From: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v3 2/4] lib/igt_dummyload: use gem_mmap__cpu and gem_mmap__wc when applicable
Date: Fri, 11 Jan 2019 17:15:46 +0100 [thread overview]
Message-ID: <20190111161548.15732-2-lukasz.kalamarz@intel.com> (raw)
In-Reply-To: <20190111161548.15732-1-lukasz.kalamarz@intel.com>
We had some duplicates in code that are using direct call to
__gem_mmap__cpu or __gem_mmap__wc and then assert it result, which is what
gem_mmap__cpu and gem_mmap__wc is taking care for us.
v2: Rebased and reordered this patch in series
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
lib/igt_dummyload.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 2027a4b7..982906f2 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -148,14 +148,13 @@ emit_recursive_batch(igt_spin_t *spin,
if (__gem_set_caching(fd, spin->poll_handle,
I915_CACHING_CACHED) == 0)
- spin->running = __gem_mmap__cpu(fd, spin->poll_handle,
- 0, 4096,
- PROT_READ | PROT_WRITE);
+ spin->running = gem_mmap__cpu(fd, spin->poll_handle,
+ 0, 4096,
+ PROT_READ | PROT_WRITE);
else
- spin->running = __gem_mmap__wc(fd, spin->poll_handle,
- 0, 4096,
- PROT_READ | PROT_WRITE);
- igt_assert(spin->running);
+ spin->running = gem_mmap__wc(fd, spin->poll_handle,
+ 0, 4096,
+ PROT_READ | PROT_WRITE);
igt_assert_eq(*spin->running, 0);
*batch++ = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0);
--
2.17.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-01-11 16:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 16:15 [igt-dev] [PATCH i-g-t v3 1/4] lib/ioctl_wrapper: use defines for get_param instead of param number Lukasz Kalamarz
2019-01-11 16:15 ` Lukasz Kalamarz [this message]
2019-01-11 17:26 ` [igt-dev] [PATCH i-g-t v3 2/4] lib/igt_dummyload: use gem_mmap__cpu and gem_mmap__wc when applicable Daniele Ceraolo Spurio
2019-01-11 16:15 ` [igt-dev] [PATCH i-g-t v3 3/4] lib/ioctl_wrapper: Implement __gem_mmap Lukasz Kalamarz
2019-01-11 17:39 ` Daniele Ceraolo Spurio
2019-01-14 15:58 ` Kalamarz, Lukasz
2019-01-11 16:15 ` [igt-dev] [PATCH i-g-t v3 4/4] lib/ioctl_wrapper: Use __gem_mmap within __gem_mmap__cpu/wc Lukasz Kalamarz
2019-01-11 16:41 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/4] lib/ioctl_wrapper: use defines for get_param instead of param number Patchwork
2019-01-11 17:54 ` [igt-dev] [PATCH i-g-t v3 1/4] " Daniele Ceraolo Spurio
2019-01-14 15:55 ` Kalamarz, Lukasz
2019-01-14 18:05 ` Daniele Ceraolo Spurio
2019-01-11 21:43 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v3,1/4] " 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=20190111161548.15732-2-lukasz.kalamarz@intel.com \
--to=lukasz.kalamarz@intel.com \
--cc=igt-dev@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