Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] drm/xe: Use poll_timeout_us()
@ 2025-09-11 17:25 Lucas De Marchi
  2025-09-11 17:25 ` [PATCH v3 1/5] drm/xe/device: Use poll_timeout_us() to wait for lmem Lucas De Marchi
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Lucas De Marchi @ 2025-09-11 17:25 UTC (permalink / raw)
  To: intel-xe
  Cc: Lucas De Marchi, Ville Syrjälä, Jani Nikula,
	Vinay Belgaumkar, John Harrison, Rodrigo Vivi, Maarten Lankhorst,
	Maarten Lankhorst

This starts using poll_timeout_us() throughout xe. Tested only by
probing xe on BMG and I haven't seen any difference.

Size-wise, it's pretty much the same thing as open coding the loops:

	add/remove: 2/0 grow/shrink: 6/1 up/down: 254/-128 (126)
	Function                                     old     new   delta
	pcode_mailbox_rw                               -     159    +159
	__xe_guc_upload.isra                        1481    1522     +41
	__pfx_pcode_mailbox_rw                         -      16     +16
	wait_for_lmem_ready                          688     701     +13
	xe_device_probe_early                        549     560     +11
	wait_for_pc_state.constprop                  213     222      +9
	xe_guc_pc_apply_flush_freq_limit             390     394      +4
	wait_for_pc_state.constprop.cold              24      25      +1
	__xe_guc_upload.isra.cold                    787     659    -128
	Total: Before=2806317, After=2806443, chg +0.00%

I adapted a few timeouts since now we are not increasing it
exponentially.

Also note that this can't really be applied right now in drm-xe-next:
we need to wait a backmerge to get poll_timeout_us() to propagate back
after it's merged from drm-intel-next. But it's already sufficient to
start some reviews and broader CI test.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
Changes in v3:
- A few more tweaks in xe_guc_pc
- Split last patch so print_bootrom_ukernel_err() is added on its own
  patch
- Link to v2: https://lore.kernel.org/r/20250909-xe-iopoll-v2-0-4c7ae9726e8e@intel.com

Changes in v2:
- Drop the change to pcode_try_request(). Adding the missing atomic
  handling would make the code more complex than it currently is
- Add patch to drop helper function as suggested by Maarten
- Make the wait functions simpler in xe_guc_pc.c
- Handle signal pending while waiting for lmem init
- Other minor changes as noted in the individual patches
- Link to v1: https://lore.kernel.org/r/20250828-xe-iopoll-v1-0-9832ccd1c8b1@intel.com
---
Lucas De Marchi (5):
      drm/xe/device: Use poll_timeout_us() to wait for lmem
      drm/xe/guc_pc: Use poll_timeout_us() for waiting
      drm/xe/guc: Drop helper to read freq
      drm/xe/guc: Extract function to print load error
      drm/xe/guc: Refactor GuC load to use poll_timeout_us()

 drivers/gpu/drm/xe/xe_device.c |  65 ++++++-----
 drivers/gpu/drm/xe/xe_guc.c    | 250 +++++++++++++++++------------------------
 drivers/gpu/drm/xe/xe_guc_pc.c |  42 ++-----
 3 files changed, 152 insertions(+), 205 deletions(-)

base-commit: a841dfdd6d774671edaad441fb846f7a3230bb07
change-id: 20250828-xe-iopoll-c0e1c4488ed4

Lucas De Marchi


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-09-16 20:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 17:25 [PATCH v3 0/5] drm/xe: Use poll_timeout_us() Lucas De Marchi
2025-09-11 17:25 ` [PATCH v3 1/5] drm/xe/device: Use poll_timeout_us() to wait for lmem Lucas De Marchi
2025-09-11 17:25 ` [PATCH v3 2/5] drm/xe/guc_pc: Use poll_timeout_us() for waiting Lucas De Marchi
2025-09-11 21:21   ` Belgaumkar, Vinay
2025-09-12  4:56     ` Lucas De Marchi
2025-09-12 23:55       ` Belgaumkar, Vinay
2025-09-11 17:25 ` [PATCH v3 3/5] drm/xe/guc: Drop helper to read freq Lucas De Marchi
2025-09-11 17:25 ` [PATCH v3 4/5] drm/xe/guc: Extract function to print load error Lucas De Marchi
2025-09-16 20:06   ` John Harrison
2025-09-11 17:25 ` [PATCH v3 5/5] drm/xe/guc: Refactor GuC load to use poll_timeout_us() Lucas De Marchi
2025-09-16 20:03   ` John Harrison
2025-09-11 17:32 ` ✗ CI.checkpatch: warning for drm/xe: Use poll_timeout_us() (rev4) Patchwork
2025-09-11 17:33 ` ✓ CI.KUnit: success " Patchwork
2025-09-11 18:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-11 23:37 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox