drm/i915/huc: Add and use HuC oriented print macros
Subsystems (2)
PATCH v2 1/1 drm/i915/huc: Add and use HuC oriented print macros
Like we did it for GuC, introduce some helper print macros for HuC to have unified format of messages that also include GT#.
While around improve some messages and use %pe if possible.
v2: update GSC/PXP timeout message
--- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 44 ++++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_huc.c +23 -21
@@ -6,6 +6,7 @@#include <linux/types.h> #include "gt/intel_gt.h" +#include "gt/intel_gt_print.h" #include "intel_guc_reg.h" #include "intel_huc.h" #include "i915_drv.h"
@@ -13,6 +14,15 @@#include <linux/device/bus.h> #include <linux/mei_aux.h> +#define huc_printk (_huc, _level, _fmt, ...) \ + gt_##_level(huc_to_gt(_huc), "HuC: " _fmt, ##__VA_ARGS__) +#define huc_err (_huc, _fmt, ...) huc_printk((_huc), err, _fmt, ##__VA_ARGS__) +#define huc_warn (_huc, _fmt, ...) huc_printk((_huc), warn, _fmt, ##__VA_ARGS__) +#define huc_notice (_huc, _fmt, ...) huc_printk((_huc), notice, _fmt, ##__VA_ARGS__) +#define huc_info (_huc, _fmt, ...) huc_printk((_huc), info, _fmt, ##__VA_ARGS__) +#define huc_dbg (_huc, _fmt, ...) huc_printk((_huc), dbg, _fmt, ##__VA_ARGS__) +#define huc_probe_error (_huc, _fmt, ...) huc_printk((_huc), probe_error, _fmt, ##__VA_ARGS__) +/** * DOC: HuC *
@@ -107,11 +117,9 @@ static enum hrtimer_restart huc_delayed_load_timer_callback(struct hrtimer *hrtiif (!intel_huc_is_authenticated (huc)) {if (huc->delayed_load.status ==INTEL_HUC_WAITING_ON_GSC ) -drm_notice (&huc_to_gt (huc)->i915->drm, -"timed out waiting for MEI GSC init to load HuC\n" ); +huc_notice (huc,"timed out waiting for MEI GSC\n" );else if (huc->delayed_load.status ==INTEL_HUC_WAITING_ON_PXP ) -drm_notice (&huc_to_gt (huc)->i915->drm, -"timed out waiting for MEI PXP init to load HuC\n" ); +huc_notice (huc,"timed out waiting for MEI PXP\n" );else MISSING_CASE (huc->delayed_load.status);
@@ -174,8 +182,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *dcase BUS_NOTIFY_DRIVER_NOT_BOUND :/* mei driver fails to be bound */ case BUS_NOTIFY_UNBIND_DRIVER :/* mei driver about to be unbound */ -drm_info (&huc_to_gt (huc)->i915->drm, -"mei driver not bound, disabling HuC load\n" ); +huc_info (huc,"MEI driver not bound, disabling load\n" );gsc_init_error (huc);break ; }
@@ -193,8 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus huc->delayed_load.nb.notifier_call = gsc_notifier; ret =bus_register_notifier (bus, &huc->delayed_load.nb);if (ret) { -drm_err (&huc_to_gt (huc)->i915->drm, -"failed to register GSC notifier\n" ); +huc_err (huc,"failed to register GSC notifier %pe\n" ,ERR_PTR (ret)); huc->delayed_load.nb.notifier_call =NULL ;gsc_init_error (huc); }
@@ -306,29 +312,25 @@ static int check_huc_loading_mode(struct intel_huc *huc)GSC_LOADS_HUC ;if (fw_needs_gsc != hw_uses_gsc) { -drm_err (>->i915->drm, -"mismatch between HuC FW (%s) and HW (%s) load modes\n" , -HUC_LOAD_MODE_STRING (fw_needs_gsc), -HUC_LOAD_MODE_STRING (hw_uses_gsc)); +huc_err (huc,"mismatch between FW (%s) and HW (%s) load modes\n" , +HUC_LOAD_MODE_STRING (fw_needs_gsc),HUC_LOAD_MODE_STRING (hw_uses_gsc));return -ENOEXEC ; }/* make sure we can access the GSC via the mei driver if we need it */ if (!(IS_ENABLED (CONFIG_INTEL_MEI_PXP ) &&IS_ENABLED (CONFIG_INTEL_MEI_GSC )) && fw_needs_gsc) { -drm_info (>->i915->drm, -"Can't load HuC due to missing MEI modules\n" ); +huc_info (huc,"can't load due to missing MEI modules\n" );return -EIO ; } -drm_dbg (>->i915->drm,"GSC loads huc=%s\n" ,str_yes_no (fw_needs_gsc)); +huc_dbg (huc,"loaded by GSC = %s\n" ,str_yes_no (fw_needs_gsc));return 0 ; }int intel_huc_init (struct intel_huc *huc) { -struct drm_i915_private *i915 =huc_to_gt (huc)->i915;int err; err =check_huc_loading_mode (huc);
@@ -345,7 +347,7 @@ int intel_huc_init(struct intel_huc *huc) out:intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_INIT_FAIL ); -drm_info (&i915->drm,"HuC init failed with %d\n" , err); +huc_info (huc,"initialization failed %pe\n" ,ERR_PTR (err));return err; }
@@ -389,13 +391,13 @@ int intel_huc_wait_for_auth_complete(struct intel_huc *huc)delayed_huc_load_complete (huc);if (ret) { -drm_err (>->i915->drm,"HuC: Firmware not verified %d\n" , ret); +huc_err (huc,"firmware not verified %pe\n" ,ERR_PTR (ret));intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_LOAD_FAIL );return ret; }intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_RUNNING ); -drm_info (>->i915->drm,"HuC authenticated\n" ); +huc_info (huc,"authenticated!\n" );return 0 ; }
@@ -430,7 +432,7 @@ int intel_huc_auth(struct intel_huc *huc) ret =intel_guc_auth_huc (guc,intel_guc_ggtt_offset (guc, huc->fw.rsa_data));if (ret) { -DRM_ERROR ("HuC: GuC did not ack Auth request %d\n" , ret); +huc_err (huc,"authentication by GuC failed %pe\n" ,ERR_PTR (ret)); goto fail; }
@@ -442,7 +444,7 @@ int intel_huc_auth(struct intel_huc *huc)return 0 ; fail: -i915_probe_error (gt->i915,"HuC: Authentication failed %d\n" , ret); +huc_probe_error (huc,"authentication failed %pe\n" ,ERR_PTR (ret));return ret; }
Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/huc: Add and use HuC oriented print macros (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/huc: Add and use HuC oriented print macros (rev2)
URL : https://patchwork.freedesktop.org/series/113542/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12688 -> Patchwork_113542v2
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/index.html
Participating hosts (26 -> 25)
------------------------------
Missing (1): fi-snb-2520m
Known issues
------------
Here are the changes found in Patchwork_113542v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][1] -> [DMESG-FAIL][2] ([i915#5334])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
#### Possible fixes ####
* igt@i915_selftest@live@gt_pm:
- {bat-rpls-2}: [DMESG-FAIL][3] ([i915#4258]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@slpc:
- {bat-rpls-1}: [DMESG-FAIL][5] ([i915#6367]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/bat-rpls-1/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@workarounds:
- {bat-adlp-9}: [INCOMPLETE][7] ([i915#4983] / [i915#7677]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/bat-adlp-9/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/bat-adlp-9/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996
Build changes
-------------
* Linux: CI_DRM_12688 -> Patchwork_113542v2
CI-20190529: 20190529
CI_DRM_12688: 9fcffc218abe16fc5fbfca231fda6a7218661eb6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7144: cda71bf809b981a646270963d6b1ccee4fd4643b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113542v2: 9fcffc218abe16fc5fbfca231fda6a7218661eb6 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
c62467bc6460 drm/i915/huc: Add and use HuC oriented print macros
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/index.html
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/huc: Add and use HuC oriented print macros (rev2)
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/huc: Add and use HuC oriented print macros (rev2)
URL : https://patchwork.freedesktop.org/series/113542/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12688_full -> Patchwork_113542v2_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/index.html
Participating hosts (10 -> 9)
------------------------------
Missing (1): shard-tglu-9
Known issues
------------
Here are the changes found in Patchwork_113542v2_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_lmem_swapping@parallel-random-verify:
- shard-glk: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#4613])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk3/igt@[email protected]
* igt@gem_pwrite@basic-exhaustion:
- shard-glk: NOTRUN -> [WARN][2] ([i915#2658])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk3/igt@[email protected]
* igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#3886]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk6/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-glk: [PASS][4] -> [FAIL][5] ([i915#2346])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-glk2/igt@kms_cursor_legacy@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk7/igt@kms_cursor_legacy@[email protected]
* igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-c-hdmi-a-1:
- shard-glk: NOTRUN -> [SKIP][6] ([fdo#109271]) +97 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk6/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-c-hdmi-a-1.html
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-glk: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#658])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk6/igt@[email protected]
* igt@kms_vblank@pipe-d-wait-idle:
- shard-glk: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#533])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk3/igt@[email protected]
#### Possible fixes ####
* igt@drm_fdinfo@virtual-idle:
- {shard-rkl}: [FAIL][9] ([i915#7742]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-2/igt@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-glk: [FAIL][11] ([i915#2842]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-glk4/igt@gem_exec_fair@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk9/igt@gem_exec_fair@[email protected]
* igt@gem_exec_reloc@basic-write-read-noreloc:
- {shard-rkl}: [SKIP][13] ([i915#3281]) -> [PASS][14] +4 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-5/igt@[email protected]
* igt@gem_exec_schedule@smoketest-all:
- shard-glk: [DMESG-WARN][15] ([i915#118]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-glk9/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-glk1/igt@[email protected]
* igt@gem_partial_pwrite_pread@reads:
- {shard-rkl}: [SKIP][17] ([i915#3282]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-5/igt@[email protected]
* igt@gen9_exec_parse@unaligned-access:
- {shard-rkl}: [SKIP][19] ([i915#2527]) -> [PASS][20] +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-4/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-5/igt@[email protected]
* igt@i915_pm_dc@dc5-psr:
- {shard-rkl}: [SKIP][21] ([i915#658]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
* igt@i915_pm_rpm@dpms-mode-unset-non-lpsp:
- {shard-dg1}: [SKIP][23] ([i915#1397]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-dg1-14/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-dg1-18/igt@[email protected]
* igt@i915_pm_rpm@pm-tiling:
- {shard-rkl}: [SKIP][25] ([fdo#109308]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
* igt@kms_fbcon_fbt@psr:
- {shard-rkl}: [SKIP][27] ([fdo#110189] / [i915#3955]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- {shard-rkl}: [SKIP][29] ([i915#1849] / [i915#4098]) -> [PASS][30] +5 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
* igt@kms_psr@primary_page_flip:
- {shard-rkl}: [SKIP][31] ([i915#1072]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@kms_psr@primary_page_flip.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@kms_psr@primary_page_flip.html
* igt@kms_rotation_crc@exhaust-fences:
- {shard-rkl}: [SKIP][33] ([i915#1845] / [i915#4098]) -> [PASS][34] +10 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
* igt@kms_universal_plane@universal-plane-pipe-b-sanity:
- {shard-rkl}: [SKIP][35] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12688/shard-rkl-2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/shard-rkl-6/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4778]: https://gitlab.freedesktop.org/drm/intel/issues/4778
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4877]: https://gitlab.freedesktop.org/drm/intel/issues/4877
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5775]: https://gitlab.freedesktop.org/drm/intel/issues/5775
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#7984]: https://gitlab.freedesktop.org/drm/intel/issues/7984
Build changes
-------------
* Linux: CI_DRM_12688 -> Patchwork_113542v2
CI-20190529: 20190529
CI_DRM_12688: 9fcffc218abe16fc5fbfca231fda6a7218661eb6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7144: cda71bf809b981a646270963d6b1ccee4fd4643b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113542v2: 9fcffc218abe16fc5fbfca231fda6a7218661eb6 @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113542v2/index.html
Quoted 10 lines · Michal Wajdeczko
Like we did it for GuC, introduce some helper print macros for HuC to have unified format of messages that also include GT#.
While around improve some messages and use %pe if possible.
v2: update GSC/PXP timeout message
Signed-off-by Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>
Daniele
Quoted 143 lines
--- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 44 ++++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_huc.c +23
-21@@ -6,6 +6,7 @@#include <linux/types.h> #include "gt/intel_gt.h" +#include "gt/intel_gt_print.h" #include "intel_guc_reg.h" #include "intel_huc.h" #include "i915_drv.h" @@ -13,6 +14,15 @@#include <linux/device/bus.h> #include <linux/mei_aux.h> +#define huc_printk (_huc, _level, _fmt, ...) \ + gt_##_level(huc_to_gt(_huc), "HuC: " _fmt, ##__VA_ARGS__) +#define huc_err (_huc, _fmt, ...) huc_printk((_huc), err, _fmt, ##__VA_ARGS__) +#define huc_warn (_huc, _fmt, ...) huc_printk((_huc), warn, _fmt, ##__VA_ARGS__) +#define huc_notice (_huc, _fmt, ...) huc_printk((_huc), notice, _fmt, ##__VA_ARGS__) +#define huc_info (_huc, _fmt, ...) huc_printk((_huc), info, _fmt, ##__VA_ARGS__) +#define huc_dbg (_huc, _fmt, ...) huc_printk((_huc), dbg, _fmt, ##__VA_ARGS__) +#define huc_probe_error (_huc, _fmt, ...) huc_printk((_huc), probe_error, _fmt, ##__VA_ARGS__) +/** * DOC: HuC * @@ -107,11 +117,9 @@ static enum hrtimer_restart huc_delayed_load_timer_callback(struct hrtimer *hrtiif (!intel_huc_is_authenticated (huc)) {if (huc->delayed_load.status ==INTEL_HUC_WAITING_ON_GSC ) -drm_notice (&huc_to_gt (huc)->i915->drm, -"timed out waiting for MEI GSC init to load HuC\n" ); +huc_notice (huc,"timed out waiting for MEI GSC\n" );else if (huc->delayed_load.status ==INTEL_HUC_WAITING_ON_PXP ) -drm_notice (&huc_to_gt (huc)->i915->drm, -"timed out waiting for MEI PXP init to load HuC\n" ); +huc_notice (huc,"timed out waiting for MEI PXP\n" );else MISSING_CASE (huc->delayed_load.status);@@ -174,8 +182,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *dcase BUS_NOTIFY_DRIVER_NOT_BOUND :/* mei driver fails to be bound */ case BUS_NOTIFY_UNBIND_DRIVER :/* mei driver about to be unbound */ -drm_info (&huc_to_gt (huc)->i915->drm, -"mei driver not bound, disabling HuC load\n" ); +huc_info (huc,"MEI driver not bound, disabling load\n" );gsc_init_error (huc);break ; }@@ -193,8 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus huc->delayed_load.nb.notifier_call = gsc_notifier; ret =bus_register_notifier (bus, &huc->delayed_load.nb);if (ret) { -drm_err (&huc_to_gt (huc)->i915->drm, -"failed to register GSC notifier\n" ); +huc_err (huc,"failed to register GSC notifier %pe\n" ,ERR_PTR (ret)); huc->delayed_load.nb.notifier_call =NULL ;gsc_init_error (huc); }@@ -306,29 +312,25 @@ static int check_huc_loading_mode(struct intel_huc *huc)GSC_LOADS_HUC ;if (fw_needs_gsc != hw_uses_gsc) { -drm_err (>->i915->drm, -"mismatch between HuC FW (%s) and HW (%s) load modes\n" , -HUC_LOAD_MODE_STRING (fw_needs_gsc), -HUC_LOAD_MODE_STRING (hw_uses_gsc)); +huc_err (huc,"mismatch between FW (%s) and HW (%s) load modes\n" , +HUC_LOAD_MODE_STRING (fw_needs_gsc),HUC_LOAD_MODE_STRING (hw_uses_gsc));return -ENOEXEC ; }/* make sure we can access the GSC via the mei driver if we need it */ if (!(IS_ENABLED (CONFIG_INTEL_MEI_PXP ) &&IS_ENABLED (CONFIG_INTEL_MEI_GSC )) && fw_needs_gsc) { -drm_info (>->i915->drm, -"Can't load HuC due to missing MEI modules\n" ); +huc_info (huc,"can't load due to missing MEI modules\n" );return -EIO ; } -drm_dbg (>->i915->drm,"GSC loads huc=%s\n" ,str_yes_no (fw_needs_gsc)); +huc_dbg (huc,"loaded by GSC = %s\n" ,str_yes_no (fw_needs_gsc));return 0 ; }int intel_huc_init (struct intel_huc *huc) { -struct drm_i915_private *i915 =huc_to_gt (huc)->i915;int err; err =check_huc_loading_mode (huc);@@ -345,7 +347,7 @@ int intel_huc_init(struct intel_huc *huc) out:intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_INIT_FAIL ); -drm_info (&i915->drm,"HuC init failed with %d\n" , err); +huc_info (huc,"initialization failed %pe\n" ,ERR_PTR (err));return err; }@@ -389,13 +391,13 @@ int intel_huc_wait_for_auth_complete(struct intel_huc *huc)delayed_huc_load_complete (huc);if (ret) { -drm_err (>->i915->drm,"HuC: Firmware not verified %d\n" , ret); +huc_err (huc,"firmware not verified %pe\n" ,ERR_PTR (ret));intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_LOAD_FAIL );return ret; }intel_uc_fw_change_status (&huc->fw,INTEL_UC_FIRMWARE_RUNNING ); -drm_info (>->i915->drm,"HuC authenticated\n" ); +huc_info (huc,"authenticated!\n" );return 0 ; }@@ -430,7 +432,7 @@ int intel_huc_auth(struct intel_huc *huc) ret =intel_guc_auth_huc (guc,intel_guc_ggtt_offset (guc, huc->fw.rsa_data));if (ret) { -DRM_ERROR ("HuC: GuC did not ack Auth request %d\n" , ret); +huc_err (huc,"authentication by GuC failed %pe\n" ,ERR_PTR (ret)); goto fail; }@@ -442,7 +444,7 @@ int intel_huc_auth(struct intel_huc *huc)return 0 ; fail: -i915_probe_error (gt->i915,"HuC: Authentication failed %d\n" , ret); +huc_probe_error (huc,"authentication failed %pe\n" ,ERR_PTR (ret));return ret; }