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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user