mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
tests/pm_pc8: subtests for runtime pm for dpms
Very basic since I lack a bit ideas. After all with the latest patches runtime pm doesn't make much a difference between dpms off and disabling the outputs completely with SetCrtc. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
29ee36f259
commit
b38b8a59a8
@ -84,6 +84,7 @@ enum screen_type {
|
||||
#define WAIT_STATUS 1
|
||||
#define WAIT_PC8_RES 2
|
||||
#define WAIT_EXTRA 4
|
||||
#define USE_DPMS 8
|
||||
|
||||
int drm_fd, msr_fd, pm_status_fd, pc8_status_fd;
|
||||
bool has_runtime_pm, has_pc8;
|
||||
@ -254,6 +255,17 @@ static bool wait_for_active(void)
|
||||
return wait_for_pm_status(RUNTIME_PM_STATUS_ACTIVE);
|
||||
}
|
||||
|
||||
static void disable_all_screens_dpms(struct mode_set_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < data->res->count_connectors; i++) {
|
||||
drmModeConnectorPtr c = data->connectors[i];
|
||||
|
||||
kmstest_set_connector_dpms(drm_fd, c, DRM_MODE_DPMS_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
static void disable_all_screens(struct mode_set_data *data)
|
||||
{
|
||||
int i, rc;
|
||||
@ -825,7 +837,11 @@ static void modeset_subtest(enum screen_type type, int rounds, int wait_flags)
|
||||
igt_require(has_pc8);
|
||||
|
||||
for (i = 0; i < rounds; i++) {
|
||||
disable_all_screens(&ms_data);
|
||||
if (wait_flags & USE_DPMS)
|
||||
disable_all_screens_dpms(&ms_data);
|
||||
else
|
||||
disable_all_screens(&ms_data);
|
||||
|
||||
if (wait_flags & WAIT_STATUS)
|
||||
igt_assert(wait_for_suspended());
|
||||
if (wait_flags & WAIT_PC8_RES)
|
||||
@ -1498,6 +1514,10 @@ int main(int argc, char *argv[])
|
||||
modeset_subtest(SCREEN_TYPE_LPSP, 1, WAIT_STATUS);
|
||||
igt_subtest("modeset-non-lpsp")
|
||||
modeset_subtest(SCREEN_TYPE_NON_LPSP, 1, WAIT_STATUS);
|
||||
igt_subtest("dpms-lpsp")
|
||||
modeset_subtest(SCREEN_TYPE_LPSP, 1, WAIT_STATUS | USE_DPMS);
|
||||
igt_subtest("dpms-non-lpsp")
|
||||
modeset_subtest(SCREEN_TYPE_NON_LPSP, 1, WAIT_STATUS | USE_DPMS);
|
||||
|
||||
/* GEM */
|
||||
igt_subtest("gem-mmap-cpu")
|
||||
|
Loading…
x
Reference in New Issue
Block a user