Skip to content

Commit 5e0656b

Browse files
vldlylumag
authored andcommitted
drm/msm/dpu: Require linear modifier for writeback framebuffers
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: 71174f3 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c") Signed-off-by: Vladimir Lypak <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/681922/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 2f8bed9 commit 5e0656b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ static int dpu_wb_conn_atomic_check(struct drm_connector *connector,
7272
DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
7373
fb->width, dpu_wb_conn->maxlinewidth);
7474
return -EINVAL;
75+
} else if (fb->modifier != DRM_FORMAT_MOD_LINEAR) {
76+
DPU_ERROR("unsupported fb modifier:%#llx\n", fb->modifier);
77+
return -EINVAL;
7578
}
7679

7780
return drm_atomic_helper_check_wb_connector_state(conn_state->connector, conn_state->state);

0 commit comments

Comments
 (0)