Re: [PATCH 5/7] drm/i915/uc: Skip reset preparation if GuC is already dead

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

 



On Fri, 17 May 2019 18:31:31 +0200, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:

Quoting Michal Wajdeczko (2019-05-17 17:22:25)
We may skip reset preparation steps if GuC is already sanitized.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_uc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 86edfa5ad72e..36c53a42927c 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -499,6 +499,9 @@ void intel_uc_reset_prepare(struct drm_i915_private *i915)
        if (!USES_GUC(i915))
                return;

+       if (!intel_guc_is_alive(guc))
+               return;

Does it not replace "if (!USES_GUC(i915))"?

Yes it can, as we will never fetch/upload fw if we don't plan to use it ;)

Btw, I'm thinking of renaming intel_guc_is_alive to intel_guc_is_loaded
or intel_guc_is_started to better describe what this function is reporting,
as one can think that intel_guc_is_alive is actually checking that GuC fw
is responsive, which in general might not be the same as "loaded"

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux