All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH igt] lib/igt_draw: move to the GTT domain before using GTT mmaps
Date: Thu, 25 Jun 2015 12:53:19 -0300	[thread overview]
Message-ID: <1435247599-21678-1-git-send-email-przanoni@gmail.com> (raw)

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

With this, we don't need to worry about what happened to the buffer
before.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 lib/igt_draw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 51dce4b..fb9294d 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -262,6 +262,9 @@ static void draw_rect_mmap_gtt(int fd, struct buf_data *buf, struct rect *rect,
 {
 	uint32_t *ptr;
 
+	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
+		       I915_GEM_DOMAIN_GTT);
+
 	ptr = gem_mmap__gtt(fd, buf->handle, buf->size, PROT_READ | PROT_WRITE);
 	igt_assert(ptr);
 
@@ -276,6 +279,8 @@ static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect,
 	uint32_t *ptr;
 	uint32_t tiling, swizzle;
 
+	gem_set_domain(fd, buf->handle, I915_GEM_DOMAIN_GTT,
+		       I915_GEM_DOMAIN_GTT);
 	gem_get_tiling(fd, buf->handle, &tiling, &swizzle);
 
 	/* We didn't implement suport for the older tiling methods yet. */
-- 
2.1.4

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

             reply	other threads:[~2015-06-25 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 15:53 Paulo Zanoni [this message]
2015-06-25 19:48 ` [PATCH igt] lib/igt_draw: move to the GTT domain before using GTT mmaps Chris Wilson

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=1435247599-21678-1-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.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.