Commit 62a21a7c authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915/ipc: register debugfs only if IPC available



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: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b18edb4f96c9d2ec728ef04e6f99d161fe5641d1.1662983005.git.jani.nikula@intel.com
parent dde01ed5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3485,9 +3485,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);
}

@@ -3529,6 +3526,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);
}