aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch
new file mode 100644
index 00000000..6a13e345
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5040-drm-amd-display-Use-requested-HDMI-aspect-ratio.patch
@@ -0,0 +1,47 @@
+From b9cd07d32e0714925d670cbf2b8c1f5e8d5f323e Mon Sep 17 00:00:00 2001
+From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
+Date: Thu, 19 Jul 2018 08:22:16 -0400
+Subject: [PATCH 5040/5725] drm/amd/display: Use requested HDMI aspect ratio
+
+[Why]
+The DRM mode's HDMI picture aspect ratio field was never saved in
+dc_stream's timing struct. This causes us to mistake a new stream to
+have the same timings as the old, even though the user has requested a
+different aspect ratio.
+
+[How]
+Save DRM's aspect ratio field within dc_stream's timing struct.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107153
+Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
+Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index c5c59cb..685b2fea 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -2300,13 +2300,8 @@ convert_color_depth_from_display_info(const struct drm_connector *connector)
+ static enum dc_aspect_ratio
+ get_aspect_ratio(const struct drm_display_mode *mode_in)
+ {
+- int32_t width = mode_in->crtc_hdisplay * 9;
+- int32_t height = mode_in->crtc_vdisplay * 16;
+-
+- if ((width - height) < 10 && (width - height) > -10)
+- return ASPECT_RATIO_16_9;
+- else
+- return ASPECT_RATIO_4_3;
++ /* 1-1 mapping, since both enums follow the HDMI spec. */
++ return (enum dc_aspect_ratio) mode_in->picture_aspect_ratio;
+ }
+
+ static enum dc_color_space
+--
+2.7.4
+