From: Daniel Vetter <daniel@ffwll.ch>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: linaro-mm-sig@lists.linaro.org, daniel.vetter@ffwll.ch,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: check that planes types are correct while initializing CRTC
Date: Tue, 17 Mar 2015 14:03:57 +0100 [thread overview]
Message-ID: <20150317130356.GF21993@phenom.ffwll.local> (raw)
In-Reply-To: <1426590329-27983-1-git-send-email-benjamin.gaignard@linaro.org>
On Tue, Mar 17, 2015 at 12:05:29PM +0100, Benjamin Gaignard wrote:
> Be warned if primary or cursor planes haven't the correct type
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Yeah that's a useful self-check to make sure universal plane conversions
are done correctly. Merged to drm-misc, thanks.
-Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 5785336..111849c4 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -659,6 +659,9 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
> struct drm_mode_config *config = &dev->mode_config;
> int ret;
>
> + WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
> + WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
> +
> crtc->dev = dev;
> crtc->funcs = funcs;
> crtc->invert_dimensions = false;
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-03-17 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 11:05 [PATCH] drm: check that planes types are correct while initializing CRTC Benjamin Gaignard
2015-03-17 13:03 ` 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=20150317130356.GF21993@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.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