From 1c0a80f160965c88f16e73ff69015db2f044c486 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Mon, 4 Dec 2023 15:13:48 +0200 Subject: Revert "drm/atomic: Loosen FB atomic checks" This reverts commit f1e75da5364e780905d9cd6043f9c74cdcf84073. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-2-dmitry.baryshkov@linaro.org --- drivers/gpu/drm/drm_atomic.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'drivers/gpu/drm/drm_atomic.c') diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index aed0a694c74c..c6f2b86c48ae 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -674,16 +674,17 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, { struct drm_plane *plane = new_plane_state->plane; struct drm_crtc *crtc = new_plane_state->crtc; + const struct drm_framebuffer *fb = new_plane_state->fb; int ret; - /* either *both* CRTC and pixel source must be set, or neither */ - if (crtc && !drm_plane_has_visible_data(new_plane_state)) { - drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no visible data\n", + /* either *both* CRTC and FB must be set, or neither */ + if (crtc && !fb) { + drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no FB\n", plane->base.id, plane->name); return -EINVAL; - } else if (drm_plane_has_visible_data(new_plane_state) && !crtc) { - drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] Source %d has visible data but no CRTC\n", - plane->base.id, plane->name, new_plane_state->pixel_source); + } else if (fb && !crtc) { + drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] FB set but no CRTC\n", + plane->base.id, plane->name); return -EINVAL; } @@ -714,11 +715,9 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, } - if (new_plane_state->pixel_source == DRM_PLANE_PIXEL_SOURCE_FB && new_plane_state->fb) { - ret = drm_atomic_plane_check_fb(new_plane_state); - if (ret) - return ret; - } + ret = drm_atomic_plane_check_fb(new_plane_state); + if (ret) + return ret; if (plane_switching_crtc(old_plane_state, new_plane_state)) { drm_dbg_atomic(plane->dev, -- cgit v1.2.3