diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:20 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:37:41 +1000 |
commit | 8a31c36cf56d2d1a9f6d91fee3b3526d7b1b9f92 (patch) | |
tree | 1d89538036a4d0f4c2ae24fc245456002cbdf3f4 /drm/nouveau/nvkm/subdev/fb/nv25.c | |
parent | 506975d83871fedcba15148630bda93c00c9a283 (diff) | |
download | nouveau-8a31c36cf56d2d1a9f6d91fee3b3526d7b1b9f92.tar.gz |
fb: convert to new-style nvkm_subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drm/nouveau/nvkm/subdev/fb/nv25.c')
-rw-r--r-- | drm/nouveau/nvkm/subdev/fb/nv25.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drm/nouveau/nvkm/subdev/fb/nv25.c b/drm/nouveau/nvkm/subdev/fb/nv25.c index 31dc7cf3a..c56746d2a 100644 --- a/drm/nouveau/nvkm/subdev/fb/nv25.c +++ b/drm/nouveau/nvkm/subdev/fb/nv25.c @@ -23,7 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#include "nv04.h" +#include "priv.h" #include "ram.h" static void @@ -42,20 +42,19 @@ nv25_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags, } } -struct nvkm_oclass * -nv25_fb_oclass = &(struct nv04_fb_impl) { - .base.base.handle = NV_SUBDEV(FB, 0x25), - .base.base.ofuncs = &(struct nvkm_ofuncs) { - .ctor = nv04_fb_ctor, - .dtor = _nvkm_fb_dtor, - .init = _nvkm_fb_init, - .fini = _nvkm_fb_fini, - }, - .base.memtype = nv04_fb_memtype_valid, - .base.ram_new = nv20_ram_new, +static const struct nvkm_fb_func +nv25_fb = { .tile.regions = 8, .tile.init = nv20_fb_tile_init, .tile.comp = nv25_fb_tile_comp, .tile.fini = nv20_fb_tile_fini, .tile.prog = nv20_fb_tile_prog, -}.base.base; + .ram_new = nv20_ram_new, + .memtype_valid = nv04_fb_memtype_valid, +}; + +int +nv25_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb) +{ + return nvkm_fb_new_(&nv25_fb, device, index, pfb); +} |