drm/amd/display: Recalculate VCPI slots for new DSC connectors
authorMikita Lipski <mikita.lipski@amd.com>
Tue, 12 Nov 2019 19:52:14 +0000 (14:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Jan 2020 23:07:47 +0000 (18:07 -0500)
commit29b9ba74f6384a81594e479b3f1750868c72f356
tree7f03a02ee24dea48b0d7754fbf83b85c084eaf61
parent34d95c3d5f687e4de8266bcdceb8b4694fe7105a
drm/amd/display: Recalculate VCPI slots for new DSC connectors

[why]
Since for DSC MST connector's PBN is claculated differently
due to compression, we have to recalculate both PBN and
VCPI slots for that connector.

[how]
The function iterates through all the active streams to
find, which have DSC enabled, then recalculates PBN for
it and calls drm_dp_helper_update_vcpi_slots_for_dsc to
update connector's VCPI slots.

v2: - use drm_dp_mst_atomic_enable_dsc per port to
enable/disable DSC

v3: - Iterate through connector states from the state passed
    - On each connector state get stream from dc_state,
instead CRTC state

Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c