From: Stefan Agner <stefan@agner.ch>
To: marex@denx.de, stefan@agner.ch,
laurent.pinchart@ideasonboard.com, daniel@ffwll.ch
Cc: airlied@linux.ie, tomi.valkeinen@ti.com, dri-devel@lists.freedesktop.org
Subject: [RFC PATCH 3/3] drm: mxsfb: enforce framebuffer size matches plane size
Date: Thu, 10 Sep 2020 11:24:25 +0200 [thread overview]
Message-ID: <20200910092425.1016976-3-stefan@agner.ch> (raw)
In-Reply-To: <20200910092425.1016976-1-stefan@agner.ch>
The plane size must match the CRTC already (enforced by not setting
the CAN_POSTION flag). However, the controller also requires the
framebuffer to be exactly the CRTC size. Make use of the new flag
DRM_PLANE_REQUIRE_MATCHING_FB to match the plane size.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index c24ef330718e..7091da1c73cc 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -410,7 +410,8 @@ static int mxsfb_plane_atomic_check(struct drm_plane *plane,
return drm_atomic_helper_check_plane_state(plane_state, crtc_state,
DRM_PLANE_HELPER_NO_SCALING,
DRM_PLANE_HELPER_NO_SCALING,
- DRM_PLANE_CAN_UPDATE_DISABLED);
+ DRM_PLANE_CAN_UPDATE_DISABLED |
+ DRM_PLANE_REQUIRE_MATCHING_FB);
}
static void mxsfb_plane_primary_atomic_update(struct drm_plane *plane,
--
2.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-09-10 9:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 9:24 [RFC PATCH 1/3] drm: use flags instead of boolean in plane check Stefan Agner
2020-09-10 9:24 ` [RFC PATCH 2/3] drm/atomic-helper: add REQUIRE_MATCHING_FB flag Stefan Agner
2020-09-11 8:52 ` Daniel Vetter
2020-09-16 10:44 ` Stefan Agner
2020-09-11 11:59 ` Ville Syrjälä
2020-09-16 10:49 ` Stefan Agner
2020-09-10 9:24 ` Stefan Agner [this message]
2020-09-11 8:50 ` [RFC PATCH 1/3] drm: use flags instead of boolean in plane check Daniel Vetter
2020-09-16 10:31 ` Stefan Agner
2020-09-16 11:26 ` Daniel Vetter
2020-09-15 22:58 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200910092425.1016976-3-stefan@agner.ch \
--to=stefan@agner.ch \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=marex@denx.de \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox