Skip to content

Commit

Permalink
drm/i915/ipc: register debugfs only if IPC available
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jani Nikula committed Sep 13, 2022
1 parent dde01ed commit 62a21a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/display/skl_watermark.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

0 comments on commit 62a21a7

Please sign in to comment.