All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: "Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [PATCH 07/10] drm/i915: Align GGTT sizes to a fence tile row
Date: Mon, 09 Jan 2017 15:21:43 +0200	[thread overview]
Message-ID: <1483968103.4882.27.camel@linux.intel.com> (raw)
In-Reply-To: <20170106152551.15422-7-chris@chris-wilson.co.uk>

On pe, 2017-01-06 at 15:25 +0000, Chris Wilson wrote:
> Ensure the view occupies the full tile row so that reads/writes into the
> VMA do not escape (via fenced detiling) into neighbouring objects - we
> will pad the object with scratch pages to satisfy the fence. This
> applies the lazy-tiling we employed on gen2/3 to gen4+.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

>  u64 i915_gem_get_ggtt_size(struct drm_i915_private *dev_priv,
> -			   u64 size, int tiling_mode)
> +			   u64 size, int tiling_mode, unsigned int stride)
>  {
>  	u64 ggtt_size;
>  
> -	GEM_BUG_ON(size == 0);
> +	GEM_BUG_ON(!size);
>  
> -	if (INTEL_GEN(dev_priv) >= 4 ||
> -	    tiling_mode == I915_TILING_NONE)
> +	if (tiling_mode == I915_TILING_NONE)
>  		return size;
>  
> +	GEM_BUG_ON(!stride);
> +
> +	if (INTEL_GEN(dev_priv) >= 4) {
> +		stride *= tiling_mode == I915_TILING_Y ? 32 : 8;

(Split from tile_row_pages and) use tile_row_size() here? I915_TILING_Y
? 32 : 8 should really be in one place.

> +		GEM_BUG_ON(stride & 4095);

~PAGE_MASK? Or even (4096 - 1) is better, so that it gets caught when
converting to non-hardcoded page sizes. CC'ing Matt.

> +		return roundup(size, stride);
> +	}
> +
>  	/* Previous chips need a power-of-two fence region when tiling */
>  	if (IS_GEN3(dev_priv))
>  		ggtt_size = 1024*1024;

Other than that,

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-09 13:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 15:25 [PATCH 01/10] drm/i915: Pack the partial view size and offset into a single u64 Chris Wilson
2017-01-06 15:25 ` [PATCH 02/10] drm/i915: Convert i915_ggtt_view to use an anonymous union Chris Wilson
2017-01-06 15:43   ` Tvrtko Ursulin
2017-01-06 15:25 ` [PATCH 03/10] drm/i915: Eliminate superfluous i915_ggtt_view_rotated Chris Wilson
2017-01-06 15:25 ` [PATCH 04/10] drm/i915: Eliminate superfluous i915_ggtt_view_normal Chris Wilson
2017-01-06 15:25 ` [PATCH 05/10] drm/i915: Extact compute_partial_view() Chris Wilson
2017-01-09 11:39   ` Joonas Lahtinen
2017-01-06 15:25 ` [PATCH 06/10] drm/i915: Clip the partial view against the object not vma Chris Wilson
2017-01-09 14:08   ` Joonas Lahtinen
2017-01-06 15:25 ` [PATCH 07/10] drm/i915: Align GGTT sizes to a fence tile row Chris Wilson
2017-01-09 13:21   ` Joonas Lahtinen [this message]
2017-01-09 13:30     ` Chris Wilson
2017-01-06 15:25 ` [PATCH 08/10] drm/i915: Replace WARNs in fence register writes with extensive asserts Chris Wilson
2017-01-09 13:37   ` Joonas Lahtinen
2017-01-06 15:25 ` [PATCH 09/10] drm/i915: Store required fence size/alignment for GGTT vma Chris Wilson
2017-01-09 14:05   ` Joonas Lahtinen
2017-01-09 14:14     ` Chris Wilson
2017-01-06 15:25 ` [PATCH 10/10] drm/i915: Remove the rounding down of the gen4+ fence region Chris Wilson
2017-01-09 11:46   ` Joonas Lahtinen
2017-01-09 12:09     ` Chris Wilson
2017-01-09 14:13 ` [PATCH 01/10] drm/i915: Pack the partial view size and offset into a single u64 Joonas Lahtinen

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=1483968103.4882.27.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@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.