All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 3/5] drm/i915/ipc: register debugfs only if IPC available
Date: Mon,  5 Sep 2022 21:01:06 +0300	[thread overview]
Message-ID: <65c7d79adbfbd8a5b69217b0f9437d8798c17218.1662400767.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1662400767.git.jani.nikula@intel.com>

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>
---
 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


  parent reply	other threads:[~2022-09-05 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 18:01 [Intel-gfx] [PATCH 0/5] drm/i915: ipc and display sub-struct refactoring Jani Nikula
2022-09-05 18:01 ` [Intel-gfx] [PATCH 1/5] drm/i915/ipc: split out intel_ipc.[ch] Jani Nikula
2022-09-05 18:01 ` [Intel-gfx] [PATCH 2/5] drm/i915/ipc: move IPC debugfs to intel_ipc.c Jani Nikula
2022-09-05 18:01 ` Jani Nikula [this message]
2022-09-05 18:01 ` [Intel-gfx] [PATCH 4/5] drm/i915/display: move IPC under display sub-struct Jani Nikula
2022-09-05 18:01 ` [Intel-gfx] [PATCH 5/5] drm/i915/display: move hdport " Jani Nikula
2022-09-05 18:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: ipc and display sub-struct refactoring Patchwork
2022-09-05 18:30 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-05 18:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-06  0:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-09-12 11:45 [Intel-gfx] [PATCH 0/5] drm/i915/ipc: ipc and sub-struct refactoring, take 2 Jani Nikula
2022-09-12 11:45 ` [Intel-gfx] [PATCH 3/5] drm/i915/ipc: register debugfs only if IPC available Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65c7d79adbfbd8a5b69217b0f9437d8798c17218.1662400767.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.