diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2018-09-20 10:59:18 -0700 |
---|---|---|
committer | Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> | 2018-09-20 16:44:07 -0700 |
commit | f2919ea120660ca15622a27527e1842d0dd3f1b7 (patch) | |
tree | dc8b2c991d4bd44d95c01c8d254291a7b873d40a /tests/kms_fbcon_fbt.c | |
parent | 3c7de9a662afff151574ada014e2c08085f57ba4 (diff) |
test/kms_fbcon_fbt: Give a explicit parameter name to functions that expect debugfs fd
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 <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 | 29 |
1 files changed, 15 insertions, 14 deletions
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, |