| From e3b0257cc0786db6923a17f3da5d2f6f9ab14cb8 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Mon, 2 Feb 2026 12:50:41 +0100 |
| Subject: drm/xe/vf: Avoid reading media version when media GT is disabled |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| From: Piotr Piórkowski <piotr.piorkowski@intel.com> |
| |
| [ Upstream commit 5e905ec67214444362b81345ef8fde63e58425b6 ] |
| |
| When the media GT is not allowed, a VF must not attempt to read |
| the media version from the GuC. The GuC may not be loaded, and |
| any attempt to communicate with it would result in a timeout |
| and a VF probe failure: |
| |
| (...) |
| [ 1912.406046] xe 0000:01:00.1: [drm] *ERROR* Tile0: GT1: GuC mmio request 0x5507: no reply 0x5507 |
| [ 1912.407277] xe 0000:01:00.1: [drm] *ERROR* Tile0: GT1: [GUC COMMUNICATION] MMIO send failed (-ETIMEDOUT) |
| [ 1912.408689] xe 0000:01:00.1: [drm] *ERROR* VF: Tile0: GT1: Failed to reset GuC state (-ETIMEDOUT) |
| [ 1912.413986] xe 0000:01:00.1: probe with driver xe failed with error -110 |
| |
| Let's skip reading the media version for VFs when the media GT is not |
| allowed. |
| |
| v2: move the condition directly to the VF path |
| |
| Fixes: 7abd69278bb5 ("drm/xe/configfs: Add attribute to disable GT types") |
| Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com> |
| Cc: Matt Roper <matthew.d.roper@intel.com> |
| Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> |
| Cc: Shuicheng Lin <shuicheng.lin@intel.com> |
| Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> |
| Link: https://patch.msgid.link/20260202115041.2863357-1-piotr.piorkowski@intel.com |
| Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> |
| (cherry picked from commit 0bcacf56dc0b265f9c47056c6a4f0c1394a8a3f0) |
| Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| drivers/gpu/drm/xe/xe_pci.c | 6 ++++++ |
| 1 file changed, 6 insertions(+) |
| |
| diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c |
| index 2aa883f5ef797..38ea9d7dad091 100644 |
| --- a/drivers/gpu/drm/xe/xe_pci.c |
| +++ b/drivers/gpu/drm/xe/xe_pci.c |
| @@ -533,6 +533,12 @@ static int read_gmdid(struct xe_device *xe, enum xe_gmdid_type type, u32 *ver, u |
| struct xe_gt *gt __free(kfree) = NULL; |
| int err; |
| |
| + /* Don't try to read media ver if media GT is not allowed */ |
| + if (type == GMDID_MEDIA && !xe_configfs_media_gt_allowed(to_pci_dev(xe->drm.dev))) { |
| + *ver = *revid = 0; |
| + return 0; |
| + } |
| + |
| gt = kzalloc(sizeof(*gt), GFP_KERNEL); |
| if (!gt) |
| return -ENOMEM; |
| -- |
| 2.51.0 |
| |