All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Propagate the fw xfer timeout
@ 2018-10-17 20:29 Chris Wilson
  2018-10-17 21:12 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Chris Wilson @ 2018-10-17 20:29 UTC (permalink / raw)
  To: intel-gfx

Propagate the timeout on transferring the fw back to the caller where it
may act upon it, usually by restarting the xfer before failing.

Testcase: igt/drv_selftest/live_hangcheck
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_fw.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c b/drivers/gpu/drm/i915/intel_guc_fw.c
index a9e6fcce467c..b68a05892dab 100644
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -125,22 +125,17 @@ static void guc_prepare_xfer(struct intel_guc *guc)
 }
 
 /* Copy RSA signature from the fw image to HW for verification */
-static int guc_xfer_rsa(struct intel_guc *guc, struct i915_vma *vma)
+static void guc_xfer_rsa(struct intel_guc *guc, struct i915_vma *vma)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
-	struct intel_uc_fw *guc_fw = &guc->fw;
-	struct sg_table *sg = vma->pages;
 	u32 rsa[UOS_RSA_SCRATCH_COUNT];
 	int i;
 
-	if (sg_pcopy_to_buffer(sg->sgl, sg->nents, rsa, sizeof(rsa),
-			       guc_fw->rsa_offset) != sizeof(rsa))
-		return -EINVAL;
+	sg_pcopy_to_buffer(vma->pages->sgl, vma->pages->nents,
+			   rsa, sizeof(rsa), guc->fw.rsa_offset);
 
 	for (i = 0; i < UOS_RSA_SCRATCH_COUNT; i++)
 		I915_WRITE(UOS_RSA_SCRATCH(i), rsa[i]);
-
-	return 0;
 }
 
 /*
@@ -251,17 +246,11 @@ static int guc_fw_xfer(struct intel_uc_fw *guc_fw, struct i915_vma *vma)
 	 * by the DMA engine in one operation, whereas the RSA signature is
 	 * loaded via MMIO.
 	 */
-	ret = guc_xfer_rsa(guc, vma);
-	if (ret)
-		DRM_WARN("GuC firmware signature xfer error %d\n", ret);
+	guc_xfer_rsa(guc, vma);
 
 	ret = guc_xfer_ucode(guc, vma);
-	if (ret)
-		DRM_WARN("GuC firmware code xfer error %d\n", ret);
-
-	ret = guc_wait_ucode(guc);
-	if (ret)
-		DRM_ERROR("GuC firmware xfer error %d\n", ret);
+	if (ret == 0)
+		ret = guc_wait_ucode(guc);
 
 	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-10-23 16:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 20:29 [PATCH] drm/i915/guc: Propagate the fw xfer timeout Chris Wilson
2018-10-17 21:12 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-17 22:14 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-17 23:09 ` [PATCH] " Daniele Ceraolo Spurio
2018-10-17 23:22   ` Michal Wajdeczko
2018-10-18  9:13     ` Chris Wilson
2018-10-18 18:18       ` Daniele Ceraolo Spurio
2018-10-18 18:27         ` Michal Wajdeczko
2018-10-18 19:42           ` Chris Wilson
2018-10-18 19:54 ` [PATCH v2] " Chris Wilson
2018-10-18 19:55 ` [PATCH v3] " Chris Wilson
2018-10-18 20:48   ` Daniele Ceraolo Spurio
2018-10-23  8:50     ` Chris Wilson
2018-10-23 16:04       ` Daniele Ceraolo Spurio
2018-10-18 20:16 ` ✗ Fi.CI.BAT: failure for drm/i915/guc: Propagate the fw xfer timeout (rev2) Patchwork
2018-10-18 20:37 ` ✓ Fi.CI.BAT: success for drm/i915/guc: Propagate the fw xfer timeout (rev3) Patchwork
2018-10-18 23:41 ` ✗ Fi.CI.IGT: failure " Patchwork

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.