summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-24 16:08:32 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-24 16:29:27 +0100
commit57259d714d3fe1170cf931af72648219856a9918 (patch)
tree0935c8d34785f96c0227b02834c2d2e2d50dadb3 /tests/kms_cursor_crc.c
parentd8078911f63494eba67f8f07ffb56c4bdeae7bc9 (diff)
lib/igt_debugfs: Don't setup crc in _new
The problem is that this causes writes to registers, and if the pipe is off they might go nowhere (e.g. when runtime pm is enabled). Furthermore we can only really check once the modeset setup is done, but again most tests set up the CRC structure before calling igt_commit and friends. We could add crc restore support to the kernel's rpm code, but that will end up being rather invasive and fragile hard-to-test code. Now originally this was needed back when CRC support wasn't available everywhere. But that's fixed now. So given all this just drop that sanity check and make sure that we only touch the debugfs file (and so the hw state) when we know the pipe is running in the desired configuration. A complementary kernel patch will try to catch offenders by returning -EIO if the pipe is off. v2: Forgot to git add one hunk. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r--tests/kms_cursor_crc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 5772ed45..7a8f34a6 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -230,7 +230,7 @@ static void test_crc_random(data_t *data)
}
}
-static bool prepare_crtc(data_t *data, igt_output_t *output,
+static void prepare_crtc(data_t *data, igt_output_t *output,
int cursor_w, int cursor_h)
{
drmModeModeInfo *mode;
@@ -267,11 +267,6 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
data->pipe_crc = igt_pipe_crc_new(data->pipe,
INTEL_PIPE_CRC_SOURCE_AUTO);
- if (!data->pipe_crc) {
- igt_info("auto crc not supported on this connector with pipe %i\n",
- data->pipe);
- return false;
- }
/* x/y position where the cursor is still fully visible */
data->left = 0;
@@ -289,8 +284,6 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
/* get reference crc w/o cursor */
igt_pipe_crc_collect_crc(data->pipe_crc, &data->ref_crc);
-
- return true;
}
static void cleanup_crtc(data_t *data, igt_output_t *output)
@@ -325,8 +318,7 @@ static void run_test(data_t *data, void (*testfunc)(data_t *), int cursor_w, int
for_each_pipe(display, p) {
data->pipe = p;
- if (!prepare_crtc(data, output, cursor_w, cursor_h))
- continue;
+ prepare_crtc(data, output, cursor_w, cursor_h);
valid_tests++;