Skip to content

Commit cc2d7bc

Browse files
Agustin GutierrezSasha Levin
authored andcommitted
drm/amd/display: Fix DSC-re-computing
[ Upstream commit b9b5a82 ] [Why] This fixes a bug introduced by commit c536555 ("drm/amd/display: dsc mst re-compute pbn for changes on hub"). The change caused light-up issues with a second display that required DSC on some MST docks. [How] Use Virtual DPCD for DSC caps in MST case. [Limitations] This change only affects MST DSC devices that follow specifications additional changes are required to check for old MST DSC devices such as ones which do not check for Virtual DPCD registers. Reviewed-by: Swapnil Patel <swapnil.patel@amd.com> Reviewed-by: Hersen Wu <hersenxs.wu@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Agustin Gutierrez <agustin.gutierrez@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Stable-dep-of: 4641169 ("drm/amd/display: Fix incorrect DSC recompute trigger") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a30cd70 commit cc2d7bc

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,10 +1219,6 @@ static bool is_dsc_need_re_compute(
12191219
if (dc_link->type != dc_connection_mst_branch)
12201220
return false;
12211221

1222-
if (!(dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT ||
1223-
dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
1224-
return false;
1225-
12261222
for (i = 0; i < MAX_PIPES; i++)
12271223
stream_on_link[i] = NULL;
12281224

@@ -1240,7 +1236,19 @@ static bool is_dsc_need_re_compute(
12401236
continue;
12411237

12421238
aconnector = (struct amdgpu_dm_connector *) stream->dm_stream_context;
1243-
if (!aconnector)
1239+
if (!aconnector || !aconnector->dsc_aux)
1240+
continue;
1241+
1242+
/*
1243+
* Check if cached virtual MST DSC caps are available and DSC is supported
1244+
* this change takes care of newer MST DSC capable devices that report their
1245+
* DPCD caps as per specifications in their Virtual DPCD registers.
1246+
1247+
* TODO: implement the check for older MST DSC devices that do not conform to
1248+
* specifications.
1249+
*/
1250+
if (!(aconnector->dc_sink->dsc_caps.dsc_dec_caps.is_dsc_supported ||
1251+
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
12441252
continue;
12451253

12461254
stream_on_link[new_stream_on_link_num] = aconnector;

0 commit comments

Comments
 (0)