From 7433914efd584b22bb49d3e1eee001f5d0525ecd Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Wed, 25 Jul 2018 15:41:56 +0200 Subject: udlfb: allow reallocating the framebuffer This patch changes udlfb so that it may reallocate the framebuffer when setting higher-resolution mode. If we boot the system without monitor attached, udlfb creates a framebuffer with the size 800x600. This patch makes it possible to select higher videomode with the fbset command when a monitor is attached. Note that there is no reliable way to prevent the system from touching the old framebuffer, so we must not free it. We add it to the list dlfb->deferred_free and free it when the driver is unloaded. Signed-off-by: Mikulas Patocka [b.zolnierkie: sparse fixes] Signed-off-by: Bartlomiej Zolnierkiewicz --- include/video/udlfb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/video') diff --git a/include/video/udlfb.h b/include/video/udlfb.h index 6e1a2e790b1b..3abd327bada6 100644 --- a/include/video/udlfb.h +++ b/include/video/udlfb.h @@ -58,6 +58,7 @@ struct dlfb_data { atomic_t bytes_sent; /* to usb, after compression including overhead */ atomic_t cpu_kcycles_used; /* transpired during pixel processing */ struct fb_var_screeninfo current_mode; + struct list_head deferred_free; }; #define NR_USB_REQUEST_I2C_SUB_IO 0x02 -- cgit v1.2.3