]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/nouveau/fb: allow chipset-specific actions for oneinit()
authorBen Skeggs <bskeggs@redhat.com>
Thu, 14 Apr 2016 00:38:55 +0000 (10:38 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 20 May 2016 04:43:04 +0000 (14:43 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h

index 9ee5872585575dbcb0304f82df4e5619cd487d71..f1a1a52aab127b2e15ebfcaba7f9a663910e2ba8 100644 (file)
@@ -98,6 +98,7 @@ static int
 nvkm_fb_oneinit(struct nvkm_subdev *subdev)
 {
        struct nvkm_fb *fb = nvkm_fb(subdev);
+
        if (fb->func->ram_new) {
                int ret = fb->func->ram_new(fb, &fb->ram);
                if (ret) {
@@ -105,6 +106,13 @@ nvkm_fb_oneinit(struct nvkm_subdev *subdev)
                        return ret;
                }
        }
+
+       if (fb->func->oneinit) {
+               int ret = fb->func->oneinit(fb);
+               if (ret)
+                       return ret;
+       }
+
        return 0;
 }
 
index 62b9feb531dc1d5a7d47bf9c7216c43b61739ba4..3c5600cd8ef44cc468ee197a940c1714ad3407d1 100644 (file)
@@ -6,6 +6,7 @@ struct nvkm_bios;
 
 struct nvkm_fb_func {
        void *(*dtor)(struct nvkm_fb *);
+       int (*oneinit)(struct nvkm_fb *);
        void (*init)(struct nvkm_fb *);
        void (*intr)(struct nvkm_fb *);