public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
@ 2019-01-18  8:58 Dhinakaran Pandiyan
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2019-01-18  8:58 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

Not clearing the pipe results in a test failure when the same pipe is
assigned to the next output.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Suggested-by: James Ausmus <james.ausmus@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 tests/kms_available_modes_crc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 45a47750..0c0282f8 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -484,6 +484,7 @@ test_available_modes(data_t* data)
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
 		igt_display_commit2(&data->display, data->commit);
+		igt_output_set_pipe(output, PIPE_NONE);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.14.1

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

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

* [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct
  2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
@ 2019-01-18  8:58 ` Dhinakaran Pandiyan
  2019-01-18 22:24   ` Souza, Jose
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure Dhinakaran Pandiyan
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2019-01-18  8:58 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

The test does not initialize data->fb, initializing stride and offset is
necessary to fill NV12 planes correctly. We should ideally be using
library functions in place handrolled code in this test, but let's start
with fixing the failures.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 tests/kms_available_modes_crc.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 0c0282f8..fbc40297 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -254,8 +254,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	uint64_t w, h;
 	signed ret, gemsize = 0;
 	unsigned tile_width, tile_height;
-	uint32_t strides[4] = {};
-	uint32_t offsets[4] = {};
 	int num_planes = 1;
 	uint64_t tiling;
 	int bpp = 0;
@@ -296,24 +294,25 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
 			     &tile_width, &tile_height);
-	strides[0] = ALIGN(w * bpp / 8, tile_width);
-	gemsize = data->size = strides[0] * ALIGN(h, tile_height);
+	data->fb.offsets[0] = 0;
+	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
+	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
 	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		offsets[1] = data->size;
-		strides[1] = strides[0];
+		data->fb.offsets[1] = data->size;
+		data->fb.strides[1] = data->fb.strides[0];
 		gemsize = data->size * 2;
 		num_planes = 2;
 	}
 
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
-			       igt_fb_mod_to_tiling(tiling), strides[0]);
+			       igt_fb_mod_to_tiling(tiling), data->fb.strides[0]);
 
 	igt_assert_eq(ret, 0);
 
 	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
-			  format, tiling, strides, offsets,
+			  format, tiling, data->fb.strides, data->fb.offsets,
 			  num_planes, LOCAL_DRM_MODE_FB_MODIFIERS,
 			  &data->fb.fb_id);
 
-- 
2.14.1

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

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

* [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure
  2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
@ 2019-01-18  8:58 ` Dhinakaran Pandiyan
  2019-01-18 22:44   ` Souza, Jose
  2019-01-18  9:57 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2019-01-18  8:58 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan

The size of the UV is not calculated correctly - height is not tile
aligned. Make use the stride and offset values intilized in the
previous patch to calculate plane size. The next step would be to rewrite
test to make use of the library functions, but for now this should fix
NV12.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 tests/kms_available_modes_crc.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index fbc40297..c0f33f3c 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -197,17 +197,18 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		writesize = data->size;
 		break;
 	case BYTES_PP_1:
-		memset((void*)data->buf, fillers[i].value, data->size);
+		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
 	case NV12:
-		memset((void*)data->buf, fillers[i].value&0xff,
-		       data->size);
+		memset((void *)data->buf, fillers[i].value&0xff,
+		       data->fb.offsets[1]);
 
-		memset((void*)(data->buf+data->size),
-		       (fillers[i].value>>8)&0xff, data->size/2);
+		memset((void *)(data->buf+data->fb.offsets[1]),
+		       (fillers[i].value>>8)&0xff,
+		       data->size - data->fb.offsets[1]);
 
-		writesize = data->size+data->size/2;
+		writesize = data->size;
 		break;
 	case P010:
 		ptemp_16_buf = (unsigned short*)data->buf;
@@ -302,6 +303,10 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		data->fb.offsets[1] = data->size;
 		data->fb.strides[1] = data->fb.strides[0];
 		gemsize = data->size * 2;
+
+		if (fillers[i].bpp == NV12)
+			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
+
 		num_planes = 2;
 	}
 
-- 
2.14.1

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
  2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure Dhinakaran Pandiyan
@ 2019-01-18  9:57 ` Patchwork
  2019-01-18 15:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-01-21  7:44 ` [igt-dev] [PATCH i-g-t 1/3] " Kahola, Mika
  4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-01-18  9:57 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
URL   : https://patchwork.freedesktop.org/series/55396/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5446 -> IGTPW_2258
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@i915_selftest@live_hangcheck:
    - fi-kbl-7560u:       PASS -> INCOMPLETE [fdo#108044]

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

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       PASS -> DMESG-WARN [fdo#102614]

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

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

  
#### Possible fixes ####

  * igt@i915_selftest@live_hangcheck:
    - fi-skl-guc:         DMESG-FAIL [fdo#108593] -> PASS

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          FAIL [fdo#103167] -> 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#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#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108044]: https://bugs.freedesktop.org/show_bug.cgi?id=108044
  [fdo#108593]: https://bugs.freedesktop.org/show_bug.cgi?id=108593
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
  [fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915


Participating hosts (47 -> 44)
------------------------------

  Additional (1): fi-icl-y 
  Missing    (4): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


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

    * IGT: IGT_4778 -> IGTPW_2258

  CI_DRM_5446: 5b3df9eee11f6b62d020e53f8e74db1f94892604 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2258: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2258/
  IGT_4778: 0c80bd7f2a964605f307e0220c6bb756685582b9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
  2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
                   ` (2 preceding siblings ...)
  2019-01-18  9:57 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Patchwork
@ 2019-01-18 15:59 ` Patchwork
  2019-01-21  7:44 ` [igt-dev] [PATCH i-g-t 1/3] " Kahola, Mika
  4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-01-18 15:59 UTC (permalink / raw)
  To: Dhinakaran Pandiyan; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
URL   : https://patchwork.freedesktop.org/series/55396/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5446_full -> IGTPW_2258_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

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

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
    - shard-snb:          NOTRUN -> DMESG-WARN [fdo#107956]

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

  * igt@kms_color@pipe-b-ctm-max:
    - shard-kbl:          PASS -> FAIL [fdo#108147]

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

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

  * igt@kms_cursor_crc@cursor-256x85-onscreen:
    - shard-glk:          PASS -> FAIL [fdo#103232] +4

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

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

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

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

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
    - shard-glk:          PASS -> FAIL [fdo#103167] +4

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

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

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

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

  * igt@perf_pmu@rc6-runtime-pm-long:
    - shard-apl:          PASS -> FAIL [fdo#105010]

  
#### Possible fixes ####

  * igt@kms_available_modes_crc@available_mode_test_crc:
    - shard-apl:          FAIL [fdo#106641] -> PASS
    - shard-glk:          FAIL [fdo#106641] -> PASS
    - shard-hsw:          FAIL [fdo#106641] -> PASS
    - shard-kbl:          FAIL [fdo#106641] -> PASS

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

  * igt@kms_cursor_crc@cursor-128x128-dpms:
    - shard-glk:          FAIL [fdo#103232] -> PASS

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

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS +1

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

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
    - shard-glk:          FAIL [fdo#103167] -> PASS +4

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

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

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

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

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - 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#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
  [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#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [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#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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

  Missing    (2): shard-skl shard-iclb 


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

    * IGT: IGT_4778 -> IGTPW_2258
    * Piglit: piglit_4509 -> None

  CI_DRM_5446: 5b3df9eee11f6b62d020e53f8e74db1f94892604 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2258: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2258/
  IGT_4778: 0c80bd7f2a964605f307e0220c6bb756685582b9 @ 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_2258/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
@ 2019-01-18 22:24   ` Souza, Jose
  2019-01-18 22:42     ` Souza, Jose
  0 siblings, 1 reply; 10+ messages in thread
From: Souza, Jose @ 2019-01-18 22:24 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran


[-- Attachment #1.1: Type: text/plain, Size: 2548 bytes --]

On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> The test does not initialize data->fb, initializing stride and offset
> is
> necessary to fill NV12 planes correctly. We should ideally be using
> library functions in place handrolled code in this test, but let's
> start
> with fixing the failures.

It is the right thing to fill igt_fb stride and offset but I did not
found any call to a function that would use that information in this
test.

> 
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  tests/kms_available_modes_crc.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/kms_available_modes_crc.c
> b/tests/kms_available_modes_crc.c
> index 0c0282f8..fbc40297 100644
> --- a/tests/kms_available_modes_crc.c
> +++ b/tests/kms_available_modes_crc.c
> @@ -254,8 +254,6 @@ static bool setup_fb(data_t *data, igt_output_t
> *output, igt_plane_t *plane,
>  	uint64_t w, h;
>  	signed ret, gemsize = 0;
>  	unsigned tile_width, tile_height;
> -	uint32_t strides[4] = {};
> -	uint32_t offsets[4] = {};
>  	int num_planes = 1;
>  	uint64_t tiling;
>  	int bpp = 0;
> @@ -296,24 +294,25 @@ static bool setup_fb(data_t *data, igt_output_t
> *output, igt_plane_t *plane,
>  
>  	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
>  			     &tile_width, &tile_height);
> -	strides[0] = ALIGN(w * bpp / 8, tile_width);
> -	gemsize = data->size = strides[0] * ALIGN(h, tile_height);
> +	data->fb.offsets[0] = 0;
> +	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
> +	gemsize = data->size = data->fb.strides[0] * ALIGN(h,
> tile_height);
>  
>  	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
> -		offsets[1] = data->size;
> -		strides[1] = strides[0];
> +		data->fb.offsets[1] = data->size;
> +		data->fb.strides[1] = data->fb.strides[0];
>  		gemsize = data->size * 2;
>  		num_planes = 2;
>  	}
>  
>  	data->gem_handle = gem_create(data->gfx_fd, gemsize);
>  	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
> -			       igt_fb_mod_to_tiling(tiling),
> strides[0]);
> +			       igt_fb_mod_to_tiling(tiling), data-
> >fb.strides[0]);
>  
>  	igt_assert_eq(ret, 0);
>  
>  	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
> -			  format, tiling, strides, offsets,
> +			  format, tiling, data->fb.strides, data-
> >fb.offsets,
>  			  num_planes, LOCAL_DRM_MODE_FB_MODIFIERS,
>  			  &data->fb.fb_id);
>  

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct
  2019-01-18 22:24   ` Souza, Jose
@ 2019-01-18 22:42     ` Souza, Jose
  0 siblings, 0 replies; 10+ messages in thread
From: Souza, Jose @ 2019-01-18 22:42 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran


[-- Attachment #1.1: Type: text/plain, Size: 3108 bytes --]

On Fri, 2019-01-18 at 22:24 +0000, Souza, Jose wrote:
> On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> > The test does not initialize data->fb, initializing stride and
> > offset
> > is
> > necessary to fill NV12 planes correctly. We should ideally be using
> > library functions in place handrolled code in this test, but let's
> > start
> > with fixing the failures.
> 
> It is the right thing to fill igt_fb stride and offset but I did not
> found any call to a function that would use that information in this
> test.


Okay now I got it, this patch do not fix anything is the work in the
next one that uses the changes from this one.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>


> 
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> >  tests/kms_available_modes_crc.c | 15 +++++++--------
> >  1 file changed, 7 insertions(+), 8 deletions(-)
> > 
> > diff --git a/tests/kms_available_modes_crc.c
> > b/tests/kms_available_modes_crc.c
> > index 0c0282f8..fbc40297 100644
> > --- a/tests/kms_available_modes_crc.c
> > +++ b/tests/kms_available_modes_crc.c
> > @@ -254,8 +254,6 @@ static bool setup_fb(data_t *data, igt_output_t
> > *output, igt_plane_t *plane,
> >  	uint64_t w, h;
> >  	signed ret, gemsize = 0;
> >  	unsigned tile_width, tile_height;
> > -	uint32_t strides[4] = {};
> > -	uint32_t offsets[4] = {};
> >  	int num_planes = 1;
> >  	uint64_t tiling;
> >  	int bpp = 0;
> > @@ -296,24 +294,25 @@ static bool setup_fb(data_t *data,
> > igt_output_t
> > *output, igt_plane_t *plane,
> >  
> >  	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
> >  			     &tile_width, &tile_height);
> > -	strides[0] = ALIGN(w * bpp / 8, tile_width);
> > -	gemsize = data->size = strides[0] * ALIGN(h, tile_height);
> > +	data->fb.offsets[0] = 0;
> > +	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
> > +	gemsize = data->size = data->fb.strides[0] * ALIGN(h,
> > tile_height);
> >  
> >  	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
> > -		offsets[1] = data->size;
> > -		strides[1] = strides[0];
> > +		data->fb.offsets[1] = data->size;
> > +		data->fb.strides[1] = data->fb.strides[0];
> >  		gemsize = data->size * 2;
> >  		num_planes = 2;
> >  	}
> >  
> >  	data->gem_handle = gem_create(data->gfx_fd, gemsize);
> >  	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
> > -			       igt_fb_mod_to_tiling(tiling),
> > strides[0]);
> > +			       igt_fb_mod_to_tiling(tiling), data-
> > > fb.strides[0]);
> >  
> >  	igt_assert_eq(ret, 0);
> >  
> >  	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
> > -			  format, tiling, strides, offsets,
> > +			  format, tiling, data->fb.strides, data-
> > > fb.offsets,
> >  			  num_planes, LOCAL_DRM_MODE_FB_MODIFIERS,
> >  			  &data->fb.fb_id);
> >  
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure
  2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure Dhinakaran Pandiyan
@ 2019-01-18 22:44   ` Souza, Jose
  2019-01-18 23:37     ` Dhinakaran Pandiyan
  0 siblings, 1 reply; 10+ messages in thread
From: Souza, Jose @ 2019-01-18 22:44 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran


[-- Attachment #1.1: Type: text/plain, Size: 2255 bytes --]

On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> The size of the UV is not calculated correctly - height is not tile
> aligned. Make use the stride and offset values intilized in the
> previous patch to calculate plane size. The next step would be to
> rewrite
> test to make use of the library functions, but for now this should
> fix
> NV12.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  tests/kms_available_modes_crc.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/kms_available_modes_crc.c
> b/tests/kms_available_modes_crc.c
> index fbc40297..c0f33f3c 100644
> --- a/tests/kms_available_modes_crc.c
> +++ b/tests/kms_available_modes_crc.c
> @@ -197,17 +197,18 @@ static bool fill_in_fb(data_t *data,
> igt_output_t *output, igt_plane_t *plane,
>  		writesize = data->size;
>  		break;
>  	case BYTES_PP_1:
> -		memset((void*)data->buf, fillers[i].value, data->size);
> +		memset((void *)data->buf, fillers[i].value, data-
> >size);
>  		writesize = data->size;
>  		break;
>  	case NV12:
> -		memset((void*)data->buf, fillers[i].value&0xff,
> -		       data->size);
> +		memset((void *)data->buf, fillers[i].value&0xff,
> +		       data->fb.offsets[1]);

Nit:
s/fillers[i].value&0xff/fillers[i].value & 0xff

>  
> -		memset((void*)(data->buf+data->size),
> -		       (fillers[i].value>>8)&0xff, data->size/2);
> +		memset((void *)(data->buf+data->fb.offsets[1]),
> +		       (fillers[i].value>>8)&0xff,
> +		       data->size - data->fb.offsets[1]);
>  
> -		writesize = data->size+data->size/2;
> +		writesize = data->size;
>  		break;
>  	case P010:
>  		ptemp_16_buf = (unsigned short*)data->buf;
> @@ -302,6 +303,10 @@ static bool setup_fb(data_t *data, igt_output_t
> *output, igt_plane_t *plane,
>  		data->fb.offsets[1] = data->size;
>  		data->fb.strides[1] = data->fb.strides[0];
>  		gemsize = data->size * 2;
> +
> +		if (fillers[i].bpp == NV12)
> +			data->size += data->fb.strides[1] * ALIGN(h/2,
> tile_height);
> +
>  		num_planes = 2;
>  	}
>  

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure
  2019-01-18 22:44   ` Souza, Jose
@ 2019-01-18 23:37     ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 10+ messages in thread
From: Dhinakaran Pandiyan @ 2019-01-18 23:37 UTC (permalink / raw)
  To: Souza, Jose, igt-dev@lists.freedesktop.org

On Fri, 2019-01-18 at 14:44 -0800, Souza, Jose wrote:
> On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> > The size of the UV is not calculated correctly - height is not tile
> > aligned. Make use the stride and offset values intilized in the
> > previous patch to calculate plane size. The next step would be to
> > rewrite
> > test to make use of the library functions, but for now this should
> > fix
> > NV12.
> 
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
> 
> > 
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> >  tests/kms_available_modes_crc.c | 17 +++++++++++------
> >  1 file changed, 11 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tests/kms_available_modes_crc.c
> > b/tests/kms_available_modes_crc.c
> > index fbc40297..c0f33f3c 100644
> > --- a/tests/kms_available_modes_crc.c
> > +++ b/tests/kms_available_modes_crc.c
> > @@ -197,17 +197,18 @@ static bool fill_in_fb(data_t *data,
> > igt_output_t *output, igt_plane_t *plane,
> >  		writesize = data->size;
> >  		break;
> >  	case BYTES_PP_1:
> > -		memset((void*)data->buf, fillers[i].value, data->size);
> > +		memset((void *)data->buf, fillers[i].value, data-
> > > size);
> > 
> >  		writesize = data->size;
> >  		break;
> >  	case NV12:
> > -		memset((void*)data->buf, fillers[i].value&0xff,
> > -		       data->size);
> > +		memset((void *)data->buf, fillers[i].value&0xff,
> > +		       data->fb.offsets[1]);
> 
> Nit:
> s/fillers[i].value&0xff/fillers[i].value & 0xff

The whole file needs styling improvements, didn't want to change just
this line.

Thanks for the review.

-DK
> 
> >  
> > -		memset((void*)(data->buf+data->size),
> > -		       (fillers[i].value>>8)&0xff, data->size/2);
> > +		memset((void *)(data->buf+data->fb.offsets[1]),
> > +		       (fillers[i].value>>8)&0xff,
> > +		       data->size - data->fb.offsets[1]);
> >  
> > -		writesize = data->size+data->size/2;
> > +		writesize = data->size;
> >  		break;
> >  	case P010:
> >  		ptemp_16_buf = (unsigned short*)data->buf;
> > @@ -302,6 +303,10 @@ static bool setup_fb(data_t *data,
> > igt_output_t
> > *output, igt_plane_t *plane,
> >  		data->fb.offsets[1] = data->size;
> >  		data->fb.strides[1] = data->fb.strides[0];
> >  		gemsize = data->size * 2;
> > +
> > +		if (fillers[i].bpp == NV12)
> > +			data->size += data->fb.strides[1] * ALIGN(h/2,
> > tile_height);
> > +
> >  		num_planes = 2;
> >  	}
> >  

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

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

* Re: [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it.
  2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
                   ` (3 preceding siblings ...)
  2019-01-18 15:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-01-21  7:44 ` Kahola, Mika
  4 siblings, 0 replies; 10+ messages in thread
From: Kahola, Mika @ 2019-01-21  7:44 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, Pandiyan, Dhinakaran

On Fri, 2019-01-18 at 00:58 -0800, Dhinakaran Pandiyan wrote:
> Not clearing the pipe results in a test failure when the same pipe is
> assigned to the next output.
> 
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Suggested-by: James Ausmus <james.ausmus@intel.com>

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  tests/kms_available_modes_crc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/kms_available_modes_crc.c
> b/tests/kms_available_modes_crc.c
> index 45a47750..0c0282f8 100644
> --- a/tests/kms_available_modes_crc.c
> +++ b/tests/kms_available_modes_crc.c
> @@ -484,6 +484,7 @@ test_available_modes(data_t* data)
>  		igt_pipe_crc_stop(data->pipe_crc);
>  		igt_pipe_crc_free(data->pipe_crc);
>  		igt_display_commit2(&data->display, data->commit);
> +		igt_output_set_pipe(output, PIPE_NONE);
>  	}
>  	igt_assert(invalids == 0);
>  }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-18  8:58 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Dhinakaran Pandiyan
2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_available_modes_crc: Initialize fb struct Dhinakaran Pandiyan
2019-01-18 22:24   ` Souza, Jose
2019-01-18 22:42     ` Souza, Jose
2019-01-18  8:58 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_modes_available_crc: Fix NV12 failure Dhinakaran Pandiyan
2019-01-18 22:44   ` Souza, Jose
2019-01-18 23:37     ` Dhinakaran Pandiyan
2019-01-18  9:57 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Reset output->pipe after testing it Patchwork
2019-01-18 15:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-21  7:44 ` [igt-dev] [PATCH i-g-t 1/3] " Kahola, Mika

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