diff options
author | Swapnil Patel <swapatel@amd.com> | 2023-11-02 16:16:49 -0400 |
---|---|---|
committer | Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> | 2023-11-02 18:40:53 -0700 |
commit | 1fc12492bc3045d7e55d85f6dd559b6766a7e564 (patch) | |
tree | 16e7e897c5682d1a68b2d02db2fa0f1f8aa4567e /drivers | |
parent | bb35141a199bad4515483373822ec0e31f580641 (diff) | |
download | linux-1fc12492bc3045d7e55d85f6dd559b6766a7e564.tar.gz |
Disable modes with >1200 MHz Pixel clocks when connected via dock
(cherry picked from commit 36301114e8a32e7f13985cbbeff7282d4c599aed)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/link/link_validation.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_validation.c b/drivers/gpu/drm/amd/display/dc/link/link_validation.c index e8b2fc4002a5..3c69d860e1c9 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_validation.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_validation.c @@ -35,6 +35,8 @@ #define DC_LOGGER_INIT(logger) +static const uint8_t DP_SINK_BRANCH_DEV_NAME_KT50X0[] = "KT50X0!"; + static uint32_t get_tmds_output_pixel_clock_100hz(const struct dc_crtc_timing *timing) { @@ -277,6 +279,15 @@ static bool dp_validate_mode_timing( timing->v_addressable == (uint32_t) 480) return true; + if (link->ctx->dce_version == DCN_VERSION_3_01 && + link->dpcd_caps.sink_dev_id == DP_BRANCH_DEVICE_ID_0060AD && + memcmp(&link->dpcd_caps.branch_dev_name, + DP_SINK_BRANCH_DEV_NAME_KT50X0, + sizeof(link->dpcd_caps.branch_dev_name)) == 0) { + if (timing->pix_clk_100hz / 10 >= (uint32_t) 1200000) + return false; /* KT50X0 does not support Pxl clock >= 1200MHz */ + } + link_setting = dp_get_verified_link_cap(link); /* TODO: DYNAMIC_VALIDATION needs to be implemented */ |