All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/i915_pm_dc: Changing sysfs open attribute to O_RDONLY
@ 2021-09-30 12:20 Jigar Bhatt
  2021-09-30 12:36 ` Petri Latvala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jigar Bhatt @ 2021-09-30 12:20 UTC (permalink / raw)
  To: igt-dev; +Cc: jigar.bhatt, nischal.varide

Opening /sys/module/drm_kms_helper/parameters/ in read only mode to
avoid permission issue in dc9-dpms test.

Signed-off-by: Jigar Bhatt <jigar.bhatt@intel.com>
---
 tests/i915/i915_pm_dc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index d70ee060..4c9b871c 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -419,7 +419,7 @@ static void setup_dc9_dpms(data_t *data, int dc_target)
 {
 	int prev_dc, sysfs_fd;
 
-	igt_require((sysfs_fd = open(KMS_HELPER, O_RDWR)) >= 0);
+	igt_require((sysfs_fd = open(KMS_HELPER, O_RDONLY)) >= 0);
 	kms_poll_saved_state = igt_sysfs_get_boolean(sysfs_fd, "poll");
 	igt_sysfs_set_boolean(sysfs_fd, "poll", KMS_POLL_DISABLE);
 	close(sysfs_fd);
@@ -449,7 +449,7 @@ static void kms_poll_state_restore(int sig)
 {
 	int sysfs_fd;
 
-	sysfs_fd = open(KMS_HELPER, O_WRONLY);
+	sysfs_fd = open(KMS_HELPER, O_RDONLY);
 	if (sysfs_fd >= 0) {
 		igt_sysfs_set_boolean(sysfs_fd, "poll", kms_poll_saved_state);
 		close(sysfs_fd);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-30 15:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 12:20 [igt-dev] [PATCH i-g-t] tests/i915/i915_pm_dc: Changing sysfs open attribute to O_RDONLY Jigar Bhatt
2021-09-30 12:36 ` Petri Latvala
2021-09-30 12:42   ` Bhatt, Jigar
2021-09-30 13:02     ` Petri Latvala
2021-09-30 13:22 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-30 15:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.