From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/gem_exec_gttfill: MMAP_OFFSET related refresh
Date: Mon, 16 Mar 2020 09:09:45 +0100 [thread overview]
Message-ID: <9fd0c91e3a82d4b749314ace64c6ecb86e1da720.camel@linux.intel.com> (raw)
In-Reply-To: <20200305175321.31384-1-janusz.krzysztofik@linux.intel.com>
On Thu, 2020-03-05 at 18:53 +0100, Janusz Krzysztofik wrote:
> The test already tried to use a working mapping by first trying legacy
> WC, then GTT. Use gem_mmap__device_coherent() helper instead of
> approaching its implementation locally.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Please ignore this submission, an equivalent implementation has been
just merged.
Thanks,
Janusz
> ---
> tests/i915/gem_exec_gttfill.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
> index f810dafd1..27277df48 100644
> --- a/tests/i915/gem_exec_gttfill.c
> +++ b/tests/i915/gem_exec_gttfill.c
> @@ -155,15 +155,10 @@ static void fillgtt(int fd, unsigned ring, int timeout)
> igt_assert(batches);
> for (unsigned i = 0; i < count; i++) {
> batches[i].handle = gem_create(fd, BATCH_SIZE);
> - batches[i].ptr =
> - __gem_mmap__wc(fd, batches[i].handle,
> - 0, BATCH_SIZE, PROT_WRITE);
> - if (!batches[i].ptr) {
> - batches[i].ptr =
> - __gem_mmap__gtt(fd, batches[i].handle,
> - BATCH_SIZE, PROT_WRITE);
> - }
> - igt_require(batches[i].ptr);
> + batches[i].ptr = gem_mmap__device_coherent(fd,
> + batches[i].handle, 0,
> + BATCH_SIZE,
> + PROT_WRITE);
> }
>
> /* Flush all memory before we start the timer */
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
prev parent reply other threads:[~2020-03-16 8:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 17:53 [igt-dev] [PATCH i-g-t] tests/gem_exec_gttfill: MMAP_OFFSET related refresh Janusz Krzysztofik
2020-03-05 18:26 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-03-06 8:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-03-16 8:09 ` Janusz Krzysztofik [this message]
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=9fd0c91e3a82d4b749314ace64c6ecb86e1da720.camel@linux.intel.com \
--to=janusz.krzysztofik@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--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