* [PATCH i-g-t v3 0/7] kms_ccs testcase improvements
@ 2017-08-31 6:18 Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 1/7] tests/kms_ccs: Test pipes other than pipe A Gabriel Krisman Bertazi
` (8 more replies)
0 siblings, 9 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
[Resending with the i-g-t tag to make sure the CI catches it. Sorry for
the noise!]
Hey,
Here is a v3 including other testcases for kms_ccs as well as random
fixes to that test and one to igt_kms.
I have two other testcases that I wanted to share together with this set
for kms_ccs, but they will come later.
Please notice that the testcase for the overlapping buffers will hit a
failure because linux fails to detect the overlapping buffers in
add_fb2. I'll submit on another thread with a patch to linux fixing the
ioctl, which will make this test suceed.
Please, let me know your feedback,
Gabriel Krisman Bertazi (7):
tests/kms_ccs: Test pipes other than pipe A
lib/igt_kms: Fix off-by-one bug on skip of missing pipe
tests/kms_ccs: Prevent segfault if pipe is not supported
tests/kms_ccs: Test case where the CCS buffer was not provided
tests/kms_ccs: Test case where CCS and main buffer overlaps
tests/kms_ccs: Test case where CCS is on a different BO
tests/kms_ccs: Test case for wrong aux buffer stripe size
lib/igt_kms.c | 2 +-
tests/kms_ccs.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 74 insertions(+), 10 deletions(-)
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 1/7] tests/kms_ccs: Test pipes other than pipe A
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe Gabriel Krisman Bertazi
` (7 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Commit d41c4ccbd2f9 ("tests/kms_ccs: Fix subtest enumeration")
accidently removed the update of data.pipe, causing kms_ccs to silently
only test PIPE_A.
This fixes the behavior reported by Daniel Vetter where tests would
succeed even on nonexistent pipes.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index ab9325d14991..775c6999699f 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -483,6 +483,8 @@ igt_main
const char *pipe_name = kmstest_pipe_name(pipe);
int sprite_idx = 0;
+ data.pipe = pipe;
+
data.flags = TEST_BAD_PIXEL_FORMAT;
igt_subtest_f("pipe-%s-bad-pixel-format", pipe_name)
test_output(&data);
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 1/7] tests/kms_ccs: Test pipes other than pipe A Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 7:06 ` Maarten Lankhorst
2017-08-31 6:18 ` [PATCH i-g-t v3 3/7] tests/kms_ccs: Prevent segfault if pipe is not supported Gabriel Krisman Bertazi
` (6 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
display->n_pipes is zero-indexed, so N returned in
igt_display_get_n_pipes is already not a valid pipe. This patch
prevents kms_ccs from going nuts when testing the first unxesting pipe.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
lib/igt_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 14e2701c3afd..ce07fcc1fc73 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1864,7 +1864,7 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
{
igt_output_t *output;
- igt_skip_on_f(igt_display_get_n_pipes(display) < pipe,
+ igt_skip_on_f(igt_display_get_n_pipes(display) <= pipe,
"Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
for_each_valid_output_on_pipe(display, pipe, output)
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 3/7] tests/kms_ccs: Prevent segfault if pipe is not supported
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 1/7] tests/kms_ccs: Test pipes other than pipe A Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 4/7] tests/kms_ccs: Test case where the CCS buffer was not provided Gabriel Krisman Bertazi
` (5 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
for_each_plane_on_pipe() indexes bad memory when iterating over an invalid
pipe. Make sure the pipe exists before trying to use it. This prevents
the crash below:
root@ideacentre:~# igt-gpu-tools/tests/kms_ccs --r pipe-D-crc-sprite-planes-basic
IGT-Version: 1.19-g59f0e3d182a8 (x86_64) (Linux: 4.13.0-rc6.intel-boxes+x86_64)
Received signal SIGSEGV.
Stack trace:
#0 [fatal_sig_handler+0x185]
#1 [killpg+0x40]
#2 [__real_main485+0x2de]
#3 [main+0x3f]
#4 [__libc_start_main+0xf1]
#5 [_start+0x2a]
#6 [<unknown>+0x2a]
Subtest pipe-D-crc-sprite-planes-basic: CRASH (0.004s)
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 775c6999699f..73025a1e019f 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -503,6 +503,9 @@ igt_main
data.flags = TEST_CRC;
igt_subtest_f("pipe-%s-crc-sprite-planes-basic", pipe_name) {
+
+ igt_display_require_output_on_pipe(&data.display, data.pipe);
+
for_each_plane_on_pipe(&data.display, data.pipe, data.plane) {
if (data.plane->type == DRM_PLANE_TYPE_PRIMARY)
continue;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 4/7] tests/kms_ccs: Test case where the CCS buffer was not provided
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (2 preceding siblings ...)
2017-08-31 6:18 ` [PATCH i-g-t v3 3/7] tests/kms_ccs: Prevent segfault if pipe is not supported Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 5/7] tests/kms_ccs: Test case where CCS and main buffer overlaps Gabriel Krisman Bertazi
` (4 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 73025a1e019f..cc41c85c4964 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -33,8 +33,12 @@ enum test_flags {
TEST_ROTATE_180 = 1 << 2,
TEST_BAD_PIXEL_FORMAT = 1 << 3,
TEST_BAD_ROTATION_90 = 1 << 4,
+ TEST_NO_AUX_BUFFER = 1 << 5,
};
+#define TEST_FAIL_ON_ADDFB2 \
+ (TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER)
+
enum test_fb_flags {
FB_COMPRESSED = 1 << 0,
FB_HAS_PLANE = 1 << 1,
@@ -321,16 +325,19 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
size[1] = f.pitches[1] * ALIGN(ccs_height, 32);
f.handles[0] = gem_create(data->drm_fd, size[0] + size[1]);
- f.handles[1] = f.handles[0];
- render_ccs(data, f.handles[1], f.offsets[1], size[1],
- height, f.pitches[1]);
+
+ if (!(data->flags & TEST_NO_AUX_BUFFER)) {
+ f.handles[1] = f.handles[0];
+ render_ccs(data, f.handles[1], f.offsets[1], size[1],
+ height, f.pitches[1]);
+ }
} else
f.handles[0] = gem_create(data->drm_fd, size[0]);
render_fb(data, f.handles[0], size[0], fb_flags, height, f.pitches[0]);
ret = drmIoctl(data->drm_fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f);
- if (data->flags & TEST_BAD_PIXEL_FORMAT) {
+ if (data->flags & TEST_FAIL_ON_ADDFB2) {
igt_assert_eq(ret, -1);
igt_assert_eq(errno, EINVAL);
return;
@@ -379,7 +386,7 @@ static void try_config(data_t *data, enum test_fb_flags fb_flags)
drm_mode->vdisplay, fb_flags);
}
- if (data->flags & TEST_BAD_PIXEL_FORMAT)
+ if (data->flags & TEST_FAIL_ON_ADDFB2)
return;
igt_plane_set_position(primary, 0, 0);
@@ -446,7 +453,8 @@ static void test_output(data_t *data)
}
if (data->flags & TEST_BAD_PIXEL_FORMAT ||
- data->flags & TEST_BAD_ROTATION_90) {
+ data->flags & TEST_BAD_ROTATION_90 ||
+ data->flags & TEST_NO_AUX_BUFFER) {
try_config(data, fb_flags | FB_COMPRESSED);
}
@@ -515,6 +523,11 @@ igt_main
}
data.plane = NULL;
+
+ data.flags = TEST_NO_AUX_BUFFER;
+ igt_subtest_f("pipe-%s-missing-ccs-buffer", pipe_name)
+ test_output(&data);
+
}
igt_fixture
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 5/7] tests/kms_ccs: Test case where CCS and main buffer overlaps
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (3 preceding siblings ...)
2017-08-31 6:18 ` [PATCH i-g-t v3 4/7] tests/kms_ccs: Test case where the CCS buffer was not provided Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 6/7] tests/kms_ccs: Test case where CCS is on a different BO Gabriel Krisman Bertazi
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index cc41c85c4964..06d34a80b108 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -34,10 +34,11 @@ enum test_flags {
TEST_BAD_PIXEL_FORMAT = 1 << 3,
TEST_BAD_ROTATION_90 = 1 << 4,
TEST_NO_AUX_BUFFER = 1 << 5,
+ TEST_BAD_CCS_OFFSET = 1 << 6,
};
#define TEST_FAIL_ON_ADDFB2 \
- (TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER)
+ (TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER | TEST_BAD_CCS_OFFSET)
enum test_fb_flags {
FB_COMPRESSED = 1 << 0,
@@ -321,7 +322,13 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
int ccs_height = ALIGN(height, 16) / 16;
f.pitches[1] = ALIGN(ccs_width * 1, 128);
f.modifier[1] = modifier;
- f.offsets[1] = size[0];
+
+ if (data->flags & TEST_BAD_CCS_OFFSET) {
+ /* Overlap CCS buffer with the color buffer. */
+ f.offsets[1] = 0;
+ } else
+ f.offsets[1] = size[0];
+
size[1] = f.pitches[1] * ALIGN(ccs_height, 32);
f.handles[0] = gem_create(data->drm_fd, size[0] + size[1]);
@@ -454,7 +461,8 @@ static void test_output(data_t *data)
if (data->flags & TEST_BAD_PIXEL_FORMAT ||
data->flags & TEST_BAD_ROTATION_90 ||
- data->flags & TEST_NO_AUX_BUFFER) {
+ data->flags & TEST_NO_AUX_BUFFER ||
+ data->flags & TEST_BAD_CCS_OFFSET) {
try_config(data, fb_flags | FB_COMPRESSED);
}
@@ -528,6 +536,10 @@ igt_main
igt_subtest_f("pipe-%s-missing-ccs-buffer", pipe_name)
test_output(&data);
+ data.flags = TEST_BAD_CCS_OFFSET;
+ igt_subtest_f("pipe-%s-invalid-ccs-offset", pipe_name)
+ test_output(&data);
+
}
igt_fixture
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 6/7] tests/kms_ccs: Test case where CCS is on a different BO
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (4 preceding siblings ...)
2017-08-31 6:18 ` [PATCH i-g-t v3 5/7] tests/kms_ccs: Test case where CCS and main buffer overlaps Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size Gabriel Krisman Bertazi
` (2 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 06d34a80b108..95de6963226d 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -35,10 +35,12 @@ enum test_flags {
TEST_BAD_ROTATION_90 = 1 << 4,
TEST_NO_AUX_BUFFER = 1 << 5,
TEST_BAD_CCS_OFFSET = 1 << 6,
+ TEST_BAD_CCS_HANDLE = 1 << 7,
};
#define TEST_FAIL_ON_ADDFB2 \
- (TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER | TEST_BAD_CCS_OFFSET)
+ (TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER | TEST_BAD_CCS_OFFSET | \
+ TEST_BAD_CCS_HANDLE)
enum test_fb_flags {
FB_COMPRESSED = 1 << 0,
@@ -276,6 +278,7 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
unsigned int size[2];
uint64_t modifier;
int ret;
+ uint32_t ccs_handle;
/* Use either compressed or Y-tiled to test. However, given the lack of
* available bandwidth, we use linear for the primary plane when
@@ -331,10 +334,18 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
size[1] = f.pitches[1] * ALIGN(ccs_height, 32);
- f.handles[0] = gem_create(data->drm_fd, size[0] + size[1]);
+ if (data->flags & TEST_BAD_CCS_HANDLE) {
+ /* Put the CCS buffer on a different BO. */
+ f.handles[0] = gem_create(data->drm_fd, size[0]);
+ ccs_handle = gem_create(data->drm_fd, size[1]);
+ f.offsets[1] = 0;
+ } else {
+ f.handles[0] = gem_create(data->drm_fd, size[0] + size[1]);
+ ccs_handle = f.handles[0];
+ }
if (!(data->flags & TEST_NO_AUX_BUFFER)) {
- f.handles[1] = f.handles[0];
+ f.handles[1] = ccs_handle;
render_ccs(data, f.handles[1], f.offsets[1], size[1],
height, f.pitches[1]);
}
@@ -462,7 +473,8 @@ static void test_output(data_t *data)
if (data->flags & TEST_BAD_PIXEL_FORMAT ||
data->flags & TEST_BAD_ROTATION_90 ||
data->flags & TEST_NO_AUX_BUFFER ||
- data->flags & TEST_BAD_CCS_OFFSET) {
+ data->flags & TEST_BAD_CCS_OFFSET ||
+ data->flags & TEST_BAD_CCS_HANDLE) {
try_config(data, fb_flags | FB_COMPRESSED);
}
@@ -540,6 +552,10 @@ igt_main
igt_subtest_f("pipe-%s-invalid-ccs-offset", pipe_name)
test_output(&data);
+ data.flags = TEST_BAD_CCS_HANDLE;
+ igt_subtest_f("pipe-%s-ccs-on-another-bo", pipe_name)
+ test_output(&data);
+
}
igt_fixture
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (5 preceding siblings ...)
2017-08-31 6:18 ` [PATCH i-g-t v3 6/7] tests/kms_ccs: Test case where CCS is on a different BO Gabriel Krisman Bertazi
@ 2017-08-31 6:18 ` Gabriel Krisman Bertazi
2017-09-05 8:03 ` Daniel Stone
2017-08-31 12:47 ` ✓ Fi.CI.BAT: success for kms_ccs testcase improvements Patchwork
2017-08-31 18:28 ` ✓ Fi.CI.IGT: " Patchwork
8 siblings, 1 reply; 13+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-08-31 6:18 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Two scenarios tested:
- unaligned stripe
- Stripe too small
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
---
tests/kms_ccs.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 95de6963226d..2e6efe95ffca 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -36,15 +36,18 @@ enum test_flags {
TEST_NO_AUX_BUFFER = 1 << 5,
TEST_BAD_CCS_OFFSET = 1 << 6,
TEST_BAD_CCS_HANDLE = 1 << 7,
+ TEST_BAD_AUX_STRIDE = 1 << 8,
};
#define TEST_FAIL_ON_ADDFB2 \
(TEST_BAD_PIXEL_FORMAT | TEST_NO_AUX_BUFFER | TEST_BAD_CCS_OFFSET | \
- TEST_BAD_CCS_HANDLE)
+ TEST_BAD_CCS_HANDLE | TEST_BAD_AUX_STRIDE)
enum test_fb_flags {
FB_COMPRESSED = 1 << 0,
FB_HAS_PLANE = 1 << 1,
+ FB_MISALIGN_AUX_STRIDE = 1 << 2,
+ FB_SMALL_AUX_STRIDE = 1 << 3,
};
typedef struct {
@@ -323,7 +326,14 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
*/
int ccs_width = ALIGN(width * 4, 32) / 32;
int ccs_height = ALIGN(height, 16) / 16;
- f.pitches[1] = ALIGN(ccs_width * 1, 128);
+ int aux_stride = ALIGN(ccs_width * 1, 128);
+
+ if (fb_flags & FB_MISALIGN_AUX_STRIDE)
+ aux_stride = ccs_width;
+ else if (fb_flags & FB_SMALL_AUX_STRIDE)
+ aux_stride = ALIGN(ccs_width/2, 128);
+
+ f.pitches[1] = aux_stride;
f.modifier[1] = modifier;
if (data->flags & TEST_BAD_CCS_OFFSET) {
@@ -478,6 +488,11 @@ static void test_output(data_t *data)
try_config(data, fb_flags | FB_COMPRESSED);
}
+ if (data->flags & TEST_BAD_AUX_STRIDE) {
+ try_config(data, fb_flags | FB_COMPRESSED | FB_MISALIGN_AUX_STRIDE);
+ try_config(data, fb_flags | FB_COMPRESSED | FB_SMALL_AUX_STRIDE);
+ }
+
primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, NULL);
igt_plane_set_rotation(primary, IGT_ROTATION_0);
@@ -556,6 +571,9 @@ igt_main
igt_subtest_f("pipe-%s-ccs-on-another-bo", pipe_name)
test_output(&data);
+ data.flags = TEST_BAD_AUX_STRIDE;
+ igt_subtest_f("pipe-%s-bad-aux-stride", pipe_name)
+ test_output(&data);
}
igt_fixture
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe
2017-08-31 6:18 ` [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe Gabriel Krisman Bertazi
@ 2017-08-31 7:06 ` Maarten Lankhorst
2017-08-31 7:08 ` Maarten Lankhorst
0 siblings, 1 reply; 13+ messages in thread
From: Maarten Lankhorst @ 2017-08-31 7:06 UTC (permalink / raw)
To: Gabriel Krisman Bertazi, intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Op 31-08-17 om 08:18 schreef Gabriel Krisman Bertazi:
> display->n_pipes is zero-indexed, so N returned in
> igt_display_get_n_pipes is already not a valid pipe. This patch
> prevents kms_ccs from going nuts when testing the first unxesting pipe.
>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
> ---
> lib/igt_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 14e2701c3afd..ce07fcc1fc73 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1864,7 +1864,7 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
> {
> igt_output_t *output;
>
> - igt_skip_on_f(igt_display_get_n_pipes(display) < pipe,
> + igt_skip_on_f(igt_display_get_n_pipes(display) <= pipe,
> "Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
>
> for_each_valid_output_on_pipe(display, pipe, output)
I think the original check is correct?
Although it could be inverted to make it more clear, matching the other similar checks in tests/kms_*.c:
igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
But your change doesn't match what any user of n_pipes in /tests is doing, so I'm afraid I have to NACK. :)
Kind regards,
Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe
2017-08-31 7:06 ` Maarten Lankhorst
@ 2017-08-31 7:08 ` Maarten Lankhorst
0 siblings, 0 replies; 13+ messages in thread
From: Maarten Lankhorst @ 2017-08-31 7:08 UTC (permalink / raw)
To: Gabriel Krisman Bertazi, intel-gfx; +Cc: daniel.vetter, daniels, tomeu.vizoso
Op 31-08-17 om 09:06 schreef Maarten Lankhorst:
> Op 31-08-17 om 08:18 schreef Gabriel Krisman Bertazi:
>> display->n_pipes is zero-indexed, so N returned in
>> igt_display_get_n_pipes is already not a valid pipe. This patch
>> prevents kms_ccs from going nuts when testing the first unxesting pipe.
>>
>> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
>> ---
>> lib/igt_kms.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>> index 14e2701c3afd..ce07fcc1fc73 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -1864,7 +1864,7 @@ void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
>> {
>> igt_output_t *output;
>>
>> - igt_skip_on_f(igt_display_get_n_pipes(display) < pipe,
>> + igt_skip_on_f(igt_display_get_n_pipes(display) <= pipe,
>> "Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
>>
>> for_each_valid_output_on_pipe(display, pipe, output)
> I think the original check is correct?
>
> Although it could be inverted to make it more clear, matching the other similar checks in tests/kms_*.c:
>
> igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
Oops, early morning math fail..
Just use the suggested form please. :)
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ Fi.CI.BAT: success for kms_ccs testcase improvements
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (6 preceding siblings ...)
2017-08-31 6:18 ` [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size Gabriel Krisman Bertazi
@ 2017-08-31 12:47 ` Patchwork
2017-08-31 18:28 ` ✓ Fi.CI.IGT: " Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2017-08-31 12:47 UTC (permalink / raw)
To: Gabriel Krisman Bertazi; +Cc: intel-gfx
== Series Details ==
Series: kms_ccs testcase improvements
URL : https://patchwork.freedesktop.org/series/29585/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
c2159678d283fea5615ec8e846a51cf4954ac82d tests/perf: add Geminilake support
with latest DRM-Tip kernel build CI_DRM_3021
c399d43adc55 drm-tip: 2017y-08m-31d-07h-25m-28s UTC integration manifest
Test kms_cursor_legacy:
Subgroup basic-flip-after-cursor-varying-size:
pass -> FAIL (fi-hsw-4770) fdo#102402 +1
Test kms_flip:
Subgroup basic-flip-vs-modeset:
skip -> PASS (fi-skl-x1585l) fdo#101781
fdo#102402 https://bugs.freedesktop.org/show_bug.cgi?id=102402
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fi-bdw-5557u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:457s
fi-bdw-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:438s
fi-blb-e6850 total:288 pass:224 dwarn:1 dfail:0 fail:0 skip:63 time:364s
fi-bsw-n3050 total:288 pass:243 dwarn:0 dfail:0 fail:0 skip:45 time:555s
fi-bwr-2160 total:288 pass:184 dwarn:0 dfail:0 fail:0 skip:104 time:253s
fi-bxt-j4205 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:533s
fi-byt-j1900 total:288 pass:254 dwarn:1 dfail:0 fail:0 skip:33 time:526s
fi-byt-n2820 total:288 pass:250 dwarn:1 dfail:0 fail:0 skip:37 time:516s
fi-elk-e7500 total:288 pass:230 dwarn:0 dfail:0 fail:0 skip:58 time:449s
fi-glk-2a total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:614s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:2 skip:25 time:464s
fi-hsw-4770r total:288 pass:263 dwarn:0 dfail:0 fail:0 skip:25 time:423s
fi-ilk-650 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:429s
fi-ivb-3520m total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:501s
fi-ivb-3770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:474s
fi-kbl-7500u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:481s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:597s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:595s
fi-pnv-d510 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:528s
fi-skl-6260u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:470s
fi-skl-6700k total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:540s
fi-skl-6770hq total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:489s
fi-skl-gvtdvm total:288 pass:266 dwarn:0 dfail:0 fail:0 skip:22 time:449s
fi-skl-x1585l total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:503s
fi-snb-2520m total:288 pass:251 dwarn:0 dfail:0 fail:0 skip:37 time:548s
fi-snb-2600 total:288 pass:249 dwarn:0 dfail:0 fail:1 skip:38 time:407s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_129/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ Fi.CI.IGT: success for kms_ccs testcase improvements
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
` (7 preceding siblings ...)
2017-08-31 12:47 ` ✓ Fi.CI.BAT: success for kms_ccs testcase improvements Patchwork
@ 2017-08-31 18:28 ` Patchwork
8 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2017-08-31 18:28 UTC (permalink / raw)
To: Gabriel Krisman Bertazi; +Cc: intel-gfx
== Series Details ==
Series: kms_ccs testcase improvements
URL : https://patchwork.freedesktop.org/series/29585/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_flip:
Subgroup plain-flip-fb-recreate-interruptible:
pass -> FAIL (shard-hsw) fdo#100368
Subgroup plain-flip-fb-recreate:
fail -> PASS (shard-hsw)
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2289 pass:1231 dwarn:0 dfail:0 fail:18 skip:1040 time:9619s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_129/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size
2017-08-31 6:18 ` [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size Gabriel Krisman Bertazi
@ 2017-09-05 8:03 ` Daniel Stone
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Stone @ 2017-09-05 8:03 UTC (permalink / raw)
To: Gabriel Krisman Bertazi; +Cc: Vetter, Daniel, intel-gfx, Tomeu Vizoso
Hi Gabriel,
On 31 August 2017 at 07:18, Gabriel Krisman Bertazi
<krisman@collabora.co.uk> wrote:
> Two scenarios tested:
> - unaligned stripe
> - Stripe too small
'stride' in the commit message please. ;) But it is fine everywhere
through the code.
> @@ -323,7 +326,14 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
> */
> int ccs_width = ALIGN(width * 4, 32) / 32;
> int ccs_height = ALIGN(height, 16) / 16;
> - f.pitches[1] = ALIGN(ccs_width * 1, 128);
> + int aux_stride = ALIGN(ccs_width * 1, 128);
> +
> + if (fb_flags & FB_MISALIGN_AUX_STRIDE)
> + aux_stride = ccs_width;
aux_stride -= 64 perhaps?
> + else if (fb_flags & FB_SMALL_AUX_STRIDE)
> + aux_stride = ALIGN(ccs_width/2, 128);
This one seems OK, but maybe want to skip it in the unlikely case that
(w <= 1024), since that already has the smallest possible valid stride
at 128.
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-09-05 8:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 6:18 [PATCH i-g-t v3 0/7] kms_ccs testcase improvements Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 1/7] tests/kms_ccs: Test pipes other than pipe A Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 2/7] lib/igt_kms: Fix off-by-one bug on skip of missing pipe Gabriel Krisman Bertazi
2017-08-31 7:06 ` Maarten Lankhorst
2017-08-31 7:08 ` Maarten Lankhorst
2017-08-31 6:18 ` [PATCH i-g-t v3 3/7] tests/kms_ccs: Prevent segfault if pipe is not supported Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 4/7] tests/kms_ccs: Test case where the CCS buffer was not provided Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 5/7] tests/kms_ccs: Test case where CCS and main buffer overlaps Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 6/7] tests/kms_ccs: Test case where CCS is on a different BO Gabriel Krisman Bertazi
2017-08-31 6:18 ` [PATCH i-g-t v3 7/7] tests/kms_ccs: Test case for wrong aux buffer stripe size Gabriel Krisman Bertazi
2017-09-05 8:03 ` Daniel Stone
2017-08-31 12:47 ` ✓ Fi.CI.BAT: success for kms_ccs testcase improvements Patchwork
2017-08-31 18:28 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.