drm/msm/dpu: Allow configuring multiple active DSC blocks
authorMarijn Suijten <marijn.suijten@somainline.org>
Tue, 16 Apr 2024 23:57:44 +0000 (01:57 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 22 Apr 2024 13:22:50 +0000 (16:22 +0300)
commitca97fa419dfe62a384fdea8b33553c4d6afe034e
tree9707a918c822ba85ab1d5bd38503c526afca24a2
parent2b938c3ab0a69ec6ea587bbf6fc2aec3db4a8736
drm/msm/dpu: Allow configuring multiple active DSC blocks

Just like the active interface and writeback block in ctl_intf_cfg_v1(),
and later the rest of the blocks in followup active-CTL fixes or
reworks, multiple calls to this function should enable additional DSC
blocks instead of overwriting the blocks that are enabled.

This pattern is observed in an active-CTL scenario since DPU 5.0.0 where
for example bonded-DSI uses a single CTL to drive multiple INTFs, and
each encoder calls this function individually with the INTF (hence the
pre-existing update instead of overwrite of this bitmask) and DSC blocks
it wishes to be enabled, and expects them to be OR'd into the bitmask.

The reverse already exists in reset_intf_cfg_v1() where only specified
DSC blocks are removed out of the CTL_DSC_ACTIVE bitmask (same for all
other blocks and ACTIVE bitmasks), leaving the rest enabled.

Fixes: 77f6da90487c ("drm/msm/disp/dpu1: Add DSC support in hw_ctl")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/589902/
Link: https://lore.kernel.org/r/20240417-drm-msm-initial-dualpipe-dsc-fixes-v1-4-78ae3ee9a697@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c