[PATCH 06/14] drm/amd/display: Disable PSR-SU on some OLED panel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tom Chung <chiahsuan.chung@xxxxxxx>

[Why]
PSR-SU may cause some glitching randomly on some OLED panel.

[How]
Disable the PSR-SU for certain PSR-SU OLED panel.

Reviewed-by: Sun peng Li <sunpeng.li@xxxxxxx>
Signed-off-by: Tom Chung <chiahsuan.chung@xxxxxxx>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@xxxxxxx>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
index 45858bf1523d..104f03868266 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
@@ -30,6 +30,23 @@
 #include "amdgpu_dm.h"
 #include "modules/power/power_helpers.h"
 
+static bool is_specific_oled_panel(struct dc_link *link)
+{
+	if (!link->dpcd_sink_ext_caps.bits.oled)
+		return false;
+
+	/* Disable PSR-SU for some OLED panels to avoid glitches */
+	if (link->dpcd_caps.sink_dev_id == 0xBA4159) {
+		uint8_t sink_dev_id_str1[] = {'4', '0', 'C', 'U', '1'};
+
+		if (!memcmp(link->dpcd_caps.sink_dev_id_str, sink_dev_id_str1,
+		    sizeof(sink_dev_id_str1)))
+			return true;
+	}
+
+	return false;
+}
+
 static bool link_supports_psrsu(struct dc_link *link)
 {
 	struct dc *dc = link->ctx->dc;
@@ -40,6 +57,9 @@ static bool link_supports_psrsu(struct dc_link *link)
 	if (dc->ctx->dce_version < DCN_VERSION_3_1)
 		return false;
 
+	if (is_specific_oled_panel(link))
+		return false;
+
 	if (!is_psr_su_specific_panel(link))
 		return false;
 
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux