]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/dpu: Require linear modifier for writeback framebuffers
authorVladimir Lypak <vladimir.lypak@gmail.com>
Fri, 17 Oct 2025 19:58:39 +0000 (19:58 +0000)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tue, 28 Oct 2025 22:20:47 +0000 (00:20 +0200)
UBWC-related register configuration for writeback is not implemented in
the driver yet but there aren't any checks for non-linear modifiers in
atomic_check. Thus when compressed framebuffer is attached to writeback
connector it will be filled with linear image data. This patch forbids
non-linear modifiers for writeback framebuffers until UBWC support for
writeback is properly implemented.

Fixes: 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/681922/
Link: https://lore.kernel.org/r/20251017-b4-dpu-fixes-v1-5-40ce5993eeb6@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c

index cd73468e369a93c50303db2a7d4499bcb17be5d1..7545c0293efbd8f7eb34a4ac56f616b7cadae1c0 100644 (file)
@@ -72,6 +72,9 @@ static int dpu_wb_conn_atomic_check(struct drm_connector *connector,
                DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
                          fb->width, dpu_wb_conn->maxlinewidth);
                return -EINVAL;
+       } else if (fb->modifier != DRM_FORMAT_MOD_LINEAR) {
+               DPU_ERROR("unsupported fb modifier:%#llx\n", fb->modifier);
+               return -EINVAL;
        }
 
        return drm_atomic_helper_check_wb_connector_state(conn_state->connector, conn_state->state);