All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset
@ 2018-03-05 14:29 Michal Wajdeczko
  2018-03-05 14:29 ` [PATCH v3 2/2] HAX: Enable GuC for CI Michal Wajdeczko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2018-03-05 14:29 UTC (permalink / raw)
  To: intel-gfx

Right after GPU reset there will be a small window of time during which
some of GuC/HuC fields will still show state before reset. Let's start
to fix that by sanitizing firmware status as we will use it shortly.

v2: s/reset_prepare/prepare_to_reset (Michel)
    don't forget about gem_sanitize path (Daniele)
v3: rebased

Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c    |  5 ++++-
 drivers/gpu/drm/i915/intel_guc.h   |  5 +++++
 drivers/gpu/drm/i915/intel_huc.h   |  5 +++++
 drivers/gpu/drm/i915/intel_uc.c    | 14 ++++++++++++++
 drivers/gpu/drm/i915/intel_uc.h    |  1 +
 drivers/gpu/drm/i915/intel_uc_fw.h |  6 ++++++
 6 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a5bd073..aedb17d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2981,6 +2981,7 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
 	}
 
 	i915_gem_revoke_fences(dev_priv);
+	intel_uc_prepare_to_reset(dev_priv);
 
 	return err;
 }
@@ -4882,8 +4883,10 @@ void i915_gem_sanitize(struct drm_i915_private *i915)
 	 * it may impact the display and we are uncertain about the stability
 	 * of the reset, so this could be applied to even earlier gen.
 	 */
-	if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915))
+	if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915)) {
+		intel_uc_prepare_to_reset(i915);
 		WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));
+	}
 }
 
 int i915_gem_suspend(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index b9424ac..bdb0777 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -132,4 +132,9 @@ static inline u32 guc_ggtt_offset(struct i915_vma *vma)
 struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size);
 u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv);
 
+static inline void intel_guc_prepare_to_reset(struct intel_guc *guc)
+{
+	intel_uc_fw_prepare_to_reset(&guc->fw);
+}
+
 #endif
diff --git a/drivers/gpu/drm/i915/intel_huc.h b/drivers/gpu/drm/i915/intel_huc.h
index 5d6e804..6f21424 100644
--- a/drivers/gpu/drm/i915/intel_huc.h
+++ b/drivers/gpu/drm/i915/intel_huc.h
@@ -38,4 +38,9 @@ struct intel_huc {
 void intel_huc_init_early(struct intel_huc *huc);
 int intel_huc_auth(struct intel_huc *huc);
 
+static inline void intel_huc_prepare_to_reset(struct intel_huc *huc)
+{
+	intel_uc_fw_prepare_to_reset(&huc->fw);
+}
+
 #endif
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index e5bf0d3..8a64ff5 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -490,3 +490,17 @@ int intel_uc_resume(struct drm_i915_private *i915)
 
 	return 0;
 }
+
+void intel_uc_prepare_to_reset(struct drm_i915_private *i915)
+{
+	struct intel_huc *huc = &i915->huc;
+	struct intel_guc *guc = &i915->guc;
+
+	if (!USES_GUC(i915))
+		return;
+
+	GEM_BUG_ON(!HAS_GUC(i915));
+
+	intel_huc_prepare_to_reset(huc);
+	intel_guc_prepare_to_reset(guc);
+}
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index f76d51d..182a2de 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -41,6 +41,7 @@
 void intel_uc_fini(struct drm_i915_private *dev_priv);
 int intel_uc_suspend(struct drm_i915_private *dev_priv);
 int intel_uc_resume(struct drm_i915_private *dev_priv);
+void intel_uc_prepare_to_reset(struct drm_i915_private *dev_priv);
 
 static inline bool intel_uc_is_using_guc(void)
 {
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/intel_uc_fw.h
index d5fd460..f1ee653 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/intel_uc_fw.h
@@ -115,6 +115,12 @@ static inline bool intel_uc_fw_is_selected(struct intel_uc_fw *uc_fw)
 	return uc_fw->path != NULL;
 }
 
+static inline void intel_uc_fw_prepare_to_reset(struct intel_uc_fw *uc_fw)
+{
+	if (uc_fw->load_status == INTEL_UC_FIRMWARE_SUCCESS)
+		uc_fw->load_status = INTEL_UC_FIRMWARE_PENDING;
+}
+
 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,
-- 
1.9.1

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

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

* [PATCH v3 2/2] HAX: Enable GuC for CI
  2018-03-05 14:29 [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Michal Wajdeczko
@ 2018-03-05 14:29 ` Michal Wajdeczko
  2018-03-05 14:43 ` [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Chris Wilson
  2018-03-05 14:51 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2018-03-05 14:29 UTC (permalink / raw)
  To: intel-gfx

v2: except running with HYPERVISOR

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/i915_params.h | 2 +-
 drivers/gpu/drm/i915/intel_uc.c    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 430f5f9..3deae1e 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -47,7 +47,7 @@
 	param(int, disable_power_well, -1) \
 	param(int, enable_ips, 1) \
 	param(int, invert_brightness, 0) \
-	param(int, enable_guc, 0) \
+	param(int, enable_guc, -1) \
 	param(int, guc_log_level, 0) \
 	param(char *, guc_firmware_path, NULL) \
 	param(char *, huc_firmware_path, NULL) \
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 8a64ff5..aaaeb61 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -63,6 +63,8 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv)
 		enable_guc |= ENABLE_GUC_LOAD_HUC;
 
 	/* Any platform specific fine-tuning can be done here */
+	if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
+		enable_guc = 0;
 
 	return enable_guc;
 }
-- 
1.9.1

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

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

* Re: [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset
  2018-03-05 14:29 [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Michal Wajdeczko
  2018-03-05 14:29 ` [PATCH v3 2/2] HAX: Enable GuC for CI Michal Wajdeczko
@ 2018-03-05 14:43 ` Chris Wilson
  2018-03-08  5:47   ` Sagar Arun Kamble
  2018-03-05 14:51 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] " Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2018-03-05 14:43 UTC (permalink / raw)
  To: Michal Wajdeczko, intel-gfx

Quoting Michal Wajdeczko (2018-03-05 14:29:16)
> Right after GPU reset there will be a small window of time during which
> some of GuC/HuC fields will still show state before reset. Let's start
> to fix that by sanitizing firmware status as we will use it shortly.
> 
> v2: s/reset_prepare/prepare_to_reset (Michel)
>     don't forget about gem_sanitize path (Daniele)
> v3: rebased
> 
> Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c    |  5 ++++-
>  drivers/gpu/drm/i915/intel_guc.h   |  5 +++++
>  drivers/gpu/drm/i915/intel_huc.h   |  5 +++++
>  drivers/gpu/drm/i915/intel_uc.c    | 14 ++++++++++++++
>  drivers/gpu/drm/i915/intel_uc.h    |  1 +
>  drivers/gpu/drm/i915/intel_uc_fw.h |  6 ++++++
>  6 files changed, 35 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a5bd073..aedb17d 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2981,6 +2981,7 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
>         }
>  
>         i915_gem_revoke_fences(dev_priv);
> +       intel_uc_prepare_to_reset(dev_priv);
>  
>         return err;
>  }
> @@ -4882,8 +4883,10 @@ void i915_gem_sanitize(struct drm_i915_private *i915)
>          * it may impact the display and we are uncertain about the stability
>          * of the reset, so this could be applied to even earlier gen.
>          */
> -       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915))
> +       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915)) {
> +               intel_uc_prepare_to_reset(i915);
>                 WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));

