* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-11 11:45 Juha-Pekka Heikkila
2019-02-11 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-11 11:45 UTC (permalink / raw)
To: igt-dev
This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_available_modes_crc.c | 136 ++++++----------------------------------
1 file changed, 20 insertions(+), 116 deletions(-)
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..eafccfb 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -122,48 +122,11 @@ static const struct {
uint32_t fourcc;
char zeropadding;
enum { BYTES_PP_1=1,
- BYTES_PP_2=2,
- BYTES_PP_4=4,
- NV12,
- P010,
- SKIP4 } bpp;
+ BYTES_PP_4=4} bpp;
uint32_t value;
} fillers[] = {
{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
- { DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
- { DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
- { DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
- /*
- * following two are skipped because blending seems to work
- * incorrectly with exception of AR24 on cursor plane.
- * Test still creates the planes, just filling plane
- * and getting crc is skipped.
- */
- { DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
- { DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
- { DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
- { DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
- { DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
- { DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
- { DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
- /*
- * (semi-)planar formats
- */
- { DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
- { DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
- { DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
- { DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
{ 0, 0, 0, 0 }
};
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
uint32_t format)
{
signed i, c, writesize;
- unsigned short* ptemp_16_buf;
unsigned int* ptemp_32_buf;
- for( i = 0; fillers[i].fourcc != 0; i++ ) {
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
if( fillers[i].fourcc == format )
break;
}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
ptemp_32_buf[c] = fillers[i].value;
writesize = data->size;
break;
- case BYTES_PP_2:
- ptemp_16_buf = (unsigned short*)data->buf;
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)fillers[i].value;
- writesize = data->size;
- break;
case BYTES_PP_1:
memset((void *)data->buf, fillers[i].value, data->size);
writesize = data->size;
break;
- case NV12:
- memset((void *)data->buf, fillers[i].value&0xff,
- data->fb.offsets[1]);
-
- memset((void *)(data->buf+data->fb.offsets[1]),
- (fillers[i].value>>8)&0xff,
- data->size - data->fb.offsets[1]);
-
- writesize = data->size;
- break;
- case P010:
- ptemp_16_buf = (unsigned short*)data->buf;
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
- ptemp_16_buf = (unsigned short*)(data->buf+data->size);
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
- writesize = data->size+data->size/2;
- break;
- case SKIP4:
- if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
- plane->type == DRM_PLANE_TYPE_CURSOR) {
- /*
- * special for cursor plane where blending works correctly.
- */
- ptemp_32_buf = (unsigned int*)data->buf;
- for (c = 0; c < data->size/4; c++)
- ptemp_32_buf[c] = fillers[i].value;
- writesize = data->size;
- break;
- }
- igt_info("Format %s CRC comparison skipped by design.\n",
- (char*)&fillers[i].fourcc);
-
- return false;
default:
igt_info("Unsupported mode for test %s\n",
(char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
tiling = LOCAL_DRM_FORMAT_MOD_NONE;
}
- for (i = 0; fillers[i].fourcc != 0; i++) {
- if (fillers[i].fourcc == format)
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+ if( fillers[i].fourcc == format )
break;
}
switch (fillers[i].bpp) {
- case NV12:
case BYTES_PP_1:
bpp = 8;
break;
-
- case P010:
- case BYTES_PP_2:
- bpp = 16;
- break;
-
- case SKIP4:
case BYTES_PP_4:
bpp = 32;
break;
+ default:
+ return false;
}
igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
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) {
- 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;
- }
-
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),
@@ -392,6 +294,18 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
signed rVal = 0;
bool do_crc;
char* crccompare[2];
+ int i;
+
+ /*
+ * Limit tests only to those fb formats listed in fillers table
+ */
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+ if( fillers[i].fourcc == mode )
+ break;
+ }
+
+ if(fillers[i].bpp == 0)
+ return false;
if (prepare_crtc(data, output, plane, mode)){
/*
@@ -431,10 +345,9 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
}
}
}
- remove_fb(data, output, plane);
- return rVal;
}
- return 1;
+ remove_fb(data, output, plane);
+ return rVal;
}
@@ -447,7 +360,6 @@ test_available_modes(data_t* data)
enum pipe pipe;
int invalids = 0;
drmModePlane *modePlane;
- char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
for_each_pipe_with_valid_output(&data->display, pipe, output) {
igt_output_set_pipe(output, pipe);
@@ -472,14 +384,6 @@ test_available_modes(data_t* data)
modeindex++) {
data->format.dword = modePlane->formats[modeindex];
- igt_info("Testing connector %s using pipe %s" \
- " plane index %d type %s mode %s\n",
- igt_output_name(output),
- kmstest_pipe_name(pipe),
- plane->index,
- planetype[plane->type],
- (char*)&data->format.name);
-
invalids += test_one_mode(data, output,
plane,
modePlane->formats[modeindex]);
--
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] 4+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats
2019-02-11 11:45 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
@ 2019-02-11 12:29 ` Patchwork
2019-02-11 14:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-11 15:03 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-02-11 12:29 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
== Series Details ==
Series: tests/kms_available_modes_crc limit tested fb formats
URL : https://patchwork.freedesktop.org/series/56491/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5586 -> IGTPW_2372
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2372 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: PASS -> DMESG-WARN [fdo#105128] / [fdo#107139]
* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: PASS -> INCOMPLETE [fdo#108602] / [fdo#108744]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
#### Possible fixes ####
* igt@kms_busy@basic-flip-b:
- fi-gdg-551: FAIL [fdo#103182] -> PASS
* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: FAIL -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: FAIL [fdo#103167] -> PASS
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- fi-byt-clapper: FAIL [fdo#103191] / [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#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
Participating hosts (47 -> 43)
------------------------------
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u
Build changes
-------------
* IGT: IGT_4816 -> IGTPW_2372
CI_DRM_5586: e54b6a76e1a6d0e4ba8b56f149673ea9907b2c59 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2372: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2372/
IGT_4816: f62577c85c9ef0539d468d6fad105b706a15139c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2372/
_______________________________________________
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.IGT: success for tests/kms_available_modes_crc limit tested fb formats
2019-02-11 11:45 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
2019-02-11 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-02-11 14:25 ` Patchwork
2019-02-11 15:03 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-02-11 14:25 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: igt-dev
== Series Details ==
Series: tests/kms_available_modes_crc limit tested fb formats
URL : https://patchwork.freedesktop.org/series/56491/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5586_full -> IGTPW_2372_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2372_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]
* igt@gem_exec_big:
- shard-hsw: PASS -> TIMEOUT [fdo#107937]
* igt@gem_exec_suspend@basic-s4-devices:
- shard-snb: PASS -> INCOMPLETE [fdo#105411] +1
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-snb: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_color@pipe-b-ctm-max:
- shard-apl: PASS -> FAIL [fdo#108147] +1
- shard-kbl: PASS -> FAIL [fdo#108147]
* igt@kms_cursor_crc@cursor-256x85-random:
- shard-apl: PASS -> FAIL [fdo#103232] +4
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: PASS -> FAIL [fdo#103232] +2
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-kbl: PASS -> FAIL [fdo#109350]
- shard-apl: PASS -> FAIL [fdo#109350]
- shard-glk: PASS -> FAIL [fdo#109350]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-kbl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-apl: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: PASS -> FAIL [fdo#103167] +6
* igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
- shard-glk: PASS -> FAIL [fdo#108948]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
- shard-apl: PASS -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-glk: PASS -> FAIL [fdo#108145] +2
* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +4
- shard-apl: PASS -> FAIL [fdo#103166] +1
* igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
- shard-kbl: PASS -> FAIL [fdo#103166] +3
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-glk: NOTRUN -> FAIL [fdo#103166]
* igt@kms_setmode@basic:
- shard-hsw: PASS -> FAIL [fdo#99912]
- shard-kbl: PASS -> FAIL [fdo#99912]
#### Possible fixes ####
* igt@gem_exec_blt@dumb-buf-max:
- shard-glk: DMESG-WARN [fdo#105763] / [fdo#106538] -> PASS
* igt@i915_suspend@fence-restore-untiled:
- shard-snb: INCOMPLETE [fdo#105411] -> PASS
* igt@kms_busy@extended-pageflip-hang-newfb-render-c:
- shard-glk: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_cursor_crc@cursor-128x128-random:
- shard-apl: FAIL [fdo#103232] -> PASS +8
- shard-kbl: FAIL [fdo#103232] -> PASS +2
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS +1
- shard-kbl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-apl: FAIL [fdo#103167] -> PASS
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
- shard-glk: FAIL [fdo#103167] -> PASS +1
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-glk: FAIL [fdo#108145] -> PASS
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS +1
- shard-kbl: FAIL [fdo#103166] -> PASS +1
* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: FAIL [fdo#103166] -> PASS +3
* igt@pm_rc6_residency@rc6-accuracy:
- shard-snb: {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#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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[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#107937]: https://bugs.freedesktop.org/show_bug.cgi?id=107937
[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#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[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_4816 -> IGTPW_2372
* Piglit: piglit_4509 -> None
CI_DRM_5586: e54b6a76e1a6d0e4ba8b56f149673ea9907b2c59 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2372: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2372/
IGT_4816: f62577c85c9ef0539d468d6fad105b706a15139c @ 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_2372/
_______________________________________________
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] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
2019-02-11 11:45 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
2019-02-11 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-11 14:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-02-11 15:03 ` Juha-Pekka Heikkila
2 siblings, 0 replies; 4+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-11 15:03 UTC (permalink / raw)
To: igt-dev
This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/kms_available_modes_crc.c | 166 +++++++++-------------------------------
1 file changed, 36 insertions(+), 130 deletions(-)
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..8f33edc 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -122,48 +122,11 @@ static const struct {
uint32_t fourcc;
char zeropadding;
enum { BYTES_PP_1=1,
- BYTES_PP_2=2,
- BYTES_PP_4=4,
- NV12,
- P010,
- SKIP4 } bpp;
+ BYTES_PP_4=4} bpp;
uint32_t value;
} fillers[] = {
{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
- { DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
- { DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
- { DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
- /*
- * following two are skipped because blending seems to work
- * incorrectly with exception of AR24 on cursor plane.
- * Test still creates the planes, just filling plane
- * and getting crc is skipped.
- */
- { DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
- { DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
- { DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
- { DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
- { DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
- { DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
- { DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
- /*
- * (semi-)planar formats
- */
- { DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
- { DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
- { DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
- { DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
{ 0, 0, 0, 0 }
};
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
uint32_t format)
{
signed i, c, writesize;
- unsigned short* ptemp_16_buf;
unsigned int* ptemp_32_buf;
- for( i = 0; fillers[i].fourcc != 0; i++ ) {
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
if( fillers[i].fourcc == format )
break;
}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
ptemp_32_buf[c] = fillers[i].value;
writesize = data->size;
break;
- case BYTES_PP_2:
- ptemp_16_buf = (unsigned short*)data->buf;
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)fillers[i].value;
- writesize = data->size;
- break;
case BYTES_PP_1:
memset((void *)data->buf, fillers[i].value, data->size);
writesize = data->size;
break;
- case NV12:
- memset((void *)data->buf, fillers[i].value&0xff,
- data->fb.offsets[1]);
-
- memset((void *)(data->buf+data->fb.offsets[1]),
- (fillers[i].value>>8)&0xff,
- data->size - data->fb.offsets[1]);
-
- writesize = data->size;
- break;
- case P010:
- ptemp_16_buf = (unsigned short*)data->buf;
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
- ptemp_16_buf = (unsigned short*)(data->buf+data->size);
- for (c = 0; c < data->size/2; c++)
- ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
- writesize = data->size+data->size/2;
- break;
- case SKIP4:
- if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
- plane->type == DRM_PLANE_TYPE_CURSOR) {
- /*
- * special for cursor plane where blending works correctly.
- */
- ptemp_32_buf = (unsigned int*)data->buf;
- for (c = 0; c < data->size/4; c++)
- ptemp_32_buf[c] = fillers[i].value;
- writesize = data->size;
- break;
- }
- igt_info("Format %s CRC comparison skipped by design.\n",
- (char*)&fillers[i].fourcc);
-
- return false;
default:
igt_info("Unsupported mode for test %s\n",
(char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
tiling = LOCAL_DRM_FORMAT_MOD_NONE;
}
- for (i = 0; fillers[i].fourcc != 0; i++) {
- if (fillers[i].fourcc == format)
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+ if( fillers[i].fourcc == format )
break;
}
switch (fillers[i].bpp) {
- case NV12:
case BYTES_PP_1:
bpp = 8;
break;
-
- case P010:
- case BYTES_PP_2:
- bpp = 16;
- break;
-
- case SKIP4:
case BYTES_PP_4:
bpp = 32;
break;
+ default:
+ return false;
}
igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
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) {
- 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;
- }
-
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),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
static int
test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
- int mode)
+ int mode, enum pipe pipe)
{
igt_crc_t current_crc;
signed rVal = 0;
bool do_crc;
- char* crccompare[2];
+ int i;
+
+ /*
+ * Limit tests only to those fb formats listed in fillers table
+ */
+ for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+ if( fillers[i].fourcc == mode )
+ break;
+ }
+
+ if(fillers[i].bpp == 0)
+ return false;
if (prepare_crtc(data, output, plane, mode)){
/*
@@ -411,30 +324,31 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
if (plane->type != DRM_PLANE_TYPE_CURSOR) {
if (!igt_check_crc_equal(¤t_crc,
- &data->fullscreen_crc)) {
- crccompare[0] = igt_crc_to_string(¤t_crc);
- crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
- igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
- free(crccompare[0]);
- free(crccompare[1]);
+ &data->fullscreen_crc)||1) {
+ igt_warn("crc mismatch. connector %s using pipe %s" \
+ " plane index %d mode %.4s\n",
+ igt_output_name(output),
+ kmstest_pipe_name(pipe),
+ plane->index,
+ (char*)&mode);
rVal++;
}
} else {
if (!igt_check_crc_equal(¤t_crc,
&data->cursor_crc)) {
- crccompare[0] = igt_crc_to_string(¤t_crc);
- crccompare[1] = igt_crc_to_string(&data->cursor_crc);
- igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
- free(crccompare[0]);
- free(crccompare[1]);
+ igt_warn("crc mismatch. connector %s using pipe %s" \
+ " plane index %d mode %.4s\n",
+ igt_output_name(output),
+ kmstest_pipe_name(pipe),
+ plane->index,
+ (char*)&mode);
rVal++;
}
}
}
- remove_fb(data, output, plane);
- return rVal;
}
- return 1;
+ remove_fb(data, output, plane);
+ return rVal;
}
@@ -447,7 +361,6 @@ test_available_modes(data_t* data)
enum pipe pipe;
int invalids = 0;
drmModePlane *modePlane;
- char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
for_each_pipe_with_valid_output(&data->display, pipe, output) {
igt_output_set_pipe(output, pipe);
@@ -472,17 +385,10 @@ test_available_modes(data_t* data)
modeindex++) {
data->format.dword = modePlane->formats[modeindex];
- igt_info("Testing connector %s using pipe %s" \
- " plane index %d type %s mode %s\n",
- igt_output_name(output),
- kmstest_pipe_name(pipe),
- plane->index,
- planetype[plane->type],
- (char*)&data->format.name);
-
invalids += test_one_mode(data, output,
plane,
- modePlane->formats[modeindex]);
+ modePlane->formats[modeindex],
+ pipe);
}
drmModeFreePlane(modePlane);
}
--
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] 4+ messages in thread
end of thread, other threads:[~2019-02-11 16:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-11 11:45 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
2019-02-11 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-11 14:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-11 15:03 ` [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox