aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgustin Gutierrez <[email protected]>2024-04-19 13:53:52 -0400
committerAlex Deucher <[email protected]>2024-05-08 15:14:58 -0400
commitb9b5a82c532109a09f4340ef5cabdfdbb0691a9d (patch)
tree50c24e3ea3c52a26d663c1f3e09d833bf59fda9d
parentd2f751722ac6be34856a7f69595deed6216724af (diff)
drm/amd/display: Fix DSC-re-computing
[Why] This fixes a bug introduced by commit c53655545141 ("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 <[email protected]> Reviewed-by: Hersen Wu <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Agustin Gutierrez <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c18
1 files changed, 13 insertions, 5 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 9469cc831597..5542e7d63b81 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
@@ -1209,10 +1209,6 @@ static bool is_dsc_need_re_compute(
if (dc_link->type != dc_connection_mst_branch)
return false;
- if (!(dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT ||
- dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
- return false;
-
for (i = 0; i < MAX_PIPES; i++)
stream_on_link[i] = NULL;
@@ -1230,7 +1226,19 @@ static bool is_dsc_need_re_compute(
continue;
aconnector = (struct amdgpu_dm_connector *) stream->dm_stream_context;
- if (!aconnector)
+ if (!aconnector || !aconnector->dsc_aux)
+ continue;
+
+ /*
+ * Check if cached virtual MST DSC caps are available and DSC is supported
+ * this change takes care of newer MST DSC capable devices that report their
+ * DPCD caps as per specifications in their Virtual DPCD registers.
+
+ * TODO: implement the check for older MST DSC devices that do not conform to
+ * specifications.
+ */
+ if (!(aconnector->dc_sink->dsc_caps.dsc_dec_caps.is_dsc_supported ||
+ aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
continue;
stream_on_link[new_stream_on_link_num] = aconnector;