From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>,
Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH] gem_pin: Be explicit about GGTT needs
Date: Wed, 6 Nov 2013 20:05:02 -0800 [thread overview]
Message-ID: <1383797102-1906-1-git-send-email-benjamin.widawsky@intel.com> (raw)
This test assumes that using gem_pin will pin in the same address space
used by execbuf. Since pin is for the global GTT only, use the existing
flag to notify i915.ko that the exec object is special.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
tests/gem_pin.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/gem_pin.c b/tests/gem_pin.c
index 273315f..ca48a04 100644
--- a/tests/gem_pin.c
+++ b/tests/gem_pin.c
@@ -45,6 +45,8 @@
#define BLT_WRITE_ALPHA (1<<21)
#define BLT_WRITE_RGB (1<<20)
+#define LOCAL__EXEC_OBJ_NEEDS_GTT (1<<1)
+
static void exec(int fd, uint32_t handle, uint32_t offset)
{
struct drm_i915_gem_execbuffer2 execbuf;
@@ -63,7 +65,7 @@ static void exec(int fd, uint32_t handle, uint32_t offset)
gem_exec[0].relocs_ptr = (uintptr_t) gem_reloc;
gem_exec[0].alignment = 0;
gem_exec[0].offset = 0;
- gem_exec[0].flags = 0;
+ gem_exec[0].flags = LOCAL__EXEC_OBJ_NEEDS_GTT;
gem_exec[0].rsvd1 = 0;
gem_exec[0].rsvd2 = 0;
--
1.8.4.2
next reply other threads:[~2013-11-07 4:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 4:05 Ben Widawsky [this message]
2013-11-07 8:30 ` [PATCH] gem_pin: Be explicit about GGTT needs Chris Wilson
2013-11-07 8:33 ` Daniel Vetter
2013-11-07 18:11 ` Ben Widawsky
2013-11-07 18:36 ` Daniel Vetter
2013-11-07 18:46 ` Ben Widawsky
2013-11-07 18:54 ` Daniel Vetter
2013-11-07 18:58 ` Ben Widawsky
2013-11-07 20:59 ` 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=1383797102-1906-1-git-send-email-benjamin.widawsky@intel.com \
--to=benjamin.widawsky@intel.com \
--cc=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.