From ba59b015a0145330e2bf7ab20d504bc624fd618a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 14 Nov 2019 15:10:23 +0100 Subject: drm/udl: Store active framebuffer in device structure The framebuffer's 'active_16' flag signals which framebuffer to flush to device memory. Moving the 'active_16' state from struct udl_framebuffer into struct udl_device prepares for using the generic GEM framebuffer. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-4-tzimmermann@suse.de --- drivers/gpu/drm/udl/udl_drv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/drm/udl/udl_drv.h') diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index be585e3e572d..a0946b955739 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -53,6 +53,10 @@ struct udl_device { struct usb_device *udev; struct drm_crtc *crtc; + /* active framebuffer on the 16-bit channel */ + const struct drm_framebuffer *active_fb_16; + spinlock_t active_fb_16_lock; + struct mutex gem_lock; int sku_pixel_limit; @@ -73,7 +77,6 @@ struct udl_device { struct udl_framebuffer { struct drm_framebuffer base; struct drm_gem_shmem_object *shmem; - bool active_16; /* active on the 16-bit channel */ }; #define to_udl_fb(x) container_of(x, struct udl_framebuffer, base) -- cgit v1.2.3