drm/msm/dpu: Reject topologies for which no DSC blocks are available
authorMarijn Suijten <marijn.suijten@somainline.org>
Wed, 21 Dec 2022 23:19:40 +0000 (00:19 +0100)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 12 Jan 2023 19:45:17 +0000 (21:45 +0200)
commit7d9510efec33157f9994df735e035e1b18e2562b
tree3061801f75e7c3bd35868e73d0f35e4db61890a9
parent82e72fd22a8f9eff4e75c08be68319008ea90a29
drm/msm/dpu: Reject topologies for which no DSC blocks are available

Resource allocation of DSC blocks should behave more like LMs and CTLs
where NULL resources (based on initial hw_blk creation via definitions
in the catalog) are skipped ^1.  The current hardcoded mapping of DSC
blocks however means that resource allocation shouldn't succeed at all
when the DSC block on the corresponding index doesn't exist, rather than
searching for the next free block.

This hardcoded mapping should be loosened separately as DPU 5.0.0
introduced a crossbar where DSC blocks can be "somewhat" freely bound to
any PP and CTL (in proper pairs).

^1: which, on hardware that supports DSC, can happen after a git rebase
ended up moving additions to _dpu_cfg to a different struct which has
the same patch context.

Fixes: f2803ee91a41 ("drm/msm/disp/dpu1: Add DSC support in RM")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/515684/
Link: https://lore.kernel.org/r/20221221231943.1961117-6-marijn.suijten@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c