diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2019-01-11 16:48:45 -0800 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2019-01-22 14:09:12 -0800 |
commit | 13ac931a33f9ce43273af0232fa33ad122c3fa07 (patch) | |
tree | a774adeb973c4108b38b2ea1d3bbd9372118835c /tests/kms_fbcon_fbt.c | |
parent | 3f828a7a8cf22b5440372234b7814c4bd1b9315e (diff) |
lib/psr: Add PSR2 support to the remaning psr functions
Add the mode parameter to psr_enable() and psr_sink_support() so PSR1
and PSR2 can be tested separated.
For now all PSR tests will run only with PSR1 and the tests for PSR2
will come in the future.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tests/kms_fbcon_fbt.c')
-rw-r--r-- | tests/kms_fbcon_fbt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index 2823b47a..9d0d5a36 100644 --- a/tests/kms_fbcon_fbt.c +++ b/tests/kms_fbcon_fbt.c @@ -199,6 +199,11 @@ static bool psr_wait_until_enabled(int debugfs_fd) return r; } +static bool psr_supported_on_chipset(int debugfs_fd) +{ + return psr_sink_support(debugfs_fd, PSR_MODE_1); +} + static void disable_features(int debugfs_fd) { igt_set_module_param_int("enable_fbc", 0); @@ -212,7 +217,7 @@ static inline void fbc_modparam_enable(int debugfs_fd) static inline void psr_debugfs_enable(int debugfs_fd) { - psr_enable(debugfs_fd); + psr_enable(debugfs_fd, PSR_MODE_1); } struct feature { @@ -226,7 +231,7 @@ struct feature { .connector_possible_fn = connector_can_fbc, .enable = fbc_modparam_enable, }, psr = { - .supported_on_chipset = psr_sink_support, + .supported_on_chipset = psr_supported_on_chipset, .wait_until_enabled = psr_wait_until_enabled, .connector_possible_fn = connector_can_psr, .enable = psr_debugfs_enable, |