All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Rings are always flushed
Date: Thu, 20 Jun 2019 17:26:04 +0100	[thread overview]
Message-ID: <79da5528-4423-db3e-62f5-ad7f77552335@linux.intel.com> (raw)
In-Reply-To: <20190619203504.4220-1-chris@chris-wilson.co.uk>


On 19/06/2019 21:35, Chris Wilson wrote:
> Our intel_rings are always flushed as they are continually used to submit
> commands to the GPU, and so do not need to be flushed on unpinning. This
> avoids pulling in the flush_ggtt_writes locking intou our context
> unpin, which we want to allow from atomic context (for simplicity).
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> index 12010e798868..8b1da57c3764 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> @@ -1219,6 +1219,7 @@ void intel_ring_unpin(struct intel_ring *ring)
>   	intel_ring_reset(ring, ring->tail);
>   
>   	GEM_BUG_ON(!ring->vma);
> +	i915_vma_unset_ggtt_write(ring->vma);
>   	if (i915_vma_is_map_and_fenceable(ring->vma))
>   		i915_vma_unpin_iomap(ring->vma);
>   	else
> 

Safe but for documentation purposes I would prefer something like:

i915_vma_pin_iomap(vma, flags = ..._FLAG_DIRECT/ASYNC/IKNOWBETTER)
{
	...
	if (!(flags & FLAG_DIRECT))
		i915_vma_set_ggtt_write(vma);
	...
}


Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2019-06-20 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 20:35 [PATCH] drm/i915: Rings are always flushed Chris Wilson
2019-06-19 21:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-06-20 15:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-06-20 16:26 ` Tvrtko Ursulin [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=79da5528-4423-db3e-62f5-ad7f77552335@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.