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: "# v4 . 9-rc1+" <drm-intel-fixes@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Round tile chunks up for constructing partial VMAs
Date: Mon, 07 Nov 2016 13:02:37 +0200	[thread overview]
Message-ID: <1478516557.2879.1.camel@linux.intel.com> (raw)
In-Reply-To: <20161107105443.27855-1-chris@chris-wilson.co.uk>

On ma, 2016-11-07 at 10:54 +0000, Chris Wilson wrote:
> When we split a large object up into chunks for GTT faulting (because we
> can't fit the whole object into the aperture) we have to align our cuts
> with the fence registers. Each partial VMA must cover a complete set of
> tile rows or the offset into each partial VMA is not aligned with the
> whole image. Currently we enforce a minimum size on each partial VMA,
> but this minimum size itself was not aligned to the tile row causing
> distortion.
> 
> > Reported-by: Andreas Reis <andreas.reis@gmail.com>
> > Reported-by: Chris Clayton <chris2553@googlemail.com>
> > Reported-by: Norbert Preining <preining@logic.at>
> > Tested-by: Norbert Preining <preining@logic.at>
> Fixes: 03af84fe7f48 ("drm/i915: Choose partial chunksize based on tile row size")
> Fixes: a61007a83a46 ("drm/i915: Fix partial GGTT faulting") # enabling patch
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98402
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.9-rc1+
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index c642385bb236..a52b40bbac6f 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1837,7 +1837,7 @@ int i915_gem_fault(struct vm_area_struct *area, struct vm_fault *vmf)
>  		/* Use a partial view if it is bigger than available space */
>  		chunk_size = MIN_CHUNK_PAGES;
>  		if (i915_gem_object_is_tiled(obj))
> -			chunk_size = max(chunk_size, tile_row_pages(obj));
> +			chunk_size = roundup(chunk_size, tile_row_pages(obj));
>  

Later in code, if chunk_size ends up bigger than object size, we
convert back to normal view, so this is good. Not sure if it's worth a
comment.

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:[~2016-11-07 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 10:54 [PATCH] drm/i915: Round tile chunks up for constructing partial VMAs Chris Wilson
2016-11-07 11:02 ` Joonas Lahtinen [this message]
2016-11-07 11:09 ` Chris Wilson
2016-11-07 11:15 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-11-07 11:42   ` Chris Wilson
2016-11-07 11:19 ` [PATCH] " Chris Wilson

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