drm/i915/uc: Add pretty printer for uc firmware
Subsystems (2)
PATCH 1/1 drm/i915/uc: Add pretty printer for uc firmware
Debugfs for GuC and HuC load info have similar common part. Move and update dump of uc_fw to separate helper for reuse.
--- drivers/gpu/drm/i915/i915_debugfs.c | 41 ++++++------------------------------- drivers/gpu/drm/i915/intel_uc_fw.c | 26 +++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc_fw.h | 2 ++ 3 files changed, 34 insertions(+), 35 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +6 -35
@@ -2386,27 +2386,13 @@ static int i915_llc(struct seq_file *m, void *data)static int i915_huc_load_status_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_uc_fw *huc_fw = &dev_priv->huc.fw; +struct drm_printer p;if (!HAS_HUC_UCODE (dev_priv))return 0 ; -seq_puts (m,"HuC firmware status:\n" ); -seq_printf (m,"\tpath: %s\n" , huc_fw->path); -seq_printf (m,"\tfetch: %s\n" , -intel_uc_fw_status_repr (huc_fw->fetch_status)); -seq_printf (m,"\tload: %s\n" , -intel_uc_fw_status_repr (huc_fw->load_status)); -seq_printf (m,"\tversion wanted: %d.%d\n" , - huc_fw->major_ver_wanted, huc_fw->minor_ver_wanted); -seq_printf (m,"\tversion found: %d.%d\n" , - huc_fw->major_ver_found, huc_fw->minor_ver_found); -seq_printf (m,"\theader: offset is %d; size = %d\n" , - huc_fw->header_offset, huc_fw->header_size); -seq_printf (m,"\tuCode: offset is %d; size = %d\n" , - huc_fw->ucode_offset, huc_fw->ucode_size); -seq_printf (m,"\tRSA: offset is %d; size = %d\n" , - huc_fw->rsa_offset, huc_fw->rsa_size); + p =drm_seq_file_printer (m); +intel_uc_fw_dump (&dev_priv->huc.fw, &p);intel_runtime_pm_get (dev_priv);seq_printf (m,"\nHuC status 0x%08x:\n" ,I915_READ (HUC_STATUS2 ));
@@ -2418,29 +2404,14 @@ static int i915_huc_load_status_info(struct seq_file *m, void *data)static int i915_guc_load_status_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_uc_fw *guc_fw = &dev_priv->guc.fw; +struct drm_printer p;u32 tmp, i;if (!HAS_GUC_UCODE (dev_priv))return 0 ; -seq_printf (m,"GuC firmware status:\n" ); -seq_printf (m,"\tpath: %s\n" , - guc_fw->path); -seq_printf (m,"\tfetch: %s\n" , -intel_uc_fw_status_repr (guc_fw->fetch_status)); -seq_printf (m,"\tload: %s\n" , -intel_uc_fw_status_repr (guc_fw->load_status)); -seq_printf (m,"\tversion wanted: %d.%d\n" , - guc_fw->major_ver_wanted, guc_fw->minor_ver_wanted); -seq_printf (m,"\tversion found: %d.%d\n" , - guc_fw->major_ver_found, guc_fw->minor_ver_found); -seq_printf (m,"\theader: offset is %d; size = %d\n" , - guc_fw->header_offset, guc_fw->header_size); -seq_printf (m,"\tuCode: offset is %d; size = %d\n" , - guc_fw->ucode_offset, guc_fw->ucode_size); -seq_printf (m,"\tRSA: offset is %d; size = %d\n" , - guc_fw->rsa_offset, guc_fw->rsa_size); + p =drm_seq_file_printer (m); +intel_uc_fw_dump (&dev_priv->guc.fw, &p);intel_runtime_pm_get (dev_priv);
drivers/gpu/drm/i915/intel_uc_fw.c +26 -0
@@ -23,6 +23,7 @@*/ #include <linux/firmware.h> +#include <drm/drm_print.h> #include "intel_uc_fw.h" #include "i915_drv.h"
@@ -281,3 +282,28 @@ void intel_uc_fw_fini(struct intel_uc_fw *uc_fw) uc_fw->fetch_status =INTEL_UC_FIRMWARE_NONE ; } + +/** +* intel_uc_fw_dump - dump information about uC firmware +* @uc_fw: uC firmware +* @p: the &drm_printer +* +* Pretty printer for uC firmware. +*/ +void intel_uc_fw_dump (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); +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)); +drm_printf (p,"\tversion: wanted %u.%u, found %u.%u\n" , + uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted, + uc_fw->major_ver_found, uc_fw->minor_ver_found); +drm_printf (p,"\theader: offset %u, size %u\n" , + uc_fw->header_offset, uc_fw->header_size); +drm_printf (p,"\tuCode: offset %u, size %u\n" , + uc_fw->ucode_offset, uc_fw->ucode_size); +drm_printf (p,"\tRSA: offset %u, size %u\n" , + uc_fw->rsa_offset, uc_fw->rsa_size); +}
drivers/gpu/drm/i915/intel_uc_fw.h +2 -0
@@ -25,6 +25,7 @@#ifndef _INTEL_UC_FW_H_#define _INTEL_UC_FW_H_ +struct drm_printer ;struct drm_i915_private ;struct i915_vma ;
@@ -115,5 +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);#endif
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2017-10-17 10:44:49)
Quoted 5 lines
Debugfs for GuC and HuC load info have similar common part. Move and update dump of
uc_fwto separate helper for reuse.Signed-off-by Michal Wajdeczko <[email protected]>Cc Chris Wilson <[email protected]>
The other place where this information is interesting is in i915_gpu_error.c
Can we take a copy of struct intel_uc_fw for huc/guc and pretty print it? Would require us to expose some methods for drm_printer to redirect it back to the error_state_buf. On paper it seems feasible.
In the back of my mind, I would like to get similar reuse for intel_engine_dump and error-state. That seems a bit trickier as we have to make copies of more things (whereas here we just take a shallow copy of the struct uc_fw).
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/uc: Add pretty printer for uc firmware
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/uc: Add pretty printer for uc firmware
URL : https://patchwork.freedesktop.org/series/32104/
State : success
== Summary ==
Series 32104v1 drm/i915/uc: Add pretty printer for uc firmware
https://patchwork.freedesktop.org/api/1.0/series/32104/revisions/1/mbox/
Test gem_exec_reloc:
Subgroup basic-cpu-gtt-active:
pass -> FAIL (fi-gdg-551) fdo#102582fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:441s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:450s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:372s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:513s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:263s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:495s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:494s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:562s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:419s fi-gdg-551 total:289 pass:177 dwarn:1 dfail:0 fail:2 skip:109 time:251s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:574s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:422s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:433s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:480s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:489s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:567s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:483s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:579s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:544s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:446s 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:517s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:498s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:454s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:562s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:418s
e4dedb9e7c81401239b67d07ed8ed07fcd2f5129 drm-tip: 2017y-10m-17d-07h-45m-57s UTC integration manifest bf17b7e87ce7 drm/i915/uc: Add pretty printer for uc firmware
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6066/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/uc: Add pretty printer for uc firmware
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/uc: Add pretty printer for uc firmware
URL : https://patchwork.freedesktop.org/series/32104/
State : success
== Summary ==
Test gem_sync:
Subgroup basic-many-each:
fail -> PASS (shard-hsw) fdo#100007
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Test prime_self_import:
Subgroup export-vs-gem_close-race:
pass -> FAIL (shard-hsw) fdo#102655fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102655 https://bugs.freedesktop.org/show_bug.cgi?id=102655
shard-hsw total:2553 pass:1439 dwarn:0 dfail:0 fail:11 skip:1103 time:9287s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6066/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✓ Fi.CI.IGT: success for drm/i915/uc: Add pretty printer for uc firmware
Quoting Patchwork (2017-10-17 21:43:41)
Quoted 9 lines
== Series Details ==
Series: drm/i915/uc: Add pretty printer for uc firmware
URL : https://patchwork.freedesktop.org/series/32104/
State : success== Summary ==
Test
gem_sync:
Quoted 8 lines
Subgroup basic-many-each:
fail -> PASS (shard-hsw) fdo#100007
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Test prime_self_import:
Subgroup export-vs-gem_close-race:
pass -> FAIL (shard-hsw) fdo#102655I have this one queued (if no one else beats me to it), but I am holding it hostage in exchange for
https://patchwork.freedesktop.org/series/32102/
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx