drm/amd/display: Add a sanity check for DSC already enabled/disabled
authorNikola Cornij <nikola.cornij@amd.com>
Wed, 16 Oct 2019 18:34:15 +0000 (14:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Nov 2019 20:29:43 +0000 (15:29 -0500)
commita5132f9728dc7c310736b83422e93e0ad563a3b6
tree9eb9272363b577cd4b33d802859a00051e08983e
parent4338ffa8df23d6665f53dd38da2e415940e3bf13
drm/amd/display: Add a sanity check for DSC already enabled/disabled

[why]
If acquire/release DSC resource sequence is affected by a regression,
it can happen that the already-in-use DSC HW block is being wrongly
re-used for a different pipe. The reverse is also possible, i.e.
already-disabled DSC HW block could be disabled from other context.

[how]
Read back the enable state of DSC HW and report an error if duplicate
enable or disable was attempted.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c