All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: igt-dev <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/9] tests/prime_mmap_coherency: use device coherent mapping instead of mmap_gtt
Date: Mon, 03 Feb 2020 22:14:06 -0800	[thread overview]
Message-ID: <87eeva5175.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <8736bu6cv5.wl-ashutosh.dixit@intel.com>

On Fri, 31 Jan 2020 22:27:42 -0800, Dixit, Ashutosh wrote:
> On Fri, 31 Jan 2020 09:31:03 -0800, Ramalingam C wrote:
> >
> > Since on new discrete GPUs we dont have the mappable aperture, if that
> > is acceptable for the test purpose, we should use GEM_MMAP_OFFSET.
> > Hence using gem_mmap_device_coherent() which wraps the mmap options in
> > the order of gem_mmap_offset / gem_mmap / mmap_gtt
> >
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > ---
> >  tests/prime_mmap_coherency.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/prime_mmap_coherency.c b/tests/prime_mmap_coherency.c
> > index 39538767c68f..32d78ee1a771 100644
> > --- a/tests/prime_mmap_coherency.c
> > +++ b/tests/prime_mmap_coherency.c
> > @@ -69,7 +69,7 @@ static int test_read_flush(void)
> >
> >	/* STEP #3: write 0x11 into BO 1. */
> >	bo_2 = drm_intel_bo_alloc(bufmgr, "BO 2", width * height * 4, 4096);
> > -	ptr_gtt = gem_mmap__gtt(fd, bo_2->handle, width * height, PROT_READ | PROT_WRITE);
> > +	ptr_gtt = gem_mmap__device_coherent(fd, bo_2->handle, 0, width * height, PROT_READ | PROT_WRITE);
> >	gem_set_domain(fd, bo_2->handle,
> >		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
> >	memset(ptr_gtt, 0xc5, width * height);
>
> I think the patch is ok but did you check if the test passes/fails on
> devices with/without a mappable aperture? I sort of expect it to always
> fail, at least with WC, but not sure if it ever passes with the GTT mapping
> (since we haven't done a clflush).

According to Chris "the gtt mapping uses WC" so cache effects for both WC
and GTT mappings should be equivalent. Therefore:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-02-04  6:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 17:31 [igt-dev] [PATCH i-g-t 0/9] Handling mmap_gtt Ramalingam C
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 1/9] tests/prime_vgem: Skip fence and gtt specific tests Ramalingam C
2020-02-01  5:42   ` Dixit, Ashutosh
2020-02-03  9:19     ` Janusz Krzysztofik
2020-02-03  9:28   ` Janusz Krzysztofik
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 2/9] tests/intel_dp_compliance: Skip tests as tiling is not supported Ramalingam C
2020-02-01  5:55   ` Dixit, Ashutosh
2020-02-04  5:55     ` Dixit, Ashutosh
2020-02-04  6:00       ` Ramalingam C
2020-02-04  6:15         ` Dixit, Ashutosh
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 3/9] tests/prime_mmap_coherency: use device coherent mapping instead of mmap_gtt Ramalingam C
2020-02-01  6:27   ` Dixit, Ashutosh
2020-02-02 18:24     ` Ramalingam C
2020-02-04  6:14     ` Dixit, Ashutosh [this message]
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 4/9] tests/prime_mmap: " Ramalingam C
2020-02-01  6:57   ` Dixit, Ashutosh
2020-02-02 18:28     ` Ramalingam C
2020-02-04  6:29     ` Dixit, Ashutosh
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 5/9] tests/kms_psr: Skip tests on mmap_gtt, if no mappable aperture Ramalingam C
2020-02-04  6:38   ` Dixit, Ashutosh
2020-02-09  0:41     ` Dixit, Ashutosh
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 6/9] tests/kms_available_modes_crc: Skip test if mappable aperture not supported Ramalingam C
2020-02-04  6:49   ` Dixit, Ashutosh
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 7/9] tests/i915_pm_rpm: use device coherent mapping instead of mmap_gtt Ramalingam C
2020-02-05  0:16   ` Dixit, Ashutosh
2020-02-07 12:59     ` Ramalingam C
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 8/9] tests/i915_suspend: skip fence related tests, if no mmap_gtt Ramalingam C
2020-02-05  2:06   ` Dixit, Ashutosh
2020-01-31 17:31 ` [igt-dev] [PATCH i-g-t 9/9] tests/gem_tiling_max_stride: Skip if set tiling is not supported Ramalingam C
2020-02-05  0:43   ` Antonio Argenziano
2020-02-05  1:29     ` Dixit, Ashutosh
2020-01-31 18:45 ` [igt-dev] ✓ Fi.CI.BAT: success for Handling mmap_gtt Patchwork
2020-02-04 12:30 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=87eeva5175.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ramalingam.c@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.