mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 06:13:04 +00:00
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>
This commit is contained in:
+2
-10
@@ -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++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user