public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane_lowres: Don't fail tests when missing format/mod support
Date: Fri, 30 Nov 2018 13:59:45 +0000	[thread overview]
Message-ID: <501c910c-7ea2-1947-5548-b547500837af@amd.com> (raw)
In-Reply-To: <20181130135614.GU9144@intel.com>

On 11/30/18 8:56 AM, Ville Syrjälä wrote:
> On Wed, Nov 28, 2018 at 09:56:19AM -0500, Nicholas Kazlauskas wrote:
>> The kms_plane_lowres subtests will fail on non-i915 hardware because
>> of the devid lookups and tiling format requirements.
>>
>> This patch makes use of the igt_display_has_format_mod() helper to
>> check for support before failing fb creation.
>>
>> The tests still won't fully run yet on i915 hardware because they'll
>> skip during calls to igt_assert_plane_visible - those require an i915
>> extension to get the CRTC/plane set for a given pipe.
>>
>> v2: Use igt_display_has_format_mod helper (Ville)
>>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>> ---
>>   tests/kms_plane_lowres.c | 24 +++++++++++++++++-------
>>   1 file changed, 17 insertions(+), 7 deletions(-)
>>
>> diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
>> index 0824ef8f..63a4e5b8 100644
>> --- a/tests/kms_plane_lowres.c
>> +++ b/tests/kms_plane_lowres.c
>> @@ -141,6 +141,12 @@ test_setup(data_t *data, enum pipe pipe, uint64_t modifier,
>>   	int size;
>>   	int i = 1, x, y;
>>   	igt_plane_t *plane;
>> +	uint64_t plane_modifier;
>> +	uint32_t plane_format;
> 
> These could be moved into tighter scope.
> 
> Apart from that lgtm
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
I'll fix that up then send the v3. Thanks.

Nicholas Kazlauskas

> 
>> +
>> +	igt_skip_on(!igt_display_has_format_mod(&data->display,
>> +						DRM_FORMAT_XRGB8888,
>> +						modifier));
>>   
>>   	igt_output_set_pipe(output, pipe);
>>   
>> @@ -171,10 +177,19 @@ test_setup(data_t *data, enum pipe pipe, uint64_t modifier,
>>   		x = 0;
>>   		y = mode->vdisplay - size;
>>   
>> +		plane_format = plane->type == DRM_PLANE_TYPE_CURSOR ?
>> +			DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888;
>> +
>> +		plane_modifier = plane->type == DRM_PLANE_TYPE_CURSOR ?
>> +			LOCAL_DRM_FORMAT_MOD_NONE : modifier;
>> +
>> +		igt_skip_on(!igt_plane_has_format_mod(plane, plane_format,
>> +						      plane_modifier));
>> +
>>   		igt_create_color_fb(data->drm_fd,
>>   				    size, size,
>> -				    plane->type == DRM_PLANE_TYPE_CURSOR ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
>> -				    plane->type == DRM_PLANE_TYPE_CURSOR ? LOCAL_DRM_FORMAT_MOD_NONE : modifier,
>> +				    plane_format,
>> +				    plane_modifier,
>>   				    1.0, 1.0, 0.0,
>>   				    &data->fb[i]);
>>   
>> @@ -251,11 +266,6 @@ static void
>>   test_plane_position(data_t *data, enum pipe pipe, uint64_t modifier)
>>   {
>>   	igt_output_t *output;
>> -	const int gen = intel_gen(intel_get_drm_devid(data->drm_fd));
>> -
>> -	if (modifier == LOCAL_I915_FORMAT_MOD_Y_TILED ||
>> -	    modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
>> -		igt_skip_on(gen < 9);
>>   
>>   	for_each_valid_output_on_pipe(&data->display, pipe, output)
>>   		test_plane_position_with_output(data, pipe, output, modifier);
>> -- 
>> 2.17.1
> 

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

  reply	other threads:[~2018-11-30 13:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 14:56 [igt-dev] [PATCH i-g-t 1/4] tests/kms_plane_scaling: Add support for testing AMDGPU Nicholas Kazlauskas
2018-11-28 14:56 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_plane_multiple: Add tiled-none plane position subtests Nicholas Kazlauskas
2018-11-29 21:48   ` Wentland, Harry
2018-11-30 13:35     ` Kazlauskas, Nicholas
2018-11-30 13:55   ` Ville Syrjälä
2018-11-30 13:57     ` Kazlauskas, Nicholas
2018-11-28 14:56 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane_lowres: Don't fail tests when missing format/mod support Nicholas Kazlauskas
2018-11-29 21:53   ` Wentland, Harry
2018-11-30 13:56   ` Ville Syrjälä
2018-11-30 13:59     ` Kazlauskas, Nicholas [this message]
2018-11-28 14:56 ` [igt-dev] [PATCH i-g-t 4/4] tests: Enable plane tests for AMDGPU Nicholas Kazlauskas
2018-11-29 21:54   ` Wentland, Harry
2018-11-28 16:22 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_plane_scaling: Add support for testing AMDGPU Patchwork
2018-11-30 13:51 ` [igt-dev] [PATCH i-g-t 1/4] " Ville Syrjälä
2018-11-30 13:55   ` Kazlauskas, Nicholas

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=501c910c-7ea2-1947-5548-b547500837af@amd.com \
    --to=nicholas.kazlauskas@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox