summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-11-04 17:20:36 +1000
committerBen Skeggs <bskeggs@redhat.com>2016-11-07 14:05:02 +1000
commitf00f0e218b5d6347f28c0f2d80ee46c45b28f3c3 (patch)
tree7ef27757704bb869f2e0838bebdcc7a337f41feb /drivers/gpu/drm/nouveau/nouveau_display.c
parente1ef6b42d9014079e5ab71acd8669d39808c3c73 (diff)
downloadlinux-stable-f00f0e218b5d6347f28c0f2d80ee46c45b28f3c3.tar.gz
linux-stable-f00f0e218b5d6347f28c0f2d80ee46c45b28f3c3.tar.bz2
linux-stable-f00f0e218b5d6347f28c0f2d80ee46c45b28f3c3.zip
drm/nouveau/kms/nv50: remove code to create ctxdma for every framebuffer
This is now handled by prepare_fb(). Legacy flips were the last user. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 62d75308c57c..75c90a8da18a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -223,10 +223,6 @@ static void
nouveau_user_framebuffer_destroy(struct drm_framebuffer *drm_fb)
{
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
- struct nouveau_display *disp = nouveau_display(drm_fb->dev);
-
- if (disp->fb_dtor)
- disp->fb_dtor(drm_fb);
if (fb->nvbo)
drm_gem_object_unreference_unlocked(&fb->nvbo->gem);
@@ -256,27 +252,18 @@ nouveau_framebuffer_new(struct drm_device *dev,
struct nouveau_bo *nvbo,
struct nouveau_framebuffer **pfb)
{
- struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_framebuffer *fb;
int ret;
- if (!(fb = kzalloc(sizeof(*fb), GFP_KERNEL)))
+ if (!(fb = *pfb = kzalloc(sizeof(*fb), GFP_KERNEL)))
return -ENOMEM;
drm_helper_mode_fill_fb_struct(&fb->base, mode_cmd);
fb->nvbo = nvbo;
ret = drm_framebuffer_init(dev, &fb->base, &nouveau_framebuffer_funcs);
- if (ret == 0) {
- if (!disp->fb_ctor || !(ret = disp->fb_ctor(&fb->base))) {
- *pfb = fb;
- return 0;
- }
- disp->fb_dtor(&fb->base);
- drm_framebuffer_cleanup(&fb->base);
- }
-
- kfree(fb);
+ if (ret)
+ kfree(fb);
return ret;
}