Commit d1bd9c6a authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Harry Wentland

tests: Add variable refresh rate tests

There are 3 tests for basic variable refresh rate functionality.

The tests measure flipping at the average between the current mode
refresh rate and the minimum supported variable refresh rate.

It tests that VRR is enabled and that the difference between flip
timestamps converges to the requested rate. It also tests this under
both S3 and DPMS.

Potential ideas for future tests:
- Test behavior inside VRR range with a stepping test
- Test behavior outside of VRR range
- Multi-monitor (limited by no async pageflips in DRM atomic API)

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Nicholas Kazlauskas's avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland's avatarHarry Wentland <harry.wentland@amd.com>
parent 031715e3
Pipeline #16616 passed with stages
in 2 minutes and 36 seconds
......@@ -189,6 +189,7 @@ const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
[IGT_CRTC_MODE_ID] = "MODE_ID",
[IGT_CRTC_ACTIVE] = "ACTIVE",
[IGT_CRTC_OUT_FENCE_PTR] = "OUT_FENCE_PTR",
[IGT_CRTC_VRR_ENABLED] = "VRR_ENABLED",
};
const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
......@@ -197,6 +198,7 @@ const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
[IGT_CONNECTOR_DPMS] = "DPMS",
[IGT_CONNECTOR_BROADCAST_RGB] = "Broadcast RGB",
[IGT_CONNECTOR_CONTENT_PROTECTION] = "Content Protection",
[IGT_CONNECTOR_VRR_CAPABLE] = "vrr_capable",
};
/*
......@@ -1789,6 +1791,9 @@ static void igt_pipe_reset(igt_pipe_t *pipe)
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 0);
igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
if (igt_pipe_obj_has_prop(pipe, IGT_CRTC_VRR_ENABLED))
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_VRR_ENABLED, 0);
pipe->out_fence_fd = -1;
}
......
......@@ -104,6 +104,7 @@ enum igt_atomic_crtc_properties {
IGT_CRTC_MODE_ID,
IGT_CRTC_ACTIVE,
IGT_CRTC_OUT_FENCE_PTR,
IGT_CRTC_VRR_ENABLED,
IGT_NUM_CRTC_PROPS
};
......@@ -121,6 +122,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_DPMS,
IGT_CONNECTOR_BROADCAST_RGB,
IGT_CONNECTOR_CONTENT_PROTECTION,
IGT_CONNECTOR_VRR_CAPABLE,
IGT_NUM_CONNECTOR_PROPS
};
......
......@@ -89,6 +89,7 @@ TESTS_progs = \
kms_tv_load_detect \
kms_universal_plane \
kms_vblank \
kms_vrr \
kms_sequence \
meta_test \
perf \
......
This diff is collapsed.
......@@ -60,6 +60,7 @@ test_progs = [
'kms_tv_load_detect',
'kms_universal_plane',
'kms_vblank',
'kms_vrr',
'meta_test',
'perf',
'pm_backlight',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment