mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 06:46:13 +00:00
tests/pc8: clarify modeset_subtest arguments
My tiny little brain can't properly process 3 unnamed boolean arguments. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
parent
abb3340617
commit
b6645ee2e2
28
tests/pc8.c
28
tests/pc8.c
@ -59,6 +59,11 @@ enum screen_type {
|
|||||||
SCREEN_TYPE_ANY,
|
SCREEN_TYPE_ANY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum residency_wait {
|
||||||
|
WAIT,
|
||||||
|
DONT_WAIT,
|
||||||
|
};
|
||||||
|
|
||||||
int drm_fd, msr_fd;
|
int drm_fd, msr_fd;
|
||||||
struct mode_set_data ms_data;
|
struct mode_set_data ms_data;
|
||||||
|
|
||||||
@ -638,23 +643,20 @@ static void basic_subtest(void)
|
|||||||
"PC8+ residency didn't stop with screen enabled.\n");
|
"PC8+ residency didn't stop with screen enabled.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void modeset_subtest(bool lpsp, bool stress, bool wait_for_residency)
|
static void modeset_subtest(enum screen_type type, int rounds,
|
||||||
|
enum residency_wait wait)
|
||||||
{
|
{
|
||||||
int i, rounds;
|
int i;
|
||||||
enum screen_type type;
|
|
||||||
|
|
||||||
rounds = stress ? 50 : 1;
|
|
||||||
type = lpsp ? SCREEN_TYPE_LPSP : SCREEN_TYPE_NON_LPSP;
|
|
||||||
|
|
||||||
for (i = 0; i < rounds; i++) {
|
for (i = 0; i < rounds; i++) {
|
||||||
disable_all_screens(&ms_data);
|
disable_all_screens(&ms_data);
|
||||||
if (wait_for_residency)
|
if (wait == WAIT)
|
||||||
igt_assert(pc8_plus_enabled());
|
igt_assert(pc8_plus_enabled());
|
||||||
|
|
||||||
/* If we skip this line it's because the type of screen we want
|
/* If we skip this line it's because the type of screen we want
|
||||||
* is not connected. */
|
* is not connected. */
|
||||||
igt_require(enable_one_screen_with_type(&ms_data, type));
|
igt_require(enable_one_screen_with_type(&ms_data, type));
|
||||||
if (wait_for_residency)
|
if (wait == WAIT)
|
||||||
igt_assert(pc8_plus_disabled());
|
igt_assert(pc8_plus_disabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -801,9 +803,9 @@ int main(int argc, char *argv[])
|
|||||||
igt_subtest("drm-resources-equal")
|
igt_subtest("drm-resources-equal")
|
||||||
drm_resources_equal_subtest();
|
drm_resources_equal_subtest();
|
||||||
igt_subtest("modeset-lpsp")
|
igt_subtest("modeset-lpsp")
|
||||||
modeset_subtest(true, false, true);
|
modeset_subtest(SCREEN_TYPE_LPSP, 1, WAIT);
|
||||||
igt_subtest("modeset-non-lpsp")
|
igt_subtest("modeset-non-lpsp")
|
||||||
modeset_subtest(false, false, true);
|
modeset_subtest(SCREEN_TYPE_NON_LPSP, 1, WAIT);
|
||||||
igt_subtest("batch")
|
igt_subtest("batch")
|
||||||
batch_subtest();
|
batch_subtest();
|
||||||
igt_subtest("i2c")
|
igt_subtest("i2c")
|
||||||
@ -811,11 +813,11 @@ int main(int argc, char *argv[])
|
|||||||
igt_subtest("stress-test")
|
igt_subtest("stress-test")
|
||||||
stress_test();
|
stress_test();
|
||||||
igt_subtest("modeset-non-lpsp-stress")
|
igt_subtest("modeset-non-lpsp-stress")
|
||||||
modeset_subtest(false, true, true);
|
modeset_subtest(SCREEN_TYPE_NON_LPSP, 50, WAIT);
|
||||||
igt_subtest("modeset-lpsp-stress-no-wait")
|
igt_subtest("modeset-lpsp-stress-no-wait")
|
||||||
modeset_subtest(true, true, false);
|
modeset_subtest(SCREEN_TYPE_LPSP, 50, DONT_WAIT);
|
||||||
igt_subtest("modeset-non-lpsp-stress-no-wait")
|
igt_subtest("modeset-non-lpsp-stress-no-wait")
|
||||||
modeset_subtest(false, true, false);
|
modeset_subtest(SCREEN_TYPE_NON_LPSP, 50, DONT_WAIT);
|
||||||
igt_subtest("register-compare") {
|
igt_subtest("register-compare") {
|
||||||
igt_require(do_register_compare);
|
igt_require(do_register_compare);
|
||||||
register_compare_subtest();
|
register_compare_subtest();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user