On 2/9/2022 9:25 AM, Dmitry Baryshkov wrote:
The atomic_check compares blending stage with DPU_STAGE_MAX (maximum amount of blending stages supported by the driver), however we should compare it against .max_mixer_blendstages, the maximum blend stage supported by the mixer.
Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org
This seems reasonable to me,
Reviewed-by: Abhinav Kumar quic_abhinavk@quicinc.com
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 637d164667e9..952ff11162c0 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -927,9 +927,9 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, pstate->pipe.multirect_mode = DPU_SSPP_MULTIRECT_NONE;
pstate->stage = DPU_STAGE_0 + pstate->base.normalized_zpos;
- if (pstate->stage >= DPU_STAGE_MAX) {
- if (pstate->stage >= pdpu->catalog->caps->max_mixer_blendstages) { DPU_ERROR("> %d plane stages assigned\n",
DPU_STAGE_MAX - DPU_STAGE_0);
return -EINVAL; }pdpu->catalog->caps->max_mixer_blendstages - DPU_STAGE_0);