disp: msm: sde: Ensure that dirty dsc blocks are flushed properly
When a dsc block gets disabled, it is not being
flushed properly because the kms_commit clears
the flush bits before the next vsync.
In a two commit scenario where the first commit
disables both dsc blocks within the same dsc
block pair, and where the second commit enables
only one of the dsc blocks in the pair, only the
second commit's dsc block gets flushed properly
because checks for dirty dsc blocks are currently
only happening if dsc is disabled for the
encoder. Since the first commit's disabled dsc
block was not flushed to hardware, there will be
errors such as pingpong timeouts and fifo
underruns, which can lead to distorted images on
the panel.
This problem manifests itself in suspend/resume
scenarios involving dp dsc connections which only
use one dsc block. During a suspend, the two dsc
blocks that were used by dsi are released due to
a null commit coming from userspace. While
resuming, depending on the mode, one of these
released dsc blocks will be alloted to dp,
leading to the problem described above.
CRs-Fixed: 2471336
Change-Id: Ifd71c980a04d63a87923eb0bece96646d4804533
Signed-off-by: Fuad Hossain <[email protected]>