This still feels wrong. If we accept that we will have to reload the fw
on resume, why are we not just sanitzing the uc state and forcing the
reload?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] drm/i915/uc: Start preparing GuC/HuC for reset
  2018-03-05 14:29 [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Michal Wajdeczko
  2018-03-05 14:29 ` [PATCH v3 2/2] HAX: Enable GuC for CI Michal Wajdeczko
  2018-03-05 14:43 ` [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Chris Wilson
@ 2018-03-05 14:51 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-03-05 14:51 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v3,1/2] drm/i915/uc: Start preparing GuC/HuC for reset
URL   : https://patchwork.freedesktop.org/series/39381/
State : failure

== Summary ==

Series 39381v1 series starting with [v3,1/2] drm/i915/uc: Start preparing GuC/HuC for reset
https://patchwork.freedesktop.org/api/1.0/series/39381/revisions/1/mbox/

---- Possible new issues:

Test core_auth:
        Subgroup basic-auth:
                pass       -> INCOMPLETE (fi-bdw-5557u)
                pass       -> INCOMPLETE (fi-bdw-gvtdvm)
                pass       -> INCOMPLETE (fi-bsw-n3050)
                pass       -> INCOMPLETE (fi-bxt-dsi)
                pass       -> INCOMPLETE (fi-byt-j1900)
                pass       -> INCOMPLETE (fi-byt-n2820)
                pass       -> INCOMPLETE (fi-cfl-8700k)
                pass       -> INCOMPLETE (fi-cfl-s2)
                pass       -> INCOMPLETE (fi-cnl-y3)
                pass       -> INCOMPLETE (fi-glk-1)
                pass       -> INCOMPLETE (fi-hsw-4770)
                pass       -> INCOMPLETE (fi-ilk-650)
                pass       -> INCOMPLETE (fi-ivb-3520m)
                pass       -> INCOMPLETE (fi-ivb-3770)
                pass       -> INCOMPLETE (fi-kbl-7500u)
                pass       -> INCOMPLETE (fi-kbl-7560u)
                pass       -> INCOMPLETE (fi-kbl-7567u)
                pass       -> INCOMPLETE (fi-kbl-r)
                pass       -> INCOMPLETE (fi-skl-6260u)
                pass       -> INCOMPLETE (fi-skl-6600u)
                pass       -> INCOMPLETE (fi-skl-6700hq)
                pass       -> INCOMPLETE (fi-skl-6700k2)
                pass       -> INCOMPLETE (fi-skl-6770hq)
                pass       -> INCOMPLETE (fi-skl-gvtdvm)
                pass       -> INCOMPLETE (fi-snb-2520m)
                pass       -> INCOMPLETE (fi-snb-2600)

fi-bdw-5557u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-bdw-gvtdvm    total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:376s
fi-bsw-n3050     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-byt-j1900     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-byt-n2820     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-cfl-8700k     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-cfl-s2        total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-cnl-y3        total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:414s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:294s
fi-glk-1         total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-hsw-4770      total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-ilk-650       total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-ivb-3520m     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-ivb-3770      total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-kbl-7500u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-kbl-7560u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-kbl-7567u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-kbl-r         total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:582s
fi-skl-6260u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-6600u     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-6700hq    total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-6700k2    total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-6770hq    total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:412s
fi-skl-gvtdvm    total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2520m     total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:1    pass:0    dwarn:0   dfail:0   fail:0   skip:0  

276a88800a08604e3f617f084f59aeef75d5a01a drm-tip: 2018y-03m-05d-12h-15m-50s UTC integration manifest
dd0e68d34742 HAX: Enable GuC for CI
b963c685ed40 drm/i915/uc: Start preparing GuC/HuC for reset

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8231/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset
  2018-03-05 14:43 ` [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Chris Wilson
@ 2018-03-08  5:47   ` Sagar Arun Kamble
  2018-03-08 10:06     ` Michal Wajdeczko
  0 siblings, 1 reply; 6+ messages in thread
From: Sagar Arun Kamble @ 2018-03-08  5:47 UTC (permalink / raw)
  To: Chris Wilson, Michal Wajdeczko, intel-gfx



On 3/5/2018 8:13 PM, Chris Wilson wrote:
> Quoting Michal Wajdeczko (2018-03-05 14:29:16)
>> Right after GPU reset there will be a small window of time during which
>> some of GuC/HuC fields will still show state before reset. Let's start
>> to fix that by sanitizing firmware status as we will use it shortly.
>>
>> v2: s/reset_prepare/prepare_to_reset (Michel)
>>      don't forget about gem_sanitize path (Daniele)
>> v3: rebased
>>
>> Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Michel Thierry <michel.thierry@intel.com>
>> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_gem.c    |  5 ++++-
>>   drivers/gpu/drm/i915/intel_guc.h   |  5 +++++
>>   drivers/gpu/drm/i915/intel_huc.h   |  5 +++++
>>   drivers/gpu/drm/i915/intel_uc.c    | 14 ++++++++++++++
>>   drivers/gpu/drm/i915/intel_uc.h    |  1 +
>>   drivers/gpu/drm/i915/intel_uc_fw.h |  6 ++++++
>>   6 files changed, 35 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index a5bd073..aedb17d 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -2981,6 +2981,7 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
>>          }
>>   
>>          i915_gem_revoke_fences(dev_priv);
>> +       intel_uc_prepare_to_reset(dev_priv);
>>   
>>          return err;
>>   }
>> @@ -4882,8 +4883,10 @@ void i915_gem_sanitize(struct drm_i915_private *i915)
>>           * it may impact the display and we are uncertain about the stability
>>           * of the reset, so this could be applied to even earlier gen.
>>           */
>> -       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915))
>> +       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915)) {
>> +               intel_uc_prepare_to_reset(i915);
>>                  WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));
> This still feels wrong. If we accept that we will have to reload the fw
> on resume, why are we not just sanitzing the uc state and forcing the
> reload?
Hi Chris,

intel_uc_prepare_to_reset() is sanitizing uc state and reload is 
happening through gem_init_hw in resume path.
what are we missing?

Thanks,
Sagar
> -Chris

-- 
Thanks,
Sagar

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

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

* Re: [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset
  2018-03-08  5:47   ` Sagar Arun Kamble
@ 2018-03-08 10:06     ` Michal Wajdeczko
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2018-03-08 10:06 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx, Sagar Arun Kamble

On Thu, 08 Mar 2018 06:47:35 +0100, Sagar Arun Kamble  
<sagar.a.kamble@intel.com> wrote:

>
>
> On 3/5/2018 8:13 PM, Chris Wilson wrote:
>> Quoting Michal Wajdeczko (2018-03-05 14:29:16)
>>> Right after GPU reset there will be a small window of time during which
>>> some of GuC/HuC fields will still show state before reset. Let's start
>>> to fix that by sanitizing firmware status as we will use it shortly.
>>>
>>> v2: s/reset_prepare/prepare_to_reset (Michel)
>>>      don't forget about gem_sanitize path (Daniele)
>>> v3: rebased
>>>
>>> Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Michel Thierry <michel.thierry@intel.com>
>>> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/i915_gem.c    |  5 ++++-
>>>   drivers/gpu/drm/i915/intel_guc.h   |  5 +++++
>>>   drivers/gpu/drm/i915/intel_huc.h   |  5 +++++
>>>   drivers/gpu/drm/i915/intel_uc.c    | 14 ++++++++++++++
>>>   drivers/gpu/drm/i915/intel_uc.h    |  1 +
>>>   drivers/gpu/drm/i915/intel_uc_fw.h |  6 ++++++
>>>   6 files changed, 35 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem.c  
>>> b/drivers/gpu/drm/i915/i915_gem.c
>>> index a5bd073..aedb17d 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>>> @@ -2981,6 +2981,7 @@ int i915_gem_reset_prepare(struct  
>>> drm_i915_private *dev_priv)
>>>          }
>>>            i915_gem_revoke_fences(dev_priv);
>>> +       intel_uc_prepare_to_reset(dev_priv);
>>>            return err;
>>>   }
>>> @@ -4882,8 +4883,10 @@ void i915_gem_sanitize(struct drm_i915_private  
>>> *i915)
>>>           * it may impact the display and we are uncertain about the  
>>> stability
>>>           * of the reset, so this could be applied to even earlier gen.
>>>           */
>>> -       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915))
>>> +       if (INTEL_GEN(i915) >= 5 && intel_has_gpu_reset(i915)) {
>>> +               intel_uc_prepare_to_reset(i915);
>>>                  WARN_ON(intel_gpu_reset(i915, ALL_ENGINES));
>> This still feels wrong. If we accept that we will have to reload the fw
>> on resume, why are we not just sanitzing the uc state and forcing the
>> reload?
> Hi Chris,
>
> intel_uc_prepare_to_reset() is sanitizing uc state and reload is  
> happening through gem_init_hw in resume path.
> what are we missing?

Maybe to make everyone happy, I'll introduce intel_uc_sanitize()
leaving to doubt how we will handle reset/suspend/resume scenarios.
And then uc_resume will likely be nop as we will do full reload on
gem_init_hw.

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

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

end of thread, other threads:[~2018-03-08 10:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 14:29 [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Michal Wajdeczko
2018-03-05 14:29 ` [PATCH v3 2/2] HAX: Enable GuC for CI Michal Wajdeczko
2018-03-05 14:43 ` [PATCH v3 1/2] drm/i915/uc: Start preparing GuC/HuC for reset Chris Wilson
2018-03-08  5:47   ` Sagar Arun Kamble
2018-03-08 10:06     ` Michal Wajdeczko
2018-03-05 14:51 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] " 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.