All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v2 1/4] drm/i915/huc: drop intel_huc_is_authenticated
Date: Wed,  4 May 2022 13:48:13 -0700	[thread overview]
Message-ID: <20220504204816.2082588-2-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20220504204816.2082588-1-daniele.ceraolospurio@intel.com>

The fuction name is confusing, because it doesn't check the actual auth
status in HW but the SW status. Given that there is only one user (the
huc_auth function itself), just get rid of it and use the FW status
checker directly.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +-
 drivers/gpu/drm/i915/gt/uc/intel_huc.h | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
index 556829de9c172..7b759b99cf3c8 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
@@ -96,7 +96,7 @@ int intel_huc_auth(struct intel_huc *huc)
 	struct intel_guc *guc = &gt->uc.guc;
 	int ret;
 
-	GEM_BUG_ON(intel_huc_is_authenticated(huc));
+	GEM_BUG_ON(intel_uc_fw_is_running(&huc->fw));
 
 	if (!intel_uc_fw_is_loaded(&huc->fw))
 		return -ENOEXEC;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
index 73ec670800f2b..77d813840d76c 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
@@ -50,11 +50,6 @@ static inline bool intel_huc_is_used(struct intel_huc *huc)
 	return intel_uc_fw_is_available(&huc->fw);
 }
 
-static inline bool intel_huc_is_authenticated(struct intel_huc *huc)
-{
-	return intel_uc_fw_is_running(&huc->fw);
-}
-
 void intel_huc_load_status(struct intel_huc *huc, struct drm_printer *p);
 
 #endif
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 1/4] drm/i915/huc: drop intel_huc_is_authenticated
Date: Wed,  4 May 2022 13:48:13 -0700	[thread overview]
Message-ID: <20220504204816.2082588-2-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20220504204816.2082588-1-daniele.ceraolospurio@intel.com>

The fuction name is confusing, because it doesn't check the actual auth
status in HW but the SW status. Given that there is only one user (the
huc_auth function itself), just get rid of it and use the FW status
checker directly.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +-
 drivers/gpu/drm/i915/gt/uc/intel_huc.h | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
index 556829de9c172..7b759b99cf3c8 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
@@ -96,7 +96,7 @@ int intel_huc_auth(struct intel_huc *huc)
 	struct intel_guc *guc = &gt->uc.guc;
 	int ret;
 
-	GEM_BUG_ON(intel_huc_is_authenticated(huc));
+	GEM_BUG_ON(intel_uc_fw_is_running(&huc->fw));
 
 	if (!intel_uc_fw_is_loaded(&huc->fw))
 		return -ENOEXEC;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
index 73ec670800f2b..77d813840d76c 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h
@@ -50,11 +50,6 @@ static inline bool intel_huc_is_used(struct intel_huc *huc)
 	return intel_uc_fw_is_available(&huc->fw);
 }
 
-static inline bool intel_huc_is_authenticated(struct intel_huc *huc)
-{
-	return intel_uc_fw_is_running(&huc->fw);
-}
-
 void intel_huc_load_status(struct intel_huc *huc, struct drm_printer *p);
 
 #endif
-- 
2.25.1


  reply	other threads:[~2022-05-04 20:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 20:48 [PATCH v2 0/4] drm/i915: Prepare for GSC-loaded HuC Daniele Ceraolo Spurio
2022-05-04 20:48 ` [Intel-gfx] " Daniele Ceraolo Spurio
2022-05-04 20:48 ` Daniele Ceraolo Spurio [this message]
2022-05-04 20:48   ` [Intel-gfx] [PATCH v2 1/4] drm/i915/huc: drop intel_huc_is_authenticated Daniele Ceraolo Spurio
2022-05-05 19:50   ` [v2,1/4] " Teres Alexis, Alan Previn
2022-05-05 19:50     ` [Intel-gfx] [v2, 1/4] " Teres Alexis, Alan Previn
2022-05-04 20:48 ` [PATCH v2 2/4] drm/i915/huc: Add fetch support for gsc-loaded HuC binary Daniele Ceraolo Spurio
2022-05-04 20:48   ` [Intel-gfx] " Daniele Ceraolo Spurio
2022-05-04 20:48 ` [PATCH v2 3/4] drm/i915/huc: Prepare for GSC-loaded HuC Daniele Ceraolo Spurio
2022-05-04 20:48   ` [Intel-gfx] " Daniele Ceraolo Spurio
2022-05-05 19:52   ` [v2,3/4] " Teres Alexis, Alan Previn
2022-05-05 19:52     ` [Intel-gfx] " Teres Alexis, Alan Previn
2022-05-04 20:48 ` [PATCH v2 4/4] drm/i915/huc: Don't fail the probe if HuC init fails Daniele Ceraolo Spurio
2022-05-04 20:48   ` [Intel-gfx] " Daniele Ceraolo Spurio
2022-05-05  0:19 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Prepare for GSC-loaded HuC (rev2) Patchwork
2022-05-05  0:43 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-05  6:37 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20220504204816.2082588-2-daniele.ceraolospurio@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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.