drm/amd/display: Skip Invalid Streams from DSC Policy
BugLink: https://bugs.launchpad.net/bugs/2101915 [ Upstream commit 9afeda04964281e9f708b92c2a9c4f8a1387b46e ] Streams with invalid new connector state should be elimiated from dsc policy. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org> [koichiroden: adjusted context due to missing commit: 3715112c1b35 ("drm/amd/display: Add DSC Debug Log")] Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
8710b689ff
commit
79a4ab47c5
@@ -1100,6 +1100,7 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
|
||||
int i, k, ret;
|
||||
bool debugfs_overwrite = false;
|
||||
uint16_t fec_overhead_multiplier_x1000 = get_fec_overhead_multiplier(dc_link);
|
||||
struct drm_connector_state *new_conn_state;
|
||||
|
||||
memset(params, 0, sizeof(params));
|
||||
|
||||
@@ -1122,6 +1123,14 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
|
||||
if (!aconnector->mst_output_port)
|
||||
continue;
|
||||
|
||||
new_conn_state = drm_atomic_get_new_connector_state(state, &aconnector->base);
|
||||
|
||||
if (!new_conn_state) {
|
||||
DRM_DEBUG_DRIVER("%s:%d MST_DSC Skip the stream 0x%p with invalid new_conn_state\n",
|
||||
__func__, __LINE__, stream);
|
||||
continue;
|
||||
}
|
||||
|
||||
stream->timing.flags.DSC = 0;
|
||||
|
||||
params[count].timing = &stream->timing;
|
||||
@@ -1151,6 +1160,8 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
|
||||
count++;
|
||||
}
|
||||
|
||||
DRM_DEBUG_DRIVER("%s: MST_DSC Params set up for %d streams\n", __func__, count);
|
||||
|
||||
if (count == 0) {
|
||||
ASSERT(0);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user