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: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b18edb4f96c9d2ec728ef04e6f99d161fe5641d1.1662983005.git.jani.nikula@intel.com
This commit is contained in:
parent
dde01ed5b0
commit
62a21a7c6a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue