summaryrefslogtreecommitdiff
path: root/tests/amdgpu
diff options
context:
space:
mode:
authorDavid Zhang <dingchen.zhang@amd.com>2022-04-28 12:46:14 -0400
committerDavid Zhang <dingchen.zhang@amd.com>2022-05-03 13:53:13 -0400
commitf6bb4399881a806fbff75ce3df89b60286d55917 (patch)
treeba7cf37a9b54f43ef0dc1496e8185e9b1d8a1460 /tests/amdgpu
parenteddc67c5c85b8ee6eb4d13752ca43da5073dc985 (diff)
tests/amdgpu/amd_psr: trigger full modeset if visual confirm enabled
[why] In amdgpu kernel, to enable PSR visual confirm debug option, it needs a full modeset to call the DM PSR setup helper which in turn to set the visual confirm debug option. Currently before test run there is such full modeset, and after test run ends the visual confirm option is restored to be disabled. Although the IGT clean up after test run ends will do DPMS transition and trigger a full modeset, but at the moment the visual confirm is already disabled. This means that even from command line, visual confirm option is set, the DC visual confirm debug is never enabled actually during any PSR-SU test run. [how] If visual confirm option is set from command line parameter, before any PSR-SU test run, we manually trigger a DPMS off->ON transition which in turn to trigger a full modeset in kernel from test_init(), to enable the visual confirm. changes in v2: - drop the scaling test patch and rebase w/ latest cod base Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Jay Pillai <aurabindo.pillai@amd.com> Cc: Wayne Lin <wayne.lin@amd.com> Signed-off-by: David Zhang <dingchen.zhang@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com>
Diffstat (limited to 'tests/amdgpu')
-rw-r--r--tests/amdgpu/amd_psr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c
index 56858f79..b930b20e 100644
--- a/tests/amdgpu/amd_psr.c
+++ b/tests/amdgpu/amd_psr.c
@@ -170,6 +170,16 @@ static void test_init(data_t *data)
data->w = data->mode->hdisplay;
data->h = data->mode->vdisplay;
+
+ if (opt.visual_confirm) {
+ /**
+ * if visual confirm option is enabled, we'd trigger a full modeset before test run
+ * to make PSR visual confirm enable take effect. DPMS off -> ON transition is one of
+ * the approaches.
+ */
+ kmstest_set_connector_dpms(data->fd, data->output->config.connector, DRM_MODE_DPMS_OFF);
+ kmstest_set_connector_dpms(data->fd, data->output->config.connector, DRM_MODE_DPMS_ON);
+ }
}
/* Common test cleanup. */
static void test_fini(data_t *data)