[Intel-gfx] [PATCH 1/2] drm/i915/huc: Move pending status before debug

Tvrtko Ursulin tursulin at ursulin.net
Wed Mar 8 16:33:10 UTC 2017


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

This avoids confusing log message sequences such as:

 [] i915/skl_huc_ver01_07_1398.bin fw status: fetch SUCCESS, load SUCCESS
 [] HuC DMA transfer wait over with ret 0
 [] i915/skl_huc_ver01_07_1398.bin fw status: fetch SUCCESS, load SUCCESS

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
Cc: Michał Winiarski <michal.winiarski at intel.com>
---
 drivers/gpu/drm/i915/intel_huc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
index e660109fc51e..8cf104350e5b 100644
--- a/drivers/gpu/drm/i915/intel_huc.c
+++ b/drivers/gpu/drm/i915/intel_huc.c
@@ -213,6 +213,8 @@ int intel_huc_load(struct drm_i915_private *dev_priv)
 	if (huc_fw->fetch_status == INTEL_UC_FIRMWARE_NONE)
 		return 0;
 
+	huc_fw->load_status = INTEL_UC_FIRMWARE_PENDING;
+
 	DRM_DEBUG_DRIVER("%s fw status: fetch %s, load %s\n",
 		huc_fw->path,
 		intel_uc_fw_status_repr(huc_fw->fetch_status),
@@ -222,8 +224,6 @@ int intel_huc_load(struct drm_i915_private *dev_priv)
 	    huc_fw->load_status == INTEL_UC_FIRMWARE_FAIL)
 		return -ENOEXEC;
 
-	huc_fw->load_status = INTEL_UC_FIRMWARE_PENDING;
-
 	switch (huc_fw->fetch_status) {
 	case INTEL_UC_FIRMWARE_FAIL:
 		/* something went wrong :( */
-- 
2.9.3



More information about the Intel-gfx mailing list