All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2.
@ 2018-11-07  7:30 Maarten Lankhorst
  2018-11-07 12:45 ` Ville Syrjälä
  2018-11-07 19:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Maarten Lankhorst @ 2018-11-07  7:30 UTC (permalink / raw)
  To: igt-dev

The previous fixes to kms_frontbuffer_tracking fixed the sharedfb tests,
but the stridechange test still creates its own fb. Use the existing 'big'
fb to force a stride change, without ending up with an excessive stride.

Changes since v1:
- Use the big fb used by the shrfb tests. It already exists and has
  the right dimensions, so why not?

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_frontbuffer_tracking.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index bf4a68ff2bde..276ef83ce386 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -2915,7 +2915,7 @@ static void badstride_subtest(const struct test_mode *t)
  */
 static void stridechange_subtest(const struct test_mode *t)
 {
-	struct igt_fb new_fb, *old_fb;
+	struct igt_fb *new_fb, *old_fb;
 	struct modeset_params *params = pick_params(t);
 	int rc;
 
@@ -2923,15 +2923,14 @@ static void stridechange_subtest(const struct test_mode *t)
 
 	old_fb = params->primary.fb;
 
-	create_fb(t->format, params->primary.fb->width + 512, params->primary.fb->height,
-		  opt.tiling, t->plane, &new_fb);
-	fill_fb(&new_fb, COLOR_PRIM_BG);
-
-	igt_assert(old_fb->strides[0] != new_fb.strides[0]);
-
 	/* We can't assert that FBC will be enabled since there may not be
 	 * enough space for the CFB, but we can check the CRC. */
-	params->primary.fb = &new_fb;
+	new_fb = &fbs[t->format].big;
+	igt_assert(old_fb->strides[0] != new_fb->strides[0]);
+
+	params->primary.fb = new_fb;
+	fill_fb_region(&params->primary, COLOR_PRIM_BG);
+
 	set_mode_for_params(params);
 	do_assertions(DONT_ASSERT_FEATURE_STATUS);
 
@@ -2941,7 +2940,7 @@ static void stridechange_subtest(const struct test_mode *t)
 	do_assertions(0);
 
 	/* This operation is the same as above, but with the planes API. */
-	params->primary.fb = &new_fb;
+	params->primary.fb = new_fb;
 	set_prim_plane_for_params(params);
 	do_assertions(DONT_ASSERT_FEATURE_STATUS);
 
@@ -2953,11 +2952,9 @@ static void stridechange_subtest(const struct test_mode *t)
 	 * Try to set a new stride. with the page flip api. This is allowed
 	 * with the atomic page flip helper, but not with the legacy page flip.
 	 */
-	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb.fb_id, 0, NULL);
+	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb->fb_id, 0, NULL);
 	igt_assert(rc == -EINVAL || rc == 0);
 	do_assertions(0);
-
-	igt_remove_fb(drm.fd, &new_fb);
 }
 
 /**
-- 
2.19.1

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2.
  2018-11-07  7:30 [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2 Maarten Lankhorst
@ 2018-11-07 12:45 ` Ville Syrjälä
  2018-11-07 14:45   ` Maarten Lankhorst
  2018-11-07 19:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2018-11-07 12:45 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

On Wed, Nov 07, 2018 at 08:30:28AM +0100, Maarten Lankhorst wrote:
> The previous fixes to kms_frontbuffer_tracking fixed the sharedfb tests,
> but the stridechange test still creates its own fb. Use the existing 'big'
> fb to force a stride change, without ending up with an excessive stride.
> 
> Changes since v1:
> - Use the big fb used by the shrfb tests. It already exists and has
>   the right dimensions, so why not?
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

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

> ---
>  tests/kms_frontbuffer_tracking.c | 21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index bf4a68ff2bde..276ef83ce386 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -2915,7 +2915,7 @@ static void badstride_subtest(const struct test_mode *t)
>   */
>  static void stridechange_subtest(const struct test_mode *t)
>  {
> -	struct igt_fb new_fb, *old_fb;
> +	struct igt_fb *new_fb, *old_fb;
>  	struct modeset_params *params = pick_params(t);
>  	int rc;
>  
> @@ -2923,15 +2923,14 @@ static void stridechange_subtest(const struct test_mode *t)
>  
>  	old_fb = params->primary.fb;
>  
> -	create_fb(t->format, params->primary.fb->width + 512, params->primary.fb->height,
> -		  opt.tiling, t->plane, &new_fb);
> -	fill_fb(&new_fb, COLOR_PRIM_BG);
> -
> -	igt_assert(old_fb->strides[0] != new_fb.strides[0]);
> -
>  	/* We can't assert that FBC will be enabled since there may not be
>  	 * enough space for the CFB, but we can check the CRC. */
> -	params->primary.fb = &new_fb;
> +	new_fb = &fbs[t->format].big;
> +	igt_assert(old_fb->strides[0] != new_fb->strides[0]);
> +
> +	params->primary.fb = new_fb;
> +	fill_fb_region(&params->primary, COLOR_PRIM_BG);
> +
>  	set_mode_for_params(params);
>  	do_assertions(DONT_ASSERT_FEATURE_STATUS);
>  
> @@ -2941,7 +2940,7 @@ static void stridechange_subtest(const struct test_mode *t)
>  	do_assertions(0);
>  
>  	/* This operation is the same as above, but with the planes API. */
> -	params->primary.fb = &new_fb;
> +	params->primary.fb = new_fb;
>  	set_prim_plane_for_params(params);
>  	do_assertions(DONT_ASSERT_FEATURE_STATUS);
>  
> @@ -2953,11 +2952,9 @@ static void stridechange_subtest(const struct test_mode *t)
>  	 * Try to set a new stride. with the page flip api. This is allowed
>  	 * with the atomic page flip helper, but not with the legacy page flip.
>  	 */
> -	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb.fb_id, 0, NULL);
> +	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb->fb_id, 0, NULL);
>  	igt_assert(rc == -EINVAL || rc == 0);
>  	do_assertions(0);
> -
> -	igt_remove_fb(drm.fd, &new_fb);
>  }
>  
>  /**
> -- 
> 2.19.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2.
  2018-11-07 12:45 ` Ville Syrjälä
@ 2018-11-07 14:45   ` Maarten Lankhorst
  0 siblings, 0 replies; 4+ messages in thread
From: Maarten Lankhorst @ 2018-11-07 14:45 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

Op 07-11-18 om 13:45 schreef Ville Syrjälä:
> On Wed, Nov 07, 2018 at 08:30:28AM +0100, Maarten Lankhorst wrote:
>> The previous fixes to kms_frontbuffer_tracking fixed the sharedfb tests,
>> but the stridechange test still creates its own fb. Use the existing 'big'
>> fb to force a stride change, without ending up with an excessive stride.
>>
>> Changes since v1:
>> - Use the big fb used by the shrfb tests. It already exists and has
>>   the right dimensions, so why not?
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Seems reasonable.
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>> ---
>>  tests/kms_frontbuffer_tracking.c | 21 +++++++++------------
>>  1 file changed, 9 insertions(+), 12 deletions(-)
>>
>> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
>> index bf4a68ff2bde..276ef83ce386 100644
>> --- a/tests/kms_frontbuffer_tracking.c
>> +++ b/tests/kms_frontbuffer_tracking.c
>> @@ -2915,7 +2915,7 @@ static void badstride_subtest(const struct test_mode *t)
>>   */
>>  static void stridechange_subtest(const struct test_mode *t)
>>  {
>> -	struct igt_fb new_fb, *old_fb;
>> +	struct igt_fb *new_fb, *old_fb;
>>  	struct modeset_params *params = pick_params(t);
>>  	int rc;
>>  
>> @@ -2923,15 +2923,14 @@ static void stridechange_subtest(const struct test_mode *t)
>>  
>>  	old_fb = params->primary.fb;
>>  
>> -	create_fb(t->format, params->primary.fb->width + 512, params->primary.fb->height,
>> -		  opt.tiling, t->plane, &new_fb);
>> -	fill_fb(&new_fb, COLOR_PRIM_BG);
>> -
>> -	igt_assert(old_fb->strides[0] != new_fb.strides[0]);
>> -
>>  	/* We can't assert that FBC will be enabled since there may not be
>>  	 * enough space for the CFB, but we can check the CRC. */
>> -	params->primary.fb = &new_fb;
>> +	new_fb = &fbs[t->format].big;
>> +	igt_assert(old_fb->strides[0] != new_fb->strides[0]);
>> +
>> +	params->primary.fb = new_fb;
>> +	fill_fb_region(&params->primary, COLOR_PRIM_BG);
>> +
>>  	set_mode_for_params(params);
>>  	do_assertions(DONT_ASSERT_FEATURE_STATUS);
>>  
>> @@ -2941,7 +2940,7 @@ static void stridechange_subtest(const struct test_mode *t)
>>  	do_assertions(0);
>>  
>>  	/* This operation is the same as above, but with the planes API. */
>> -	params->primary.fb = &new_fb;
>> +	params->primary.fb = new_fb;
>>  	set_prim_plane_for_params(params);
>>  	do_assertions(DONT_ASSERT_FEATURE_STATUS);
>>  
>> @@ -2953,11 +2952,9 @@ static void stridechange_subtest(const struct test_mode *t)
>>  	 * Try to set a new stride. with the page flip api. This is allowed
>>  	 * with the atomic page flip helper, but not with the legacy page flip.
>>  	 */
>> -	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb.fb_id, 0, NULL);
>> +	rc = drmModePageFlip(drm.fd, drm.display.pipes[params->pipe].crtc_id, new_fb->fb_id, 0, NULL);
>>  	igt_assert(rc == -EINVAL || rc == 0);
>>  	do_assertions(0);
>> -
>> -	igt_remove_fb(drm.fd, &new_fb);
>>  }
>>  
>>  /**
>> -- 
>> 2.19.1
>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev

Thanks, pushed. :)

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2.
  2018-11-07  7:30 [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2 Maarten Lankhorst
  2018-11-07 12:45 ` Ville Syrjälä
@ 2018-11-07 19:34 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-11-07 19:34 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: igt-dev

== Series Details ==

Series: tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2.
URL   : https://patchwork.freedesktop.org/series/52142/
State : failure

== Summary ==

Series 52142 revision 1 was fully merged or fully failed: no git log

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

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

end of thread, other threads:[~2018-11-07 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07  7:30 [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Really do not skip on 4k displays, v2 Maarten Lankhorst
2018-11-07 12:45 ` Ville Syrjälä
2018-11-07 14:45   ` Maarten Lankhorst
2018-11-07 19:34 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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.