All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Reject fence stride=0 on gen4+
Date: Tue, 9 Apr 2013 19:32:50 +0200	[thread overview]
Message-ID: <20130409173250.GD27612@phenom.ffwll.local> (raw)
In-Reply-To: <1365527353-30602-1-git-send-email-ville.syrjala@linux.intel.com>

On Tue, Apr 09, 2013 at 08:09:13PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Our checks for an invalid fence stride forgot to guard against
> zero stride on gen4+. Fix it.
> 
> v2: Avoid duplicated code (danvet)
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
>  drivers/gpu/drm/i915/i915_gem_tiling.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index 139d17d..537545b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -238,6 +238,9 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
>  		}
>  	}
>  
> +	if (stride < tile_width)
> +		return false;
> +
>  	/* 965+ just needs multiples of tile width */
>  	if (INTEL_INFO(dev)->gen >= 4) {
>  		if (stride & (tile_width - 1))
> @@ -246,9 +249,6 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
>  	}
>  
>  	/* Pre-965 needs power of two tile widths */
> -	if (stride < tile_width)
> -		return false;
> -
>  	if (stride & (stride - 1))
>  		return false;
>  
> -- 
> 1.8.1.5
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-04-09 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 14:46 [PATCH] drm/i915: Reject fence stride=0 on gen4+ ville.syrjala
2013-04-09 15:01 ` Daniel Vetter
2013-04-09 15:08   ` Ville Syrjälä
2013-04-09 17:09   ` [PATCH v2] " ville.syrjala
2013-04-09 17:32     ` 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=20130409173250.GD27612@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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 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.