From: Daniel Vetter <daniel@ffwll.ch>
To: Simon Ser <contact@emersion.fr>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: warn if cursor plane is set with legacy funcs
Date: Tue, 22 Dec 2020 16:09:08 +0100 [thread overview]
Message-ID: <X+IMFOv0/76J2o52@phenom.ffwll.local> (raw)
In-Reply-To: <20201222134002.161613-1-contact@emersion.fr>
On Tue, Dec 22, 2020 at 02:40:02PM +0100, Simon Ser wrote:
> A driver must not set drm_crtc.cursor and any of the legacy funcs at the
> same time, otherwise it's not clear which one DRM core should use for
> legacy cursor updates.
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_mode_config.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
> index 9611f21bca00..92e56baf04ad 100644
> --- a/drivers/gpu/drm/drm_mode_config.c
> +++ b/drivers/gpu/drm/drm_mode_config.c
> @@ -645,6 +645,16 @@ void drm_mode_config_validate(struct drm_device *dev)
> WARN(!crtc->primary, "Missing primary plane on [CRTC:%d:%s]\n",
> crtc->base.id, crtc->name);
>
> + WARN(crtc->cursor && crtc->funcs->cursor_set,
> + "[CRTC:%d:%s] must not have both a cursor plane and a cursor_set func",
> + crtc->base.id, crtc->name);
> + WARN(crtc->cursor && crtc->funcs->cursor_set2,
> + "[CRTC:%d:%s] must not have both a cursor plane and a cursor_set2 func",
> + crtc->base.id, crtc->name);
> + WARN(crtc->cursor && crtc->funcs->cursor_move,
> + "[CRTC:%d:%s] must not have both a cursor plane and a cursor_move func",
> + crtc->base.id, crtc->name);
> +
> if (crtc->primary) {
> WARN(!(crtc->primary->possible_crtcs & drm_crtc_mask(crtc)),
> "Bogus primary plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n",
> --
> 2.29.2
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-12-22 15:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 13:40 [PATCH] drm: warn if cursor plane is set with legacy funcs Simon Ser
2020-12-22 15:09 ` Daniel Vetter [this message]
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=X+IMFOv0/76J2o52@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=contact@emersion.fr \
--cc=dri-devel@lists.freedesktop.org \
/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