From 5aa8d0564cad4a8d609df1a4d2ac12de4bf7fee5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 16 May 2022 10:36:11 +0200 Subject: [PATCH] 4.14-stable patches added patches: drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch --- ...m-vmwgfx-initialize-drm_mode_fb_cmd2.patch | 40 +++++++++++++++++++ queue-4.14/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-4.14/drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch diff --git a/queue-4.14/drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch b/queue-4.14/drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch new file mode 100644 index 00000000000..20289c99059 --- /dev/null +++ b/queue-4.14/drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch @@ -0,0 +1,40 @@ +From 3059d9b9f6aa433a55b9d0d21b566396d5497c33 Mon Sep 17 00:00:00 2001 +From: Zack Rusin +Date: Wed, 2 Mar 2022 10:24:24 -0500 +Subject: drm/vmwgfx: Initialize drm_mode_fb_cmd2 + +From: Zack Rusin + +commit 3059d9b9f6aa433a55b9d0d21b566396d5497c33 upstream. + +Transition to drm_mode_fb_cmd2 from drm_mode_fb_cmd left the structure +unitialized. drm_mode_fb_cmd2 adds a few additional members, e.g. flags +and modifiers which were never initialized. Garbage in those members +can cause random failures during the bringup of the fbcon. + +Initializing the structure fixes random blank screens after bootup due +to flags/modifiers mismatches during the fbcon bring up. + +Fixes: dabdcdc9822a ("drm/vmwgfx: Switch to mode_cmd2") +Signed-off-by: Zack Rusin +Cc: Daniel Vetter +Cc: # v4.10+ +Reviewed-by: Martin Krastev +Reviewed-by: Maaz Mombasawala +Link: https://patchwork.freedesktop.org/patch/msgid/20220302152426.885214-7-zack@kde.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +@@ -522,7 +522,7 @@ static int vmw_fb_kms_detach(struct vmw_ + + static int vmw_fb_kms_framebuffer(struct fb_info *info) + { +- struct drm_mode_fb_cmd2 mode_cmd; ++ struct drm_mode_fb_cmd2 mode_cmd = {0}; + struct vmw_fb_par *par = info->par; + struct fb_var_screeninfo *var = &info->var; + struct drm_framebuffer *cur_fb; diff --git a/queue-4.14/series b/queue-4.14/series index 7a4c792ff32..f8f682b3a28 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -20,3 +20,4 @@ usb-serial-qcserial-add-support-for-sierra-wireless-em7590.patch usb-serial-option-add-fibocom-l610-modem.patch usb-serial-option-add-fibocom-ma510-modem.patch cgroup-cpuset-remove-cpus_allowed-mems_allowed-setup-in-cpuset_init_smp.patch +drm-vmwgfx-initialize-drm_mode_fb_cmd2.patch -- 2.47.3