From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V2 4/5] tests/kms_force_connector_basic: Set the param only if driver supports
Date: Fri, 31 Mar 2023 19:15:55 +0530 [thread overview]
Message-ID: <20230331134556.4077113-5-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230331134556.4077113-1-bhanuprakash.modem@intel.com>
Set/Clear the param "load_detect_test" only if driver supports.
V2: - Set the param if driver supports
- Fix the commit message
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_force_connector_basic.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index 4ff1efe3b..35e8153c8 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -36,6 +36,7 @@ static void reset_connectors(void)
drmModeRes *res;
drmModeConnector *connector = NULL;
int drm_fd;
+ char *param;
drm_fd = drm_open_driver_master(DRIVER_ANY);
res = drmModeGetResources(drm_fd);
@@ -53,7 +54,11 @@ static void reset_connectors(void)
drmModeFreeConnector(connector);
}
- igt_set_module_param_int(drm_fd, "load_detect_test", 0);
+ param = __igt_params_get(drm_fd, "load_detect_test");
+ if (param) {
+ igt_set_module_param_int(drm_fd, "load_detect_test", 0);
+ free(param);
+ }
close(drm_fd);
}
--
2.40.0
next prev parent reply other threads:[~2023-03-31 13:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 13:45 [igt-dev] [i-g-t V2 0/5] Enable ADDFB tests for XE Bhanuprakash Modem
2023-03-31 13:45 ` [igt-dev] [i-g-t V2 1/5] lib/xe/xe_ioctl: Add a helper to map the buffer Bhanuprakash Modem
2023-03-31 13:45 ` [igt-dev] [i-g-t V2 2/5] lib/igt_fb: Add support for allocating buffers for XE Bhanuprakash Modem
2023-04-06 6:16 ` Karthik B S
2023-03-31 13:45 ` [igt-dev] [i-g-t V2 3/5] tests/kms_addfb_basic: Add XE support Bhanuprakash Modem
2023-04-04 15:02 ` Kamil Konieczny
2023-04-05 6:13 ` Modem, Bhanuprakash
2023-04-06 6:42 ` Karthik B S
2023-04-06 7:57 ` Modem, Bhanuprakash
2023-03-31 13:45 ` Bhanuprakash Modem [this message]
2023-04-04 14:51 ` [igt-dev] [i-g-t V2 4/5] tests/kms_force_connector_basic: Set the param only if driver supports Kamil Konieczny
2023-03-31 13:45 ` [igt-dev] [i-g-t V2 5/5] xe-fast-feedback: Add basic kms tests to XE BAT Bhanuprakash Modem
2023-03-31 15:58 ` [igt-dev] ✓ Fi.CI.BAT: success for Enable ADDFB tests for XE (rev3) Patchwork
2023-04-01 15:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230331134556.4077113-5-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox