diff options
author | Daniel Stone <daniels@collabora.com> | 2018-03-30 17:11:15 +0300 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2018-05-18 16:52:18 +0300 |
commit | 9d7e70020c244940dc34f19b8d2da6b3f6516946 (patch) | |
tree | ec78b9ac54a798c6a4bb4c678239273c41bf0822 /drivers/gpu/drm/cirrus/cirrus_fbdev.c | |
parent | c9b6be7dc13e2f87592ee4c9812cb450dba484d5 (diff) | |
download | linux-9d7e70020c244940dc34f19b8d2da6b3f6516946.tar.xz |
drm/cirrus: Place GEM BOs in drm_framebuffer
Since drm_framebuffer can now store GEM objects directly, place them
there rather than in our own subclass. As this makes the framebuffer
create_handle and destroy functions the same as the GEM framebuffer
helper, we can reuse those.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180330141138.28987-1-daniels@collabora.com
Diffstat (limited to 'drivers/gpu/drm/cirrus/cirrus_fbdev.c')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_fbdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index 32fbfba2c623..a74d32846958 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c @@ -29,7 +29,7 @@ static void cirrus_dirty_update(struct cirrus_fbdev *afbdev, int x2, y2; unsigned long flags; - obj = afbdev->gfb.obj; + obj = afbdev->gfb.base.obj[0]; bo = gem_to_cirrus_bo(obj); /* @@ -250,9 +250,9 @@ static int cirrus_fbdev_destroy(struct drm_device *dev, drm_fb_helper_unregister_fbi(&gfbdev->helper); - if (gfb->obj) { - drm_gem_object_put_unlocked(gfb->obj); - gfb->obj = NULL; + if (gfb->base.obj[0]) { + drm_gem_object_put_unlocked(gfb->base.obj[0]); + gfb->base.obj[0] = NULL; } vfree(gfbdev->sysram); |