drm/i915: Capture dmc firmware information before reset
Subsystems (2)
PATCH 1/3 drm/i915: Capture dmc firmware information before reset
The firmware may change between the hang and cat /sys/class/drm/card0/error
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +4 -0
@@ -953,6 +953,10 @@ struct i915_gpu_state {u32 gab_ctl;u32 gfx_mode; +/* Firmware load state */ +u32 dmc_loaded; +u32 dmc_version; +u32 nfence;u64 fence[I915_MAX_NUM_FENCES ];struct intel_overlay_error_state *overlay;
drivers/gpu/drm/i915/i915_gpu_error.c +16 -6
@@ -623,13 +623,10 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,err_printf (m,"IOMMU enabled?: %d\n" , error->iommu);if (HAS_CSR (dev_priv)) { -struct intel_csr *csr = &dev_priv->csr; - -err_printf (m,"DMC loaded: %s\n" , -yesno (csr->dmc_payload !=NULL )); +err_printf (m,"DMC loaded: %s\n" ,yesno (error->dmc_loaded));err_printf (m,"DMC fw version: %d.%d\n" , -CSR_VERSION_MAJOR (csr->version), -CSR_VERSION_MINOR (csr->version)); +CSR_VERSION_MAJOR (error->dmc_version), +CSR_VERSION_MINOR (error->dmc_version)); }err_printf (m,"EIR: 0x%08x\n" , error->eir);
@@ -1585,6 +1582,18 @@ static void i915_capture_reg_state(struct drm_i915_private *dev_priv, error->pgtbl_er =I915_READ (PGTBL_ER ); } +/* Capture all firmware related information. */ +static void i915_capture_fw_state (struct drm_i915_private *dev_priv, +struct i915_gpu_state *error) +{ +if (HAS_CSR (dev_priv)) { +struct intel_csr *csr = &dev_priv->csr; + + error->dmc_loaded = (csr->dmc_payload !=NULL ); + error->dmc_version = csr->version; + } +} + static void i915_error_capture_msg(struct drm_i915_private *dev_priv, struct i915_gpu_state *error, u32 engine_mask,
@@ -1650,6 +1659,7 @@ static int capture(void *data)i915_capture_gen_state (error->i915, error);i915_capture_reg_state (error->i915, error); +i915_capture_fw_state (error->i915, error);i915_gem_record_fences (error->i915, error);i915_gem_record_rings (error->i915, error);i915_capture_active_buffers (error->i915, error);
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915: Include GuC fw version in error state
There was no way to check if the platform is running the latest firmware.
v2: use HAS_GUC and intel_guc* (Michal)
capture before reset (Chris)
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -956,6 +956,8 @@ struct i915_gpu_state {/* Firmware load state */ u32 dmc_loaded;u32 dmc_version; +u32 guc_loaded; +u32 guc_version;u32 nfence;u64 fence[I915_MAX_NUM_FENCES ];
drivers/gpu/drm/i915/i915_gpu_error.c +17 -0
@@ -629,6 +629,13 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, CSR_VERSION_MINOR(error->dmc_version)); } +if (HAS_GUC (dev_priv)) { +err_printf (m,"GuC loaded: %s\n" ,yesno (error->guc_loaded)); +err_printf (m,"GuC fw version: %d.%d\n" , + error->guc_version >>16 , + error->guc_version &0xffff ); + } +err_printf (m,"EIR: 0x%08x\n" , error->eir);err_printf (m,"IER: 0x%08x\n" , error->ier);for (i =0 ; i < error->ngtier; i++)
@@ -1592,6 +1599,16 @@ static void i915_capture_fw_state(struct drm_i915_private *dev_priv, error->dmc_loaded = (csr->dmc_payload !=NULL ); error->dmc_version = csr->version; } + +if (HAS_GUC (dev_priv)) { +struct intel_guc *guc = &dev_priv->guc; + + error->guc_loaded = + (guc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); + error->guc_version = + (guc->fw.major_ver_found <<16 | + guc->fw.minor_ver_found); + } } static void i915_error_capture_msg(struct drm_i915_private *dev_priv,
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915: Include GuC fw version in error state
Quoted 21 lines · Michel Thierry
There was no way to check if the platform is running the latest firmware.
v2: use
HAS_GUCand intel_guc* (Michal)
capture before reset (Chris)Cc Chris Wilson <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Arkadiusz Hiler <[email protected]>Signed-off-by Michel Thierry <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 959
Quoted 4 lines
drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -956,6 +956,8 @@ struct i915_gpu_state {/* Firmware load state */ u32 dmc_loaded;u32 dmc_version; +u32 guc_loaded;
Btw, we can drop this u32 by assuming that non-zero version is same as "loaded" as having fw version 0.0 loaded into Guc is unlikely ;)
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 960
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+u32 guc_version;
Hmm, if we use 2x u16 here then we avoid manual bit operations on capture/print
But still
-Michal
Quoted 41 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0u32 nfence;u64 fence[I915_MAX_NUM_FENCES ];drivers/gpu/drm/i915/i915_gpu_error.c +17
-0@@ -629,6 +629,13 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, CSR_VERSION_MINOR(error->dmc_version)); } +if (HAS_GUC (dev_priv)) { +err_printf (m,"GuC loaded: %s\n" ,yesno (error->guc_loaded)); +err_printf (m,"GuC fw version: %d.%d\n" , + error->guc_version >>16 , + error->guc_version &0xffff ); + } +err_printf (m,"EIR: 0x%08x\n" , error->eir);err_printf (m,"IER: 0x%08x\n" , error->ier);for (i =0 ; i < error->ngtier; i++)@@ -1592,6 +1599,16 @@ static void i915_capture_fw_state(struct drm_i915_private *dev_priv, error->dmc_loaded = (csr->dmc_payload !=NULL ); error->dmc_version = csr->version; } + +if (HAS_GUC (dev_priv)) { +struct intel_guc *guc = &dev_priv->guc; + + error->guc_loaded = + (guc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); + error->guc_version = + (guc->fw.major_ver_found <<16 | + guc->fw.minor_ver_found); + } } static void i915_error_capture_msg(struct drm_i915_private *dev_priv,Signature · 1 line
2.11.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915: Include HuC fw version in error state
In reply to Michel ThierryHuC depends on GuC, so be it.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 11 +++++++++++ 2 files changed, 13 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -958,6 +958,8 @@ struct i915_gpu_state {u32 dmc_version;u32 guc_loaded;u32 guc_version; +u32 huc_loaded; +u32 huc_version;u32 nfence;u64 fence[I915_MAX_NUM_FENCES ];
drivers/gpu/drm/i915/i915_gpu_error.c +11 -0
@@ -634,6 +634,10 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,err_printf (m,"GuC fw version: %d.%d\n" , error->guc_version >>16 , error->guc_version &0xffff ); +err_printf (m,"HuC loaded: %s\n" ,yesno (error->huc_loaded)); +err_printf (m,"HuC fw version: %d.%d\n" , + error->huc_version >>16 , + error->huc_version &0xffff ); }err_printf (m,"EIR: 0x%08x\n" , error->eir);
@@ -1602,12 +1606,19 @@ static void i915_capture_fw_state(struct drm_i915_private *dev_priv,if (HAS_GUC (dev_priv)) {struct intel_guc *guc = &dev_priv->guc; +struct intel_huc *huc = &dev_priv->huc; error->guc_loaded = (guc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); error->guc_version = (guc->fw.major_ver_found <<16 | guc->fw.minor_ver_found); + + error->huc_loaded = + (huc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); + error->huc_version = + (huc->fw.major_ver_found <<16 | + huc->fw.minor_ver_found); } }
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Include HuC fw version in error state
Quoted 14 lines · Michel Thierry
HuC depends on GuC, so be it.
Suggested-by Michal Wajdeczko <[email protected]>Signed-off-by Michel Thierry <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 11 +++++++++++ 2 files changed, 13 insertions(+)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 962
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -958,6 +958,8 @@ struct i915_gpu_state {u32 dmc_version;u32 guc_loaded;u32 guc_version; +u32 huc_loaded; +u32 huc_version;
I'll just ask once if you might consider merging major_ver_found, minor_ver_found in fw so we don't dance around u16 -> u32 -> u16 so blatantly.
Patches do what they say, so
Just beware the style police.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Include HuC fw version in error state
In reply to Michel ThierryQuoted 14 lines · Michel Thierry
HuC depends on GuC, so be it.
Suggested-by Michal Wajdeczko <[email protected]>Signed-off-by Michel Thierry <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 11 +++++++++++ 2 files changed, 13 insertions(+)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 962
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -958,6 +958,8 @@ struct i915_gpu_state {u32 dmc_version;u32 guc_loaded;u32 guc_version; +u32 huc_loaded; +u32 huc_version;
Same comments as with patch 2/3 (only 2x u16), anyway
-Michal
Quoted 45 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0u32 nfence;u64 fence[I915_MAX_NUM_FENCES ];drivers/gpu/drm/i915/i915_gpu_error.c +11
-0@@ -634,6 +634,10 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,err_printf (m,"GuC fw version: %d.%d\n" , error->guc_version >>16 , error->guc_version &0xffff ); +err_printf (m,"HuC loaded: %s\n" ,yesno (error->huc_loaded)); +err_printf (m,"HuC fw version: %d.%d\n" , + error->huc_version >>16 , + error->huc_version &0xffff ); }err_printf (m,"EIR: 0x%08x\n" , error->eir);@@ -1602,12 +1606,19 @@ static void i915_capture_fw_state(struct drm_i915_private *dev_priv,if (HAS_GUC (dev_priv)) {struct intel_guc *guc = &dev_priv->guc; +struct intel_huc *huc = &dev_priv->huc; error->guc_loaded = (guc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); error->guc_version = (guc->fw.major_ver_found <<16 | guc->fw.minor_ver_found); + + error->huc_loaded = + (huc->fw.load_status ==INTEL_UC_FIRMWARE_SUCCESS ); + error->huc_version = + (huc->fw.major_ver_found <<16 | + huc->fw.minor_ver_found); } }Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Michel Thierry
The firmware may change between the hang and cat
/sys/class/drm/card0/errorCc Chris Wilson <[email protected]>Signed-off-by Michel Thierry <[email protected]>---
-Michal
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Michel Thierry
The firmware may change between the hang and cat
/sys/class/drm/card0/errorCc Chris Wilson <[email protected]>Signed-off-by Michel Thierry <[email protected]>
Looks sane...
Quoted 10 lines
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 957
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -953,6 +953,10 @@ struct i915_gpu_state {u32 gab_ctl;u32 gfx_mode; +/* Firmware load state */ +u32 dmc_loaded;
Can dmc_version be zero? i.e. Does !0 => dmc_loaded?
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+u32 dmc_version;
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 21 lines · Chris Wilson
Quoted 4 lines · Michel Thierry
The firmware may change between the hang and cat
/sys/class/drm/card0/errorCc Chris Wilson <[email protected]>Signed-off-by Michel Thierry <[email protected]>Looks sane...
Quoted 13 lines
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/i915_gpu_error.c | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0@@ -953,6 +953,10 @@ struct i915_gpu_state {u32 gab_ctl;u32 gfx_mode;
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 957
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0+/* Firmware load state */ +u32 dmc_loaded;Can
dmc_versionbe zero? i.e. Does !0 =>dmc_loaded?
Nothing would stop them to build a v0.0 firmware, but in this case, we can save one variable.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Michel Thierry
Quoted 21 lines · Chris Wilson
Quoted 4 lines · Michel Thierry
The firmware may change between the hang and cat
/sys/class/drm/card0/errorCc Chris Wilson <[email protected]>Signed-off-by Michel Thierry <[email protected]>Looks sane...
Quoted 13 lines
---
drivers/gpu/drm/i915/i915_drv.h| 4 ++++drivers/gpu/drm/i915/i915_gpu_error.c| 22 ++++++++++++++++------2 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0@@ -953,6 +953,10 @@ struct i915_gpu_state {u32 gab_ctl;u32 gfx_mode;
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 957
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0+/* Firmware load state */ +u32 dmc_loaded;Can
dmc_versionbe zero? i.e. Does !0 =>dmc_loaded?Nothing would stop them to build a v0.0 firmware, but in this case, we can save one variable.
On the other guc thread, the suggestion is to use 0 as an invalid version...
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 29 lines · Chris Wilson
Quoted 28 lines · Michel Thierry
Quoted 26 lines · Chris Wilson
Quoted 4 lines · Michel Thierry
The firmware may change between the hang and cat
/sys/class/drm/card0/errorCc Chris Wilson <[email protected]>Signed-off-by Michel Thierry <[email protected]>Looks sane...
Quoted 10 lines
---
drivers/gpu/drm/i915/i915_drv.h| 4 ++++drivers/gpu/drm/i915/i915_gpu_error.c| 22 ++++++++++++++++------2 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0drivers/gpu/drm/i915/i915_drv.h struct i915_gpu_state { · line 957
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -953,6 +953,10 @@ struct i915_gpu_state {u32 gab_ctl;u32 gfx_mode; +/* Firmware load state */ +u32 dmc_loaded;Can
dmc_versionbe zero? i.e. Does !0 =>dmc_loaded?
Quoted 7 lines
Quoted 2 lines
Nothing would stop them to build a v0.0 firmware, but in this case, we can save one variable.
On the other guc thread, the suggestion is to use 0 as an invalid version...
-Chris
ok, let's go with that, I'll remove *_loaded.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Capture dmc firmware information before reset
In reply to Michel Thierry== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Capture dmc firmware information before reset
URL : https://patchwork.freedesktop.org/series/20220/
State : success
== Summary ==
Series 20220v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/20220/revisions/1/mbox/
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 fi-bxt-t5700 total:108 pass:95 dwarn:0 dfail:0 fail:0 skip:12 fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29
9243ada504db810aa40b0e8f5e00d46871c78149 drm-tip: 2017y-02m-24d-17h-52m-18s UTC integration manifest 4325c98 drm/i915: Include HuC fw version in error state
c03914e drm/i915: Include GuC fw version in error state
1123b62 drm/i915: Capture dmc firmware information before reset
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3964/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx