All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/plane-helper: Test for plane disable earlier
Date: Wed, 10 Dec 2014 11:05:19 +0100	[thread overview]
Message-ID: <20141210100519.GJ27182@phenom.ffwll.local> (raw)
In-Reply-To: <1418154823-10819-2-git-send-email-matthew.d.roper@intel.com>

On Tue, Dec 09, 2014 at 11:53:37AM -0800, Matt Roper wrote:
> drm_plane_helper_check_update() currently uses crtc before testing whether
> we're disabling the plane (fb == NULL).  Move the fb test before the first crtc
> usage so that crtc == NULL doesn't have to be handled by the caller.
> 
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

Makes sense, but can you please resubmit with dri-devel cced?

Thanks, Daniel

> ---
>  drivers/gpu/drm/drm_plane_helper.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
> index ae61fb2..f24c4cf 100644
> --- a/drivers/gpu/drm/drm_plane_helper.c
> +++ b/drivers/gpu/drm/drm_plane_helper.c
> @@ -142,6 +142,17 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
>  {
>  	int hscale, vscale;
>  
> +	if (!fb) {
> +		*visible = false;
> +		return 0;
> +	}
> +
> +	/* crtc should only be NULL when disabling (i.e., !fb) */
> +	if (WARN_ON(!crtc)) {
> +		*visible = false;
> +		return 0;
> +	}
> +
>  	if (!crtc->enabled && !can_update_disabled) {
>  		DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n");
>  		return -EINVAL;
> @@ -155,11 +166,6 @@ int drm_plane_helper_check_update(struct drm_plane *plane,
>  		return -ERANGE;
>  	}
>  
> -	if (!fb) {
> -		*visible = false;
> -		return 0;
> -	}
> -
>  	*visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale);
>  	if (!*visible)
>  		/*
> -- 
> 1.8.5.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-12-10 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 19:53 [PATCH 0/7] i915 atomic plane helper conversion (v3) Matt Roper
2014-12-09 19:53 ` [PATCH 1/7] drm/plane-helper: Test for plane disable earlier Matt Roper
2014-12-10 10:05   ` Daniel Vetter [this message]
2014-12-11 15:20   ` Matt Roper
2014-12-11 15:57     ` [Intel-gfx] " Daniel Vetter
2014-12-09 19:53 ` [PATCH 2/7] drm/i915: Refactor work that can sleep out of commit (v3) Matt Roper
2014-12-11 23:53   ` [PATCH] drm/i915: Refactor work that can sleep out of commit (v4) Matt Roper
2014-12-12  9:06     ` Ander Conselvan de Oliveira
2014-12-13 12:23     ` shuang.he
2014-12-09 19:53 ` [PATCH 3/7] drm/i915: Move vblank evasion to commit (v3) Matt Roper
2014-12-09 19:53 ` [PATCH 4/7] drm/i915: Clarify sprite plane function names (v2) Matt Roper
2014-12-09 19:53 ` [PATCH 5/7] drm/i915: Prepare for atomic plane helpers (v6) Matt Roper
2014-12-11 23:54   ` [PATCH] drm/i915: Prepare for atomic plane helpers (v7) Matt Roper
2014-12-12 12:52     ` Ander Conselvan de Oliveira
2014-12-09 19:53 ` [PATCH 6/7] drm/i915: Switch plane handling to atomic helpers (v5) Matt Roper
2014-12-12 12:53   ` Ander Conselvan de Oliveira
2014-12-09 19:53 ` [PATCH 7/7] drm/i915: Drop unused position fields Matt Roper
2014-12-10  7:12   ` shuang.he

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=20141210100519.GJ27182@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.