Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling
@ 2018-05-15 10:28 Mika Kahola
  2018-05-15 12:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip_tiling Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mika Kahola @ 2018-05-15 10:28 UTC (permalink / raw)
  To: igt-dev

Make sure framebuffer compression is disabled when running this test.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_flip_tiling.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index 5aae29a..8dde5c8 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -33,12 +33,23 @@
 
 IGT_TEST_DESCRIPTION("Test page flips and tiling scenarios");
 
+#define fbc_enable() igt_set_module_param_int("enable_fbc", 1)
+#define fbc_disable() igt_set_module_param_int("enable_fbc", 0)
+
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
 	int gen;
 } data_t;
 
+static bool fbc_is_enabled(int fd)
+{
+	char buf[128];
+
+	igt_debugfs_read(fd, "i915_fbc_status", buf);
+	return strstr(buf, "FBC enabled\n");
+}
+
 static igt_pipe_crc_t *_pipe_crc;
 
 static igt_pipe_crc_t *pipe_crc_new(data_t *data, int pipe)
@@ -88,6 +99,10 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t ti
 	igt_pipe_crc_t *pipe_crc;
 	igt_crc_t reference_crc, crc;
 	int fb_id, ret, width;
+	bool fbc_enabled = fbc_is_enabled(data->drm_fd);
+
+	if (fbc_enabled)
+		fbc_disable();
 
 	pipe_crc = pipe_crc_new(data, pipe);
 	igt_output_set_pipe(output, pipe);
@@ -153,6 +168,9 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t ti
 
 	igt_remove_fb(data->drm_fd, &fb[0]);
 	igt_remove_fb(data->drm_fd, &fb[1]);
+
+	if (fbc_enabled)
+		fbc_enable();
 }
 
 static data_t data;
-- 
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] 7+ messages in thread
* [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling
@ 2018-05-16 11:57 Mika Kahola
  0 siblings, 0 replies; 7+ messages in thread
From: Mika Kahola @ 2018-05-16 11:57 UTC (permalink / raw)
  To: igt-dev

Make sure framebuffer compression is disabled when running this test.
This may or may not have an effect on pipe crc mismatch errors that
we keep receiving from our CI runs. This patch is all about excluding the
possibility that fbc would have an effect on these errors.

This patch is not for review!

References: https://bugs.freedesktop.org/show_bug.cgi?id=103166
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_flip_tiling.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index 5aae29a..19be81d 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -33,6 +33,9 @@
 
 IGT_TEST_DESCRIPTION("Test page flips and tiling scenarios");
 
+#define fbc_enable() igt_set_module_param_int("enable_fbc", 1)
+#define fbc_disable() igt_set_module_param_int("enable_fbc", 0)
+
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
@@ -170,6 +173,7 @@ igt_main
 
 		igt_require_pipe_crc(data.drm_fd);
 		igt_display_init(&data.display, data.drm_fd);
+		fbc_disable();
 	}
 
 	/*
-- 
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] 7+ messages in thread

end of thread, other threads:[~2018-05-16 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15 10:28 [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling Mika Kahola
2018-05-15 12:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip_tiling Patchwork
2018-05-15 21:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-05-16 11:36 ` [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling Daniel Vetter
2018-05-16 11:45   ` Arkadiusz Hiler
2018-05-16 12:48     ` Mika Kahola
  -- strict thread matches above, loose matches on Subject: below --
2018-05-16 11:57 Mika Kahola

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