From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [CI i-g-t 1/5] lib/igt_gt: Fix forcewake open
Date: Wed, 25 Sep 2024 23:16:47 -0500 [thread overview]
Message-ID: <20240926041651.412396-1-lucas.demarchi@intel.com> (raw)
File from the kernel side is read-only and should be open as such:
debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
to_i915(minor->dev), &i915_forcewake_fops);
Apparently it doesn't matter for just opening it:
openat(AT_FDCWD, "/sys/kernel/debug/dri/0", O_RDONLY) = 5
openat(5, "i915_forcewake_user", O_WRONLY) = 6
But RDONLY is sufficient. Let's stick to the file permission.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
lib/igt_gt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index aa5e75b07..b043e2d41 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -503,7 +503,7 @@ int igt_open_forcewake_handle(int fd)
{
if (getenv("IGT_NO_FORCEWAKE"))
return -1;
- return igt_debugfs_open(fd, "i915_forcewake_user", O_WRONLY);
+ return igt_debugfs_open(fd, "i915_forcewake_user", O_RDONLY);
}
#if defined(__x86_64__) || defined(__i386__)
--
2.46.1
next reply other threads:[~2024-09-26 4:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 4:16 Lucas De Marchi [this message]
2024-09-26 4:16 ` [CI i-g-t 2/5] lib/igt_gt: Make igt_open_forcewake_handle() xe-compatible Lucas De Marchi
2024-09-26 4:16 ` [CI i-g-t 3/5] lib/igt_gt: Add igt_open_forcewake_handle_for_pcidev() Lucas De Marchi
2024-09-26 4:16 ` [CI i-g-t 4/5] treewide: Fix intel_register_access_init() Lucas De Marchi
2024-09-26 4:16 ` [CI i-g-t 5/5] lib/igt_gt: Stop passing fd == -1 in igt_open_forcewake_handle() Lucas De Marchi
2024-09-26 10:24 ` ✗ Fi.CI.BAT: failure for series starting with [CI,i-g-t,1/5] lib/igt_gt: Fix forcewake open Patchwork
2024-09-26 10:36 ` ✓ CI.xeBAT: success " Patchwork
2024-09-27 2:59 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-30 19:47 ` ✓ CI.xeBAT: success for series starting with [CI,i-g-t,1/5] lib/igt_gt: Fix forcewake open (rev2) Patchwork
2024-09-30 19:54 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-01 2:36 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-01 6:29 ` Lucas De Marchi
2024-10-01 6:20 ` ✗ 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=20240926041651.412396-1-lucas.demarchi@intel.com \
--to=lucas.demarchi@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