All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-24 18:54 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-24 18:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If the specified object can not fit into the GTT due to overlap with a
neighbouring pinned object (not part of the execobjects[]), we expect to
fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
error in a badly constructed execobjects[]). To prevent the tests
causing overlap with other external objects expand the test hole by a
page on either side.

(Setting up the system to deliberately hit ENOSPC is trickier as for
example it requires pinned an object into the scanout with enough free
space on either side to test.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_softpin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index 99388599..23f93623 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
 
 	/* Find a hole */
 	memset(object, 0, sizeof(object));
-	object[0].handle = gem_create(fd, 3*4096);
+	object[0].handle = gem_create(fd, 5*4096);
 	gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
 	gem_execbuf(fd, &execbuf);
 	gem_close(fd, object[0].handle);
-	hole = object[0].offset;
+	hole = object[0].offset + 4096;
 
 	/* Create a snoop + uncached pair */
 	object[0].handle = gem_create(fd, 4096);
-- 
2.16.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-gfx] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-24 18:54 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-24 18:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If the specified object can not fit into the GTT due to overlap with a
neighbouring pinned object (not part of the execobjects[]), we expect to
fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
error in a badly constructed execobjects[]). To prevent the tests
causing overlap with other external objects expand the test hole by a
page on either side.

(Setting up the system to deliberately hit ENOSPC is trickier as for
example it requires pinned an object into the scanout with enough free
space on either side to test.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_softpin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index 99388599..23f93623 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
 
 	/* Find a hole */
 	memset(object, 0, sizeof(object));
-	object[0].handle = gem_create(fd, 3*4096);
+	object[0].handle = gem_create(fd, 5*4096);
 	gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
 	gem_execbuf(fd, &execbuf);
 	gem_close(fd, object[0].handle);
-	hole = object[0].offset;
+	hole = object[0].offset + 4096;
 
 	/* Create a snoop + uncached pair */
 	object[0].handle = gem_create(fd, 4096);
-- 
2.16.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
  2018-02-24 18:54 ` [Intel-gfx] " Chris Wilson
  (?)
@ 2018-02-25 14:02 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-02-25 14:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
URL   : https://patchwork.freedesktop.org/series/38921/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
305ebcedc36e98f3118ac27a5bbde0ce7cd71a74 Iterate over physical engines

with latest DRM-Tip kernel build CI_DRM_3830
316ba650abe6 drm-tip: 2018y-02m-23d-16h-41m-52s UTC integration manifest

No testlist changes.

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_chamelium:
        Subgroup dp-edid-read:
                fail       -> PASS       (fi-kbl-7500u) fdo#102505
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                incomplete -> PASS       (fi-bxt-dsi) fdo#103927

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:425s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:485s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:285s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:477s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:484s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:473s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:456s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:396s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:418s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:286s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:505s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:388s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:410s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:442s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:450s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:487s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:447s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:491s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:589s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:436s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:501s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:519s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:482s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:487s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:410s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:432s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:400s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1002/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
  2018-02-24 18:54 ` [Intel-gfx] " Chris Wilson
  (?)
  (?)
@ 2018-02-25 15:20 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-02-25 15:20 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
URL   : https://patchwork.freedesktop.org/series/38921/
State : failure

== Summary ==

Test gem_exec_async:
        Subgroup concurrent-writes-bsd1:
                pass       -> SKIP       (shard-hsw)
                pass       -> SKIP       (shard-apl)
        Subgroup concurrent-writes-bsd2:
                pass       -> SKIP       (shard-hsw)
                pass       -> SKIP       (shard-apl)
Test kms_chv_cursor_fail:
        Subgroup pipe-a-64x64-top-edge:
                fail       -> PASS       (shard-apl)
Test kms_plane:
        Subgroup plane-position-hole-dpms-pipe-b-planes:
                fail       -> PASS       (shard-apl)
        Subgroup plane-position-covered-pipe-a-planes:
                pass       -> FAIL       (shard-apl)
Test gem_exec_await:
        Subgroup wide-contexts:
                pass       -> SKIP       (shard-apl)
Test kms_rotation_crc:
        Subgroup sprite-rotation-180:
                pass       -> FAIL       (shard-snb) fdo#103925
Test kms_flip:
        Subgroup flip-vs-absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test drv_suspend:
        Subgroup fence-restore-tiled2untiled:
                skip       -> PASS       (shard-hsw)
Test kms_cursor_legacy:
        Subgroup cursor-vs-flip-atomic-transitions:
                pass       -> FAIL       (shard-apl) fdo#103355
Test kms_sysfs_edid_timing:
                pass       -> WARN       (shard-apl) fdo#100047

fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047

shard-apl        total:3465 pass:1816 dwarn:1   dfail:0   fail:13  skip:1634 time:12141s
shard-hsw        total:3465 pass:1766 dwarn:1   dfail:0   fail:3   skip:1694 time:11517s
shard-snb        total:3465 pass:1358 dwarn:1   dfail:0   fail:3   skip:2103 time:6699s
Blacklisted hosts:
shard-kbl        total:3465 pass:1935 dwarn:1   dfail:0   fail:20  skip:1509 time:9552s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1002/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
  2018-02-24 18:54 ` [Intel-gfx] " Chris Wilson
@ 2018-02-26 20:54   ` Chris Wilson
  -1 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-26 20:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-02-24 18:54:04)
