drm/i915: Add Guc/HuC firmware details to error state
Subsystems (2)
PATCH v5 1/2 drm/i915: Add Guc/HuC firmware details to error state
Include GuC and HuC firmware details in captured error state to provide additional debug information. To reuse existing uc firmware pretty printer, introduce new drm-printer variant that works with our i915_error_state_buf output. Also update uc firmware pretty printer to accept const input.
v2: don't rely on current caps (Chris)
dump correct fw info (Michal)
v3: simplify capture of custom paths (Chris)
v4: improve 'why' comment (Joonas)
trim output if no fw path (Michal)
group code around uc error state (Michal)
--- drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_gpu_error.c | 63 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc_fw.c | 6 +++- drivers/gpu/drm/i915/intel_uc_fw.h | 2 +- 4 files changed, 74 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -911,6 +911,11 @@ struct i915_gpu_state {struct intel_device_info device_info;struct i915_params params; +struct i915_error_uc { +struct intel_uc_fw guc_fw; +struct intel_uc_fw huc_fw; + } uc; +/* Generic register state */ u32 eir;u32 pgtbl_er;
drivers/gpu/drm/i915/i915_gpu_error.c +63 -0
116 lines not on this page · raw message
drivers/gpu/drm/i915/intel_uc_fw.c +5 -1
@@ -299,10 +299,14 @@ void intel_uc_fw_fini(struct intel_uc_fw *uc_fw)* * Pretty printer for uC firmware. */ -void intel_uc_fw_dump (struct intel_uc_fw *uc_fw,struct drm_printer *p) +void intel_uc_fw_dump (const struct intel_uc_fw *uc_fw,struct drm_printer *p) {drm_printf (p,"%s firmware: %s\n" ,intel_uc_fw_type_repr (uc_fw->type), uc_fw->path); + +if (!uc_fw->path) +return ; +drm_printf (p,"\tstatus: fetch %s, load %s\n" ,intel_uc_fw_status_repr (uc_fw->fetch_status),intel_uc_fw_status_repr (uc_fw->load_status));
drivers/gpu/drm/i915/intel_uc_fw.h +1 -1
@@ -116,6 +116,6 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw,int (*xfer)(struct intel_uc_fw *uc_fw, struct i915_vma *vma));void intel_uc_fw_fini (struct intel_uc_fw *uc_fw); -void intel_uc_fw_dump (struct intel_uc_fw *uc_fw,struct drm_printer *p); +void intel_uc_fw_dump (const struct intel_uc_fw *uc_fw,struct drm_printer *p);#endif
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/2 drm/i915: Make GuC log part of the uC error state
We keep details of GuC and HuC in separate error state struct. Make GuC log part of it to group all related data together.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -914,6 +914,7 @@ struct i915_gpu_state {struct i915_error_uc {struct intel_uc_fw guc_fw;struct intel_uc_fw huc_fw; +struct drm_i915_error_object *guc_log; } uc;/* Generic register state */
@@ -939,7 +940,6 @@ struct i915_gpu_state {struct intel_overlay_error_state *overlay;struct intel_display_error_state *display;struct drm_i915_error_object *semaphore; -struct drm_i915_error_object *guc_log;struct drm_i915_error_engine {int engine_id;
drivers/gpu/drm/i915/i915_gpu_error.c +3 -15
@@ -618,6 +618,7 @@ static void err_print_uc(struct drm_i915_error_state_buf *m,intel_uc_fw_dump (&error_uc->guc_fw, &p);intel_uc_fw_dump (&error_uc->huc_fw, &p); +print_error_obj (m,NULL ,"GuC log buffer" , error_uc->guc_log); } int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
@@ -795,8 +796,6 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,print_error_obj (m,NULL ,"Semaphores" , error->semaphore); -print_error_obj (m,NULL ,"GuC log buffer" , error->guc_log); -if (error->overlay)intel_overlay_print_error_state (m, error->overlay);
@@ -868,6 +867,7 @@ static void cleanup_uc_state(const struct i915_error_uc *error_uc) {kfree (error_uc->guc_fw.path);kfree (error_uc->huc_fw.path); +i915_error_object_free (error_uc->guc_log); }void __i915_gpu_state_free (struct kref *error_ref)
@@ -896,7 +896,6 @@ void __i915_gpu_state_free(struct kref *error_ref) }i915_error_object_free (error->semaphore); -i915_error_object_free (error->guc_log);for (i =0 ; i <ARRAY_SIZE (error->active_bo); i++)kfree (error->active_bo[i]);
@@ -1618,17 +1617,7 @@ static void capture_uc_state(struct i915_gpu_state *error)*/ error_uc->guc_fw.path =kstrdup (i915->guc.fw.path,GFP_ATOMIC ); error_uc->huc_fw.path =kstrdup (i915->huc.fw.path,GFP_ATOMIC ); -} - -static void i915_gem_capture_guc_log_buffer (struct drm_i915_private *dev_priv, -struct i915_gpu_state *error) -{ -/* Capturing log buf contents won't be useful if logging was disabled */ -if (!dev_priv->guc.log.vma || (i915_modparams.guc_log_level <0 )) -return ; - - error->guc_log =i915_error_object_create (dev_priv, - dev_priv->guc.log.vma); + error_uc->guc_log =i915_error_object_create (i915, i915->guc.log.vma); }/* Capture all registers which don't fit into another category. */
@@ -1779,7 +1768,6 @@ static int capture(void *data)i915_gem_record_rings (error->i915, error);i915_capture_active_buffers (error->i915, error);i915_capture_pinned_buffers (error->i915, error); -i915_gem_capture_guc_log_buffer (error->i915, error); error->overlay =intel_overlay_capture_error_state (error->i915); error->display =intel_display_capture_error_state (error->i915);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v5 2/2] drm/i915: Make GuC log part of the uC error state
Quoting Michal Wajdeczko (2017-10-25 11:41:12)
Quoted 2 lines
We keep details of GuC and HuC in separate error state struct. Make GuC log part of it to group all related data together.
The only significant change would appear to placement in error-state; it now comes at the end. Maybe that's ok; what do we feel is the relevance of the guc log vs the dumping of user buffers? Do we want to read the log first, or are we likely to skip to the userstate and then jump back?
At least the consideration is worthy of comment in the changelog. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v5 2/2] drm/i915: Make GuC log part of the uC error state
Quoted 8 lines · Chris Wilson
Quoting Michal Wajdeczko (2017-10-25 11:41:12)
Quoted 2 lines
We keep details of GuC and HuC in separate error state struct. Make GuC log part of it to group all related data together.
The only significant change would appear to placement in error-state; it now comes at the end. Maybe that's ok; what do we feel is the relevance of the guc log vs the dumping of user buffers? Do we want to read the log first, or are we likely to skip to the userstate and then jump back?
I would expect data in error-state to be grouped always per "source" to easy track what is available from it. Also ordering of these sources can be based on the order driver is using/creating them (ie. pciid, modparams, device flags, uc, engines, buffers... - which is different than today's)
Quoted 2 lines
At least the consideration is worthy of comment in the changelog.
Ok, I'll add small note.
Michal
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [v5,1/2] drm/i915: Add Guc/HuC firmware details to error state
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: series starting with [v5,1/2] drm/i915: Add Guc/HuC firmware details to error state
URL : https://patchwork.freedesktop.org/series/32615/
State : failure
== Summary ==
Series 32615v1 series starting with [v5,1/2] drm/i915: Add Guc/HuC firmware details to error state
https://patchwork.freedesktop.org/api/1.0/series/32615/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-wb:
pass -> INCOMPLETE (fi-cnl-y)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-n2820) fdo#101705
Test drv_module_reload:
Subgroup basic-reload-inject:
pass -> DMESG-WARN (fi-bsw-n3050)fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:451s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:370s fi-bsw-n3050 total:289 pass:242 dwarn:1 dfail:0 fail:0 skip:46 time:523s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:261s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:500s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:496s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:500s fi-byt-n2820 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:472s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:550s fi-cnl-y total:62 pass:45 dwarn:0 dfail:0 fail:0 skip:16 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:418s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:252s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:584s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:486s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:451s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:428s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:432s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:496s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:465s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:493s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:571s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:473s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:546s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:449s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:600s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:647s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:530s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:502s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:460s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:572s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:427s
63e85ec6f910933a46b5a50a2a077b6860ed4815 drm-tip: 2017y-10m-24d-20h-52m-45s UTC integration manifest dc5d4defa91c drm/i915: Make GuC log part of the uC error stateab4e46ec6fdd drm/i915: Add Guc/HuC firmware details to error state
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6179/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx