Created
August 17, 2021 03:09
-
-
Save kramerc/3c378c66add1af7d2ca3050c61177baa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes sleep bug on AMD cards including DisplayPort ports. | |
Based on https://gitlab.freedesktop.org/drm/amd/-/issues/662#note_909333 | |
Index: linux-source-5.10/drivers/gpu/drm/amd/display/dc/core/dc_link.c | |
=================================================================== | |
--- linux-source-5.10.orig/drivers/gpu/drm/amd/display/dc/core/dc_link.c | |
+++ linux-source-5.10/drivers/gpu/drm/amd/display/dc/core/dc_link.c | |
@@ -153,7 +153,7 @@ static bool program_hpd_filter(const str | |
case SIGNAL_TYPE_HDMI_TYPE_A: | |
/* Program hpd filter */ | |
delay_on_connect_in_ms = 500; | |
- delay_on_disconnect_in_ms = 100; | |
+ delay_on_disconnect_in_ms = 1200; | |
break; | |
case SIGNAL_TYPE_DISPLAY_PORT: | |
case SIGNAL_TYPE_DISPLAY_PORT_MST: | |
@@ -165,7 +165,7 @@ static bool program_hpd_filter(const str | |
* also see intermittent i2c read issues. | |
*/ | |
delay_on_connect_in_ms = 80; | |
- delay_on_disconnect_in_ms = 0; | |
+ delay_on_disconnect_in_ms = 1200; | |
break; | |
case SIGNAL_TYPE_LVDS: | |
case SIGNAL_TYPE_EDP: | |
@@ -1573,7 +1573,8 @@ static bool dc_link_construct(struct dc_ | |
* If GPIO isn't programmed correctly HPD might not rise or drain | |
* fast enough, leading to bounces. | |
*/ | |
- program_hpd_filter(link); | |
+ // program_hpd_filter(link); | |
+ dc_link_enable_hpd_filter(link, true); | |
link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED; | |
@@ -2803,7 +2804,10 @@ const struct dc_link_status *dc_link_get | |
void core_link_resume(struct dc_link *link) | |
{ | |
if (link->connector_signal != SIGNAL_TYPE_VIRTUAL) | |
- program_hpd_filter(link); | |
+ { | |
+ // program_hpd_filter(link); | |
+ dc_link_enable_hpd_filter(link, true); | |
+ } | |
} | |
static struct fixed31_32 get_pbn_per_slot(struct dc_stream_state *stream) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment