Re: [PATCH v2 1/2] drm/i915/guc: Use correct error code for GuC initialization failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<snip>

diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/intel_uc_fw.h
index d5fd460..0e3b237 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/intel_uc_fw.h
@@ -115,6 +115,11 @@ static inline bool intel_uc_fw_is_selected(struct intel_uc_fw *uc_fw)
  	return uc_fw->path != NULL;
  }
+static inline bool intel_uc_fw_is_loaded(struct intel_uc_fw *uc_fw)
+{
+	return uc_fw->load_status == INTEL_UC_FIRMWARE_SUCCESS;

Since we do not immediately update uc_fw->load_status after full GPU reset we have a small window of time during re-initialization where this function would falsely return true. We don't hit the issue in this patch, but I'd personally prefer not to add this function until uc_fw->load_status is correctly updated as we might inadvertently start to use it at the wrong time. Alternatively, if you want to merge this soon we could read the status from the HW as an initial version and then switch to uc_fw->load_status after we've fixed it.

Daniele

+}
+
  void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
  		       struct intel_uc_fw *uc_fw);
  int intel_uc_fw_upload(struct intel_uc_fw *uc_fw,

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux