public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
@ 2019-01-22 14:38 Juha-Pekka Heikkila
  2019-01-22 15:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Juha-Pekka Heikkila @ 2019-01-22 14:38 UTC (permalink / raw)
  To: igt-dev

Make certain viewports are divisible by four due to intel
hw workarounds for NV12.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109381
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_rotation_crc.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 8f343e0..d66b489 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -467,6 +467,7 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
 			igt_plane_set_size(planes[c].plane, h, w);
 
 		igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
+
 		igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
 	}
 
@@ -486,10 +487,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
 static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
 			  int c)
 {
-	p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay)
-			+ ((data->planepos[c].origo & p_right) ? mode->hdisplay : 0);
-	p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay)
-			+ ((data->planepos[c].origo & p_bottom) ? mode->vdisplay : 0);
+	if (data->planepos[c].origo & p_right) {
+		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay
+				+ mode->hdisplay);
+		p[c].x1 &= ~3;
+		p[c].x1 -= (p[c].x1+p[c].width-mode->hdisplay)&3;
+	} else {
+		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay);
+		p[c].x1 &= ~3;
+	}
+
+	if (data->planepos[c].origo & p_bottom) {
+		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay
+				+ mode->vdisplay);
+		p[c].y1 &= ~3;
+		p[c].y1 -= (p[c].y1+p[c].height-mode->vdisplay)&3;
+	} else {
+		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay);
+		p[c].y1 &= ~3;
+	}
 }
 
 /*
-- 
2.7.4

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
@ 2019-01-22 15:25 ` Patchwork
  2019-01-22 18:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-22 15:25 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

== Series Details ==

Series: tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
URL   : https://patchwork.freedesktop.org/series/55566/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5463 -> IGTPW_2271
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55566/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2271 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103167]

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#107362]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362] +1

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         PASS -> FAIL [fdo#104008]

  
#### Possible fixes ####

  * igt@kms_frontbuffer_tracking@basic:
    - {fi-icl-u3}:        FAIL [fdo#103167] -> PASS

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-byt-clapper:     FAIL [fdo#107362] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316


Participating hosts (41 -> 41)
------------------------------

  Additional (4): fi-icl-y fi-icl-u2 fi-apl-guc fi-pnv-d510 
  Missing    (4): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


Build changes
-------------

    * IGT: IGT_4782 -> IGTPW_2271

  CI_DRM_5463: 6bd1569466edcb2f890a374be27f0eb6780963f9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2271: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2271/
  IGT_4782: 96f3a1b876e0dd24706b85fb872f12031a436e84 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
  2019-01-22 15:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-01-22 18:00 ` Patchwork
  2019-01-23 21:07 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-22 18:00 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

== Series Details ==

Series: tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
URL   : https://patchwork.freedesktop.org/series/55566/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5463_full -> IGTPW_2271_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55566/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2271_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_pipe_control_store_loop@fresh-buffer:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411] / [fdo#107469]

  * igt@gem_tiled_pread_pwrite:
    - shard-glk:          PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-glk:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_color@pipe-c-degamma:
    - shard-apl:          NOTRUN -> FAIL [fdo#104782]

  * igt@kms_color@pipe-c-legacy-gamma:
    - shard-apl:          PASS -> FAIL [fdo#104782]

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +5

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-glk:          PASS -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          NOTRUN -> FAIL [fdo#103232]
    - shard-kbl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
    - shard-hsw:          PASS -> DMESG-WARN [fdo#102614]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167] +5

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
    - shard-glk:          PASS -> FAIL [fdo#103167] +9
    - shard-kbl:          PASS -> FAIL [fdo#103167]

  * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
    - shard-glk:          PASS -> FAIL [fdo#108948]

  * igt@kms_plane@plane-position-covered-pipe-a-planes:
    - shard-kbl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
    - shard-apl:          PASS -> FAIL [fdo#103166] +8

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +5

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  
#### Possible fixes ####

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +3
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
    - shard-glk:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          FAIL [fdo#103166] -> PASS

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109381] -> PASS
    - shard-glk:          DMESG-FAIL [fdo#105763] / [fdo#106538] -> PASS
    - shard-apl:          DMESG-FAIL [fdo#108950] -> PASS

  * igt@kms_setmode@basic:
    - shard-apl:          FAIL [fdo#99912] -> PASS

  * igt@perf_pmu@rc6:
    - shard-kbl:          {SKIP} [fdo#109271] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#107469]: https://bugs.freedesktop.org/show_bug.cgi?id=107469
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109381]: https://bugs.freedesktop.org/show_bug.cgi?id=109381
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4782 -> IGTPW_2271
    * Piglit: piglit_4509 -> None

  CI_DRM_5463: 6bd1569466edcb2f890a374be27f0eb6780963f9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2271: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2271/
  IGT_4782: 96f3a1b876e0dd24706b85fb872f12031a436e84 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
  2019-01-22 15:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-01-22 18:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-01-23 21:07 ` Ville Syrjälä
  2019-01-24 12:29   ` Juha-Pekka Heikkila
  2019-01-24 15:45 ` Juha-Pekka Heikkila
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Ville Syrjälä @ 2019-01-23 21:07 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

On Tue, Jan 22, 2019 at 04:38:57PM +0200, Juha-Pekka Heikkila wrote:
> Make certain viewports are divisible by four due to intel
> hw workarounds for NV12.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109381
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  tests/kms_rotation_crc.c | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 8f343e0..d66b489 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -467,6 +467,7 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
>  			igt_plane_set_size(planes[c].plane, h, w);
>  
>  		igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
> +
>  		igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
>  	}
>  
> @@ -486,10 +487,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
>  static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
>  			  int c)
>  {
> -	p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay)
> -			+ ((data->planepos[c].origo & p_right) ? mode->hdisplay : 0);
> -	p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay)
> -			+ ((data->planepos[c].origo & p_bottom) ? mode->vdisplay : 0);
> +	if (data->planepos[c].origo & p_right) {
> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay
> +				+ mode->hdisplay);
> +		p[c].x1 &= ~3;
> +		p[c].x1 -= (p[c].x1+p[c].width-mode->hdisplay)&3;

So assuming the plane is extending past the right edge of the screen (is
that always true here?) the part we want a multiple of four is
'hdisplay-x1', so not quite sure why we're looking at the chopped off
part instead. But since the plane size is already aligned to four
(maybe?) I guess this works.

Hmm, aren't most display resolutions multiple of four anyway? So I wonder
why a simple 'x1 &= ~3' etc. is not sufficient?

> +	} else {
> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay);
> +		p[c].x1 &= ~3;
> +	}
> +
> +	if (data->planepos[c].origo & p_bottom) {
> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay
> +				+ mode->vdisplay);
> +		p[c].y1 &= ~3;
> +		p[c].y1 -= (p[c].y1+p[c].height-mode->vdisplay)&3;
> +	} else {
> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay);
> +		p[c].y1 &= ~3;
> +	}
>  }
>  
>  /*
> -- 
> 2.7.4
> 
> _______________________________________________
> 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] 9+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-23 21:07 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
@ 2019-01-24 12:29   ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 9+ messages in thread
From: Juha-Pekka Heikkila @ 2019-01-24 12:29 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev

On 23.1.2019 23.07, Ville Syrjälä wrote:
> On Tue, Jan 22, 2019 at 04:38:57PM +0200, Juha-Pekka Heikkila wrote:
>> Make certain viewports are divisible by four due to intel
>> hw workarounds for NV12.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109381
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>>   tests/kms_rotation_crc.c | 24 ++++++++++++++++++++----
>>   1 file changed, 20 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
>> index 8f343e0..d66b489 100644
>> --- a/tests/kms_rotation_crc.c
>> +++ b/tests/kms_rotation_crc.c
>> @@ -467,6 +467,7 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
>>   			igt_plane_set_size(planes[c].plane, h, w);
>>   
>>   		igt_plane_set_position(planes[c].plane, planeinfo[c].x1, planeinfo[c].y1);
>> +
>>   		igt_plane_set_rotation(planes[c].plane, planeinfo[c].rotation_hw);
>>   	}
>>   
>> @@ -486,10 +487,25 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
>>   static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
>>   			  int c)
>>   {
>> -	p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay)
>> -			+ ((data->planepos[c].origo & p_right) ? mode->hdisplay : 0);
>> -	p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay)
>> -			+ ((data->planepos[c].origo & p_bottom) ? mode->vdisplay : 0);
>> +	if (data->planepos[c].origo & p_right) {
>> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay
>> +				+ mode->hdisplay);
>> +		p[c].x1 &= ~3;
>> +		p[c].x1 -= (p[c].x1+p[c].width-mode->hdisplay)&3;
> 
> So assuming the plane is extending past the right edge of the screen (is
> that always true here?) the part we want a multiple of four is
> 'hdisplay-x1', so not quite sure why we're looking at the chopped off
> part instead. But since the plane size is already aligned to four
> (maybe?) I guess this works.
> 
> Hmm, aren't most display resolutions multiple of four anyway? So I wonder
> why a simple 'x1 &= ~3' etc. is not sufficient?

I was not certain all modes have multiple of four sizes thus I had bit 
of extra juggling here. Above code is ran also for for cases where 
planes are in middle of screen not going over any edges. Though, I 
realized I can change it to bit more simple, I'll make another patch. I 
get to remove that random newline on the same go :)

/Juha-Pekka

> 
>> +	} else {
>> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay);
>> +		p[c].x1 &= ~3;
>> +	}
>> +
>> +	if (data->planepos[c].origo & p_bottom) {
>> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay
>> +				+ mode->vdisplay);
>> +		p[c].y1 &= ~3;
>> +		p[c].y1 -= (p[c].y1+p[c].height-mode->vdisplay)&3;
>> +	} else {
>> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay);
>> +		p[c].y1 &= ~3;
>> +	}
>>   }
>>   
>>   /*
>> -- 
>> 2.7.4
>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 

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

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

* [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
                   ` (2 preceding siblings ...)
  2019-01-23 21:07 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
@ 2019-01-24 15:45 ` Juha-Pekka Heikkila
  2019-01-25 21:29   ` Ville Syrjälä
  2019-01-24 16:45 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2) Patchwork
  2019-01-24 20:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 9+ messages in thread
From: Juha-Pekka Heikkila @ 2019-01-24 15:45 UTC (permalink / raw)
  To: igt-dev

Make certain viewports are divisible by four due to intel
hw workarounds for NV12.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_rotation_crc.c | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 8f343e0..fc995d0 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -486,10 +486,31 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
 static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
 			  int c)
 {
-	p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay)
-			+ ((data->planepos[c].origo & p_right) ? mode->hdisplay : 0);
-	p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay)
-			+ ((data->planepos[c].origo & p_bottom) ? mode->vdisplay : 0);
+	if (data->planepos[c].origo & p_right) {
+		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay
+				+ mode->hdisplay);
+		p[c].x1 &= ~3;
+		/*
+		 * At this point is handled surface on right side. If display
+		 * mode is not divisible by 4 but with 2 point location is
+		 * fixed to match requirements. Because of YUV planes here is
+		 * intentionally ignored bit 1.
+		 */
+		p[c].x1 -= mode->hdisplay & 2;
+	} else {
+		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay);
+		p[c].x1 &= ~3;
+	}
+
+	if (data->planepos[c].origo & p_bottom) {
+		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay
+				+ mode->vdisplay);
+		p[c].y1 &= ~3;
+		p[c].y1 -= mode->vdisplay & 2;
+	} else {
+		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay);
+		p[c].y1 &= ~3;
+	}
 }
 
 /*
-- 
2.7.4

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2)
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
                   ` (3 preceding siblings ...)
  2019-01-24 15:45 ` Juha-Pekka Heikkila
@ 2019-01-24 16:45 ` Patchwork
  2019-01-24 20:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-24 16:45 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

== Series Details ==

Series: tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2)
URL   : https://patchwork.freedesktop.org/series/55566/
State : success

== Summary ==

CI Bug Log - changes from IGT_4790 -> IGTPW_2291
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55566/revisions/2/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2291 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@read_all_entries:
    - fi-kbl-7567u:       PASS -> DMESG-WARN [fdo#103558] / [fdo#105602]

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7567u:       PASS -> WARN [fdo#109380]

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-kbl-7500u:       PASS -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105602]

  
#### Possible fixes ####

  * igt@i915_module_load@reload-no-display:
    - fi-kbl-7567u:       DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS +1

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       FAIL [fdo#108767] -> PASS

  * igt@pm_rpm@basic-pci-d3-state:
    - fi-byt-n2820:       {SKIP} [fdo#109271] -> PASS

  * igt@pm_rpm@basic-rte:
    - fi-byt-n2820:       FAIL [fdo#108800] -> PASS

  * igt@prime_vgem@basic-fence-flip:
    - fi-kbl-7500u:       {SKIP} [fdo#109271] -> PASS +33

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109380]: https://bugs.freedesktop.org/show_bug.cgi?id=109380


Participating hosts (43 -> 41)
------------------------------

  Missing    (2): fi-kbl-soraka fi-ilk-m540 


Build changes
-------------

    * IGT: IGT_4790 -> IGTPW_2291

  CI_DRM_5475: 9ced33eacb10c4ec1f03010d6efd9f21c6cf3ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2291: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2291/
  IGT_4790: dcdf4b04e16312f8f52ad389388d834f9d74b8f0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2)
  2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
                   ` (4 preceding siblings ...)
  2019-01-24 16:45 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2) Patchwork
@ 2019-01-24 20:13 ` Patchwork
  5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-24 20:13 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

== Series Details ==

Series: tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2)
URL   : https://patchwork.freedesktop.org/series/55566/
State : success

== Summary ==

CI Bug Log - changes from IGT_4790_full -> IGTPW_2291_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/55566/revisions/2/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2291_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@pi-ringfull-render:
    - shard-kbl:          NOTRUN -> FAIL [fdo#103158]

  * igt@gem_userptr_blits@stress-mm-invalidate-close:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@i915_suspend@shrink:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#109244]
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#109244]

  * igt@kms_busy@extended-modeset-hang-newfb-render-a:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956] +1
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_busy@extended-pageflip-hang-newfb-render-a:
    - shard-glk:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          NOTRUN -> FAIL [fdo#108145] +1

  * igt@kms_cursor_crc@cursor-128x128-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +3

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-128x42-onscreen:
    - shard-glk:          PASS -> FAIL [fdo#103232] +5
    - shard-kbl:          PASS -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-kbl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-glk:          PASS -> FAIL [fdo#104873]

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          PASS -> FAIL [fdo#105363]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145] / [fdo#108590]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +7

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
    - shard-kbl:          NOTRUN -> FAIL [fdo#103166]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
    - shard-apl:          PASS -> FAIL [fdo#103166] +3
    - shard-kbl:          PASS -> FAIL [fdo#103166] +2

  * igt@kms_setmode@basic:
    - shard-apl:          PASS -> FAIL [fdo#99912]
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@bcs0-s3:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_color@pipe-a-degamma:
    - shard-apl:          FAIL [fdo#104782] / [fdo#108145] -> PASS

  * igt@kms_color@pipe-b-degamma:
    - shard-kbl:          FAIL [fdo#104782] -> PASS
    - shard-apl:          FAIL [fdo#104782] -> PASS +1

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-glk:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-64x64-suspend:
    - shard-glk:          INCOMPLETE [fdo#103359] / [k.org#198133] -> PASS

  * igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
    - shard-glk:          FAIL [fdo#105454] / [fdo#106509] -> PASS

  * igt@kms_cursor_legacy@pipe-c-torture-bo:
    - shard-kbl:          DMESG-WARN [fdo#107122] -> PASS

  * igt@kms_plane@pixel-format-pipe-a-planes:
    - shard-kbl:          FAIL [fdo#103166] -> PASS

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +5

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-glk:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_rotation_crc@multiplane-rotation:
    - shard-glk:          DMESG-FAIL [fdo#105763] / [fdo#106538] -> PASS +1

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          FAIL [fdo#109381] -> PASS
    - shard-apl:          DMESG-FAIL [fdo#108950] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103158]: https://bugs.freedesktop.org/show_bug.cgi?id=103158
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105454]: https://bugs.freedesktop.org/show_bug.cgi?id=105454
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
  [fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
  [fdo#107122]: https://bugs.freedesktop.org/show_bug.cgi?id=107122
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
  [fdo#108950]: https://bugs.freedesktop.org/show_bug.cgi?id=108950
  [fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109381]: https://bugs.freedesktop.org/show_bug.cgi?id=109381
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4790 -> IGTPW_2291

  CI_DRM_5475: 9ced33eacb10c4ec1f03010d6efd9f21c6cf3ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2291: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2291/
  IGT_4790: dcdf4b04e16312f8f52ad389388d834f9d74b8f0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* Re: [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests
  2019-01-24 15:45 ` Juha-Pekka Heikkila
@ 2019-01-25 21:29   ` Ville Syrjälä
  0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2019-01-25 21:29 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

On Thu, Jan 24, 2019 at 05:45:25PM +0200, Juha-Pekka Heikkila wrote:
> Make certain viewports are divisible by four due to intel
> hw workarounds for NV12.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  tests/kms_rotation_crc.c | 29 +++++++++++++++++++++++++----
>  1 file changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 8f343e0..fc995d0 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -486,10 +486,31 @@ static bool get_multiplane_crc(data_t *data, igt_output_t *output,
>  static void pointlocation(data_t *data, planeinfos *p, drmModeModeInfo *mode,
>  			  int c)
>  {
> -	p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay)
> -			+ ((data->planepos[c].origo & p_right) ? mode->hdisplay : 0);
> -	p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay)
> -			+ ((data->planepos[c].origo & p_bottom) ? mode->vdisplay : 0);
> +	if (data->planepos[c].origo & p_right) {
> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay
> +				+ mode->hdisplay);
> +		p[c].x1 &= ~3;
> +		/*
> +		 * At this point is handled surface on right side. If display
> +		 * mode is not divisible by 4 but with 2 point location is
> +		 * fixed to match requirements. Because of YUV planes here is
> +		 * intentionally ignored bit 1.
> +		 */
> +		p[c].x1 -= mode->hdisplay & 2;

Not really sure why we'd ignore the first bit. If hdisplay is odd
we'll still end up with an odd viewport width, which will fail. If we
don't ignore the bit we'll end up with an odd x1 instead, which would
still fail no?

Anwways, I think this patch should do what we want so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> +	} else {
> +		p[c].x1 = (int32_t)(data->planepos[c].x * mode->hdisplay);
> +		p[c].x1 &= ~3;
> +	}
> +
> +	if (data->planepos[c].origo & p_bottom) {
> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay
> +				+ mode->vdisplay);
> +		p[c].y1 &= ~3;
> +		p[c].y1 -= mode->vdisplay & 2;
> +	} else {
> +		p[c].y1 = (int32_t)(data->planepos[c].y * mode->vdisplay);
> +		p[c].y1 &= ~3;
> +	}
>  }
>  
>  /*
> -- 
> 2.7.4
> 
> _______________________________________________
> 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] 9+ messages in thread

end of thread, other threads:[~2019-01-25 21:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 14:38 [igt-dev] [PATCH i-g-t] tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests Juha-Pekka Heikkila
2019-01-22 15:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-22 18:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-23 21:07 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2019-01-24 12:29   ` Juha-Pekka Heikkila
2019-01-24 15:45 ` Juha-Pekka Heikkila
2019-01-25 21:29   ` Ville Syrjälä
2019-01-24 16:45 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Fix multiplane-rotation-cropping* tests (rev2) Patchwork
2019-01-24 20:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox