intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Micah Fedke <micah.fedke@collabora.com>,
	Intel GFX discussion <intel-gfx@lists.freedesktop.org>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	Daniel Stone <daniels@collabora.com>,
	Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [i-g-t PATCH v1 12/14] kms_addfb_basic: Split tiling_tests off
Date: Mon, 7 Mar 2016 17:08:52 +0100	[thread overview]
Message-ID: <56DDA794.9040506@collabora.com> (raw)
In-Reply-To: <20160305123317.GH18536@phenom.ffwll.local>

On 03/05/2016 01:33 PM, Daniel Vetter wrote:
> On Wed, Mar 02, 2016 at 03:00:19PM +0100, Tomeu Vizoso wrote:
>> Move tests requiring tiled BOs to the end so they don't cause unrelated
>> subtests to be skipped when testing drivers with only dumb buffer
>> support.
> 
> This uncovers a deficiency in igt skip infrastructure when you have
> disjoint sets of subtests with common requirements, e.g.
> 
> {
> 	igt_require_intel();
> 
> 	... intel tiling subtests;
> }
> 
> {
> 	igt_require_amd();
> 
> 	... amd tiling subtests;
> }
> 
> The current rule is that a skip outside of subtest skips _all_ remaining
> subtests. We might want to introduce some kind of igt_subtest_group block
> so that only that group is skipped.
> 
> Anyway, just a thought, nothing you'll have to tackle here ;-)

I think it's likely I will find more problematic cases as I get more
tests to run on !i915, so will think of it.

Thanks,

Tomeu

> -Daniel
> 
>>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>> ---
>>
>>  tests/kms_addfb_basic.c | 50 ++++++++++++++++++++++++++++++++++++++++++++-----
>>  1 file changed, 45 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
>> index e61d2502d78b..6dfaecfc38a7 100644
>> --- a/tests/kms_addfb_basic.c
>> +++ b/tests/kms_addfb_basic.c
>> @@ -156,16 +156,50 @@ static void pitch_tests(int fd)
>>  		}
>>  	}
>>  
>> +	igt_fixture
>> +		gem_close(fd, gem_bo);
>> +}
>> +
>> +
>> +static void tiling_tests(int fd)
>> +{
>> +	struct drm_mode_fb_cmd2 f = {};
>> +	uint32_t tiled_x_bo;
>> +	uint32_t tiled_y_bo;
>> +
>> +	f.width = 512;
>> +	f.height = 512;
>> +	f.pixel_format = DRM_FORMAT_XRGB8888;
>>  	f.pitches[0] = 1024*4;
>>  
>> +	igt_fixture {
>> +		tiled_x_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
>> +			DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED,
>> +			1024*4, NULL, NULL, NULL);
>> +		igt_assert(tiled_x_bo);
>> +
>> +		tiled_y_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
>> +			DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_Y_TILED,
>> +			1024*4, NULL, NULL, NULL);
>> +		igt_assert(tiled_y_bo);
>> +
>> +		gem_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
>> +			DRM_FORMAT_XRGB8888, 0, 0, NULL, NULL, NULL);
>> +		igt_assert(gem_bo);
>> +	}
>> +
>> +	f.pitches[0] = 1024*4;
>>  	igt_subtest("basic-X-tiled") {
>> -		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
>> +		f.handles[0] = tiled_x_bo;
>> +
>>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
>>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
>>  		f.fb_id = 0;
>>  	}
>>  
>>  	igt_subtest("framebuffer-vs-set-tiling") {
>> +		f.handles[0] = gem_bo;
>> +
>>  		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
>>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
>>  		igt_assert(__gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4) == -EBUSY);
>> @@ -176,20 +210,24 @@ static void pitch_tests(int fd)
>>  
>>  	f.pitches[0] = 512*4;
>>  	igt_subtest("tile-pitch-mismatch") {
>> -		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
>> +		f.handles[0] = tiled_x_bo;
>> +
>>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
>>  			   errno == EINVAL);
>>  	}
>>  
>>  	f.pitches[0] = 1024*4;
>>  	igt_subtest("basic-Y-tiled") {
>> -		gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
>> +		f.handles[0] = tiled_y_bo;
>> +
>>  		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
>>  			   errno == EINVAL);
>>  	}
>>  
>> -	igt_fixture
>> -		gem_close(fd, gem_bo);
>> +	igt_fixture {
>> +		gem_close(fd, tiled_x_bo);
>> +		gem_close(fd, tiled_y_bo);
>> +	}
>>  }
>>  
>>  static void size_tests(int fd)
>> @@ -448,6 +486,8 @@ igt_main
>>  
>>  	addfb25_ytile(fd, gen);
>>  
>> +	tiling_tests(fd);
>> +
>>  	igt_fixture
>>  		close(fd);
>>  }
>> -- 
>> 2.5.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

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

  reply	other threads:[~2016-03-07 16:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 14:00 [i-g-t PATCH v1 00/14] Get a few more tests to run on !i915 Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 01/14] lib: add igt_require_intel Tomeu Vizoso
2016-03-02 14:18   ` Chris Wilson
2016-03-02 14:00 ` [i-g-t PATCH v1 02/14] lib: Have gem_set_tiling require intel Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 03/14] lib: Expose is_i915_device Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 04/14] lib: Have intel_get_drm_devid call igt_require_intel Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 05/14] lib: Call intel_get_drm_devid only from intel code Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 06/14] lib: Add wrapper for DRM_IOCTL_MODE_CREATE_DUMB Tomeu Vizoso
2016-03-05 12:21   ` Daniel Vetter
2016-03-02 14:00 ` [i-g-t PATCH v1 07/14] lib: Map dumb buffers Tomeu Vizoso
2016-03-02 14:21   ` Chris Wilson
2016-03-02 14:22     ` Daniel Stone
2016-03-02 14:39       ` Chris Wilson
2016-03-02 14:40         ` Daniel Stone
2016-03-02 14:54           ` Chris Wilson
2016-03-02 15:41             ` Daniel Stone
2016-03-05 12:24             ` Daniel Vetter
2016-03-05 12:27               ` Daniel Vetter
2016-03-02 14:00 ` [i-g-t PATCH v1 08/14] lib: Add igt_create_bo_with_dimensions Tomeu Vizoso
2016-03-05 12:30   ` Daniel Vetter
2016-03-07 16:19     ` Tomeu Vizoso
2016-03-07 16:25     ` Ville Syrjälä
2016-03-08 11:45     ` Daniel Stone
2016-11-01 15:44   ` Tvrtko Ursulin
2016-11-10 13:17     ` Tomeu Vizoso
2016-11-10 16:23       ` Tvrtko Ursulin
2016-11-11 11:23         ` Tomeu Vizoso
2016-11-11 11:33           ` Tvrtko Ursulin
2016-11-11 13:14             ` Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 09/14] tests: Open any driver Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 10/14] kms_addfb_basic: call igt_create_bo_with_dimensions Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 11/14] kms_addfb_basic: move tiling functionality into each subtest Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 12/14] kms_addfb_basic: Split tiling_tests off Tomeu Vizoso
2016-03-05 12:33   ` Daniel Vetter
2016-03-07 16:08     ` Tomeu Vizoso [this message]
2016-03-02 14:00 ` [i-g-t PATCH v1 13/14] kms_addfb_basic: Move calls to gem_set_tiling to the subtests Tomeu Vizoso
2016-03-02 14:00 ` [i-g-t PATCH v1 14/14] kms_addfb_basic: Get intel gen from within subtest Tomeu Vizoso
2016-03-05 12:34 ` [i-g-t PATCH v1 00/14] Get a few more tests to run on !i915 Daniel Vetter
2016-04-14 12:56   ` Daniel Stone

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=56DDA794.9040506@collabora.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=emil.velikov@collabora.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=micah.fedke@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).