diff options
Diffstat (limited to 'sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch')
-rw-r--r-- | sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch deleted file mode 100644 index 631e709d..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 965421096770bb0d69444950c1f839e8e5504da5 Mon Sep 17 00:00:00 2001 -From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> -Date: Tue, 15 Dec 2020 10:45:05 -0500 -Subject: [PATCH] drm/amd/display: Add get_dig_frontend implementation for DCEx - -Some old ASICs might not implement/require get_dig_frontend helper; in -this scenario, we can have a NULL pointer exception when we try to call -it inside vbios disable operation. For example, this situation might -happen when using Polaris12 with an eDP panel. This commit avoids this -situation by adding a specific get_dig_frontend implementation for DCEx. - -Cc: Alex Deucher <alexander.deucher@amd.com> -Cc: Borislav Petkov <bp@alien8.de> -Cc: Harry Wentland <Harry.Wentland@amd.com> -Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> -Cc: Chiawen Huang <chiawen.huang@amd.com> -Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> -Signed-off-by: Alex Deucher <alexander.deucher@amd.com> ---- - .../drm/amd/display/dc/dce/dce_link_encoder.c | 45 ++++++++++++++++++- - .../drm/amd/display/dc/dce/dce_link_encoder.h | 2 + - 2 files changed, 45 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -index b409f6b2bfd8..f355cd1e9090 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c -@@ -119,7 +119,8 @@ static const struct link_encoder_funcs dce110_lnk_enc_funcs = { - .disable_hpd = dce110_link_encoder_disable_hpd, - .is_dig_enabled = dce110_is_dig_enabled, - .destroy = dce110_link_encoder_destroy, -- .get_max_link_cap = dce110_link_encoder_get_max_link_cap -+ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, -+ .get_dig_frontend = dce110_get_dig_frontend, - }; - - static enum bp_result link_transmitter_control( -@@ -235,6 +236,45 @@ static void set_link_training_complete( - - } - -+unsigned int dce110_get_dig_frontend(struct link_encoder *enc) -+{ -+ struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc); -+ u32 value; -+ enum engine_id result; -+ -+ REG_GET(DIG_BE_CNTL, DIG_FE_SOURCE_SELECT, &value); -+ -+ switch (value) { -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGA: -+ result = ENGINE_ID_DIGA; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGB: -+ result = ENGINE_ID_DIGB; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGC: -+ result = ENGINE_ID_DIGC; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGD: -+ result = ENGINE_ID_DIGD; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGE: -+ result = ENGINE_ID_DIGE; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGF: -+ result = ENGINE_ID_DIGF; -+ break; -+ case DCE110_DIG_FE_SOURCE_SELECT_DIGG: -+ result = ENGINE_ID_DIGG; -+ break; -+ default: -+ // invalid source select DIG -+ ASSERT(false); -+ result = ENGINE_ID_UNKNOWN; -+ } -+ -+ return result; -+} -+ - void dce110_link_encoder_set_dp_phy_pattern_training_pattern( - struct link_encoder *enc, - uint32_t index) -@@ -1665,7 +1705,8 @@ static const struct link_encoder_funcs dce60_lnk_enc_funcs = { - .disable_hpd = dce110_link_encoder_disable_hpd, - .is_dig_enabled = dce110_is_dig_enabled, - .destroy = dce110_link_encoder_destroy, -- .get_max_link_cap = dce110_link_encoder_get_max_link_cap -+ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, -+ .get_dig_frontend = dce110_get_dig_frontend - }; - - void dce60_link_encoder_construct( -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -index cb714a48b171..fc6ade824c23 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h -@@ -295,6 +295,8 @@ void dce110_link_encoder_connect_dig_be_to_fe( - enum engine_id engine, - bool connect); - -+unsigned int dce110_get_dig_frontend(struct link_encoder *enc); -+ - void dce110_link_encoder_set_dp_phy_pattern_training_pattern( - struct link_encoder *enc, - uint32_t index); --- -2.25.4 - |