Skip to content

Commit c31b41f

Browse files
Tom Chungalexdeucher
authored andcommitted
drm/amd/display: Disable PSR-SU on some OLED panel
[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@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 36681f1 commit c31b41f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@
3030
#include "amdgpu_dm.h"
3131
#include "modules/power/power_helpers.h"
3232

33+
static bool is_specific_oled_panel(struct dc_link *link)
34+
{
35+
if (!link->dpcd_sink_ext_caps.bits.oled)
36+
return false;
37+
38+
/* Disable PSR-SU for some OLED panels to avoid glitches */
39+
if (link->dpcd_caps.sink_dev_id == 0xBA4159) {
40+
uint8_t sink_dev_id_str1[] = {'4', '0', 'C', 'U', '1'};
41+
42+
if (!memcmp(link->dpcd_caps.sink_dev_id_str, sink_dev_id_str1,
43+
sizeof(sink_dev_id_str1)))
44+
return true;
45+
}
46+
47+
return false;
48+
}
49+
3350
static bool link_supports_psrsu(struct dc_link *link)
3451
{
3552
struct dc *dc = link->ctx->dc;
@@ -40,6 +57,9 @@ static bool link_supports_psrsu(struct dc_link *link)
4057
if (dc->ctx->dce_version < DCN_VERSION_3_1)
4158
return false;
4259

60+
if (is_specific_oled_panel(link))
61+
return false;
62+
4363
if (!is_psr_su_specific_panel(link))
4464
return false;
4565

0 commit comments

Comments
 (0)