aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch
new file mode 100644
index 00000000..c750a787
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0202-drm-amd-display-fix-crash-with-modesetting-driver.patch
@@ -0,0 +1,36 @@
+From 27d1aff9314927ec08d08f25acc44859767d2291 Mon Sep 17 00:00:00 2001
+From: Harry Wentland <harry.wentland@amd.com>
+Date: Fri, 3 Feb 2017 11:45:43 -0500
+Subject: [PATCH 0202/4131] drm/amd/display: fix crash with modesetting driver
+
+They might call commit with ACTION_NOTHING without a mode.
+We shouldn't crash but simply skip updating stream scaling
+settings since scaling obviously didn't change without a
+provided mode.
+
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+index 7710e2c..2c3dcd5 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+@@ -645,6 +645,10 @@ static void update_stream_scaling_settings(
+ struct rect src = { 0 }; /* viewport in composition space*/
+ struct rect dst = { 0 }; /* stream addressable area */
+
++ /* no mode. nothing to be done */
++ if (!mode)
++ return;
++
+ /* Full screen scaling by default */
+ src.width = mode->hdisplay;
+ src.height = mode->vdisplay;
+--
+2.7.4
+