[PATCH 3/5] drm/i915/ipc: register debugfs only if IPC available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_ipc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ipc.c b/drivers/gpu/drm/i915/display/intel_ipc.c
index 389d7d8012d9..1285d88b5d25 100644
--- a/drivers/gpu/drm/i915/display/intel_ipc.c
+++ b/drivers/gpu/drm/i915/display/intel_ipc.c
@@ -68,9 +68,6 @@ static int intel_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, intel_ipc_status_show, i915);
 }
 
@@ -111,6 +108,9 @@ void intel_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, &intel_ipc_status_fops);
 }
-- 
2.34.1




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux