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 <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-4-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann
2019-11-14 15:10:23 +01:00
parent f3f8630a9a
commit ba59b015a0
4 changed files with 25 additions and 14 deletions

View File

@@ -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)