summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangzhi Zuo <Jerry.Zuo@amd.com>2024-12-02 13:30:37 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 10:04:48 +0100
commitb79eaf9b86a8789f15a2ed05c6ffe2b4e5e35aea (patch)
tree193184dbb3fd226bd1a5098d36ebd39e461557c9
parent1eec554f898b666386c4860adae0acbcbf9eaf32 (diff)
downloadlinux-b79eaf9b86a8789f15a2ed05c6ffe2b4e5e35aea.tar.gz
linux-b79eaf9b86a8789f15a2ed05c6ffe2b4e5e35aea.tar.bz2
linux-b79eaf9b86a8789f15a2ed05c6ffe2b4e5e35aea.zip
drm/amd/display: Fix Mode Cutoff in DSC Passthrough to DP2.1 Monitor
[ Upstream commit e56ad45e991128bf4db160b75a1d9f647a341d8f ] Source --> DP2.1 MST hub --> DP1.4/2.1 monitor When change from DP1.4 to DP2.1 from monitor manual, modes higher than 4k120 are all cutoff by mode validation. Switch back to DP1.4 gets all the modes up to 4k240 available to be enabled by dsc passthrough. [why] Compared to DP1.4 link from hub to monitor, DP2.1 link has larger full_pbn value that causes overflow in the process of doing conversion from pbn to kbps. [how] Change the data type accordingly to fit into the data limit during conversion calculation. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 754dbc544f03..5bdf44c69218 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -1691,16 +1691,16 @@ clean_exit:
return ret;
}
-static unsigned int kbps_from_pbn(unsigned int pbn)
+static uint32_t kbps_from_pbn(unsigned int pbn)
{
- unsigned int kbps = pbn;
+ uint64_t kbps = (uint64_t)pbn;
kbps *= (1000000 / PEAK_FACTOR_X1000);
kbps *= 8;
kbps *= 54;
kbps /= 64;
- return kbps;
+ return (uint32_t)kbps;
}
static bool is_dsc_common_config_possible(struct dc_stream_state *stream,