Intel-GFX Archive on 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
Subject: Re: [PATCH 1/2] drm/i915: Combine write_domain flushes to a single function
Date: Wed, 12 Apr 2017 11:42:07 +0300	[thread overview]
Message-ID: <1491986527.3274.12.camel@linux.intel.com> (raw)
In-Reply-To: <20170411134729.9940-1-chris@chris-wilson.co.uk>

On ti, 2017-04-11 at 14:47 +0100, Chris Wilson wrote:
> In the next patch, we will introduce a new cache domain for
> differentiating between GTT access and direct WC access. This will
> require us to include WC in our write_domain flushes. Rather than
> duplicate a third function, combine the existing two into one and
> flushing WC writes will then be automatically handled as well.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> +static inline enum fb_op_origin
> +write_origin(struct drm_i915_gem_object *obj, unsigned int domain)

fb_write_origin? Just for added clarity.

> +{
> +	return (domain == I915_GEM_DOMAIN_GTT ?
> +		obj->frontbuffer_ggtt_origin : ORIGIN_CPU);
> +}

<SNIP>

> @@ -794,7 +848,7 @@ int i915_gem_obj_prepare_shmem_read(struct drm_i915_gem_object *obj,
>  			goto out;
>  	}
>  
> -	i915_gem_object_flush_gtt_write_domain(obj);
> +	flush_write_domain(obj, I915_GEM_DOMAIN_CPU);

Let me tell ya, this reads really confusing. Maybe

	flush_write_domain(obj, ~I915_GEM_DOMAIN_CPU);

and call the parameter "mask" instead of "exclude..."

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

  parent reply	other threads:[~2017-04-12  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 13:47 [PATCH 1/2] drm/i915: Combine write_domain flushes to a single function Chris Wilson
2017-04-11 13:47 ` [PATCH 2/2] drm/i915: Treat WC a separate cache domain Chris Wilson
2017-04-11 15:12 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Combine write_domain flushes to a single function Patchwork
2017-04-12  8:42 ` Joonas Lahtinen [this message]
2017-04-12  9:42 ` [PATCH v2] " Chris Wilson
2017-04-12 10:06   ` Joonas Lahtinen
2017-04-12 10:23     ` Chris Wilson
2017-04-12 10:31 ` ✗ Fi.CI.BAT: failure for series starting with [v2] drm/i915: Combine write_domain flushes to a single function (rev2) 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=1491986527.3274.12.camel@linux.intel.com \
    --to=joonas.lahtinen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox