From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
Date: Mon, 26 Feb 2018 23:22:03 +0200 [thread overview]
Message-ID: <20180226212203.GX5453@intel.com> (raw)
In-Reply-To: <151967848797.14388.14011377163461240257@mail.alporthouse.com>
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
next prev parent reply other threads:[~2018-02-26 21:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 18:54 [Intel-gfx] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects 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 ` [Intel-gfx] [PATCH igt] " Chris Wilson
2018-02-26 21:22 ` Ville Syrjälä [this message]
2018-02-26 21:27 ` [igt-dev] " 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=20180226212203.GX5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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