dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/atomic: Remove WARN_ON for invalid plane configuration.
Date: Tue, 30 Jan 2018 10:21:12 -0500	[thread overview]
Message-ID: <05002f19-436e-d88f-afa8-5e4129c8fb0f@amd.com> (raw)
In-Reply-To: <20180130102704.28016-1-maarten.lankhorst@linux.intel.com>

On 2018-01-30 05:27 AM, Maarten Lankhorst wrote:
> Userspace can set a FB_ID on a plane without setting CRTC_ID, which
> will fail with -EINVAL, but the kernel shouldn't warn about that.
> 
> Same for !FB_ID and CRTC_ID being set.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_atomic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 51a848c553b9..7d9ad20040a1 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -863,10 +863,10 @@ static int drm_atomic_plane_check(struct drm_plane *plane,
>  	int ret;
>  
>  	/* either *both* CRTC and FB must be set, or neither */
> -	if (WARN_ON(state->crtc && !state->fb)) {
> +	if (state->crtc && !state->fb) {
>  		DRM_DEBUG_ATOMIC("CRTC set but no FB\n");
>  		return -EINVAL;
> -	} else if (WARN_ON(state->fb && !state->crtc)) {
> +	} else if (state->fb && !state->crtc) {
>  		DRM_DEBUG_ATOMIC("FB set but no CRTC\n");
>  		return -EINVAL;
>  	}
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-01-30 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 10:27 [PATCH] drm/atomic: Remove WARN_ON for invalid plane configuration Maarten Lankhorst
2018-01-30 15:21 ` Harry Wentland [this message]
2018-01-30 15:45   ` Maarten Lankhorst

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=05002f19-436e-d88f-afa8-5e4129c8fb0f@amd.com \
    --to=harry.wentland@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.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