Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Tomita Moeko <tomitamoeko@gmail.com>
To: "Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>
Cc: intel-xe@lists.freedesktop.org, stable@vger.kernel.org,
	Tomita Moeko <tomitamoeko@gmail.com>,
	Badal Nilawar <badal.nilawar@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>
Subject: [PATCH 6.12 0/4] drm/xe: Fix xe_force_wake_get return handling
Date: Tue, 29 Jul 2025 19:05:21 +0800	[thread overview]
Message-ID: <20250729110525.49838-1-tomitamoeko@gmail.com> (raw)

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.


Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5373
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>


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(-)

-- 
2.47.2


             reply	other threads:[~2025-07-29 11:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 11:05 Tomita Moeko [this message]
2025-07-29 11:05 ` [PATCH 6.12 1/4] Revert "drm/xe/gt: Update handling of xe_force_wake_get return" Tomita Moeko
2025-07-29 21:03   ` Sasha Levin
2025-07-29 11:05 ` [PATCH 6.12 2/4] Revert "drm/xe/tests/mocs: Update xe_force_wake_get() return handling" Tomita Moeko
2025-07-29 19:45   ` Sasha Levin
2025-07-29 11:05 ` [PATCH 6.12 3/4] Revert "drm/xe/devcoredump: Update handling of xe_force_wake_get return" Tomita Moeko
2025-07-29 19:45   ` Sasha Levin
2025-07-29 11:05 ` [PATCH 6.12 4/4] Revert "drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain()" Tomita Moeko
2025-07-29 14:51   ` Greg KH
2025-07-29 21:29     ` Rodrigo Vivi
2025-07-29 19:37   ` Sasha Levin

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=20250729110525.49838-1-tomitamoeko@gmail.com \
    --to=tomitamoeko@gmail.com \
    --cc=badal.nilawar@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=nirmoy.das@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.hellstrom@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox