aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch
new file mode 100644
index 00000000..1e3da675
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3487-drm-amd-display-Calculate-bpc-based-on-max_requested.patch
@@ -0,0 +1,43 @@
+From a1261bed085d28247ce6977e0f94b3f7a00c3440 Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Wed, 21 Aug 2019 11:27:13 -0400
+Subject: [PATCH 3487/4256] drm/amd/display: Calculate bpc based on
+ max_requested_bpc
+
+[Why]
+The only place where state->max_bpc is updated on the connector is
+at the start of atomic check during drm_atomic_connector_check. It
+isn't updated when adding the connectors to the atomic state after
+the fact. It also doesn't necessarily reflect the right value when
+called in amdgpu during mode validation outside of atomic check.
+
+This can cause the wrong bpc to be used even if the max_requested_bpc
+is the correct value.
+
+[How]
+Don't rely on state->max_bpc reflecting the real bpc value and just
+do the min(...) based on display info bpc and max_requested_bpc.
+
+Fixes: 01933ba42d3d ("drm/amd/display: Use current connector state if NULL when checking bpc")
+Change-Id: Ic8ff6beaf00dd6c2b9dd82bc503e5c7ce281ed1b
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Reviewed-by: Leo Li <sunpeng.li@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
+index cc415ecc2c1a..48fd259cd33f 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
+@@ -58,6 +58,7 @@ const char *const *amdgpu_dm_crtc_get_crc_sources(struct drm_crtc *crtc,
+ size_t *count);
+ void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc);
+ #else
++#define amdgpu_dm_crtc_configure_crc_source NULL
+ #define amdgpu_dm_crtc_set_crc_source NULL
+ #define amdgpu_dm_crtc_verify_crc_source NULL
+ #define amdgpu_dm_crtc_get_crc_sources NULL
+--
+2.17.1
+