]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: relax YUV requirements
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 26 Jun 2024 21:45:56 +0000 (00:45 +0300)
committerAbhinav Kumar <quic_abhinavk@quicinc.com>
Mon, 5 Aug 2024 20:55:57 +0000 (13:55 -0700)
YUV formats require only CSC to be enabled. Even decimated formats
should not require scaler. Relax the requirement and don't check for the
scaler block while checking if YUV format can be enabled.

Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/601049/
Link: https://lore.kernel.org/r/20240627-dpu-virtual-wide-v5-2-5efb90cbb8be@linaro.org
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

index a62ac0c0c06a424dc71ad24c8595dabf0df23413..dc1fd95e767bb5fcf3298f4d8ebcdedea9e52f2b 100644 (file)
@@ -747,10 +747,9 @@ static int dpu_plane_atomic_check_pipe(struct dpu_plane *pdpu,
        min_src_size = MSM_FORMAT_IS_YUV(fmt) ? 2 : 1;
 
        if (MSM_FORMAT_IS_YUV(fmt) &&
-           (!pipe->sspp->cap->sblk->scaler_blk.len ||
-            !pipe->sspp->cap->sblk->csc_blk.len)) {
+           !pipe->sspp->cap->sblk->csc_blk.len) {
                DPU_DEBUG_PLANE(pdpu,
-                               "plane doesn't have scaler/csc for yuv\n");
+                               "plane doesn't have csc for yuv\n");
                return -EINVAL;
        }