Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, karthik.b.s@intel.com
Subject: [igt-dev] [i-g-t V3 5/6] tests/kms_force_connector_basic: Set the param only if driver supports
Date: Thu,  6 Apr 2023 13:18:14 +0530	[thread overview]
Message-ID: <20230406074815.463965-6-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230406074815.463965-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>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.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 4ff1efe3b70..35e8153c802 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

  parent reply	other threads:[~2023-04-06  7:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  7:48 [igt-dev] [i-g-t V3 0/6] Enable ADDFB tests for XE Bhanuprakash Modem
2023-04-06  7:48 ` [igt-dev] [i-g-t V3 1/6] lib/xe/xe_ioctl: Add a helper to map the buffer Bhanuprakash Modem
2023-04-06  7:48 ` [igt-dev] [i-g-t V3 2/6] lib/igt_fb: Add support for allocating buffers for XE Bhanuprakash Modem
2023-04-06  7:48 ` [igt-dev] [i-g-t V3 3/6] tests/kms_addfb_basic: Code cleanup Bhanuprakash Modem
2023-04-06 10:01   ` Karthik B S
2023-04-06  7:48 ` [igt-dev] [i-g-t V3 4/6] tests/kms_addfb_basic: Add XE support Bhanuprakash Modem
2023-04-06 10:01   ` Karthik B S
2023-04-06  7:48 ` Bhanuprakash Modem [this message]
2023-04-06  7:48 ` [igt-dev] [i-g-t V3 6/6] xe-fast-feedback: Add basic kms tests to XE BAT Bhanuprakash Modem
2023-04-06  8:26   ` Karthik B S
2023-04-06  8:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for Enable ADDFB tests for XE (rev4) Patchwork
2023-04-06 10:36 ` [igt-dev] ✓ Fi.CI.BAT: success for Enable ADDFB tests for XE (rev5) Patchwork
2023-04-07  0:32 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230406074815.463965-6-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    /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