From 13ac931a33f9ce43273af0232fa33ad122c3fa07 Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Fri, 11 Jan 2019 16:48:45 -0800 Subject: lib/psr: Add PSR2 support to the remaning psr functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza --- tests/kms_fbcon_fbt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/kms_fbcon_fbt.c') 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, -- cgit v1.2.3