Lyude
2021-Mar-17 22:42 UTC
[Nouveau] [PATCH i-g-t 0/3] tests/kms_color: Fixup for nouveau
From: Lyude Paul <lyude at redhat.com> This patch series just introduces a small drive-by cleanup for kms_color, and fixes the kms_color test so that it works correctly on nouveau. Note that the invalid LUT/gamma tests will likely currently fail, but I'm going to be submitting some kernel patches to fix these in nouveau very shortly. Cc: Martin Peres <martin.peres at free.fr> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Jeremy Cline <jcline at redhat.com> Lyude Paul (3): tests/kms_color: Don't opencode igt_check_crc_equal() tests/kms_color: Allow tests to run on any driver tests/kms_color: Stop leaking fbs tests/kms_color.c | 15 +++++++++++++-- tests/kms_color_helper.c | 6 ------ 2 files changed, 13 insertions(+), 8 deletions(-) -- 2.29.2
Lyude
2021-Mar-17 22:42 UTC
[Nouveau] [PATCH i-g-t 1/3] tests/kms_color: Don't opencode igt_check_crc_equal()
From: Lyude Paul <lyude at redhat.com>
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Martin Peres <martin.peres at free.fr>
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: Jeremy Cline <jcline at redhat.com>
---
tests/kms_color.c | 2 +-
tests/kms_color_helper.c | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index f2686f57..705c9160 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -506,7 +506,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- ret &= crc_equal(&crc_software, &crc_hardware);
+ ret &= !igt_skip_crc_compare || igt_check_crc_equal(&crc_software,
&crc_hardware);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index ac8e8454..5f223a88 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -245,12 +245,6 @@ get_blob(data_t *data, igt_pipe_t *pipe, enum
igt_atomic_crtc_properties prop)
return drmModeGetPropertyBlob(data->drm_fd, prop_value);
}
-bool crc_equal(igt_crc_t *a, igt_crc_t *b)
-{
- return igt_skip_crc_compare ||
- memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0;
-}
-
int
pipe_set_property_blob_id(igt_pipe_t *pipe,
enum igt_atomic_crtc_properties prop,
--
2.29.2
Lyude
2021-Mar-17 22:42 UTC
[Nouveau] [PATCH i-g-t 2/3] tests/kms_color: Allow tests to run on any driver
From: Lyude Paul <lyude at redhat.com>
There's no reason I can see for this being Intel/AMD only
Signed-off-by: Lyude Paul <lyude at redhat.com>
Cc: Martin Peres <martin.peres at free.fr>
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: Jeremy Cline <jcline at redhat.com>
---
tests/kms_color.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 705c9160..02a1a2de 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -847,7 +847,7 @@ igt_main
enum pipe pipe;
igt_fixture {
- data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_AMDGPU);
+ data.drm_fd = drm_open_driver_master(DRIVER_ANY);
if (is_i915_device(data.drm_fd))
data.devid = intel_get_drm_devid(data.drm_fd);
kmstest_set_vt_graphics_mode();
--
2.29.2
From: Lyude Paul <lyude at redhat.com> While I was testing this out with nouveau, I noticed that this test leaks quite a lot of framebuffers. Didn't cause any issues, but we should fix this while we're at it. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Martin Peres <martin.peres at free.fr> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Jeremy Cline <jcline at redhat.com> --- tests/kms_color.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/kms_color.c b/tests/kms_color.c index 02a1a2de..b1b91c74 100644 --- a/tests/kms_color.c +++ b/tests/kms_color.c @@ -105,6 +105,8 @@ static void test_pipe_degamma(data_t *data, igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_remove_fb(data->drm_fd, &fb); + igt_remove_fb(data->drm_fd, &fb_modeset); } free_lut(degamma_linear); @@ -189,6 +191,8 @@ static void test_pipe_gamma(data_t *data, igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_remove_fb(data->drm_fd, &fb); + igt_remove_fb(data->drm_fd, &fb_modeset); } free_lut(gamma_full); @@ -292,6 +296,8 @@ static void test_pipe_legacy_gamma(data_t *data, igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_remove_fb(data->drm_fd, &fb); + igt_remove_fb(data->drm_fd, &fb_modeset); } free(red_lut); @@ -510,6 +516,8 @@ static bool test_pipe_ctm(data_t *data, igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_remove_fb(data->drm_fd, &fb); + igt_remove_fb(data->drm_fd, &fb_modeset); } free_lut(degamma_linear); @@ -618,6 +626,9 @@ static void test_pipe_limited_range_ctm(data_t *data, * equal to the CRC of the CTM matrix transformation output. */ igt_assert_crc_equal(&crc_full, &crc_limited); + + igt_remove_fb(data->drm_fd, &fb); + igt_remove_fb(data->drm_fd, &fb_modeset); } free_lut(gamma_linear); -- 2.29.2
Martin Peres
2021-Mar-18 06:42 UTC
[Nouveau] [igt-dev] [PATCH i-g-t 0/3] tests/kms_color: Fixup for nouveau
On 18/03/2021 00:42, Lyude wrote:> From: Lyude Paul <lyude at redhat.com> > > This patch series just introduces a small drive-by cleanup for > kms_color, and fixes the kms_color test so that it works correctly on > nouveau. Note that the invalid LUT/gamma tests will likely currently > fail, but I'm going to be submitting some kernel patches to fix these in > nouveau very shortly.The series is: Reviewed-by: Martin Peres <martin.peres at mupuf.org>> > Cc: Martin Peres <martin.peres at free.fr> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: Jeremy Cline <jcline at redhat.com> > > Lyude Paul (3): > tests/kms_color: Don't opencode igt_check_crc_equal() > tests/kms_color: Allow tests to run on any driver > tests/kms_color: Stop leaking fbs > > tests/kms_color.c | 15 +++++++++++++-- > tests/kms_color_helper.c | 6 ------ > 2 files changed, 13 insertions(+), 8 deletions(-) >
Jeremy Cline
2021-Mar-22 15:20 UTC
[Nouveau] [PATCH i-g-t 0/3] tests/kms_color: Fixup for nouveau
On Wed, Mar 17, 2021 at 06:42:19PM -0400, Lyude wrote:> From: Lyude Paul <lyude at redhat.com> > > This patch series just introduces a small drive-by cleanup for > kms_color, and fixes the kms_color test so that it works correctly on > nouveau. Note that the invalid LUT/gamma tests will likely currently > fail, but I'm going to be submitting some kernel patches to fix these in > nouveau very shortly. > > Cc: Martin Peres <martin.peres at free.fr> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: Jeremy Cline <jcline at redhat.com> > > Lyude Paul (3): > tests/kms_color: Don't opencode igt_check_crc_equal() > tests/kms_color: Allow tests to run on any driver > tests/kms_color: Stop leaking fbs > > tests/kms_color.c | 15 +++++++++++++-- > tests/kms_color_helper.c | 6 ------ > 2 files changed, 13 insertions(+), 8 deletions(-) >Reviewed-by: Jeremy Cline <jcline at redhat.com>