Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] lib/i915/drrs: close file handler after update DRRS setting
@ 2023-10-22 13:54 Lee Shawn C
  2023-10-23  4:53 ` Sharma, Swati2
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Shawn C @ 2023-10-22 13:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Lee Shawn C

After configure DRRS status, test tool has to release file handler
properly to avoid unexpected problem.

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 lib/i915/intel_drrs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/i915/intel_drrs.c b/lib/i915/intel_drrs.c
index 2f83e1394a61..deaec90d3f59 100644
--- a/lib/i915/intel_drrs.c
+++ b/lib/i915/intel_drrs.c
@@ -69,6 +69,7 @@ static void drrs_set(int device, enum pipe pipe, unsigned int val)
 	dir = igt_debugfs_pipe_dir(device, pipe, O_DIRECTORY);
 	igt_require_fd(dir);
 	ret = igt_sysfs_write(dir, "i915_drrs_ctl", buf, sizeof(buf) - 1);
+	close(dir);
 
 	/*
 	 * drrs_enable() is called on DRRS capable platform only,
-- 
2.34.1

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

end of thread, other threads:[~2023-10-23  4:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22 13:54 [igt-dev] [PATCH] lib/i915/drrs: close file handler after update DRRS setting Lee Shawn C
2023-10-23  4:53 ` Sharma, Swati2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox