All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Skip final clflush if LLC is coherent
Date: Mon, 14 Nov 2016 15:57:32 +0200	[thread overview]
Message-ID: <20161114135732.GW31595@intel.com> (raw)
In-Reply-To: <20161114085453.16384-2-chris@chris-wilson.co.uk>

On Mon, Nov 14, 2016 at 08:54:53AM +0000, Chris Wilson wrote:
> If the LLC is coherent with the object, we do not need to worry about
> whether main memory and cache mismatch when we hand the object back to
> the system.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Makes sense to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 4931bfcff2a2..3b021e9e3379 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -228,7 +228,8 @@ __i915_gem_object_release_shmem(struct drm_i915_gem_object *obj,
>  	if (obj->mm.madv == I915_MADV_DONTNEED)
>  		obj->mm.dirty = false;
>  
> -	if ((obj->base.read_domains & I915_GEM_DOMAIN_CPU) == 0)
> +	if ((obj->base.read_domains & I915_GEM_DOMAIN_CPU) == 0 &&
> +	    !cpu_cache_is_coherent(obj->base.dev, obj->cache_level))
>  		drm_clflush_sg(pages);
>  
>  	obj->base.read_domains = I915_GEM_DOMAIN_CPU;
> -- 
> 2.10.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-14 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14  8:54 [PATCH 1/2] drm/i915: Skip clflushes for all non-page backed objects Chris Wilson
2016-11-14  8:54 ` [PATCH 2/2] drm/i915: Skip final clflush if LLC is coherent Chris Wilson
2016-11-14 13:57   ` Ville Syrjälä [this message]
2016-11-14 10:17 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Skip clflushes for all non-page backed objects Patchwork

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=20161114135732.GW31595@intel.com \
    --to=ville.syrjala@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.