OSDN Git Service

drm/amd/display: Add dsc pre-validation in atomic check
authorRoman Li <Roman.Li@amd.com>
Fri, 28 Jan 2022 17:29:01 +0000 (12:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Feb 2022 22:30:02 +0000 (17:30 -0500)
commit17ce8a6907f77b7ac97ddaa071d8a1f6e06ce85b
tree06c9476f09b51fdc338aebea08c9f5c7fe4b9d7d
parentaa79d3808e8cf1f5fd0f1c20c2e6a6865b5b940c
drm/amd/display: Add dsc pre-validation in atomic check

[Why]
The previous change:
"Add affected crtcs to atomic state for dsc mst unplug"
forces modeset on all added crctc regardless whether timing changed or not.
Per our implementation of dsc we need modeset only if timing changed.
Otherwise dsc can be programmed incorrectly leading to dsc engine hang.

[How]
During atomic_check pre-compute dsc params.
Only set mode_changed if timing is changed.

Reviewed-by: Hersen Wu <hersenwu@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h
drivers/gpu/drm/amd/display/dc/core/dc_resource.c