All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 1/2] drm/i915: add assumed cpu-dirtied flush
Date: Thu, 11 Aug 2011 17:47:25 -0700	[thread overview]
Message-ID: <1313110048-2971-2-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1313110048-2971-1-git-send-email-ben@bwidawsk.net>


Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.h            |    2 ++
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index feb4f16..2a61e63 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -879,6 +879,8 @@ struct drm_i915_gem_object {
 	 * reaches 0, dev_priv->pending_flip_queue will be woken up.
 	 */
 	atomic_t pending_flip;
+
+	atomic_t always_cpu_dirty;
 };
 
 #define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 4934cf8..f60cfcc 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -201,6 +201,10 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj,
 
 	cd->invalidate_domains |= invalidate_domains;
 	cd->flush_domains |= flush_domains;
+
+	if (atomic_read(&obj->always_cpu_dirty))
+		cd->flush_domains |= I915_GEM_DOMAIN_CPU;
+
 	if (flush_domains & I915_GEM_GPU_DOMAINS)
 		cd->flush_rings |= obj->ring->id;
 	if (invalidate_domains & I915_GEM_GPU_DOMAINS)
-- 
1.7.6

  reply	other threads:[~2011-08-12  0:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  0:47 [RFC] non-blocking map Ben Widawsky
2011-08-12  0:47 ` Ben Widawsky [this message]
2011-08-12  1:18   ` [PATCH 1/2] drm/i915: add assumed cpu-dirtied flush Ben Widawsky
2011-08-12  0:47 ` [PATCH 2/2] drm/i915: Assume size & 1 means WO map (hack) Ben Widawsky
2011-08-12  0:47 ` [PATCH] intel: hack to allow WO mappings Ben Widawsky
2011-08-12  0:56 ` [RFC] non-blocking map Keith Packard
2011-08-12  1:19   ` Ben Widawsky
2011-08-12 23:28     ` Eric Anholt
2011-08-13  0:59       ` Ben Widawsky

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=1313110048-2971-2-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --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.