[Intel-gfx] [PATCH 3/5] drm/i915/ipc: register debugfs only if IPC available
Jani Nikula
jani.nikula at intel.com
Mon Sep 12 11:45:14 UTC 2022
It looks like trying to enable IPC via debugfs on platforms that don't
have IPC resulted in dmesg info message about IPC being enabled, which
is clearly not possible and would not happen.
Seems sensible to register IPC debugfs only on platforms that have IPC.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 1f0efde29d96..fd9552f08422 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3479,9 +3479,6 @@ static int skl_watermark_ipc_status_open(struct inode *inode, struct file *file)
{
struct drm_i915_private *i915 = inode->i_private;
- if (!HAS_IPC(i915))
- return -ENODEV;
-
return single_open(file, skl_watermark_ipc_status_show, i915);
}
@@ -3523,6 +3520,9 @@ void skl_watermark_ipc_debugfs_register(struct drm_i915_private *i915)
{
struct drm_minor *minor = i915->drm.primary;
+ if (!HAS_IPC(i915))
+ return;
+
debugfs_create_file("i915_ipc_status", 0644, minor->debugfs_root, i915,
&skl_watermark_ipc_status_fops);
}
--
2.34.1
More information about the Intel-gfx
mailing list