All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Matthew Auld <matthew.william.auld@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: simplify bind_to_vm init code
Date: Thu, 17 Mar 2016 13:53:19 +0000	[thread overview]
Message-ID: <20160317135319.GY14143@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <CAM0jSHMo_hvPn25Fr4zZ=8uKtkP7DhhbfU+xbc4zUz-tstpsYg@mail.gmail.com>

On Thu, Mar 17, 2016 at 01:41:32PM +0000, Matthew Auld wrote:
> Hi,
> 
> If we don't do any of the fence business for !i915_is_gtt, then will
> this not change the following code:
> 
> if (alignment == 0)
>     alignment = flags & PIN_MAPPABLE ? fence_alignment : unfenced_alignment;
> 
> Or am I missing something?

Fwiw, the patches I have sent previously change it to:

size = max(size, vma->size);
if (flags & PIN_MAPPABLE)
	size = i915_gem_get_gtt_size(dev, size, obj->tiling_mode);

alignment =
	max_t(u64, max(alignment, vma->display_alignment),
      	      i915_gem_get_gtt_alignment(dev, size, obj->tiling_mode, flags & PIN_MAPPABLE));
if (alignment == 4096)
	alignment = 0;

start = flags & PIN_OFFSET_BIAS ? flags & PIN_OFFSET_MASK : 0;

end = vma->vm->total;
if (flags & PIN_MAPPABLE)
	end = min_t(u64, end, dev_priv->gtt.mappable_end);
if (flags & PIN_ZONE_4G)
	end = min_t(u64, end, (1ULL << 32) - PAGE_SIZE);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-17 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 17:07 [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
2016-03-17 10:00 ` Tvrtko Ursulin
2016-03-17 13:41   ` Matthew Auld
2016-03-17 13:53     ` Chris Wilson [this message]
2016-03-17 17:36     ` Tvrtko Ursulin
2016-03-17 10:36 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-03-18 10:46 [PATCH] " Matthew Auld
2016-03-18 11:10 ` Tvrtko Ursulin
2016-03-18 11:26   ` Chris Wilson
2016-03-18 13:54 Matthew Auld
2016-03-22 10:36 ` Matthew Auld

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=20160317135319.GY14143@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.william.auld@gmail.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.