mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
kms_plane: Add test that suspends/resumes before getting crc
This adds a test that does a suspend/resume cycle between configuring a plane and getting the crc value for the pipe. The intention is to test if the user requested stated is restored properly, instead of being clobbered by the state read out from the hardware. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
a29f28eba9
commit
eeff390598
@ -32,6 +32,7 @@
|
|||||||
#include "drmtest.h"
|
#include "drmtest.h"
|
||||||
#include "igt_debugfs.h"
|
#include "igt_debugfs.h"
|
||||||
#include "igt_kms.h"
|
#include "igt_kms.h"
|
||||||
|
#include "igt_aux.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float red;
|
float red;
|
||||||
@ -269,6 +270,7 @@ create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode,
|
|||||||
enum {
|
enum {
|
||||||
TEST_PANNING_TOP_LEFT = 1 << 0,
|
TEST_PANNING_TOP_LEFT = 1 << 0,
|
||||||
TEST_PANNING_BOTTOM_RIGHT = 1 << 1,
|
TEST_PANNING_BOTTOM_RIGHT = 1 << 1,
|
||||||
|
TEST_SUSPEND_RESUME = 1 << 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -309,8 +311,13 @@ test_plane_panning_with_output(data_t *data,
|
|||||||
|
|
||||||
igt_display_commit(&data->display);
|
igt_display_commit(&data->display);
|
||||||
|
|
||||||
|
if (flags & TEST_SUSPEND_RESUME)
|
||||||
|
igt_system_suspend_autoresume();
|
||||||
|
|
||||||
igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
|
igt_pipe_crc_collect_crc(data->pipe_crc, &crc);
|
||||||
|
|
||||||
|
igt_debug_wait_for_keypress("crc");
|
||||||
|
|
||||||
if (flags & TEST_PANNING_TOP_LEFT)
|
if (flags & TEST_PANNING_TOP_LEFT)
|
||||||
igt_assert(igt_crc_equal(&test.red_crc, &crc));
|
igt_assert(igt_crc_equal(&test.red_crc, &crc));
|
||||||
else
|
else
|
||||||
@ -360,6 +367,11 @@ run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane)
|
|||||||
test_plane_panning(data, pipe, plane,
|
test_plane_panning(data, pipe, plane,
|
||||||
TEST_PANNING_BOTTOM_RIGHT);
|
TEST_PANNING_BOTTOM_RIGHT);
|
||||||
|
|
||||||
|
igt_subtest_f("plane-panning-bottom-right-suspend-pipe-%s-plane-%d",
|
||||||
|
kmstest_pipe_name(pipe), plane)
|
||||||
|
test_plane_panning(data, pipe, plane,
|
||||||
|
TEST_PANNING_BOTTOM_RIGHT |
|
||||||
|
TEST_SUSPEND_RESUME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user