All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [CI 11/15] drm/i915/huc: track delayed HuC load with a fence
Date: Mon, 7 Nov 2022 17:41:35 -0800	[thread overview]
Message-ID: <Y2mzzzFLU9klpDje@google.com> (raw)
In-Reply-To: <ac5fde11-c17d-8574-c938-c2278d53cf95@intel.com>

On Mon, Nov 07, 2022 at 10:38:14AM -0800, Ceraolo Spurio, Daniele wrote:
> Ok, I think I have an idea of what's happening: if HuC is not enabled, we
> skip the call to fence_fini, so we leak the debug object. Can you check if
> the below diff fixes the issue for you?

Thanks for checking! This also gives me the hint that I can try out the
HuC firmware to see if that changes anything for me. For reference,
here's the firmware bundled with ChromeOS (and that I'm running):

https://chromium.googlesource.com/chromiumos/third_party/linux-firmware/+/HEAD/i915/

We tend to pull pieces from upstream linux-firwmare.git as needed, and
seemingly ChromeOS folks haven't found HuC necessary for GLK.

> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> index fbc8bae14f76..e3bbd174889d 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
> @@ -300,13 +300,12 @@ int intel_huc_init(struct intel_huc *huc)
> 
>  void intel_huc_fini(struct intel_huc *huc)
>  {
> -       if (!intel_uc_fw_is_loadable(&huc->fw))
> -               return;
> -
>         delayed_huc_load_complete(huc);
> 
>         i915_sw_fence_fini(&huc->delayed_load.fence);
> -       intel_uc_fw_fini(&huc->fw);
> +
> +       if (intel_uc_fw_is_loadable(&huc->fw))
> +               intel_uc_fw_fini(&huc->fw);
>  }

(NB: you have some very weird whitespace in there. It's neither tabs nor
spaces. This slightly increases the chance that I get your diff wrong,
since the patch doesn't apply directly. But I'm pretty sure I
hand-copied it correctly...)

Unfortunately, I still see the same(?) problem with this patch.

[   85.182000] ------------[ cut here ]------------
[   85.182014] ODEBUG: init destroyed (active state 0) object type: i915_sw_fence hint: sw_fence_dummy_notify+0x0/0x11 [i915]
[   85.182238] WARNING: CPU: 2 PID: 1925 at lib/debugobjects.c:505 debug_print_object+0x6b/0x7e
[   85.182257] Modules linked in: i915(+) cmac algif_hash algif_skcipher af_alg btusb uvcvideo btrtl videobuf2_vmalloc btintel videobuf2_v4l2 btmtk videobuf2_memops videobuf2_common btbcm soundwire_intel soundwire_generic_allocation soundwire_cadence soundwire_bus 8021q bluetooth ecdh_generic ecc rtw88_8822ce rtw88_8822c rtw88_pci rtw88_core mac80211 cfg80211 r8152 mii video wmi backlight drm_buddy intel_gtt drm_display_helper ttm prime_numbers joydev [last unloaded: i915]
[   85.182593] CPU: 2 PID: 1925 Comm: i915_module_loa Not tainted 6.1.0-rc3-01115-ga397a9098fb3-dirty #35 b6325f6cdf3c04a0862a445aa86b1799d3939949
[   85.182607] Hardware name: HP Meep/Meep, BIOS Google_Meep.11297.262.0 03/18/2021
[   85.182619] RIP: 0010:debug_print_object+0x6b/0x7e
[   85.182634] Code: 31 c9 ff c0 89 05 ae a4 67 01 8b 43 10 8b 4b 14 48 8b 14 c5 e0 4a 86 8d 4d 8b 07 48 c7 c7 fe 47 ac 8d 4c 89 f6 e8 ba 53 c2 ff <0f> 0b ff 05 2a 50 11 01 5b 41 5e 41 5f 5d c3 cc cc cc cc 55 48 89
[   85.182646] RSP: 0018:ffffad7280583638 EFLAGS: 00010246
[   85.182661] RAX: 229fb1a4f3034f00 RBX: ffff960980064348 RCX: 0000000000000027
[   85.182672] RDX: 0000000000000027 RSI: 00000000ffffdfff RDI: ffff960af7d1b440
[   85.182683] RBP: ffffad7280583650 R08: 0000000000000000 R09: ffffad7280583490
[   85.182693] R10: 00000000ffffdfff R11: ffffffff8ca46e5b R12: ffff960988382cf8
[   85.182703] R13: ffffffffc08656b0 R14: ffffffff8daffd1f R15: ffffffffc08656b0
[   85.182713] FS:  00007fd5f9306940(0000) GS:ffff960af7d00000(0000) knlGS:0000000000000000
[   85.182725] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   85.182735] CR2: 00007fd5f85ef000 CR3: 00000001061d2000 CR4: 0000000000350ee0
[   85.182746] Call Trace:
[   85.182759]  <TASK>
[   85.182775]  __debug_object_init+0x26c/0x5ea
[   85.182794]  ? intel_huc_init_early+0xa6/0xa6 [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.182996]  ? 0xffffffffc03e6083
[   85.183028]  ? prepare_ftrace_return+0xa2/0xdf
[   85.183059]  ? __init_waitqueue_head+0x5/0x21
[   85.183082]  i915_sw_fence_reinit+0x19/0x3d [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.183310]  intel_huc_init_early+0x72/0xa6 [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.183514]  intel_uc_init_early+0x76/0x25b [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.183697]  intel_gt_common_init_early+0xc3/0xd6 [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.183878]  intel_root_gt_init_early+0x4c/0x5c [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.184055]  i915_driver_probe+0x26b/0xbf9 [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.184233]  ? drm_privacy_screen_put+0x5/0x23
[   85.184260]  i915_pci_probe+0x182/0x266 [i915 30ae04bc806a1fe406030ed4bf98e870eb8aa3bf]
[   85.184468]  pci_device_probe+0x99/0x126
...

That only required:

  pkill frecon
  <rmmod some audio drivers>
  ./i915_module_load --run-subtest reload

Brian

  reply	other threads:[~2022-11-08  1:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  0:41 [Intel-gfx] [CI 00/15] drm/i915: HuC loading for DG2 Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 01/15] mei: add support to GSC extended header Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 02/15] mei: bus: enable sending gsc commands Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 03/15] mei: adjust extended header kdocs Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 04/15] mei: bus: extend bus API to support command streamer API Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 05/15] mei: pxp: add command streamer API to the PXP driver Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 06/15] mei: pxp: support matching with a gfx discrete card Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 07/15] drm/i915/pxp: load the pxp module when we have a gsc-loaded huc Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 08/15] drm/i915/pxp: implement function for sending tee stream command Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 09/15] drm/i915/pxp: add huc authentication and loading command Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 10/15] drm/i915/dg2: setup HuC loading via GSC Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 11/15] drm/i915/huc: track delayed HuC load with a fence Daniele Ceraolo Spurio
2022-10-19  9:54   ` Tvrtko Ursulin
2022-11-04 23:26     ` Brian Norris
2022-11-05  0:38       ` Ceraolo Spurio, Daniele
2022-11-05  0:49         ` Ceraolo Spurio, Daniele
2022-11-05  1:27           ` Brian Norris
2022-11-07 18:38             ` Ceraolo Spurio, Daniele
2022-11-08  1:41               ` Brian Norris [this message]
2022-11-08  1:57                 ` Ceraolo Spurio, Daniele
2022-09-28  0:41 ` [Intel-gfx] [CI 12/15] drm/i915/huc: stall media submission until HuC is loaded Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 13/15] drm/i915/huc: better define HuC status getparam possible return values Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 14/15] drm/i915/huc: define gsc-compatible HuC fw for DG2 Daniele Ceraolo Spurio
2022-09-28  0:41 ` [Intel-gfx] [CI 15/15] HAX: drm/i915: force INTEL_MEI_GSC and INTEL_MEI_PXP on for CI Daniele Ceraolo Spurio
2022-09-28  7:35 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: HuC loading for DG2 (rev8) Patchwork
2022-09-28  7:36 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-28  7:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-29  1:22 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2mzzzFLU9klpDje@google.com \
    --to=briannorris@chromium.org \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.