> If the specified object can not fit into the GTT due to overlap with a
> neighbouring pinned object (not part of the execobjects[]), we expect to
> fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> error in a badly constructed execobjects[]). To prevent the tests
> causing overlap with other external objects expand the test hole by a
> page on either side.
> 
> (Setting up the system to deliberately hit ENOSPC is trickier as for
> example it requires pinned an object into the scanout with enough free
> space on either side to test.)

Anybody? I know it's an esoteric part of ancient HW that no one cares
about...
-Chris

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/gem_softpin.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> index 99388599..23f93623 100644
> --- a/tests/gem_softpin.c
> +++ b/tests/gem_softpin.c
> @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
>  
>         /* Find a hole */
>         memset(object, 0, sizeof(object));
> -       object[0].handle = gem_create(fd, 3*4096);
> +       object[0].handle = gem_create(fd, 5*4096);
>         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
>         gem_execbuf(fd, &execbuf);
>         gem_close(fd, object[0].handle);
> -       hole = object[0].offset;
> +       hole = object[0].offset + 4096;
>  
>         /* Create a snoop + uncached pair */
>         object[0].handle = gem_create(fd, 4096);
> -- 
> 2.16.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-26 20:54   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-26 20:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Quoting Chris Wilson (2018-02-24 18:54:04)
> If the specified object can not fit into the GTT due to overlap with a
> neighbouring pinned object (not part of the execobjects[]), we expect to
> fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> error in a badly constructed execobjects[]). To prevent the tests
> causing overlap with other external objects expand the test hole by a
> page on either side.
> 
> (Setting up the system to deliberately hit ENOSPC is trickier as for
> example it requires pinned an object into the scanout with enough free
> space on either side to test.)

Anybody? I know it's an esoteric part of ancient HW that no one cares
about...
-Chris

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/gem_softpin.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> index 99388599..23f93623 100644
> --- a/tests/gem_softpin.c
> +++ b/tests/gem_softpin.c
> @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
>  
>         /* Find a hole */
>         memset(object, 0, sizeof(object));
> -       object[0].handle = gem_create(fd, 3*4096);
> +       object[0].handle = gem_create(fd, 5*4096);
>         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
>         gem_execbuf(fd, &execbuf);
>         gem_close(fd, object[0].handle);
> -       hole = object[0].offset;
> +       hole = object[0].offset + 4096;
>  
>         /* Create a snoop + uncached pair */
>         object[0].handle = gem_create(fd, 4096);
> -- 
> 2.16.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
  2018-02-26 20:54   ` [Intel-gfx] " Chris Wilson
@ 2018-02-26 21:22     ` Ville Syrjälä
  -1 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-02-26 21:22 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Mon, Feb 26, 2018 at 08:54:47PM +0000, Chris Wilson wrote:
> Quoting Chris Wilson (2018-02-24 18:54:04)
> > If the specified object can not fit into the GTT due to overlap with a
> > neighbouring pinned object (not part of the execobjects[]), we expect to
> > fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> > error in a badly constructed execobjects[]). To prevent the tests
> > causing overlap with other external objects expand the test hole by a
> > page on either side.
> > 
> > (Setting up the system to deliberately hit ENOSPC is trickier as for
> > example it requires pinned an object into the scanout with enough free
> > space on either side to test.)
> 
> Anybody? I know it's an esoteric part of ancient HW that no one cares
> about...
> -Chris
> 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/gem_softpin.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> > index 99388599..23f93623 100644
> > --- a/tests/gem_softpin.c
> > +++ b/tests/gem_softpin.c
> > @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
> >  
> >         /* Find a hole */
> >         memset(object, 0, sizeof(object));
> > -       object[0].handle = gem_create(fd, 3*4096);
> > +       object[0].handle = gem_create(fd, 5*4096);
> >         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
> >         gem_execbuf(fd, &execbuf);
> >         gem_close(fd, object[0].handle);
> > -       hole = object[0].offset;
> > +       hole = object[0].offset + 4096;

I didn't double check the ENOSPC vs. EINVAL details, but a guard page on
each side makes sense to me here.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> >  
> >         /* Create a snoop + uncached pair */
> >         object[0].handle = gem_create(fd, 4096);
> > -- 
> > 2.16.1
> > 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-26 21:22     ` Ville Syrjälä
  0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-02-26 21:22 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Mon, Feb 26, 2018 at 08:54:47PM +0000, Chris Wilson wrote:
> Quoting Chris Wilson (2018-02-24 18:54:04)
> > If the specified object can not fit into the GTT due to overlap with a
> > neighbouring pinned object (not part of the execobjects[]), we expect to
> > fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> > error in a badly constructed execobjects[]). To prevent the tests
> > causing overlap with other external objects expand the test hole by a
> > page on either side.
> > 
> > (Setting up the system to deliberately hit ENOSPC is trickier as for
> > example it requires pinned an object into the scanout with enough free
> > space on either side to test.)
> 
> Anybody? I know it's an esoteric part of ancient HW that no one cares
> about...
> -Chris
> 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/gem_softpin.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> > index 99388599..23f93623 100644
> > --- a/tests/gem_softpin.c
> > +++ b/tests/gem_softpin.c
> > @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
> >  
> >         /* Find a hole */
> >         memset(object, 0, sizeof(object));
> > -       object[0].handle = gem_create(fd, 3*4096);
> > +       object[0].handle = gem_create(fd, 5*4096);
> >         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
> >         gem_execbuf(fd, &execbuf);
> >         gem_close(fd, object[0].handle);
> > -       hole = object[0].offset;
> > +       hole = object[0].offset + 4096;

I didn't double check the ENOSPC vs. EINVAL details, but a guard page on
each side makes sense to me here.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> >  
> >         /* Create a snoop + uncached pair */
> >         object[0].handle = gem_create(fd, 4096);
> > -- 
> > 2.16.1
> > 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
  2018-02-26 21:22     ` Ville Syrjälä
@ 2018-02-26 21:27       ` Chris Wilson
  -1 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-26 21:27 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev, intel-gfx

Quoting Ville Syrjälä (2018-02-26 21:22:03)
> On Mon, Feb 26, 2018 at 08:54:47PM +0000, Chris Wilson wrote:
> > Quoting Chris Wilson (2018-02-24 18:54:04)
> > > If the specified object can not fit into the GTT due to overlap with a
> > > neighbouring pinned object (not part of the execobjects[]), we expect to
> > > fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> > > error in a badly constructed execobjects[]). To prevent the tests
> > > causing overlap with other external objects expand the test hole by a
> > > page on either side.
> > > 
> > > (Setting up the system to deliberately hit ENOSPC is trickier as for
> > > example it requires pinned an object into the scanout with enough free
> > > space on either side to test.)
> > 
> > Anybody? I know it's an esoteric part of ancient HW that no one cares
> > about...
> > -Chris
> > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > >  tests/gem_softpin.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> > > index 99388599..23f93623 100644
> > > --- a/tests/gem_softpin.c
> > > +++ b/tests/gem_softpin.c
> > > @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
> > >  
> > >         /* Find a hole */
> > >         memset(object, 0, sizeof(object));
> > > -       object[0].handle = gem_create(fd, 3*4096);
> > > +       object[0].handle = gem_create(fd, 5*4096);
> > >         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
> > >         gem_execbuf(fd, &execbuf);
> > >         gem_close(fd, object[0].handle);
> > > -       hole = object[0].offset;
> > > +       hole = object[0].offset + 4096;
> 
> I didn't double check the ENOSPC vs. EINVAL details, but a guard page on
> each side makes sense to me here.

It's enough to make me regret trying to discern the difference :)
EINVAL was for if the user's execobject[] conflicts with itself (a user
error), ENOSPC if we couldn't fit the object into the hole (something we
couldn't expect the user to predict).

Thanks,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-26 21:27       ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-02-26 21:27 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev, intel-gfx

Quoting Ville Syrjälä (2018-02-26 21:22:03)
> On Mon, Feb 26, 2018 at 08:54:47PM +0000, Chris Wilson wrote:
> > Quoting Chris Wilson (2018-02-24 18:54:04)
> > > If the specified object can not fit into the GTT due to overlap with a
> > > neighbouring pinned object (not part of the execobjects[]), we expect to
> > > fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
> > > error in a badly constructed execobjects[]). To prevent the tests
> > > causing overlap with other external objects expand the test hole by a
> > > page on either side.
> > > 
> > > (Setting up the system to deliberately hit ENOSPC is trickier as for
> > > example it requires pinned an object into the scanout with enough free
> > > space on either side to test.)
> > 
> > Anybody? I know it's an esoteric part of ancient HW that no one cares
> > about...
> > -Chris
> > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > >  tests/gem_softpin.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
> > > index 99388599..23f93623 100644
> > > --- a/tests/gem_softpin.c
> > > +++ b/tests/gem_softpin.c
> > > @@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
> > >  
> > >         /* Find a hole */
> > >         memset(object, 0, sizeof(object));
> > > -       object[0].handle = gem_create(fd, 3*4096);
> > > +       object[0].handle = gem_create(fd, 5*4096);
> > >         gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
> > >         gem_execbuf(fd, &execbuf);
> > >         gem_close(fd, object[0].handle);
> > > -       hole = object[0].offset;
> > > +       hole = object[0].offset + 4096;
> 
> I didn't double check the ENOSPC vs. EINVAL details, but a guard page on
> each side makes sense to me here.

It's enough to make me regret trying to discern the difference :)
EINVAL was for if the user's execobject[] conflicts with itself (a user
error), ENOSPC if we couldn't fit the object into the hole (something we
couldn't expect the user to predict).

Thanks,
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-26 21:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24 18:54 [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects Chris Wilson
2018-02-24 18:54 ` [Intel-gfx] " Chris Wilson
2018-02-25 14:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-02-25 15:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-02-26 20:54 ` [PATCH igt] " Chris Wilson
2018-02-26 20:54   ` [Intel-gfx] " Chris Wilson
2018-02-26 21:22   ` [igt-dev] " Ville Syrjälä
2018-02-26 21:22     ` Ville Syrjälä
2018-02-26 21:27     ` Chris Wilson
2018-02-26 21:27       ` Chris Wilson

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.