Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX" failed to apply to 7.3-stable tree

PATCH Sasha Levin 2 participants 2 messages Nov 7 – Nov 10

Subsystems (3)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

The patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.3.y
git checkout FETCH_HEAD
git cherry-pick -x ace076ef0a854ab5940bacc539bf66afd61d118c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'

Thanks,
Sasha

------------------ original commit in Linus's tree ------------------

From ace076ef0a854ab5940bacc539bf66afd61d118c Mon Sep 17 00:00:00 2001
From: Jia Yao <[email protected]>
Date: Tue, 4 Aug 2026 16:50:56 +0000
Subject: [PATCH] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX

On iGPU, the UM queue BO is allocated in system memory. On dGFX, the BO was previously created in system memory and later reallocated in xe_guc_realloc_post_hwconfig(). Allocate the UM queue BO directly in VRAM on dGFX, where it is ultimately required.

Fixes 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement")
Cc Gwan-gyeong Mun <[email protected]>
Cc Matthew Auld <[email protected]>
Cc <[email protected]> # v6.12+
---
 drivers/gpu/drm/xe/xe_guc.c     | 6 ------
 drivers/gpu/drm/xe/xe_guc_ads.c | 8 +++++---
 2 files changed, 5 insertions(+), 9 deletions(-)
drivers/gpu/drm/xe/xe_guc.c +0 -6
index 4f132bf8539da..4286bd05c6861 100644
@@ -732,12 +732,6 @@ static int xe_guc_realloc_post_hwconfig(struct xe_guc *guc)
 	if (ret)
 		return ret;
 
-	if (guc->ads.um_queue_bo) {
-		ret = xe_managed_bo_reinit_in_vram(xe, tile, &guc->ads.um_queue_bo);
-		if (ret)
-			return ret;
-	}
-
 	return 0;
 }
 
drivers/gpu/drm/xe/xe_guc_ads.c +5 -3
index f8c679cef0039..77429ff4d2a9a 100644
@@ -445,15 +445,17 @@ int xe_guc_ads_init(struct xe_guc_ads *ads)
 		/*
 		 * Allocate a separate BO for the HW fault ring (UM queues).
 		 *
-		 * Round the size up to the next power of two so that
+		 * Round the size up to the next power of two so that on iGPU
 		 * (system memory, no IOMMU) the TTM pool issues a single
 		 * alloc_pages(order=N) call, maximising the chance of getting
 		 * a physically contiguous block.  GuC requires contiguous DPA.
 		 */
-		size_t um_size = roundup_pow_of_two(GUC_UM_QUEUE_SIZE *
+		size_t um_size = IS_DGFX(xe) ?
+				 GUC_UM_QUEUE_SIZE * GUC_UM_HW_QUEUE_MAX :
+				 roundup_pow_of_two(GUC_UM_QUEUE_SIZE *
 						    GUC_UM_HW_QUEUE_MAX);
 
-		u32 um_flags = XE_BO_FLAG_SYSTEM |
+		u32 um_flags = XE_BO_FLAG_VRAM_IF_DGFX(tile) |
 			       XE_BO_FLAG_GGTT |
 			       XE_BO_FLAG_GGTT_INVALIDATE |
 			       XE_BO_FLAG_PINNED_NORESTORE;
Signature · 1 line
2.53.0
#1 lore raw

I checked linux-7.3.y, and this patch has already been merged into it.

Thanks,
Jia

Quoted 108 lines

-----Original Message-----
From: Sasha Levin <[email protected]>
Sent: Saturday, November 7, 2026 2:03 AM
To: Yao, Jia <[email protected]>; Mun, Gwan-gyeong <gwan- [email protected]>; Auld, Matthew <[email protected]>
Cc: [email protected]
Subject: FAILED: patch "[PATCH] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX" failed to apply to 7.3-stable tree

The patch below does not apply to the 7.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
linux-7.3.y git checkout FETCH_HEAD git cherry-pick -x ace076ef0a854ab5940bacc539bf66afd61d118c
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '20261107050240-failed-7.3- [email protected]' --subject-prefix 'PATCH 7.3.y' 'HEAD^..'

Thanks,
Sasha

------------------ original commit in Linus's tree ------------------

From ace076ef0a854ab5940bacc539bf66afd61d118c Mon Sep 17 00:00:00 2001
From: Jia Yao <[email protected]>
Date: Tue, 4 Aug 2026 16:50:56 +0000
Subject: [PATCH] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX

On iGPU, the UM queue BO is allocated in system memory. On dGFX, the BO was previously created in system memory and later reallocated in xe_guc_realloc_post_hwconfig(). Allocate the UM queue BO directly in VRAM on dGFX, where it is ultimately required.

Fixes 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement")
Cc Gwan-gyeong Mun <[email protected]>
Cc Matthew Auld <[email protected]>
Cc <[email protected]> # v6.12+

[email protected]

---
 drivers/gpu/drm/xe/xe_guc.c     | 6 ------
 drivers/gpu/drm/xe/xe_guc_ads.c | 8 +++++---
 2 files changed, 5 insertions(+), 9 deletions(-)
drivers/gpu/drm/xe/xe_guc.c index renamed from drivers/gpu/drm/xe/xe_guc.c +0 -0

4f132bf8539da..4286bd05c6861 100644

drivers/gpu/drm/xe/xe_guc.c +0 -6
@@ -732,12 +732,6 @@ static int xe_guc_realloc_post_hwconfig(struct
 xe_guc *guc)
 	if (ret)
 		return ret;
 
-	if (guc->ads.um_queue_bo) {
-		ret = xe_managed_bo_reinit_in_vram(xe, tile, &guc-
 >ads.um_queue_bo);
-		if (ret)
-			return ret;
-	}
-
 	return 0;

}

(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_guc_ads.c index f8c679cef0039..77429ff4d2a9a 100644

drivers/gpu/drm/xe/xe_guc_ads.c +1 -1
@@ -445,15 +445,17 @@ int xe_guc_ads_init(struct xe_guc_ads *ads)
 		/*
 		 * Allocate a separate BO for the HW fault ring (UM queues).
 		 *
-		 * Round the size up to the next power of two so that
+		 * Round the size up to the next power of two so that on iGPU
 		 * (system memory, no IOMMU) the TTM pool issues a single
 		 * alloc_pages(order=N) call, maximising the chance of getting
 		 * a physically contiguous block.  GuC requires contiguous

DPA.

drivers/gpu/drm/xe/xe_guc_ads.c +0 -1
 		 */
-		size_t um_size =

roundup_pow_of_two(GUC_UM_QUEUE_SIZE *

drivers/gpu/drm/xe/xe_guc_ads.c +2 -0
+		size_t um_size = IS_DGFX(xe) ?
+				 GUC_UM_QUEUE_SIZE *

GUC_UM_HW_QUEUE_MAX :
+
roundup_pow_of_two(GUC_UM_QUEUE_SIZE *

GUC_UM_HW_QUEUE_MAX);

drivers/gpu/drm/xe/xe_guc_ads.c +1 -2
-		u32 um_flags = XE_BO_FLAG_SYSTEM |
+		u32 um_flags = XE_BO_FLAG_VRAM_IF_DGFX(tile) |
 			       XE_BO_FLAG_GGTT |
 			       XE_BO_FLAG_GGTT_INVALIDATE |
 			       XE_BO_FLAG_PINNED_NORESTORE;
--

2.53.0