From f2919ea120660ca15622a27527e1842d0dd3f1b7 Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Thu, 20 Sep 2018 10:59:18 -0700 Subject: test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's rename to debugfs_fd all the parameters of the functions that expect debugfs fd to avoid call one those functions with the wrong file descriptor. v2: - Fixing code style - Renaming fbc_wait_until_enabled() too Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza --- tests/kms_fbcon_fbt.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'tests/kms_fbcon_fbt.c') diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index 138eda9b..8de3da83 100644 --- a/tests/kms_fbcon_fbt.c +++ b/tests/kms_fbcon_fbt.c @@ -121,10 +121,10 @@ static bool fbc_is_enabled(int debugfs_fd) return strstr(buf, "FBC enabled\n"); } -static bool fbc_wait_until_enabled(int fd) +static bool fbc_wait_until_enabled(int debugfs_fd) { - bool r = igt_wait(fbc_is_enabled(fd), 5000, 1); - fbc_print_status(fd); + bool r = igt_wait(fbc_is_enabled(debugfs_fd), 5000, 1); + fbc_print_status(debugfs_fd); return r; } @@ -203,34 +203,35 @@ static bool psr_is_enabled(int debugfs_fd) return strstr(buf, "\nHW Enabled & Active bit: yes\n"); } -static bool psr_wait_until_enabled(int fd) +static bool psr_wait_until_enabled(int debugfs_fd) { - bool r = igt_wait(psr_is_enabled(fd), 5000, 1); - psr_print_status(fd); + bool r = igt_wait(psr_is_enabled(debugfs_fd), 5000, 1); + + psr_print_status(debugfs_fd); return r; } -static void disable_features(int fd) +static void disable_features(int debugfs_fd) { igt_set_module_param_int("enable_fbc", 0); - psr_disable(fd); + psr_disable(debugfs_fd); } -static inline void fbc_modparam_enable(int fd) +static inline void fbc_modparam_enable(int debugfs_fd) { igt_set_module_param_int("enable_fbc", 1); } -static inline void psr_debugfs_enable(int fd) +static inline void psr_debugfs_enable(int debugfs_fd) { - psr_enable(fd); + psr_enable(debugfs_fd); } struct feature { - bool (*supported_on_chipset)(int fd); - bool (*wait_until_enabled)(int fd); + bool (*supported_on_chipset)(int debugfs_fd); + bool (*wait_until_enabled)(int debugfs_fd); bool (*connector_possible_fn)(drmModeConnectorPtr connector); - void (*enable)(int fd); + void (*enable)(int debugfs_fd); } fbc = { .supported_on_chipset = fbc_supported_on_chipset, .wait_until_enabled = fbc_wait_until_enabled, -- cgit v1.2.3