From: Lee Shawn C <shawn.c.lee@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lee Shawn C <shawn.c.lee@intel.com>
Subject: [igt-dev] [PATCH] lib/i915/drrs: close file handler after update DRRS setting
Date: Sun, 22 Oct 2023 21:54:16 +0800 [thread overview]
Message-ID: <20231022135416.1868389-1-shawn.c.lee@intel.com> (raw)
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
next reply other threads:[~2023-10-22 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-22 13:54 Lee Shawn C [this message]
2023-10-23 4:53 ` [igt-dev] [PATCH] lib/i915/drrs: close file handler after update DRRS setting Sharma, Swati2
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=20231022135416.1868389-1-shawn.c.lee@intel.com \
--to=shawn.c.lee@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