Skip to content

drm/xe: Fix xe_force_wake_get return handling

Tomita Moeko intel-xe stable 1 version Applied

Status from this message: This is a note to let you know that I've just added the patch titled

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4Revert "drm/xe/gt: Update handling of xe_force_wake_get return"drivers/gpu/drm/xe/xe_gt.c+47 -582 replies
2/4Revert "drm/xe/tests/mocs: Update xe_force_wake_get() return handling"drivers/gpu/drm/xe/tests/xe_mocs.c+10 -112 replies
3/4Revert "drm/xe/devcoredump: Update handling of xe_force_wake_get return"drivers/gpu/drm/xe/xe_devcoredump.c+6 -82 replies
4/4Revert "drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain()"drivers/gpu/drm/xe/xe_force_wake.h+0 -164 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchRodrigo Vivi
1/4A-b
2/4A-b
3/4A-b
4/4A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 6.12 0/4] drm/xe: Fix xe_force_wake_get return handling

This patchset fixes the xe driver probe fail with -ETIMEDOUT issue in linux 6.12.35 and later version. The failure is caused by commit d42b44736ea2 ("drm/xe/gt: Update handling of xe_force_wake_get return"), which incorrectly handles the return value of xe_force_wake_get as "refcounted domain mask" (as introduced in 6.13), rather than status code (as used in 6.12).

In 6.12 stable kernel, xe_force_wake_get still returns a status code. The update incorrectly treats the return value as a mask, causing the return value of 0 to be misinterpreted as an error. As a result, the driver probe fails with -ETIMEDOUT in xe_pci_probe -> xe_device_probe -> xe_gt_init_hwconfig -> xe_force_wake_get.

[ 1254.323172] xe 0000:00:02.0: [drm] Found ALDERLAKE_P (device ID 46a6) display version 13.00 stepping D0
[ 1254.323175] xe 0000:00:02.0: [drm:xe_pci_probe [xe]] ALDERLAKE_P  46a6:000c dgfx:0 gfx:Xe_LP (12.00) media:Xe_M (12.00) display:yes dma_m_s:39 tc:1 gscfi:0 cscfi:0
[ 1254.323275] xe 0000:00:02.0: [drm:xe_pci_probe [xe]] Stepping = (G:C0, M:C0, B:**)
[ 1254.323328] xe 0000:00:02.0: [drm:xe_pci_probe [xe]] SR-IOV support: no (mode: none)
[ 1254.323379] xe 0000:00:02.0: [drm:intel_pch_type [xe]] Found Alder Lake PCH
[ 1254.323475] xe 0000:00:02.0: probe with driver xe failed with error -110

Similar return handling issue cause by API mismatch are also found in:
Commit 95a75ed2b005 ("drm/xe/tests/mocs: Update xe_force_wake_get() return handling") Commit 9ffd6ec2de08 ("drm/xe/devcoredump: Update handling of xe_force_wake_get return")

This patchset fixes them by reverting them all.

Additionally, commit deb05f8431f3 ("drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain()") is also reverted as it is not needed in 6.12.

Cc Badal Nilawar <[email protected]>
Cc Matthew Brost <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Himal Prasad Ghimiray <[email protected]>
Cc Nirmoy Das <[email protected]>

Tomita Moeko (4):
Revert "drm/xe/gt: Update handling of xe_force_wake_get return" Revert "drm/xe/tests/mocs: Update xe_force_wake_get() return handling" Revert "drm/xe/devcoredump: Update handling of xe_force_wake_get
return"
Revert "drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain()"

 drivers/gpu/drm/xe/tests/xe_mocs.c  |  21 +++---
 drivers/gpu/drm/xe/xe_devcoredump.c |  14 ++--
 drivers/gpu/drm/xe/xe_force_wake.h  |  16 -----
 drivers/gpu/drm/xe/xe_gt.c          | 105 +++++++++++++---------------
 4 files changed, 63 insertions(+), 93 deletions(-)
Signature · 1 line
2.47.2