drm/xe/xe3p_lpg: L2 flush optimization
Subsystems (2)
cover drm/xe/xe3p_lpg: L2 flush optimization
The optimization involves two key changes:
Hardware-assisted Transient Display Flush:
The new hardware can automatically manage the flushing of "transient" display data from the L2 cache. This eliminates the need for manual (software-driven) transient display (TD) flushes by the driver, simplifying the code and likely improving efficiency.
Transient Application (App) Cacheline Management:
The hardware gains the ability to flush transient application cache lines more efficiently. The patch handles the necessary integration to utilize this new functionality and manages manual flushing where it is still required, ensuring data coherency and optimizing performance.
Tejas Upadhyay (3):
drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually drm/xe/xe3p_lpg: Enable L2 flush optimization feature drm/xe/xe3p: Skip TD flush
drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_guc.c | 3 +++ drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 6 files changed, 40 insertions(+), 2 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/3 drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
"eXtended Architecture" (XA) tagged memory—memory shared between the CPU and GPU is treated differently from other GPU memory when the Media engine is power-gated.
XA is *always* flushed, like at the end-of-submssion (and maybe other places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
V2(MattA): Expand commit description
--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_bo.c +2 -1
@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ; }if (!idle) {
drivers/gpu/drm/xe/xe_device.c +23 -0
@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device *xe) } } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) +{ +/* XA is *always* flushed, like at the end-of-submssion (and maybe other +* places), just that internally as an optimisation hw doesn't need to make +* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media +* coherency, and only CPU vs GPU coherency, so can make that flush a +* targeted XA flush, since stuff tagged with XA now means it's shared with +* the CPU. The main implication is that we now need to somehow flush non-XA before +* freeing system memory pages, otherwise dirty cachelines could be flushed after the free +* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;
drivers/gpu/drm/xe/xe_device.h +1 -0
@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void xe_device_l2_flush (struct xe_device *xe);
drivers/gpu/drm/xe/xe_userptr.c +2 -1
@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { +if ((xe_vm_in_fault_mode (vm) ||xe_device_needs_cache_flush (vm->xe)) && + userptr->initial_bind) { err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); }
Signature · 1 line
2.52.0
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between the CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb - transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."
Quoted 3 lines
is treated differently from other GPU memory when the Media engine is power-gated.
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via PIPE_CONTROL or MI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.
Quoted 8 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushed
If media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
Matt
Quoted 88 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +2
-1@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ; }if (!idle) {drivers/gpu/drm/xe/xe_device.c +23
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device *xe) } } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) +{ +/* XA is *always* flushed, like at the end-of-submssion (and maybe other +* places), just that internally as an optimisation hw doesn't need to make +* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media +* coherency, and only CPU vs GPU coherency, so can make that flush a +* targeted XA flush, since stuff tagged with XA now means it's shared with +* the CPU. The main implication is that we now need to somehow flush non-XA before +* freeing system memory pages, otherwise dirty cachelines could be flushed after the free +* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void xe_device_l2_flush (struct xe_device *xe);drivers/gpu/drm/xe/xe_userptr.c +2
-1@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { +if ((xe_vm_in_fault_mode (vm) ||xe_device_needs_cache_flush (vm->xe)) && + userptr->initial_bind) { err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); }Signature · 1 line
2.52.0
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
Matthew Brost
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 51 lines · Matt Roper
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between the CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb - transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."
Quoted 3 lines
is treated differently from other GPU memory when the Media engine is power-gated.
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 8 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedIf media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
Quoted 10 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his questions.
A couple of comments below.
Quoted 20 lines
Matt
Quoted 17 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;
This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look correct.
Quoted 57 lines
Quoted 57 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {drivers/gpu/drm/xe/xe_device.c +23
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device *xe) } } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) +{ +/* XA is *always* flushed, like at the end-of-submssion (and maybe other +* places), just that internally as an optimisation hw doesn't need to make +* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media +* coherency, and only CPU vs GPU coherency, so can make that flush a +* targeted XA flush, since stuff tagged with XA now means it's shared with +* the CPU. The main implication is that we now need to somehow flush non-XA before +* freeing system memory pages, otherwise dirty cachelines could be flushed after the free +* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void xe_device_l2_flush (struct xe_device *xe);drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 );
Quoted 3 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 3 lines
drivers/gpu/drm/xe/xe_userptr.c +2
-1-if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { +if ((xe_vm_in_fault_mode (vm) ||xe_device_needs_cache_flush (vm->xe)) && + userptr->initial_bind) {
Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-0err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); }Signature · 1 line
2.52.0Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
RE: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 25 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 2 lines · Matt Roper
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between
the
Quoted 9 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."
Quoted 43 lines
Quoted 1 line
Quoted 1 line
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 41 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedIf media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
Quoted 12 lines
Quoted 11 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
Quoted 4 lines
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his questions.
Its forcing flush via tlb invalidation PPC flag under xe_invalidate_vma( ).
Quoted 36 lines
A couple of comments below.
Quoted 21 lines
Matt
Quoted 18 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Quoted 6 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look correct.
The thing is that we are trying to solve problem with userptr with non-XA pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
There was thinking that with this patch we would at least solve the problem of corruption and later when page_reclamation feature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.
So thought was to let this solution go in with little perf hit and discuss with page reclamation owner to come with cleaner solution together.
Tejas
Quoted 95 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device
Quoted 10 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}drivers/gpu/drm/xe/xe_bo.c +0
-0if (!idle) {(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device*xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c +9
-0} } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1109
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't need to make
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1111
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1112
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that flush a
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1113
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means it's shared with
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1114
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1115
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines could be flushed after the free
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037100644drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv
Quoted 5 lines
drivers/gpu/drm/xe/xe_userptr.c +1
-1false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-1err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); } --2.52.0
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 69 lines · Tejas
Quoted 25 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 2 lines · Matt Roper
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between
the
Quoted 9 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 43 lines
Quoted 1 line
Quoted 1 line
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 41 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedIf media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
Quoted 3 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
Quoted 6 lines
Quoted 4 lines
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his questions.
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).
By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Matt
Quoted 145 lines
Quoted 37 lines
A couple of comments below.
Quoted 21 lines
Matt
Quoted 18 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Quoted 6 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look correct.
The thing is that we are trying to solve problem with userptr with non-XA pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
There was thinking that with this patch we would at least solve the problem of corruption and later whenpage_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.So thought was to let this solution go in with little perf hit and discuss with page reclamation owner to come with cleaner solution together.
Tejas
Quoted 95 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device
Quoted 10 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}drivers/gpu/drm/xe/xe_bo.c +0
-0if (!idle) {(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device*xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c +9
-0} } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1109
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't need to make
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1111
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1112
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that flush a
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1113
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means it's shared with
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1114
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1115
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines could be flushed after the free
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037100644drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv
Quoted 5 lines
drivers/gpu/drm/xe/xe_userptr.c +1
-1false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-1err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); } --2.52.0
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 115 lines · Matt Roper
Quoted 69 lines · Tejas
Quoted 25 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 2 lines · Matt Roper
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between
the
Quoted 9 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 43 lines
Quoted 1 line
Quoted 1 line
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 41 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedIf media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
Quoted 3 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 18 lines
Quoted 17 lines
Quoted 12 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his questions.
Quoted 6 lines
Quoted 1 line
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Private-physical-cache. It's just what hw side calls the device side l2/l3 on newer igpu (I think LNL+). I assume it is quite different from the implemetation on dgpu, from HW pov, which is maybe why is has a special name. On dgpu they just refer to it as plain l2/l3, not PPC. On dgpu there is also additional SMRO (system-memory-read-only) device cache, which I assume is caching reads over pci to system memory from GPU side, but that gets flushed at the usual places, like end of submission etc. Setting the PPC bit on Guc TLB inval will only flush SMRO on dgpu.
Quoted 150 lines
Matt
Quoted 145 lines
Quoted 37 lines
A couple of comments below.
Quoted 21 lines
Matt
Quoted 18 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Quoted 6 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look correct.
The thing is that we are trying to solve problem with userptr with non-XA pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
There was thinking that with this patch we would at least solve the problem of corruption and later whenpage_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.So thought was to let this solution go in with little perf hit and discuss with page reclamation owner to come with cleaner solution together.
Tejas
Quoted 95 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device
Quoted 10 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device*xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c +9
-0} } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1109
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't need to make
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1111
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1112
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that flush a
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1113
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means it's shared with
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1114
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1115
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines could be flushed after the free
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037100644drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv
Quoted 5 lines
drivers/gpu/drm/xe/xe_userptr.c +1
-1false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-1err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); } --2.52.0
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
RE: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
+ Michal
Quoted 139 lines
-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: 12 February 2026 15:24
To: Roper, Matthew D <[email protected]>; Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 13 lines · Matt Roper
Quoted 12 lines · Tejas
Quoted 12 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 3 lines
Quoted 3 lines
Quoted 3 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
Quoted 1 line
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
the
Quoted 12 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 36 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
If media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if
media is idle.
Quoted 23 lines
Quoted 4 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
Quoted 16 lines
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is
idle."
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his
questions.
Quoted 7 lines
Quoted 2 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Quoted 8 lines
Private-physical-cache. It's just what hw side calls the device side l2/l3 on newer igpu (I think LNL+). I assume it is quite different from the implemetation on dgpu, from HW pov, which is maybe why is has a special name. On dgpu they just refer to it as plain l2/l3, not PPC. On dgpu there is also additional SMRO (system-memory-read-only) device cache, which I assume is caching reads over pci to system memory from GPU side, but that gets flushed at the usual places, like end of submission etc. Setting the PPC bit on Guc TLB inval will only flush SMRO on dgpu.
I had conversation with Michal and also had confirmation from Jose about their usage of pat_index for userptr, just summarising it below :
UMD Compute, with userptr :
- Uses pat_index 19 (which is App-transient(XA) and 1Way-coh)
- Flushing : will be taken care by app-transient ability in HW if media is off, if media is on full flush anyways will happen.
Mesa, with userptr:
- Use 2way-coh
- Flushing : 2 way Coherency will take care
With above understanding it seems we can drop this patch as its not needed, instead we need to have new patch to validate if right pat-index coherency is used and if not used reject the request.
Tejas
Quoted 174 lines
Quoted 49 lines
Matt
Quoted 44 lines
Quoted 44 lines
A couple of comments below.
Quoted 22 lines
Matt
Quoted 19 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look
correct.
Quoted 2 lines
Quoted 2 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
Quoted 1 line
Quoted 1 line
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 2 lines
Quoted 2 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 8 lines
Quoted 8 lines
Tejas
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex
743c18e0c580..da2abed94bc0Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 5 lines
Quoted 5 lines
100644
drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct
xe_device*xe)
Quoted 13 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 13 lines
} }drivers/gpu/drm/xe/xe_device.c +10
-0+/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and +maybe other
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * places), just that internally as an optimisation hw doesn't +need tomake
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +3
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT +caches vs Media
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * coherency, and only CPU vs GPU coherency, so can make that +flusha
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * targeted XA flush, since stuff tagged with XA now means it's +sharedwith
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * freeing system memory pages, otherwise dirty cachelines could +beflushed after the free
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex
39464650533b..baf386e0e037Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.h void xe_device_snapshot_print(struct
Quoted 4 lines
100644
drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct
xe_deviceQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_device.h +1
-0*xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindex
e120323c43bc..b435ea7f9b66Quoted 34 lines
Quoted 33 lines
Quoted 33 lines
Quoted 5 lines
Quoted 5 lines
100644
drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 5 lines
false, MAX_SCHEDULE_TIMEOUT); XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +1
-1-if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 156 lines · Tejas
+ Michal
Quoted 139 lines
-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: 12 February 2026 15:24
To: Roper, Matthew D <[email protected]>; Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 13 lines · Matt Roper
Quoted 12 lines · Tejas
Quoted 12 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 3 lines
Quoted 3 lines
Quoted 3 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
Quoted 1 line
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
the
Quoted 12 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 36 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
If media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if
media is idle.
Quoted 23 lines
Quoted 4 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
Quoted 16 lines
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is
idle."
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his
questions.
Quoted 7 lines
Quoted 2 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Quoted 8 lines
Private-physical-cache. It's just what hw side calls the device side l2/l3 on newer igpu (I think LNL+). I assume it is quite different from the implemetation on dgpu, from HW pov, which is maybe why is has a special name. On dgpu they just refer to it as plain l2/l3, not PPC. On dgpu there is also additional SMRO (system-memory-read-only) device cache, which I assume is caching reads over pci to system memory from GPU side, but that gets flushed at the usual places, like end of submission etc. Setting the PPC bit on Guc TLB inval will only flush SMRO on dgpu.
I had conversation with Michal and also had confirmation from Jose about their usage of
pat_indexfor userptr, just summarising it below :UMD Compute, with userptr :
- Usespat_index19 (which is App-transient(XA) and 1Way-coh)
- Flushing : will be taken care by app-transient ability in HW if media is off, if media is on full flush anyways will happen.
Quoted 5 lines
Mesa, with userptr:
- Use 2way-coh
- Flushing : 2 way Coherency will take careWith above understanding it seems we can drop this patch as its not needed, instead we need to have new patch to validate if right pat-index coherency is used and if not used reject the request.
I think that only resolves the userptr side. We still need something for eviction/shriker path with normal BOs, which this patch was also trying to address, right?
Quoted 177 lines
Tejas
Quoted 174 lines
Quoted 49 lines
Matt
Quoted 44 lines
Quoted 44 lines
A couple of comments below.
Quoted 22 lines
Matt
Quoted 19 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct · line 694
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look
correct.
Quoted 2 lines
Quoted 2 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
Quoted 1 line
Quoted 1 line
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 2 lines
Quoted 2 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 8 lines
Quoted 8 lines
Tejas
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex
743c18e0c580..da2abed94bc0Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 5 lines
Quoted 5 lines
100644
drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct
xe_device*xe)
Quoted 13 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 13 lines
} }drivers/gpu/drm/xe/xe_device.c +10
-0+/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and +maybe other
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * places), just that internally as an optimisation hw doesn't +need tomake
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +3
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT +caches vs Media
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * coherency, and only CPU vs GPU coherency, so can make that +flusha
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * targeted XA flush, since stuff tagged with XA now means it's +sharedwith
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * freeing system memory pages, otherwise dirty cachelines could +beflushed after the free
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex
39464650533b..baf386e0e037Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.h void xe_device_snapshot_print(struct
Quoted 4 lines
100644
drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct
xe_deviceQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_device.h +1
-0*xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindex
e120323c43bc..b435ea7f9b66Quoted 34 lines
Quoted 33 lines
Quoted 33 lines
Quoted 5 lines
Quoted 5 lines
100644
drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 5 lines
false, MAX_SCHEDULE_TIMEOUT); XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +1
-1-if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
err = xe_vm_invalidate_vma(vma); XE_WARN_ON(err); }--
2.52.0--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 237 lines · Matthew Auld
Quoted 236 lines · Tejas
+ Michal
Quoted 214 lines
-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: 12 February 2026 15:24
To: Roper, Matthew D <[email protected]>; Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 16 lines · Matt Roper
Quoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 5 lines
Quoted 5 lines
Quoted 5 lines · Matt Roper
Quoted 4 lines
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 80 lines
Quoted 80 lines
Quoted 80 lines
the
Quoted 18 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you
seeing this definition? Everything in the bspec indicates that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation that
refers to it as "extended."Quoted 3 lines
is treated differently from other GPU memory when the Media engine
ispower-gated.
Quoted 60 lines
Quoted 4 lines
XA is *always* flushed, like at the end-of-submssion (and maybe
otherI assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW),
and that depending on other state/optimizations in the system,
those flushes may flush the entire device cache, or may only flush
the subset of cache data that is not marked as transient. The way
you worded this was confusing since it makes it sound like cache
flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need
to make that a full flush (which will also include XA) when Media
is off/powergated, since it doesn't need to worry about GT caches
vs Media coherency, and only CPU vs GPU coherency, so can make
that flush a targeted XA flush, since stuff tagged withQuoted 8 lines
XA now
means it's shared with the CPU. The main implication is that we
now need to somehow flush non-XA before freeing system memory
pages, otherwise dirty cachelines could be flushed after the free
(like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is that
marking something as wb-transient-app indicates that it might be
accessed by something other than our graphics/media IP (i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache hasn't been
flushedQuoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since there's
no real need for the data to get to RAM. So that enables an
optimization (which comes in your next patch), that allows flushes
to only operate on the subset of the device cache tagged as "transient" ifmedia is idle.
Quoted 38 lines
Quoted 6 lines
But what If we have stale non-XA marked pages for userptr, and that
object moves out and at the same time media comes back, will end up
in full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to
either be transient (so CPU can see the data in RAM after explicit
flushes) or it needs to be using a coherent PAT (so that the CPU can
just snoop the GPU cache). If you marked userptr as both non- XA and
non-coherent, then that sounds likely to be a userspace bug (and
probably something we can catch and reject as an invalid case on any
Xe3p or later platforms that support this) since the CPU wouldn't have
any reliable way of seeing GPU updates.If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in the
driver today? It was my understanding that "heavy" TLB invalidations
wait for data values to be globally observable before starting, so I
think that would ensure that any non-XA data makes it to RAM before
any binding changes, object, destruction, etc.? Is there something
special about userptr that makes that case more of a problem?Quoted 27 lines
I just found bspec page 74635 which gives an overview of the various
flush and invalidate cases, and I don't see anything there that makes
it obvious to me that userptr would be special.Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
As you said, we eventually do want to force a flush of the
non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below
are accomplishing that. Is there a way to explicitly request a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending
on whether media is active), I thought there might be some kind of
GuC interface to request "please do one full flush now, even if media isidle."
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt
seems like valid concerns. Thomas also raised some concerns in the
two previous revisions; again I’m not an expert, but reading through
those, it doesn’t really seem like he received proper answers to hisquestions.
Quoted 11 lines
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for
the device cache? It's already really confusing that some of our
hardware docs use a mix of both "L2" and "L3" to refer to the same
device cache for historical reasons...Quoted 15 lines
Private-physical-cache. It's just what hw side calls the device side
l2/l3 on newer igpu (I think LNL+). I assume it is quite different from the
implemetation on dgpu, from HW pov, which is maybe why is has a special
name. On dgpu they just refer to it as plain l2/l3, not PPC. On dgpu there is
also additional SMRO (system-memory-read-only) device cache, which I
assume is caching reads over pci to system memory from GPU side, but that
gets flushed at the usual places, like end of submission etc. Setting the PPC bit
on Guc TLB inval will only flush SMRO on dgpu.I had conversation with Michal and also had confirmation from Jose about their usage of
pat_indexfor userptr, just summarising it below :
Quoted 8 lines
Quoted 8 lines
UMD Compute, with userptr :
- Usespat_index19 (which is App-transient(XA) and 1Way-coh)
- Flushing : will be taken care by app-transient ability in HW if media is off, if media is on full flush anyways will happen.Mesa, with userptr:
- Use 2way-coh
- Flushing : 2 way Coherency will take care
Mesa uses 1 way coherency, 2 way coherencey has a larger impact in iGPU not backed by LLC.
Quoted 236 lines
Quoted 4 lines
With above understanding it seems we can drop this patch as its not needed, instead we need to have new patch to validate if right pat- index coherency is used and if not used reject the request.
I think that only resolves the userptr side. We still need something for
eviction/shriker path with normal BOs, which this patch was also trying
to address, right?Quoted 225 lines
Tejas
Quoted 222 lines
Quoted 65 lines
Matt
Quoted 60 lines
Quoted 60 lines
A couple of comments below.
Quoted 26 lines
Matt
Quoted 23 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 7 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 7 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a
binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the
granularity we want here is to do this on every move/free with bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not lookcorrect.
Quoted 3 lines
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media
will come back active, stale cached entries of that object will be flushed as part
of full flush , which may corrupt things.Quoted 2 lines
Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 3 lines
Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 8 lines
Quoted 8 lines
Tejas
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex
743c18e0c580..da2abed94bc0Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 6 lines
Quoted 6 lines
100644
drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidtdf_request_sync(struct
xe_device*xe)
Quoted 17 lines
Quoted 15 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */
+boolxe_device_needs_cache_flush(struct xe_device *xe){drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that
+flusha
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means it's
+sharedwith
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow
flush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines could
+beflushed after the free
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +2
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe))Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_device.c +4
-0+return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){ structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex
39464650533b..baf386e0e037Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
100644
drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_deviceQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
*xe, struct
drm_printer*p);
u64xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe, u64
address);Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
+bool
xe_device_needs_cache_flush(struct xe_device *xe);
voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindex
e120323c43bc..b435ea7f9b66Quoted 40 lines
Quoted 39 lines
Quoted 39 lines
Quoted 6 lines
Quoted 6 lines
100644
drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +1
-0+ if ((xe_vm_in_fault_mode(vm) ||xe_device_needs_cache_flush(vm-
xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will
be interrupted via preempt fences, so it doesn’t seem necessary to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 12 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
RE: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
In reply to Matt RoperQuoted 91 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 12 lines · Tejas
Quoted 12 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 3 lines
Quoted 3 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
Quoted 1 line
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 18 lines
Quoted 18 lines
the
Quoted 12 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 4 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 10 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
If media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as
"transient" if media is idle.
Quoted 4 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
Quoted 8 lines
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.
Quoted 70 lines
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even
if media is idle."
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his
questions.
Quoted 2 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Matt
Quoted 26 lines
Quoted 26 lines
A couple of comments below.
Quoted 22 lines
Matt
Quoted 19 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;
Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.
Tejas
Quoted 146 lines
Quoted 7 lines
Quoted 7 lines
This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Quoted 6 lines
Quoted 6 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look
correct.
Quoted 2 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
Quoted 1 line
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 2 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 29 lines
Tejas
Quoted 27 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}drivers/gpu/drm/xe/xe_bo.c +0
-0if (!idle) {(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 13 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 13 lines
drivers/gpu/drm/xe/xe_device.c +10
-0} } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and +maybe other
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * places), just that internally as an optimisation hw doesn't +need tomake
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +3
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT +caches vs Media
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that
Quoted 69 lines
Quoted 69 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * targeted XA flush, since stuff tagged with XA now means +it's sharedwith
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * the CPU. The main implication is that we now need to +somehowflush non-XA before
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+ * freeing system memory pages, otherwise dirty cachelines +could beflushed after the free
Quoted 26 lines
Quoted 26 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void
xe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 8 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +2
-1false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 7 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-1err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); } --2.52.0
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 139 lines · Tejas
Quoted 123 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 4 lines
Quoted 4 lines · Matt Roper
Quoted 3 lines
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 24 lines
Quoted 24 lines
the
Quoted 17 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you
seeing this definition? Everything in the bspec indicates that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation that
refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 5 lines
Quoted 4 lines
XA is *always* flushed, like at the end-of-submssion (and maybe
otherQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in
the system, those flushes may flush the entire device cache, or
may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Quoted 10 lines
places), just that internally as an optimisation hw doesn't need
to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT
caches vs Media coherency, and only CPU vs GPU coherency, so can
make that flush a targeted XA flush, since stuff tagged with XAQuoted 8 lines
now means it's shared with the CPU. The main implication is that
we now need to somehow flush non-XA before freeing system memory
pages, otherwise dirty cachelines could be flushed after the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is that
marking something as wb-transient-app indicates that it might be
accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache hasn't been
flushedQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables
an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as"transient" if media is idle.
Quoted 6 lines
But what If we have stale non-XA marked pages for userptr, and that
object moves out and at the same time media comes back, will end up in
full flush and flush the stale entry to RAM.Quoted 15 lines
What makes userptr special here? During general, active usage, userptr would
be data that's accessible by the CPU, so it needs to either be transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be using a
coherent PAT (so that the CPU can just snoop the GPU cache). If you marked
userptr as both non-XA and non-coherent, then that sounds likely to be a
userspace bug (and probably something we can catch and reject as an invalid
case on any Xe3p or later platforms that support this) since the CPU wouldn't
have any reliable way of seeing GPU updates.
Quoted 5 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.
The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel expects either 1WAY or 2WAY for the @pat_index."
Using 1 way is enough as Xe KMD does a PIPE_CONTROL flushing GPU caches at the end of batch buffers.
Quoted 291 lines
Quoted 96 lines
If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in the driver
today? It was my understanding that "heavy" TLB invalidations wait for data
values to be globally observable before starting, so I think that would ensure
that any non-XA data makes it to RAM before any binding changes, object,
destruction, etc.? Is there something special about userptr that makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below
are accomplishing that. Is there a way to explicitly request a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be
some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt
seems like valid concerns. Thomas also raised some concerns in the
two previous revisions; again I’m not an expert, but reading through
those, it doesn’t really seem like he received proper answers to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for historical
reasons...Matt
Quoted 28 lines
Quoted 28 lines
A couple of comments below.
Quoted 24 lines
Matt
Quoted 21 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode(vm)) { drm_gpuvm_bo_evict(vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.Tejas
Quoted 179 lines
Quoted 17 lines
Quoted 17 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the
granularity we want here is to do this on every move/free with bindings.Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?Quoted 4 lines
Quoted 4 lines
I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not lookcorrect.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media
will come back active, stale cached entries of that object will be flushed as part
of full flush , which may corrupt things.Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed above
(which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 36 lines
Tejas
Quoted 34 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 16 lines
Quoted 14 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */drivers/gpu/drm/xe/xe_device.c +2
-0+bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make
that
Quoted 79 lines
Quoted 79 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means
+it's sharedwith
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to
+somehowflush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines
+could beflushed after the free
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64
xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe, u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe); voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will
be interrupted via preempt fences, so it doesn’t seem necessary to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 145 lines · Jose
Quoted 139 lines · Tejas
Quoted 123 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 4 lines
Quoted 4 lines · Matt Roper
Quoted 3 lines
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 24 lines
Quoted 24 lines
the
Quoted 17 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you
seeing this definition? Everything in the bspec indicates that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation that
refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 5 lines
Quoted 4 lines
XA is *always* flushed, like at the end-of-submssion (and maybe
otherQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in
the system, those flushes may flush the entire device cache, or
may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Quoted 10 lines
places), just that internally as an optimisation hw doesn't need
to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT
caches vs Media coherency, and only CPU vs GPU coherency, so can
make that flush a targeted XA flush, since stuff tagged with XAQuoted 8 lines
now means it's shared with the CPU. The main implication is that
we now need to somehow flush non-XA before freeing system memory
pages, otherwise dirty cachelines could be flushed after the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is that
marking something as wb-transient-app indicates that it might be
accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache hasn't been
flushedQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables
an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as"transient" if media is idle.
Quoted 6 lines
But what If we have stale non-XA marked pages for userptr, and that
object moves out and at the same time media comes back, will end up in
full flush and flush the stale entry to RAM.Quoted 15 lines
What makes userptr special here? During general, active usage, userptr would
be data that's accessible by the CPU, so it needs to either be transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be using a
coherent PAT (so that the CPU can just snoop the GPU cache). If you marked
userptr as both non-XA and non-coherent, then that sounds likely to be a
userspace bug (and probably something we can catch and reject as an invalid
case on any Xe3p or later platforms that support this) since the CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 5 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.
Quoted 7 lines
The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel expects either 1WAY or 2WAY for the @pat_index."
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches at the end of batch buffers.
But isn't that what we're discussing here? 1-way *won't* necessarily be enough anymore because PIPE_CONTROL instructions don't flush the entire cache anymore. Whenever the GuC determines that media is inactive and activates the optimization, PIPE_CONTROL, MI_FLUSH_DW, etc. change behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So there's a new requirement here that you ensure you're using an XA PAT index, or you switch to use 2-way coherency which will allow the CPU to snoop the GPU's caches.
Matt
Quoted 292 lines
Quoted 292 lines
Quoted 97 lines
If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in the driver
today? It was my understanding that "heavy" TLB invalidations wait for data
values to be globally observable before starting, so I think that would ensure
that any non-XA data makes it to RAM before any binding changes, object,
destruction, etc.? Is there something special about userptr that makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below
are accomplishing that. Is there a way to explicitly request a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be
some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt
seems like valid concerns. Thomas also raised some concerns in the
two previous revisions; again I’m not an expert, but reading through
those, it doesn’t really seem like he received proper answers to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for historical
reasons...Matt
Quoted 28 lines
Quoted 28 lines
A couple of comments below.
Quoted 24 lines
Matt
Quoted 21 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct · line 695
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode(vm)) { drm_gpuvm_bo_evict(vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.Tejas
Quoted 179 lines
Quoted 17 lines
Quoted 17 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the
granularity we want here is to do this on every move/free with bindings.Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?Quoted 4 lines
Quoted 4 lines
I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not lookcorrect.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media
will come back active, stale cached entries of that object will be flushed as part
of full flush , which may corrupt things.Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed above
(which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 36 lines
Tejas
Quoted 34 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 16 lines
Quoted 14 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */drivers/gpu/drm/xe/xe_device.c +2
-0+bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make
that
Quoted 79 lines
Quoted 79 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means
+it's sharedwith
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to
+somehowflush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines
+could beflushed after the free
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64
xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe, u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe); voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will
be interrupted via preempt fences, so it doesn’t seem necessary to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 154 lines · Matt Roper
Quoted 145 lines · Jose
Quoted 139 lines · Tejas
Quoted 123 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 4 lines
Quoted 4 lines · Matt Roper
Quoted 3 lines
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 24 lines
Quoted 24 lines
the
Quoted 17 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you
seeing this definition? Everything in the bspec indicates that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation that
refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 5 lines
Quoted 4 lines
XA is *always* flushed, like at the end-of-submssion (and maybe
otherQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in
the system, those flushes may flush the entire device cache, or
may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Quoted 10 lines
places), just that internally as an optimisation hw doesn't need
to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT
caches vs Media coherency, and only CPU vs GPU coherency, so can
make that flush a targeted XA flush, since stuff tagged with XAQuoted 8 lines
now means it's shared with the CPU. The main implication is that
we now need to somehow flush non-XA before freeing system memory
pages, otherwise dirty cachelines could be flushed after the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is that
marking something as wb-transient-app indicates that it might be
accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that outside
observers like
the CPU can snoop the device cache, even when the cache
hasn't been
flushedQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables
an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as"transient" if media is idle.
Quoted 6 lines
But what If we have stale non-XA marked pages for userptr, and that
object moves out and at the same time media comes back, will end up in
full flush and flush the stale entry to RAM.Quoted 15 lines
What makes userptr special here? During general, active usage, userptr would
be data that's accessible by the CPU, so it needs to either be transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be using a
coherent PAT (so that the CPU can just snoop the GPU cache). If you marked
userptr as both non-XA and non-coherent, then that sounds likely to be a
userspace bug (and probably something we can catch and reject as an invalid
case on any Xe3p or later platforms that support this) since the CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 5 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.Quoted 7 lines
The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel expects either 1WAY or 2WAY for the @pat_index."
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches at the end of batch buffers.
Quoted 9 lines
But isn't that what we're discussing here? 1-way *won't* necessarily be enough anymore because
PIPE_CONTROLinstructions don't flush the entire cache anymore. Whenever the GuC determines that media is inactive and activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So there's a new requirement here that you ensure you're using an XA PAT index, or you switch to use 2-way coherency which will allow the CPU to snoop the GPU's caches.
That exactly matches my understanding also.
Quoted 297 lines
Matt
Quoted 292 lines
Quoted 292 lines
Quoted 97 lines
If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in the driver
today? It was my understanding that "heavy" TLB invalidations wait for data
values to be globally observable before starting, so I think that would ensure
that any non-XA data makes it to RAM before any binding changes, object,
destruction, etc.? Is there something special about userptr that makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below
are accomplishing that. Is there a way to explicitly request a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be
some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt
seems like valid concerns. Thomas also raised some concerns in the
two previous revisions; again I’m not an expert, but reading through
those, it doesn’t really seem like he received proper answers to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for historical
reasons...Matt
Quoted 28 lines
Quoted 28 lines
A couple of comments below.
Quoted 24 lines
Matt
Quoted 21 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct · line 695
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode(vm)) { drm_gpuvm_bo_evict(vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.Tejas
Quoted 179 lines
Quoted 17 lines
Quoted 17 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the
granularity we want here is to do this on every move/free with bindings.Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?Quoted 4 lines
Quoted 4 lines
I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not lookcorrect.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media
will come back active, stale cached entries of that object will be flushed as part
of full flush , which may corrupt things.Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed above
(which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 36 lines
Tejas
Quoted 34 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 16 lines
Quoted 14 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */drivers/gpu/drm/xe/xe_device.c +2
-0+bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make
that
Quoted 79 lines
Quoted 79 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means
+it's sharedwith
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to
+somehowflush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines
+could beflushed after the free
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} + void xe_device_l2_flush(struct xe_device *xe) { struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p); u64 xe_device_canonicalize_addr(struct xe_device *xe, u64 address); u64 xe_device_uncanonicalize_addr(struct xe_device *xe,u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe);
voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will
be interrupted via preempt fences, so it doesn’t seem necessary to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 220 lines · Matthew Auld
Quoted 203 lines · Matt Roper
Quoted 194 lines · Jose
Quoted 185 lines · Tejas
Quoted 176 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 7 lines
Quoted 7 lines
Quoted 5 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 30 lines
Quoted 30 lines
the
Quoted 22 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are
you
seeing this definition? Everything in the bspec indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient
display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation
that
refers to it as "extended."Quoted 3 lines
is treated differently from other GPU memory when the Media
engine ispower-gated.
Quoted 6 lines
Quoted 5 lines
XA is *always* flushed, like at the end-of-submssion (and
maybe
otherQuoted 16 lines
Quoted 8 lines
Quoted 8 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations
in
the system, those flushes may flush the entire device cache,Quoted 8 lines
Quoted 8 lines
or
may only flush the subset of cache data that is not marked as
transient. The way you worded this was confusing since it
makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 55 lines
Quoted 55 lines
Quoted 55 lines
Quoted 18 lines
places), just that internally as an optimisation hw doesn't
need
to make that a full flush (which will also include XA) when
Media is off/powergated, since it doesn't need to worry
about GT
caches vs Media coherency, and only CPU vs GPU coherency,
so can
make that flush a targeted XA flush, since stuff tagged
with XA
now means it's shared with the CPU. The main implication is
thatQuoted 8 lines
we now need to somehow flush non-XA before freeing system
memory
pages, otherwise dirty cachelines could be flushed after
the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is
that
marking something as wb-transient-app indicates that it might
be
accessed by something other than our graphics/media IP (i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in
the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that outside
observers like
the CPU can snoop the device cache, even when the cache
hasn't been
flushedQuoted 12 lines
Quoted 4 lines
Quoted 4 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens sinceQuoted 8 lines
Quoted 8 lines
there's no real need for the data to get to RAM. So that
enables
an optimization (which comes in your next patch), that allows
flushes to only operate on the subset of the device cache
tagged as"transient" if media is idle.
Quoted 8 lines
But what If we have stale non-XA marked pages for userptr, and
that
object moves out and at the same time media comes back, will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage,
userptr would
be data that's accessible by the CPU, so it needs to either be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache). If
you marked
userptr as both non-XA and non-coherent, then that sounds likely toQuoted 8 lines
be a
userspace bug (and probably something we can catch and reject as an
invalid
case on any Xe3p or later platforms that support this) since the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 6 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 7 lines
"Note: For userptr and externally imported dma-buf the kernel expects
either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches
at the end of batch buffers.Quoted 15 lines
But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush the entire
cache anymore. Whenever the GuC determines that media is inactive and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So
there's a new requirement here that you ensure you're using an XA PAT
index, or you switch to use 2-way coherency which will allow the CPU to
snoop the GPU's caches.
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way coherency with DGFX?
It sounds like the same PAT restriction is needed also for imported dma-buf, right?
/Thomas
Quoted 364 lines
Quoted 364 lines
Matt
Quoted 358 lines
Quoted 358 lines
Quoted 120 lines
If something happens that changes the GTT mapping of an object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I think that
would ensure
that any non-XA data makes it to RAM before any binding changes,
object,
destruction, etc.? Is there something special about userptr that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it
obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the
non-transient data as well once we're freeing the underlying
pages.
So how do we do that? It's not clear to me how the changes
below
are accomplishing that. Is there a way to explicitly request
a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch
(togglingQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
whether flushes are full flushes vs non-transient flushes
depending on whether media is active), I thought there might
be
some kind of GuC interface to request "please do one full
flush now, evenif media is idle."
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from
Matt
seems like valid concerns. Thomas also raised some concerns in
the
two previous revisions; again I’m not an expert, but reading
through
those, it doesn’t really seem like he received proper answers
to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym
for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for
historical
reasons...Matt
Quoted 30 lines
Quoted 30 lines
A couple of comments below.
Quoted 26 lines
Matt
Quoted 23 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 7 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which
can be evicted while media was off and stale entries can be flushed
when media comes back on. Which was not case earlier as full flush
was happening at regular sync points and that’s where this feature is
bringing optimization now.Tejas
Quoted 217 lines
Quoted 25 lines
Quoted 25 lines
This will trigger a TLB invalidation (and I assume a cache
flush)
every time we move or free memory in the 3D stack if it has a
binding. It also performs a synchronous wait on the BO being
idle.
Both of these are very expensive operations. I can’t imagine
the
granularity we want here is to do this on every move/free with
bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after
this
seems unnecessary, though perhaps the cache flush is still
required?Quoted 6 lines
Quoted 6 lines
I think this needs a bit more explanation, because without
knowing a
lot about the exact requirements, the implementation does not
lookcorrect.
Quoted 4 lines
The thing is that we are trying to solve problem with userptr
with non-XApat, consider if that BO got moved while media is not active. As
soon as media
will come back active, stale cached entries of that object will be
flushed as part
of full flush , which may corrupt things.Quoted 3 lines
There was thinking that with this patch we would at least solve
the problemof corruption and later when
page_reclamationfeature comes in will
help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed
above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 4 lines
So thought was to let this solution go in with little perf hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 49 lines
Tejas
Quoted 47 lines
Quoted 13 lines
Quoted 11 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidQuoted 2 lines
tdf_request_sync(struct
xe_device*xe)
Quoted 12 lines
Quoted 12 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, falseQuoted 8 lines
Quoted 8 lines
otherwise.
+ */
+boolxe_device_needs_cache_flush(struct xe_device *xe){drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end- of-
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA)
when Media isdrivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry
about GT
+caches vsMedia
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so
can makethat
Quoted 90 lines
Quoted 90 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA
now means
+it's sharedwith
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now
need to
+somehowflush non-XA before
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty
cachelines
+could beflushed after the free
Quoted 34 lines
Quoted 34 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a
full flush)drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){ structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_device*xe, structdrm_printer*p);
u64 xe_device_canonicalize_addr(structxe_device*xe, u64
address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe,
u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe);
voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware
will
be interrupted via preempt fences, so it doesn’t seem necessary
to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 221 lines · Thomas Hellström
Quoted 220 lines · Matthew Auld
Quoted 218 lines · Matt Roper
Quoted 194 lines · Jose
Quoted 185 lines · Tejas
Quoted 176 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 7 lines
Quoted 7 lines
Quoted 5 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 30 lines
Quoted 30 lines
the
Quoted 22 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are
you
seeing this definition? Everything in the bspec indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient
display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation
that
refers to it as "extended."Quoted 3 lines
is treated differently from other GPU memory when the Media
engine ispower-gated.
Quoted 6 lines
Quoted 5 lines
XA is *always* flushed, like at the end-of-submssion (and
maybe
otherQuoted 16 lines
Quoted 8 lines
Quoted 8 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations
in
the system, those flushes may flush the entire device cache,Quoted 8 lines
Quoted 8 lines
or
may only flush the subset of cache data that is not marked as
transient. The way you worded this was confusing since it
makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 55 lines
Quoted 55 lines
Quoted 55 lines
Quoted 18 lines
places), just that internally as an optimisation hw doesn't
need
to make that a full flush (which will also include XA) when
Media is off/powergated, since it doesn't need to worry
about GT
caches vs Media coherency, and only CPU vs GPU coherency,
so can
make that flush a targeted XA flush, since stuff tagged
with XA
now means it's shared with the CPU. The main implication is
thatQuoted 8 lines
we now need to somehow flush non-XA before freeing system
memory
pages, otherwise dirty cachelines could be flushed after
the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is
that
marking something as wb-transient-app indicates that it might
be
accessed by something other than our graphics/media IP (i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in
the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that
outside
observers like
the CPU can snoop the device cache, even when the
cache
hasn't been
flushedQuoted 12 lines
Quoted 4 lines
Quoted 4 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens sinceQuoted 8 lines
Quoted 8 lines
there's no real need for the data to get to RAM. So that
enables
an optimization (which comes in your next patch), that allows
flushes to only operate on the subset of the device cache
tagged as"transient" if media is idle.
Quoted 8 lines
But what If we have stale non-XA marked pages for userptr, and
that
object moves out and at the same time media comes back, will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage,
userptr would
be data that's accessible by the CPU, so it needs to either be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache). If
you marked
userptr as both non-XA and non-coherent, then that sounds likely toQuoted 8 lines
be a
userspace bug (and probably something we can catch and reject as an
invalid
case on any Xe3p or later platforms that support this) since the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 6 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 7 lines
"Note: For userptr and externally imported dma-buf the kernel expects
either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush the entire
cache anymore. Whenever the GuC determines that media is inactive and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So
there's a new requirement here that you ensure you're using an XA PAT
index, or you switch to use 2-way coherency which will allow the CPU to
snoop the GPU's caches.
Quoted 4 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way coherency with DGFX?
Yeah, this should be igpu only. I seem to also recall that on dgpu, Media is coherent with l2/l3, but also I don't think system memory can be cached in l2/l3 (only VRAM), which I assume is why there is the special SMRO (system-memory-read-only) cache only on dgpu, which is flushed when the fence signals, unlike the l2/l3.
Quoted 3 lines
It sounds like the same PAT restriction is needed also for imported dma-buf, right?
Good point. Looks like we are missing that still. Otherwise we can run into the same issues with stale l2/l3/ppc.
Quoted 368 lines
/Thomas
Quoted 364 lines
Quoted 364 lines
Matt
Quoted 358 lines
Quoted 358 lines
Quoted 120 lines
If something happens that changes the GTT mapping of an object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I think that
would ensure
that any non-XA data makes it to RAM before any binding changes,
object,
destruction, etc.? Is there something special about userptr that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it
obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the
non-transient data as well once we're freeing the underlying
pages.
So how do we do that? It's not clear to me how the changes
below
are accomplishing that. Is there a way to explicitly request
a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch
(togglingQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
whether flushes are full flushes vs non-transient flushes
depending on whether media is active), I thought there might
be
some kind of GuC interface to request "please do one full
flush now, evenif media is idle."
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from
Matt
seems like valid concerns. Thomas also raised some concerns in
the
two previous revisions; again I’m not an expert, but reading
through
those, it doesn’t really seem like he received proper answers
to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym
for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for
historical
reasons...Matt
Quoted 30 lines
Quoted 30 lines
A couple of comments below.
Quoted 26 lines
Matt
Quoted 23 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 7 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which
can be evicted while media was off and stale entries can be flushed
when media comes back on. Which was not case earlier as full flush
was happening at regular sync points and that’s where this feature is
bringing optimization now.Tejas
Quoted 217 lines
Quoted 25 lines
Quoted 25 lines
This will trigger a TLB invalidation (and I assume a cache
flush)
every time we move or free memory in the 3D stack if it has a
binding. It also performs a synchronous wait on the BO being
idle.
Both of these are very expensive operations. I can’t imagine
the
granularity we want here is to do this on every move/free with
bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after
this
seems unnecessary, though perhaps the cache flush is still
required?Quoted 6 lines
Quoted 6 lines
I think this needs a bit more explanation, because without
knowing a
lot about the exact requirements, the implementation does not
lookcorrect.
Quoted 4 lines
The thing is that we are trying to solve problem with userptr
with non-XApat, consider if that BO got moved while media is not active. As
soon as media
will come back active, stale cached entries of that object will be
flushed as part
of full flush , which may corrupt things.Quoted 3 lines
There was thinking that with this patch we would at least solve
the problemof corruption and later when
page_reclamationfeature comes in will
help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed
above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 4 lines
So thought was to let this solution go in with little perf hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 49 lines
Tejas
Quoted 47 lines
Quoted 13 lines
Quoted 11 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidQuoted 2 lines
tdf_request_sync(struct
xe_device*xe)
Quoted 12 lines
Quoted 12 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, falseQuoted 8 lines
Quoted 8 lines
otherwise.
+ */
+boolxe_device_needs_cache_flush(struct xe_device *xe){drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end- of-
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA)
when Media isdrivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry
about GT
+caches vsMedia
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so
can makethat
Quoted 90 lines
Quoted 90 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA
now means
+it's sharedwith
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now
need to
+somehowflush non-XA before
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty
cachelines
+could beflushed after the free
Quoted 34 lines
Quoted 34 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a
full flush)drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} + void xe_device_l2_flush(struct xe_device *xe) { struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_device*xe, structdrm_printer*p);
u64 xe_device_canonicalize_addr(structxe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(structxe_device
*xe,
u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe);
voidxe_device_td_flush(struct xe_device *xe);
voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware
will
be interrupted via preempt fences, so it doesn’t seem necessary
to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 263 lines · Matthew Auld
Quoted 257 lines · Thomas Hellström
Quoted 256 lines · Matthew Auld
Quoted 254 lines · Matt Roper
Quoted 223 lines · Jose
Quoted 213 lines · Tejas
Quoted 204 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 15 lines · Tejas
Quoted 15 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel-
[email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 7 lines
Quoted 7 lines
Quoted 5 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 46 lines
Quoted 46 lines
the
Quoted 12 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong;
where
are
you
seeing this definition? Everything in the bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb -
transientQuoted 13 lines
display").
I'm not sure why exactly they picked "X" to refer
to
transient in
both of these cases, but I've never seen any
documentation
that
refers to it as "extended."Quoted 4 lines
is treated differently from other GPU memory when
the
Media
engine ispower-gated.
Quoted 19 lines
Quoted 6 lines
XA is *always* flushed, like at the end-of-
submssion
(and
maybe
otherI assume you're referring to the fact that the driver
performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations
in
the system, those flushes may flush the entire device
cache,
orQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
may only flush the subset of cache data that is not marked as
transient. The way you worded this was confusing since
it
makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 23 lines
places), just that internally as an optimisation
hw
doesn't
need
to make that a full flush (which will also
include
XA) when
Media is off/powergated, since it doesn't need to
worry
about GT
caches vs Media coherency, and only CPU vs GPU
coherency,
so can
make that flush a targeted XA flush, since stuff
tagged
with XA
now means it's shared with the CPU. The main
implication is
that
we now need to somehow flush non-XA before
freeing
systemQuoted 8 lines
memory
pages, otherwise dirty cachelines could be
flushed
after
the
free (like if Media suddenly turns on and does a
full
flush)This description seems really confusing. My understanding is
that
marking something as wb-transient-app indicates that it
might
be
accessed by something other than our graphics/media IP
(i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in
the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that outside
observers like
the CPU can snoop the device cache, even when the
cache
hasn't been
flushedQuoted 16 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to
include
non-transient data when an device cache flush happens
since
there's no real need for the data to get to RAM. SoQuoted 8 lines
Quoted 8 lines
that
enables
an optimization (which comes in your next patch), that
allows
flushes to only operate on the subset of the device cache
tagged as"transient" if media is idle.
Quoted 9 lines
But what If we have stale non-XA marked pages for userptr,
and
that
object moves out and at the same time media comes back, will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage,
userptr would
be data that's accessible by the CPU, so it needs to either
be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs
to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache).
If
you marked
userptr as both non-XA and non-coherent, then that sounds likely to
be a
userspace bug (and probably something we can catch andQuoted 8 lines
reject
as an
invalid
case on any Xe3p or later platforms that support this) since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 7 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 8 lines
"Note: For userptr and externally imported dma-buf the kernel expects
either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush the
entire
cache anymore. Whenever the GuC determines that media is inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change
behavior to only flush out the subset of data that was marked as
app-transient; anything not marked that way doesn't get flushed now. So
there's a new requirement here that you ensure you're using an XA
PAT
index, or you switch to use 2-way coherency which will allow the
CPU to
snoop the GPU's caches.Quoted 4 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way coherency with DGFX?
Quoted 6 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu, Media is coherent with l2/l3, but also I don't think system memory can
be cached in l2/l3 (only VRAM), which I assume is why there is the special SMRO (system-memory-read-only) cache only on dgpu, which is flushed when the fence signals, unlike the l2/l3.
Yes that sounds reasonable.
Quoted 8 lines
Quoted 4 lines
It sounds like the same PAT restriction is needed also for imported dma-buf, right?
Good point. Looks like we are missing that still. Otherwise we can run
into the same issues with stale l2/l3/ppc.
So if this affects only system memory could we instead of relying on 2- way coherency or XA, just flush at dma unmap time, because that's typically just before releasing the pages.
The exception, though, is dma-buf where the exporter can actually release memory before all importers have given up their dma-mappings.
/Thomas
Quoted 409 lines
Quoted 409 lines
/Thomas
Quoted 404 lines
Quoted 404 lines
Matt
Quoted 398 lines
Quoted 398 lines
Quoted 133 lines
If something happens that changes the GTT mapping of an object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I think
that
would ensure
that any non-XA data makes it to RAM before any binding changes,
object,
destruction, etc.? Is there something special about userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the
various flush
and invalidate cases, and I don't see anything there that makes it
obvious to
me that userptr would be special.Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
As you said, we eventually do want to force a flush of
the
non-transient data as well once we're freeing the underlying
pages.
So how do we do that? It's not clear to me how the changes
below
are accomplishing that. Is there a way to explicitly
request
a
full device cache flush (ignoring the transient vs non-
transient tagging)?
Since the GuC handles the optimization in the next patch
(toggling
whether flushes are full flushes vs non-transient flushesQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
depending on whether media is active), I thought
there
might
be
some kind of GuC interface to request "please do
one
full
flush now, evenif media is idle."
Quoted 15 lines
Quoted 15 lines
Quoted 1 line
I’m not an expert here by any means, but everything above
from
Matt
seems like valid concerns. Thomas also raised some concerns in
the
two previous revisions; again I’m not an expert, but reading
through
those, it doesn’t really seem like he received proper answers
to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new
synonym
for the
device cache? It's already really confusing that some of our
hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache
for
historical
reasons...Matt
Quoted 31 lines
Quoted 31 lines
A couple of comments below.
Quoted 27 lines
Matt
Quoted 24 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2deletions(-)
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 8 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo
,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;Matt R,
This flush will be still needed as there can be non-xa buffers
which
can be evicted while media was off and stale entries can be flushed
when media comes back on. Which was not case earlier as full
flush
was happening at regular sync points and that’s where this feature is
bringing optimization now.Tejas
Quoted 241 lines
Quoted 28 lines
Quoted 28 lines
This will trigger a TLB invalidation (and I assume a cache
flush)
every time we move or free memory in the 3D stack if it
has a
binding. It also performs a synchronous wait on the BO
being
idle.
Both of these are very expensive operations. I can’t imagine
the
granularity we want here is to do this on every move/free
with
bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after
this
seems unnecessary, though perhaps the cache flush is still
required?Quoted 7 lines
Quoted 7 lines
I think this needs a bit more explanation, because without
knowing a
lot about the exact requirements, the implementation does
not
lookcorrect.
Quoted 4 lines
The thing is that we are trying to solve problem with userptr
with non-XApat, consider if that BO got moved while media is not active.
As
soon as media
will come back active, stale cached entries of that object
will be
flushed as part
of full flush , which may corrupt things.Quoted 4 lines
There was thinking that with this patch we would at least
solve
the problemof corruption and later when
page_reclamationfeature comes
in will
help in
performance as well. But now when page reclamation feature is
merged earlier
and it tightly coupled with bind/unbind some cases like discussed
above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 5 lines
So thought was to let this solution go in with little perf
hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 53 lines
Tejas
Quoted 51 lines
Quoted 13 lines
Quoted 11 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidQuoted 2 lines
tdf_request_sync(struct
xe_device*xe)
Quoted 15 lines
Quoted 15 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush,
false
otherwise.
+ */Quoted 8 lines
Quoted 8 lines
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end-
of-
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA)
when Media isdrivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to
worry
about GT
+caches vsMedia
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency,
so
can makethat
Quoted 99 lines
Quoted 99 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA
now means
+it's sharedwith
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we
now
need to
+somehowflush non-XA before
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise
dirty
cachelines
+could beflushed after the free
Quoted 40 lines
Quoted 40 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does
a
full flush)drivers/gpu/drm/xe/xe_device.c +2
-0+*/ + if (GRAPHICS_VER(xe) >= 35 &&!IS_DGFX(xe))
drivers/gpu/drm/xe/xe_device.c +4
-0+return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe)
{
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_device*xe, structdrm_printer*p);
u64 xe_device_canonicalize_addr(structxe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(structxe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
voidxe_device_td_flush(struct xe_device *xe);
voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware
will
be interrupted via preempt fences, so it doesn’t seem necessary
to
invalidate the TLBs but perhaps we need a cflush and TLB
invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 278 lines · Thomas Hellström
Quoted 263 lines · Matthew Auld
Quoted 257 lines · Thomas Hellström
Quoted 256 lines · Matthew Auld
Quoted 254 lines · Matt Roper
Quoted 223 lines · Jose
Quoted 213 lines · Tejas
Quoted 204 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 15 lines · Tejas
Quoted 15 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel-
[email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 7 lines
Quoted 7 lines
Quoted 5 lines · Matt Roper
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 46 lines
Quoted 46 lines
the
Quoted 12 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong;
where
are
you
seeing this definition? Everything in the bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb -
transientQuoted 13 lines
display").
I'm not sure why exactly they picked "X" to refer
to
transient in
both of these cases, but I've never seen any
documentation
that
refers to it as "extended."Quoted 4 lines
is treated differently from other GPU memory when
the
Media
engine ispower-gated.
Quoted 19 lines
Quoted 6 lines
XA is *always* flushed, like at the end-of-
submssion
(and
maybe
otherI assume you're referring to the fact that the driver
performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations
in
the system, those flushes may flush the entire device
cache,
orQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
may only flush the subset of cache data that is not marked as
transient. The way you worded this was confusing since
it
makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 23 lines
places), just that internally as an optimisation
hw
doesn't
need
to make that a full flush (which will also
include
XA) when
Media is off/powergated, since it doesn't need to
worry
about GT
caches vs Media coherency, and only CPU vs GPU
coherency,
so can
make that flush a targeted XA flush, since stuff
tagged
with XA
now means it's shared with the CPU. The main
implication is
that
we now need to somehow flush non-XA before
freeing
systemQuoted 8 lines
memory
pages, otherwise dirty cachelines could be
flushed
after
the
free (like if Media suddenly turns on and does a
full
flush)This description seems really confusing. My understanding is
that
marking something as wb-transient-app indicates that it
might
be
accessed by something other than our graphics/media IP
(i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in
the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that
outside
observers like
the CPU can snoop the device cache, even when
the
cache
hasn't been
flushedQuoted 16 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to
include
non-transient data when an device cache flush happens
since
there's no real need for the data to get to RAM. SoQuoted 8 lines
Quoted 8 lines
that
enables
an optimization (which comes in your next patch), that
allows
flushes to only operate on the subset of the device cache
tagged as"transient" if media is idle.
Quoted 9 lines
But what If we have stale non-XA marked pages for userptr,
and
that
object moves out and at the same time media comes back, will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage,
userptr would
be data that's accessible by the CPU, so it needs to either
be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs
to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache).
If
you marked
userptr as both non-XA and non-coherent, then that sounds likely to
be a
userspace bug (and probably something we can catch andQuoted 8 lines
reject
as an
invalid
case on any Xe3p or later platforms that support this) since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 7 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 8 lines
"Note: For userptr and externally imported dma-buf the kernel expects
either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush the
entire
cache anymore. Whenever the GuC determines that media is inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change
behavior to only flush out the subset of data that was marked as
app-transient; anything not marked that way doesn't get flushed now. So
there's a new requirement here that you ensure you're using an XA
PAT
index, or you switch to use 2-way coherency which will allow the
CPU to
snoop the GPU's caches.Quoted 4 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way coherency with DGFX?
Quoted 6 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu, Media is coherent with l2/l3, but also I don't think system memory can
be cached in l2/l3 (only VRAM), which I assume is why there is the special SMRO (system-memory-read-only) cache only on dgpu, which is flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 5 lines
Quoted 4 lines
It sounds like the same PAT restriction is needed also for imported dma-buf, right?
Quoted 7 lines
Quoted 3 lines
Good point. Looks like we are missing that still. Otherwise we can run
into the same issues with stale l2/l3/ppc.So if this affects only system memory could we instead of relying on 2- way coherency or XA, just flush at dma unmap time, because that's typically just before releasing the pages.
Yeah, I think we could make it work, from security pov, similar to userptr, with the right manual flushes in KMD. Maybe just a question if userspace wants such a model? Anything cached in l2/l3 might require manual flushing by userspace (if that is even possible)?
Quoted 415 lines
The exception, though, is dma-buf where the exporter can actually release memory before all importers have given up their dma-mappings.
/Thomas
Quoted 409 lines
Quoted 409 lines
/Thomas
Quoted 404 lines
Quoted 404 lines
Matt
Quoted 398 lines
Quoted 398 lines
Quoted 133 lines
If something happens that changes the GTT mapping of an object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I think
that
would ensure
that any non-XA data makes it to RAM before any binding changes,
object,
destruction, etc.? Is there something special about userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the
various flush
and invalidate cases, and I don't see anything there that makes it
obvious to
me that userptr would be special.Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
As you said, we eventually do want to force a flush of
the
non-transient data as well once we're freeing the underlying
pages.
So how do we do that? It's not clear to me how the changes
below
are accomplishing that. Is there a way to explicitly
request
a
full device cache flush (ignoring the transient vs non-
transient tagging)?
Since the GuC handles the optimization in the next patch
(toggling
whether flushes are full flushes vs non-transient flushesQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
depending on whether media is active), I thought
there
might
be
some kind of GuC interface to request "please do
one
full
flush now, evenif media is idle."
Quoted 15 lines
Quoted 15 lines
Quoted 1 line
I’m not an expert here by any means, but everything above
from
Matt
seems like valid concerns. Thomas also raised some concerns in
the
two previous revisions; again I’m not an expert, but reading
through
those, it doesn’t really seem like he received proper answers
to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new
synonym
for the
device cache? It's already really confusing that some of our
hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache
for
historical
reasons...Matt
Quoted 31 lines
Quoted 31 lines
A couple of comments below.
Quoted 27 lines
Matt
Quoted 24 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2deletions(-)
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 8 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo
,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;Matt R,
This flush will be still needed as there can be non-xa buffers
which
can be evicted while media was off and stale entries can be flushed
when media comes back on. Which was not case earlier as full
flush
was happening at regular sync points and that’s where this feature is
bringing optimization now.Tejas
Quoted 241 lines
Quoted 28 lines
Quoted 28 lines
This will trigger a TLB invalidation (and I assume a cache
flush)
every time we move or free memory in the 3D stack if it
has a
binding. It also performs a synchronous wait on the BO
being
idle.
Both of these are very expensive operations. I can’t imagine
the
granularity we want here is to do this on every move/free
with
bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after
this
seems unnecessary, though perhaps the cache flush is still
required?Quoted 7 lines
Quoted 7 lines
I think this needs a bit more explanation, because without
knowing a
lot about the exact requirements, the implementation does
not
lookcorrect.
Quoted 4 lines
The thing is that we are trying to solve problem with userptr
with non-XApat, consider if that BO got moved while media is not active.
As
soon as media
will come back active, stale cached entries of that object
will be
flushed as part
of full flush , which may corrupt things.Quoted 4 lines
There was thinking that with this patch we would at least
solve
the problemof corruption and later when
page_reclamationfeature comes
in will
help in
performance as well. But now when page reclamation feature is
merged earlier
and it tightly coupled with bind/unbind some cases like discussed
above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 5 lines
So thought was to let this solution go in with little perf
hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 53 lines
Tejas
Quoted 51 lines
Quoted 13 lines
Quoted 11 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidQuoted 2 lines
tdf_request_sync(struct
xe_device*xe)
Quoted 15 lines
Quoted 15 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush,
false
otherwise.
+ */Quoted 8 lines
Quoted 8 lines
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end-
of-
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA)
when Media isdrivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to
worry
about GT
+caches vsMedia
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency,
so
can makethat
Quoted 99 lines
Quoted 99 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA
now means
+it's sharedwith
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we
now
need to
+somehowflush non-XA before
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise
dirty
cachelines
+could beflushed after the free
Quoted 40 lines
Quoted 40 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does
a
full flush)drivers/gpu/drm/xe/xe_device.c +2
-0+*/ + if (GRAPHICS_VER(xe) >= 35 &&!IS_DGFX(xe))
drivers/gpu/drm/xe/xe_device.c +4
-0+return true; +return false; +} + void xe_device_l2_flush(struct xe_device *xe){
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_device*xe, structdrm_printer*p);
u64 xe_device_canonicalize_addr(structxe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(structxe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
voidxe_device_td_flush(struct xe_device *xe);
voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {
drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware
will
be interrupted via preempt fences, so it doesn’t seem necessary
to
invalidate the TLBs but perhaps we need a cflush and TLB
invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 333 lines · Matthew Auld
Quoted 327 lines · Thomas Hellström
Quoted 302 lines · Matthew Auld
Quoted 295 lines · Thomas Hellström
Quoted 294 lines · Matthew Auld
Quoted 292 lines · Matt Roper
Quoted 258 lines · Jose
Quoted 243 lines · Tejas
Quoted 234 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 18 lines · Tejas
Quoted 18 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel-
[email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyOn Tue, Feb 10, 2026 at 01:05:25PM -0800, Matt Roper
wrote:Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged
memory—memory
sharedbetween
Quoted 54 lines
Quoted 54 lines
the
Quoted 15 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is
wrong;
where
are
you
seeing this definition? Everything in the
bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb -
transient
display").Quoted 14 lines
I'm not sure why exactly they picked "X" to
refer
to
transient in
both of these cases, but I've never seen any
documentation
that
refers to it as "extended."Quoted 5 lines
is treated differently from other GPU memory
when
the
Media
engine ispower-gated.
Quoted 23 lines
Quoted 6 lines
XA is *always* flushed, like at the end-of-
submssion
(and
maybe
otherI assume you're referring to the fact that the
driver
performs
flushes at the end of submission (viaPIPE_CONTROL
orMI_FLUSH_DW), and that depending on other
state/optimizations
in
the system, those flushes may flush the entire
device
cache,
or
may only flush the subset of cache data that is
not
marked asQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
transient. The way you worded this was
confusing
since
it
makes
it sound like cache flushes happen
automatically
somewhere inhardware/firmware.
Quoted 86 lines
Quoted 86 lines
Quoted 86 lines
Quoted 36 lines
places), just that internally as an
optimisation
hw
doesn't
need
to make that a full flush (which will also
include
XA) when
Media is off/powergated, since it doesn't
need to
worry
about GT
caches vs Media coherency, and only CPU vs
GPU
coherency,
so can
make that flush a targeted XA flush, since
stuff
tagged
with XA
now means it's shared with the CPU. The main
implication is
that
we now need to somehow flush non-XA before
freeing
system
memory
pages, otherwise dirty cachelines could be
flushed
after
the
free (like if Media suddenly turns on and
does a
full
flush)This description seems really confusing. My
understanding is
that
marking something as wb-transient-app indicates
that it
might
be
accessed by something other than our
graphics/media
IP
(i.e.,
accessed from the CPU, exported to another
device,
etc.), so
transient data truly does need to be flushed at
the
points in
the
driver where a flush typically happens.However when something is _not_ transient, then
either:
- it's "private" to the GPU and only our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so
that
outside
observers like
the CPU can snoop the device cache, even
when
the
cache
hasn't been
flushedIf media is not active, then there's really no
need
to
include
non-transient data when an device cache flush
happens
since
there's no real need for the data to get to
RAM.
So
that
enablesQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
an optimization (which comes in your next
patch),
that
allows
flushes to only operate on the subset of the
device
cache
tagged as"transient" if media is idle.
Quoted 10 lines
But what If we have stale non-XA marked pages for
userptr,
and
that
object moves out and at the same time media comes
back,
will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active
usage,
userptr would
be data that's accessible by the CPU, so it needs to either
be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs
to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache).
If
you marked
userptr as both non-XA and non-coherent, then that sounds
likely to
be a
userspace bug (and probably something we can catch and
rejectQuoted 8 lines
as an
invalid
case on any Xe3p or later platforms that support this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 7 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel
expects
either 1WAY or 2WAY for the @pat_index."Quoted 5 lines
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing
GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush
the
entire
cache anymore. Whenever the GuC determines that media is inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change
behavior to only flush out the subset of data that was marked
as
app-transient; anything not marked that way doesn't get flushed
now. So
there's a new requirement here that you ensure you're using an
XA
PAT
index, or you switch to use 2-way coherency which will allow
the
CPU to
snoop the GPU's caches.Quoted 5 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way
coherency with DGFX?Quoted 10 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu,
Media is coherent with l2/l3, but also I don't think system memory
can
be cached in l2/l3 (only VRAM), which I assume is why there is the
special SMRO (system-memory-read-only) cache only on dgpu, which is
flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 10 lines
Quoted 5 lines
It sounds like the same PAT restriction is needed also for imported
dma-buf, right?Good point. Looks like we are missing that still. Otherwise we can
run
into the same issues with stale l2/l3/ppc.Quoted 4 lines
So if this affects only system memory could we instead of relying on 2-
way coherency or XA, just flush at dma unmap time, because that's typically just before releasing the pages.
Quoted 5 lines
Yeah, I think we could make it work, from security pov, similar to userptr, with the right manual flushes in KMD. Maybe just a question if
userspace wants such a model? Anything cached in l2/l3 might require manual flushing by userspace (if that is even possible)?
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
For imported dma-buf kernel requires 2-way or XA for security due to the relaxed dma-buf unmap.
For SVM/System allocator we'd require 2-way or XA.
Otherwise KMD security is enforced by flush at dma-unmap time?
/Thomas
Quoted 470 lines
Quoted 470 lines
The exception, though, is dma-buf where the exporter can actually release memory before all importers have given up their dma- mappings.
/Thomas
Quoted 462 lines
Quoted 462 lines
/Thomas
Quoted 457 lines
Quoted 457 lines
Matt
Quoted 451 lines
Quoted 451 lines
Quoted 154 lines
If something happens that changes the GTT mapping of an
object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I
think
that
would ensure
that any non-XA data makes it to RAM before any binding
changes,
object,
destruction, etc.? Is there something special about userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of
the
various flush
and invalidate cases, and I don't see anything there that
makes it
obvious to
me that userptr would be special.Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
As you said, we eventually do want to force a
flush
of
the
non-transient data as well once we're freeing
the
underlying
pages.
So how do we do that? It's not clear to me how
the
changes
below
are accomplishing that. Is there a way to
explicitly
request
a
full device cache flush (ignoring the transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thoughtQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
there
might
be
some kind of GuC interface to request "please
do
one
full
flush now, evenif media is idle."
Quoted 11 lines
Quoted 11 lines
Quoted 1 line
I’m not an expert here by any means, but everything
above
from
Matt
seems like valid concerns. Thomas also raised some
concerns in
theQuoted 8 lines
Quoted 8 lines
two previous revisions; again I’m not an expert, but
reading
through
those, it doesn’t really seem like he received proper
answers
to hisquestions.
Quoted 4 lines
Its forcing flush via tlb invalidation PPC flag
underxe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another
new
synonym
for the
device cache? It's already really confusing that some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same device
cache
for
historical
reasons...Matt
Quoted 31 lines
Quoted 31 lines
A couple of comments below.
Quoted 27 lines
Matt
Quoted 24 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3 ++-
4 files changed, 28 insertions(+), 2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(v
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ continue;Matt R,
This flush will be still needed as there can be non-xa buffers
which
can be evicted while media was off and stale entries can be
flushed
when media comes back on. Which was not case earlier as full
flush
was happening at regular sync points and that’s where this
feature is
bringing optimization now.Tejas
Quoted 269 lines
Quoted 35 lines
Quoted 35 lines
This will trigger a TLB invalidation (and I assume a
cache
flush)
every time we move or free memory in the 3D stack if
it
has a
binding. It also performs a synchronous wait on the
BO
being
idle.
Both of these are very expensive operations. I can’t
imagine
the
granularity we want here is to do this on every move/free
with
bindings.Also, for LR compute with preempt fences, we would
trigger the
preempt fences during the wait, so a TLB invalidation
after
this
seems unnecessary, though perhaps the cache flush is
still
required?Quoted 9 lines
Quoted 9 lines
I think this needs a bit more explanation, because
without
knowing a
lot about the exact requirements, the implementation
does
not
lookcorrect.
Quoted 5 lines
The thing is that we are trying to solve problem
with
userptr
with non-XApat, consider if that BO got moved while media is not active.
As
soon as media
will come back active, stale cached entries of that object
will be
flushed as part
of full flush , which may corrupt things.Quoted 4 lines
There was thinking that with this patch we would at least
solve
the problemof corruption and later when
page_reclamationfeature comes
in will
help in
performance as well. But now when page reclamation feature is
merged earlier
and it tightly coupled with bind/unbind some cases like
discussed
above
(which are not doing unbind immediately on move/free) are
missed in
reclamation.Quoted 6 lines
So thought was to let this solution go in with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 58 lines
Tejas
Quoted 56 lines
Quoted 13 lines
Quoted 13 lines
}
if (!idle) {
diff --git a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device*xe)
Quoted 17 lines
Quoted 17 lines
}
}+/**
+ * xe_device_needs_cache_flush - Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache
flush,
false
otherwise.
+ */
+bool xe_device_needs_cache_flush(structQuoted 8 lines
Quoted 8 lines
xe_device
*xe) {
+ /* XA is *always* flushed, like at
the
end-
of-
submssion (and
+maybeother
Quoted 4 lines
Quoted 4 lines
+ * places), just that internally as
an
optimisation hw doesn't
+need tomake
Quoted 10 lines
Quoted 10 lines
+ * that a full flush (which will
also
include XA)
when Media is
+ * off/powergated, since it doesn't
need
to
worry
about GT
+caches vsMedia
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
+ * coherency, and only CPU vs GPU
coherency,
so
can makethat
Quoted 109 lines
Quoted 109 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 5 lines
Quoted 5 lines
+ * targeted XA flush, since stuff
tagged
with XA
now means
+it's sharedwith
Quoted 6 lines
Quoted 6 lines
+ * the CPU. The main implication is
that
we
now
need to
+somehowflush non-XA before
Quoted 5 lines
Quoted 5 lines
+ * freeing system memory pages,
otherwise
dirty
cachelines
+could beflushed after the free
Quoted 43 lines
Quoted 43 lines
+ * (like if Media suddenly turns on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct xe_device
*xe)
{
struct xe_gt *gt;
diff --git a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64 xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct xe_device
*xe);
void
xe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
diff --git a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 11 lines
Quoted 9 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm) ||
+xe_device_needs_cache_flush(vm-xe)) &&
Quoted 1 line
+ userptr->initial_bind) {
Same concern with the LR preempt fence as above — the
hardware
will
be interrupted via preempt fences, so it doesn’t seem
necessary
to
invalidate the TLBs but perhaps we need a cflush and
TLB
invalidation is the mechanism for that too?Matt
Quoted 8 lines
Quoted 7 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 340 lines · Thomas Hellström
Quoted 333 lines · Matthew Auld
Quoted 327 lines · Thomas Hellström
Quoted 302 lines · Matthew Auld
Quoted 295 lines · Thomas Hellström
Quoted 294 lines · Matthew Auld
Quoted 292 lines · Matt Roper
Quoted 258 lines · Jose
Quoted 243 lines · Tejas
Quoted 234 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 18 lines · Tejas
Quoted 18 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel-
[email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyOn Tue, Feb 10, 2026 at 01:05:25PM -0800, Matt Roper
wrote:Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
On Tue, Feb 10, 2026 at 06:21:22PM +0530, Tejas
Upadhyay
wrote:
"eXtended Architecture" (XA) tagged
memory—memory
sharedbetween
Quoted 54 lines
Quoted 54 lines
the
Quoted 29 lines
CPU and GPU
I'm pretty sure this expansion of "XA" is
wrong;
where
are
you
seeing this definition? Everything in the
bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb -
transient
display").
I'm not sure why exactly they picked "X" to
refer
to
transient in
both of these cases, but I've never seen any
documentation
that
refers to it as "extended."is treated differently from other GPU memory
when
the
Media
engine ispower-gated.
Quoted 23 lines
XA is *always* flushed, like at the end-of-
submssion
(and
maybe
otherI assume you're referring to the fact that the
driver
performs
flushes at the end of submission (via
PIPE_CONTROL
or
MI_FLUSH_DW), and that depending on other
state/optimizations
in
the system, those flushes may flush the entire
device
cache,
or
may only flush the subset of cache data that is
not
marked asQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
transient. The way you worded this was
confusing
since
it
makes
it sound like cache flushes happen
automatically
somewhere inhardware/firmware.
Quoted 86 lines
Quoted 86 lines
Quoted 86 lines
places), just that internally as an
optimisation
hw
doesn't
need
to make that a full flush (which will also
include
XA) when
Media is off/powergated, since it doesn't
need to
worry
about GT
caches vs Media coherency, and only CPU vs
GPU
coherency,
so can
make that flush a targeted XA flush, since
stuff
tagged
with XA
now means it's shared with the CPU. The main
implication is
that
we now need to somehow flush non-XA before
freeing
system
memory
pages, otherwise dirty cachelines could be
flushed
after
the
free (like if Media suddenly turns on and
does a
full
flush)This description seems really confusing. My
understanding is
that
marking something as wb-transient-app indicates
that it
might
be
accessed by something other than our
graphics/media
IP
(i.e.,
accessed from the CPU, exported to another
device,
etc.), so
transient data truly does need to be flushed at
the
points in
the
driver where a flush typically happens.However when something is _not_ transient, then
either:
- it's "private" to the GPU and only our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so
that
outside
observers like
the CPU can snoop the device cache, even
when
the
cache
hasn't been
flushedIf media is not active, then there's really no
need
to
include
non-transient data when an device cache flush
happens
since
there's no real need for the data to get to
RAM.
So
that
enablesQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
an optimization (which comes in your next
patch),
that
allows
flushes to only operate on the subset of the
device
cache
tagged as"transient" if media is idle.
Quoted 10 lines
But what If we have stale non-XA marked pages for
userptr,
and
that
object moves out and at the same time media comes
back,
will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active
usage,
userptr would
be data that's accessible by the CPU, so it needs to either
be
transient (so CPU
can see the data in RAM after explicit flushes) or it needs
to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache).
If
you marked
userptr as both non-XA and non-coherent, then that sounds
likely to
be a
userspace bug (and probably something we can catch and
rejectQuoted 8 lines
as an
invalid
case on any Xe3p or later platforms that support this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 7 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel
expects
either 1WAY or 2WAY for the @pat_index."Quoted 5 lines
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing
GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush
the
entire
cache anymore. Whenever the GuC determines that media is inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change
behavior to only flush out the subset of data that was marked
as
app-transient; anything not marked that way doesn't get flushed
now. So
there's a new requirement here that you ensure you're using an
XA
PAT
index, or you switch to use 2-way coherency which will allow
the
CPU to
snoop the GPU's caches.Quoted 5 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have 2-way
coherency with DGFX?Quoted 10 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu,
Media is coherent with l2/l3, but also I don't think system memory
can
be cached in l2/l3 (only VRAM), which I assume is why there is the
special SMRO (system-memory-read-only) cache only on dgpu, which is
flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 10 lines
Quoted 5 lines
It sounds like the same PAT restriction is needed also for imported
dma-buf, right?Good point. Looks like we are missing that still. Otherwise we can
run
into the same issues with stale l2/l3/ppc.Quoted 4 lines
So if this affects only system memory could we instead of relying on 2-
way coherency or XA, just flush at dma unmap time, because that's typically just before releasing the pages.Quoted 5 lines
Yeah, I think we could make it work, from security pov, similar to userptr, with the right manual flushes in KMD. Maybe just a question if
userspace wants such a model? Anything cached in l2/l3 might require manual flushing by userspace (if that is even possible)?
Quoted 3 lines
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
Yeah, looking at BSpec 74635 (Media off case), I'm only really seeing MEM_SET which userspace could potentially use by itself? But then it's unclear if they mean to actually clear-the-memory (which is not what we want) or using the special evict mode, but that seems to be talking more about flushing to local memory, so not completely sure what that does on igpu. If it's the evict mode then should in theory be possible for userpace to do a manual flush, but that would have to be done per-bo/vma?
Quoted 7 lines
For imported dma-buf kernel requires 2-way or XA for security due to the relaxed dma-buf unmap.
For SVM/System allocator we'd require 2-way or XA.
Otherwise KMD security is enforced by flush at dma-unmap time?
Yeah, that is my understanding. Otherwise I don't currently see what prevents the dirty non-XA cache lines being flushed at some random point later, after we have already freed the corresponding system memory, potentially nuking the next user who allocates those pages.
Quoted 473 lines
/Thomas
Quoted 470 lines
Quoted 470 lines
The exception, though, is dma-buf where the exporter can actually release memory before all importers have given up their dma- mappings.
/Thomas
Quoted 462 lines
Quoted 462 lines
/Thomas
Quoted 457 lines
Quoted 457 lines
Matt
Quoted 451 lines
Quoted 451 lines
Quoted 154 lines
If something happens that changes the GTT mapping of an
object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I
think
that
would ensure
that any non-XA data makes it to RAM before any binding
changes,
object,
destruction, etc.? Is there something special about userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of
the
various flush
and invalidate cases, and I don't see anything there that
makes it
obvious to
me that userptr would be special.Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
As you said, we eventually do want to force a
flush
of
the
non-transient data as well once we're freeing
the
underlying
pages.
So how do we do that? It's not clear to me how
the
changes
below
are accomplishing that. Is there a way to
explicitly
request
a
full device cache flush (ignoring the transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thoughtQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
there
might
be
some kind of GuC interface to request "please
do
one
full
flush now, evenif media is idle."
Quoted 11 lines
Quoted 11 lines
Quoted 1 line
I’m not an expert here by any means, but everything
above
from
Matt
seems like valid concerns. Thomas also raised some
concerns in
theQuoted 8 lines
Quoted 8 lines
two previous revisions; again I’m not an expert, but
reading
through
those, it doesn’t really seem like he received proper
answers
to hisquestions.
Quoted 4 lines
Its forcing flush via tlb invalidation PPC flag
underxe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another
new
synonym
for the
device cache? It's already really confusing that some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same device
cache
for
historical
reasons...Matt
Quoted 31 lines
Quoted 31 lines
A couple of comments below.
Quoted 27 lines
Matt
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3 ++-
4 files changed, 28 insertions(+), 2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(v
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ continue;Matt R,
This flush will be still needed as there can be non-xa buffers
which
can be evicted while media was off and stale entries can be
flushed
when media comes back on. Which was not case earlier as full
flush
was happening at regular sync points and that’s where this
feature is
bringing optimization now.Tejas
Quoted 269 lines
Quoted 35 lines
Quoted 35 lines
This will trigger a TLB invalidation (and I assume a
cache
flush)
every time we move or free memory in the 3D stack if
it
has a
binding. It also performs a synchronous wait on the
BO
being
idle.
Both of these are very expensive operations. I can’t
imagine
the
granularity we want here is to do this on every move/free
with
bindings.Also, for LR compute with preempt fences, we would
trigger the
preempt fences during the wait, so a TLB invalidation
after
this
seems unnecessary, though perhaps the cache flush is
still
required?Quoted 9 lines
Quoted 9 lines
I think this needs a bit more explanation, because
without
knowing a
lot about the exact requirements, the implementation
does
not
lookcorrect.
Quoted 5 lines
The thing is that we are trying to solve problem
with
userptr
with non-XApat, consider if that BO got moved while media is not active.
As
soon as media
will come back active, stale cached entries of that object
will be
flushed as part
of full flush , which may corrupt things.Quoted 4 lines
There was thinking that with this patch we would at least
solve
the problemof corruption and later when
page_reclamationfeature comes
in will
help in
performance as well. But now when page reclamation feature is
merged earlier
and it tightly coupled with bind/unbind some cases like
discussed
above
(which are not doing unbind immediately on move/free) are
missed in
reclamation.Quoted 6 lines
So thought was to let this solution go in with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 58 lines
Tejas
Quoted 56 lines
Quoted 13 lines
}
if (!idle) {
diff --git a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device*xe)
Quoted 25 lines
}
}+/**
+ * xe_device_needs_cache_flush - Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache
flush,
false
otherwise.
+ */
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {
+ /* XA is *always* flushed, like at
the
end-
of-
submssion (and
+maybeother
Quoted 4 lines
+ * places), just that internally as
an
optimisation hw doesn't
+need tomake
Quoted 10 lines
+ * that a full flush (which will
also
include XA)
when Media is
+ * off/powergated, since it doesn't
need
to
worry
about GT
+caches vsMedia
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
+ * coherency, and only CPU vs GPU
coherency,
so
can makethat
Quoted 109 lines
Quoted 109 lines
Quoted 1 line
+flush
a
Quoted 5 lines
+ * targeted XA flush, since stuff
tagged
with XA
now means
+it's sharedwith
Quoted 6 lines
+ * the CPU. The main implication is
that
we
now
need to
+somehowflush non-XA before
Quoted 5 lines
+ * freeing system memory pages,
otherwise
dirty
cachelines
+could beflushed after the free
Quoted 52 lines
+ * (like if Media suddenly turns on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct xe_device
*xe)
{
struct xe_gt *gt;
diff --git a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64 xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct xe_device
*xe);
void
xe_device_l2_flush(struct xe_device *xe);diff --git a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 11 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm) ||
+xe_device_needs_cache_flush(vm-
xe)) &&
+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the
hardware
will
be interrupted via preempt fences, so it doesn’t seem
necessary
to
invalidate the TLBs but perhaps we need a cflush and
TLB
invalidation is the mechanism for that too?Matt
Quoted 8 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
RE: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 213 lines
-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: 16 February 2026 22:12
To: Thomas Hellström <[email protected]>; Roper, Matthew D <[email protected]>; Souza, Jose <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; Mrozek, Michal <[email protected]>; [email protected]; Brost, Matthew <[email protected]>
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 36 lines · Thomas Hellström
Quoted 35 lines · Matthew Auld
Quoted 34 lines · Thomas Hellström
Quoted 33 lines · Matthew Auld
Quoted 32 lines · Thomas Hellström
Quoted 31 lines · Matthew Auld
Quoted 30 lines · Matt Roper
Quoted 28 lines · Jose
Quoted 27 lines · Tejas
Quoted 27 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 13 lines · Tejas
Quoted 13 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush
userptr/shrinker bo cachelines manuallyQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
On Tue, Feb 10, 2026 at 01:05:25PM -0800, Matt Roper
wrote:
On Tue, Feb 10, 2026 at 06:21:22PM +0530, Tejas Upadhyay
wrote:
"eXtended Architecture" (XA) tagged memory—memoryshared
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
between
Quoted 14 lines
Quoted 14 lines
the
CPU and GPUI'm pretty sure this expansion of "XA" is wrong; where are
you seeing this definition? Everything in the bspec
indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient
display").
I'm not sure why exactly they picked "X" to refer to
transient in both of these cases, but I've never seen any
documentation that refers to it as "extended."is treated differently from other GPU memory when the
Media engine isQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
power-gated.
XA is *always* flushed, like at the end-of- submssion
(and maybe otherI assume you're referring to the fact that the driver
performs flushes at the end of submission (via
PIPE_CONTROL or MI_FLUSH_DW), and that depending onother
Quoted 124 lines
Quoted 124 lines
Quoted 123 lines
Quoted 101 lines
Quoted 101 lines
Quoted 100 lines
Quoted 87 lines
Quoted 79 lines
Quoted 74 lines
Quoted 57 lines
Quoted 5 lines
Quoted 5 lines
state/optimizations in the system, those flushes may flush
the entire device cache, or may only flush the subset of
cache data that is not marked as transient. The way you
worded this was confusing since it makes it sound like
cache flushes happen automatically somewhere inhardware/firmware.
Quoted 34 lines
Quoted 34 lines
places), just that internally as an optimisation hw
doesn't need to make that a full flush (which will also
include
XA) when
Media is off/powergated, since it doesn't need to worry
about GT caches vs Media coherency, and only CPU vs GPU
coherency, so can make that flush a targeted XA flush,
since stuff tagged with XA now means it's shared with the
CPU. The main implication is that we now need to somehow
flush non-XA before freeing system memory pages,
otherwise dirty cachelines could be flushed after the
free (like if Media suddenly turns on and does a full
flush)This description seems really confusing. My understanding
is that marking something as wb-transient-app indicates
that it might be accessed by something other than our
graphics/media IP (i.e., accessed from the CPU, exported
to another device, etc.), so transient data truly does
need to be flushed at the points in the driver where a
flush typically happens.However when something is _not_ transient, then
either:
- it's "private" to the GPU and only our
graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that
outside observers like
the CPU can snoop the device cache, even when the
cache hasn't been
flushedQuoted 10 lines
Quoted 10 lines
If media is not active, then there's really no need to
include non-transient data when an device cache flush
happens since there's no real need for the data to get to
RAM.
So
that
enables
an optimization (which comes in your next patch), that
allows flushes to only operate on the subset of the device
cache tagged as"transient" if media is idle.
Quoted 5 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
Quoted 16 lines
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If
you marked
userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support
this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 5 lines
Right. FYI @Mrozek, Michal @Souza, Jose For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.
Quoted 7 lines
The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the kernel expects either 1WAY or 2WAY for the @pat_index."
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches at the end of batch buffers.Quoted 11 lines
But isn't that what we're discussing here? 1-way *won't* necessarily be enough anymore because
PIPE_CONTROLinstructions don't flush the entire cache anymore. Whenever the GuC determines that media is inactive and activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc.
change
behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So there's a new requirement here that you ensure you're using an XA PAT index, or you switch to use 2-way coherency which will allow the CPU to snoop the GPU's caches.That exactly matches my understanding also.
Quoted 8 lines
Quoted 2 lines
This only ever affects IGFX, right? Since AFAIU we don't have 2-way coherency with DGFX?
Yeah, this should be igpu only. I seem to also recall that on dgpu, Media is coherent with l2/l3, but also I don't think system memory can be cached in l2/l3 (only VRAM), which I assume is why there is the special SMRO (system-memory-read-only) cache only on dgpu, which is flushed when the fence signals, unlike the l2/l3.
Yes that sounds reasonable.
Quoted 7 lines
Quoted 4 lines
It sounds like the same PAT restriction is needed also for imported dma-buf, right?
Good point. Looks like we are missing that still. Otherwise we can run into the same issues with stale l2/l3/ppc.
So if this affects only system memory could we instead of relying on 2- way coherency or XA, just flush at dma unmap time, because that's typically just before releasing the pages.
Quoted 8 lines
Quoted 4 lines
Yeah, I think we could make it work, from security pov, similar to userptr, with the right manual flushes in KMD. Maybe just a question if userspace wants such a model? Anything cached in l2/l3 might require manual flushing by userspace (if that is even possible)?
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
Quoted 7 lines
Yeah, looking at BSpec 74635 (Media off case), I'm only really seeing
MEM_SETwhich userspace could potentially use by itself? But then it's unclear if they mean to actually clear-the-memory (which is not what we want) or using the special evict mode, but that seems to be talking more about flushing to local memory, so not completely sure what that does on igpu. If it's the evict mode then should in theory be possible for userpace to do a manual flush, but that would have to be done per-bo/vma?
MEM_SET says, range needs to be specified as part of command with evict mode.
Quoted 5 lines
Quoted 5 lines
For imported dma-buf kernel requires 2-way or XA for security due to the relaxed dma-buf unmap.
Quoted 8 lines
Quoted 3 lines
For SVM/System allocator we'd require 2-way or XA.
Otherwise KMD security is enforced by flush at dma-unmap time?
Yeah, that is my understanding. Otherwise I don't currently see what prevents the dirty non-XA cache lines being flushed at some random point later, after we have already freed the corresponding system memory, potentially nuking the next user who allocates those pages.
Hmm, so it means we can drop this patch completely and do something like below :
In, xe_migrate_dma_unmap(),
dma_unmap_page()
if (pat_index != 18 or 19 && coh_mode != 2_way)
/* manual_flush */
Tejas
Quoted 474 lines
Quoted 474 lines
/Thomas
Quoted 470 lines
Quoted 470 lines
The exception, though, is dma-buf where the exporter can actually release memory before all importers have given up their dma- mappings.
/Thomas
Quoted 462 lines
Quoted 462 lines
/Thomas
Quoted 457 lines
Quoted 457 lines
Matt
Quoted 451 lines
Quoted 451 lines
Quoted 154 lines
If something happens that changes the GTT mapping of an
object,
then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I
think
that
would ensure
that any non-XA data makes it to RAM before any binding
changes,
object,
destruction, etc.? Is there something special about userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of
the
various flush
and invalidate cases, and I don't see anything there that
makes it
obvious to
me that userptr would be special.Quoted 31 lines
Quoted 31 lines
As you said, we eventually do want to force a
flush
of
the
non-transient data as well once we're freeing
the
underlying
pages.
So how do we do that? It's not clear to me how
the
changes
below
are accomplishing that. Is there a way to
explicitly
request
a
full device cache flush (ignoring the transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thoughtQuoted 8 lines
Quoted 8 lines
there
might
be
some kind of GuC interface to request "please
do
one
full
flush now, evenif media is idle."
Quoted 11 lines
Quoted 11 lines
I’m not an expert here by any means, but
everything
above
from
Matt
seems like valid concerns. Thomas also raised
some
concerns in
theQuoted 8 lines
Quoted 8 lines
two previous revisions; again I’m not an expert,
but
reading
through
those, it doesn’t really seem like he received
proper
answers
to hisquestions.
Quoted 4 lines
Its forcing flush via tlb invalidation PPC flag
underxe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another
new
synonym
for the
device cache? It's already really confusing that some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same device
cache
for
historical
reasons...Matt
Quoted 31 lines
Quoted 31 lines
A couple of comments below.
Matt
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3 ++-
4 files changed, 28 insertions(+), 2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(v
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ continue;Matt R,
This flush will be still needed as there can be non-xa buffers
which
can be evicted while media was off and stale entries can be
flushed
when media comes back on. Which was not case earlier as full
flush
was happening at regular sync points and that’s where this
feature is
bringing optimization now.Tejas
Quoted 269 lines
Quoted 35 lines
Quoted 35 lines
This will trigger a TLB invalidation (and I
assume a
cache
flush)
every time we move or free memory in the 3D stack
if
it
has a
binding. It also performs a synchronous wait on
the
BO
being
idle.
Both of these are very expensive operations. I
can’t
imagine
the
granularity we want here is to do this on every
move/free
with
bindings.Also, for LR compute with preempt fences, we
would
trigger the
preempt fences during the wait, so a TLB
invalidation
after
this
seems unnecessary, though perhaps the cache flush
is
still
required?Quoted 9 lines
Quoted 9 lines
I think this needs a bit more explanation,
because
without
knowing a
lot about the exact requirements, the
implementation
does
not
lookcorrect.
Quoted 5 lines
The thing is that we are trying to solve problem
with
userptr
with non-XApat, consider if that BO got moved while media is not active.
As
soon as media
will come back active, stale cached entries of that object
will be
flushed as part
of full flush , which may corrupt things.Quoted 4 lines
There was thinking that with this patch we would at least
solve
the problemof corruption and later when
page_reclamationfeature comes
in will
help in
performance as well. But now when page reclamation feature is
merged earlier
and it tightly coupled with bind/unbind some cases like
discussed
above
(which are not doing unbind immediately on move/free) are
missed in
reclamation.Quoted 6 lines
So thought was to let this solution go in with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 58 lines
Tejas
Quoted 56 lines
}
if (!idle) {
diff --git a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device
*xe)
}
}+/**
+ * xe_device_needs_cache_flush - Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache
flush,
false
otherwise.
+ */
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {
+ /* XA is *always* flushed, like at
the
end-
of-
submssion (and
+maybe
other
+ * places), just that internally as
an
optimisation hw doesn't
+need to
make
+ * that a full flush (which will
also
include XA)
when Media is
+ * off/powergated, since it doesn't
need
to
worry
about GT
+caches vs
MediaQuoted 4 lines
Quoted 4 lines
+ * coherency, and only CPU vs GPU
coherency,
so
can makethat
Quoted 109 lines
Quoted 109 lines
+flush
a
+ * targeted XA flush, since stuff
tagged
with XA
now means
+it's shared
with
+ * the CPU. The main implication is
that
we
now
need to
+somehow
flush non-XA before
+ * freeing system memory pages,
otherwise
dirty
cachelines
+could be
flushed after the free
+ * (like if Media suddenly turns on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct xe_device
*xe)
{
struct xe_gt *gt;
diff --git a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64 xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64 xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct xe_device
*xe);
void
xe_device_l2_flush(struct xe_device *xe);diff --git a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm
*vm, struct xe_userptr_vma *uv
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm) ||
+xe_device_needs_cache_flush(vm-
xe)) &&
+ userptr->initial_bind) {Same concern with the LR preempt fence as above —
the
hardware
will
be interrupted via preempt fences, so it doesn’t
seem
necessary
to
invalidate the TLBs but perhaps we need a cflush
and
TLB
invalidation is the mechanism for that too?Matt
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 337 lines · Tejas
Quoted 303 lines
-----Original Message-----
From: Auld, Matthew <[email protected]>
Sent: 16 February 2026 22:12
To: Thomas Hellström <[email protected]>; Roper, Matthew
D <[email protected]>; Souza, Jose <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; Mrozek, Michal <[email protected]>; [email protected]; Brost, Matthew
<[email protected]>
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 46 lines · Thomas Hellström
Quoted 45 lines · Matthew Auld
Quoted 44 lines · Thomas Hellström
Quoted 43 lines · Matthew Auld
Quoted 42 lines · Thomas Hellström
Quoted 41 lines · Matthew Auld
Quoted 40 lines · Matt Roper
Quoted 38 lines · Jose
Quoted 36 lines · Tejas
Quoted 36 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel-
[email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 18 lines · Tejas
-----Original Message-----
From: Brost, Matthew
<[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D
<[email protected]>
Cc: Upadhyay, Tejas
<[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>;
[email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg:
flush
userptr/shrinker bo cachelines manuallyQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
On Tue, Feb 10, 2026 at 01:05:25PM -0800,
Matt Roper
wrote:
On Tue, Feb 10, 2026 at 06:21:22PM +0530,
Tejas Upadhyay
wrote:
"eXtended Architecture" (XA) tagged
memory—memoryshared
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
between
Quoted 27 lines
the
CPU and GPUI'm pretty sure this expansion of "XA" is
wrong; where are
you seeing this definition? Everything
in the bspec
indicates that XA means "wb
- transient app" (similar to how "XD" is
'wb - transient
display").
I'm not sure why exactly they picked "X"
to refer to
transient in both of these cases, but
I've never seen any
documentation that refers to it as
"extended."is treated differently from other GPU
memory when the
Media engine is
power-gated.XA is *always* flushed, like at the
end-of- submssion
(and maybe otherQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
I assume you're referring to the fact
that the driver
performs flushes at the end of submission
(via
PIPE_CONTROL or MI_FLUSH_DW), and that
depending onother
Quoted 193 lines
Quoted 185 lines
Quoted 179 lines
Quoted 157 lines
Quoted 151 lines
Quoted 151 lines
Quoted 150 lines
Quoted 124 lines
Quoted 115 lines
Quoted 106 lines
Quoted 10 lines
state/optimizations in the system, those
flushes may flush
the entire device cache, or may only
flush the subset of
cache data that is not marked as
transient. The way you
worded this was confusing since it makes
it sound like
cache flushes happen automatically
somewhere inhardware/firmware.
Quoted 69 lines
places), just that internally as an
optimisation hw
doesn't need to make that a full flush
(which will also
include
XA) when
Media is off/powergated, since it
doesn't need to worry
about GT caches vs Media coherency, and
only CPU vs GPU
coherency, so can make that flush a
targeted XA flush,
since stuff tagged with XA now means
it's shared with the
CPU. The main implication is that we
now need to somehow
flush non-XA before freeing system
memory pages,
otherwise dirty cachelines could be
flushed after the
free (like if Media suddenly turns on
and does a full
flush)This description seems really confusing.
My understanding
is that marking something as wb-
transient-app indicates
that it might be accessed by something
other than our
graphics/media IP (i.e., accessed from
the CPU, exported
to another device, etc.), so transient
data truly does
need to be flushed at the points in the
driver where a
flush typically happens.However when something is _not_
transient, then
either:
- it's "private" to the GPU and only
our
graphics/media IP will be
accessing it
- it's bound with a coherent PAT
index so that
outside observers like
the CPU can snoop the device
cache, even when the
cache hasn't been
flushedIf media is not active, then there's
really no need to
include non-transient data when an device
cache flush
happens since there's no real need for
the data to get to
RAM.
So
that
enables
an optimization (which comes in your next
patch), that
allows flushes to only operate on the
subset of the device
cache tagged as"transient" if media is idle.
Quoted 8 lines
But what If we have stale non-XA marked pages
for userptr,
and that object moves out and at the same
time media comes
back, will end up in full flush and flush the
stale entry to
RAM.What makes userptr special here? During general, active
usage, userptr would be data that's accessible by the CPU, so
it needs to either be transient (so CPU can see the data in
RAM after explicit flushes) or it needs to be using a
coherent PAT (so that the CPU can just snoop the GPU cache).
If
you marked
userptr as both non-XA and non-coherent, then that sounds
likely to be a userspace bug (and probably something we canQuoted 8 lines
catch and reject as an invalid case on any Xe3p or later
platforms that support
this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 7 lines
Right. FYI @Mrozek, Michal @Souza, Jose For
userptr, as
explained above, it needs to be either coherent
or XA pat
index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 7 lines
"Note: For userptr and externally imported dma-buf the kernel
expects either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing
GPU caches at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't*
necessarily be enough anymore becausePIPE_CONTROLinstructions
don't flush the entire cache anymore. Whenever the GuC
determines that media is inactive and activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change
behavior to only flush out the subset of data that was marked as
app-transient; anything not marked that way doesn't get flushed
now. So there's a new requirement here that you ensure you're
using an XA PAT index, or you switch to use 2-way coherency
which will allow the CPU to snoop the GPU's caches.Quoted 5 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have
2-way coherency with DGFX?Quoted 9 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu,
Media is coherent with l2/l3, but also I don't think system memory
can be cached in l2/l3 (only VRAM), which I assume is why there is
the special SMRO (system-memory-read-only) cache only on dgpu,
which is flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 9 lines
Quoted 5 lines
It sounds like the same PAT restriction is needed also for
imported dma-buf, right?Good point. Looks like we are missing that still. Otherwise we can
run into the same issues with stale l2/l3/ppc.Quoted 5 lines
So if this affects only system memory could we instead of relying on
2- way coherency or XA, just flush at dma unmap time, because that's
typically just before releasing the pages.Quoted 7 lines
Yeah, I think we could make it work, from security pov, similar to
userptr, with the right manual flushes in KMD. Maybe just a question
if userspace wants such a model? Anything cached in l2/l3 might require manual flushing by userspace (if that is even possible)?Quoted 3 lines
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
Quoted 12 lines
Yeah, looking at BSpec 74635 (Media off case), I'm only really seeing
MEM_SETwhich userspace could potentially use by itself? But then it's unclear
if they mean to actually clear-the-memory (which is not what we want) or using the special evict mode, but that seems to be talking more about
flushing to local memory, so not completely sure what that does on igpu. If it's
the evict mode then should in theory be possible for userpace to do a manual
flush, but that would have to be done per-bo/vma?
MEM_SETsays, range needs to be specified as part of command with evict mode.Quoted 10 lines
Quoted 9 lines
For imported dma-buf kernel requires 2-way or XA for security due to
the relaxed dma-buf unmap.For SVM/System allocator we'd require 2-way or XA.
Otherwise KMD security is enforced by flush at dma-unmap time?
Quoted 7 lines
Yeah, that is my understanding. Otherwise I don't currently see what prevents
the dirty non-XA cache lines being flushed at some random point later, after
we have already freed the corresponding system memory, potentially nuking
the next user who allocates those pages.
Quoted 8 lines
Hmm, so it means we can drop this patch completely and do something like below :
In,
xe_migrate_dma_unmap(),
dma_unmap_page()
if (pat_index!= 18 or 19 &&coh_mode!= 2_way)/* manual_flush */
I think for userptr you'd want to add this in __vma_userptr_invalidate(), just before drm_gpusvm_unmap_pages().
For bos you'd want to add it in xe_tt_unmap_sg() just before dma_unmap_sgtable(). But if you want to do it conditionally, you would need a flag in the struct xe_ttm_tt that is set whenever the owning bo is mapped in such a way that content has not been flushed.
/Thomas
Quoted 550 lines
Tejas
Quoted 547 lines
Quoted 547 lines
/Thomas
Quoted 543 lines
Quoted 543 lines
The exception, though, is dma-buf where the exporter can actually
release memory before all importers have given up their dma- mappings./Thomas
Quoted 534 lines
Quoted 534 lines
/Thomas
Quoted 529 lines
Quoted 529 lines
Matt
Quoted 523 lines
Quoted 523 lines
Quoted 178 lines
If something happens that changes the GTT mapping of
an
object,
then
doesn't that already trigger a TLB invalidation when
necessary in
the driver
today? It was my understanding that "heavy" TLB
invalidations wait
for data
values to be globally observable before starting, so
I
think
that
would ensure
that any non-XA data makes it to RAM before any binding
changes,
object,
destruction, etc.? Is there something special about
userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview
of
the
various flush
and invalidate cases, and I don't see anything there
that
makes it
obvious to
me that userptr would be special.Quoted 46 lines
As you said, we eventually do want to
force a
flush
of
the
non-transient data as well once we're
freeing
the
underlying
pages.
So how do we do that? It's not clear to
me how
the
changes
below
are accomplishing that. Is there a way
to
explicitly
request
a
full device cache flush (ignoring the
transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in
the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thought
there
might
be
some kind of GuC interface to request
"please
do
one
full
flush now, evenif media is idle."
Quoted 22 lines
I’m not an expert here by any means, but
everything
above
from
Matt
seems like valid concerns. Thomas also
raised
some
concerns in
the
two previous revisions; again I’m not an
expert,
but
reading
through
those, it doesn’t really seem like he
received
proper
answers
to hisquestions.
Quoted 5 lines
Its forcing flush via tlb invalidation PPC
flag
under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another
new
synonym
for the
device cache? It's already really confusing that
some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same
device
cache
for
historical
reasons...Matt
Quoted 35 lines
A couple of comments below.
Matt
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c |
3 ++-
drivers/gpu/drm/xe/xe_device.c |
23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3
++-
4 files changed, 28 insertions(+),
2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 12 lines
Quoted 12 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_e
vict(v
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ contin
ue;Matt R,
This flush will be still needed as there can be
non-xa
buffers
which
can be evicted while media was off and stale
entries
can be
flushed
when media comes back on. Which was not case
earlier as
full
flush
was happening at regular sync points and that’s
where
this
feature is
bringing optimization now.Tejas
Quoted 311 lines
Quoted 50 lines
This will trigger a TLB invalidation (and I
assume a
cache
flush)
every time we move or free memory in the 3D
stack
if
it
has a
binding. It also performs a synchronous
wait on
the
BO
being
idle.
Both of these are very expensive
operations. I
can’t
imagine
the
granularity we want here is to do this on
every
move/free
with
bindings.Also, for LR compute with preempt fences,
we
would
trigger the
preempt fences during the wait, so a TLB
invalidation
after
this
seems unnecessary, though perhaps the cache
flush
is
still
required?I think this needs a bit more explanation,
because
without
knowing a
lot about the exact requirements, the
implementation
does
not
lookcorrect.
Quoted 6 lines
The thing is that we are trying to solve
problem
with
userptr
with non-XApat, consider if that BO got moved while media is not
active.
As
soon as media
will come back active, stale cached entries of that
object
will be
flushed as part
of full flush , which may corrupt things.Quoted 5 lines
There was thinking that with this patch we
would at
least
solve
the problemof corruption and later when
page_reclamationfeature
comes
in will
help in
performance as well. But now when page reclamation
feature is
merged earlier
and it tightly coupled with bind/unbind some cases
like
discussed
above
(which are not doing unbind immediately on move/free)
are
missed in
reclamation.Quoted 7 lines
So thought was to let this solution go in
with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner solution
together.Quoted 71 lines
Tejas
}
if (!idle) {
diff --git
a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device
*xe)
}
}+/**
+ * xe_device_needs_cache_flush -
Whether the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs
cache
flush,
false
otherwise.
+ */
+bool
xe_device_needs_cache_flush(struct
xe_device
*xe) {
+ /* XA is *always* flushed,
like at
the
end-
of-
submssion (and
+maybe
other
+ * places), just that
internally as
an
optimisation hw doesn't
+need to
make
+ * that a full flush (which
will
also
include XA)
when Media is
+ * off/powergated, since it
doesn't
need
to
worry
about GT
+caches vs
Media
+ * coherency, and only CPU vs
GPU
coherency,
so
can makethat
Quoted 131 lines
+flush
a
+ * targeted XA flush, since
stuff
tagged
with XA
now means
+it's shared
with
+ * the CPU. The main
implication is
that
we
now
need to
+somehow
flush non-XA before
+ * freeing system memory
pages,
otherwise
dirty
cachelines
+could be
flushed after the free
+ * (like if Media suddenly
turns on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct
xe_device
*xe)
{
struct xe_gt *gt;
diff --git
a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64
xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64
xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool
xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct
xe_device
*xe);
void
xe_device_l2_flush(struct xe_device
*xe);diff --git
a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm
*vm, struct xe_userptr_vma *uv
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm)
||
+xe_device_needs_cache_flush(vm-
xe)) &&
+ userptr->initial_bind) {Same concern with the LR preempt fence as
above —
the
hardware
will
be interrupted via preempt fences, so it
doesn’t
seem
necessary
to
invalidate the TLBs but perhaps we need a
cflush
and
TLB
invalidation is the mechanism for that too?Matt
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
In reply to Matthew AuldQuoted 420 lines · Matthew Auld
Quoted 395 lines · Thomas Hellström
Quoted 385 lines · Matthew Auld
Quoted 377 lines · Thomas Hellström
Quoted 349 lines · Matthew Auld
Quoted 341 lines · Thomas Hellström
Quoted 340 lines · Matthew Auld
Quoted 338 lines · Matt Roper
Quoted 300 lines · Jose
Quoted 282 lines · Tejas
Quoted 273 lines
-----Original Message-----
From: Roper, Matthew D
<[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>;
[email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush
userptr/shrinker bo
cachelines manuallyOn Wed, Feb 11, 2026 at 07:06:05PM +0000,
Upadhyay,
TejasQuoted 23 lines · wrote:
Quoted 23 lines
-----Original Message-----
From: Brost, Matthew
<[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D
<[email protected]>
Cc: Upadhyay, Tejas
<[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>;
[email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg:
flush
userptr/shrinker bo
cachelines manuallyOn Tue, Feb 10, 2026 at 01:05:25PM -0800,
Matt
Roper
wrote:Quoted 7 lines
Quoted 7 lines
On Tue, Feb 10, 2026 at 06:21:22PM +0530,
Tejas
Upadhyay
wrote:
"eXtended Architecture" (XA) tagged
memory—memory
sharedbetween
Quoted 61 lines
Quoted 61 lines
the
CPU and GPUI'm pretty sure this expansion of "XA" is
wrong;
where
are
you
seeing this definition? Everything in the
bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is
'wb -
transient
display").
I'm not sure why exactly they picked "X" to
refer
to
transient in
both of these cases, but I've never seen
any
documentation
that
refers to it as "extended."is treated differently from other GPU
memory
when
the
Media
engine is
power-gated.XA is *always* flushed, like at the end-
of-
submssion
(and
maybe
otherI assume you're referring to the fact that
the
driver
performs
flushes at the end of submission (via
PIPE_CONTROL
or
MI_FLUSH_DW), and that depending on other
state/optimizations
in
the system, those flushes may flush the
entire
device
cache,
or
may only flush the subset of cache data
that is
not
marked asQuoted 8 lines
Quoted 8 lines
transient. The way you worded this was
confusing
since
it
makes
it sound like cache flushes happen
automatically
somewhere inhardware/firmware.
Quoted 102 lines
Quoted 102 lines
places), just that internally as an
optimisation
hw
doesn't
need
to make that a full flush (which will
also
include
XA) when
Media is off/powergated, since it doesn't
need to
worry
about GT
caches vs Media coherency, and only CPU
vs
GPU
coherency,
so can
make that flush a targeted XA flush,
since
stuff
tagged
with XA
now means it's shared with the CPU. The
main
implication is
that
we now need to somehow flush non-XA
before
freeing
system
memory
pages, otherwise dirty cachelines could
be
flushed
after
the
free (like if Media suddenly turns on and
does a
full
flush)This description seems really confusing.
My
understanding is
that
marking something as wb-transient-app
indicates
that it
might
be
accessed by something other than our
graphics/media
IP
(i.e.,
accessed from the CPU, exported to another
device,
etc.), so
transient data truly does need to be
flushed at
the
points in
the
driver where a flush typically happens.However when something is _not_ transient,
then
either:
- it's "private" to the GPU and only
our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index
so
that
outside
observers like
the CPU can snoop the device cache,
even
when
the
cache
hasn't been
flushedIf media is not active, then there's really
no
need
to
include
non-transient data when an device cache
flush
happens
since
there's no real need for the data to get to
RAM.
So
that
enables
an optimization (which comes in your nextQuoted 8 lines
Quoted 8 lines
patch),
that
allows
flushes to only operate on the subset of
the
device
cache
tagged as"transient" if media is idle.
Quoted 12 lines
But what If we have stale non-XA marked pages
for
userptr,
and
that
object moves out and at the same time media
comes
back,
will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general,
active
usage,
userptr would
be data that's accessible by the CPU, so it needs
to
either
be
transient (so CPU
can see the data in RAM after explicit flushes)
or it
needs
to be
using a
coherent PAT (so that the CPU can just snoop the
GPU
cache).
If
you marked
userptr as both non-XA and non-coherent, then
that
sounds
likely to
be a
userspace bug (and probably something we can
catch
and
rejectQuoted 8 lines
as an
invalid
case on any Xe3p or later platforms that support
this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 8 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either
coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the
kernel
expects
either 1WAY or 2WAY for the @pat_index."Quoted 5 lines
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing
GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't*
necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush
the
entire
cache anymore. Whenever the GuC determines that media is
inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc.
change
behavior to only flush out the subset of data that was marked
as
app-transient; anything not marked that way doesn't get flushed
now. So
there's a new requirement here that you ensure you're using
an
XA
PAT
index, or you switch to use 2-way coherency which will allow
the
CPU to
snoop the GPU's caches.Quoted 6 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have
2-way
coherency with DGFX?Quoted 12 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu,
Media is coherent with l2/l3, but also I don't think system memory
can
be cached in l2/l3 (only VRAM), which I assume is why there is
the
special SMRO (system-memory-read-only) cache only on dgpu, which
is
flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 11 lines
Quoted 5 lines
It sounds like the same PAT restriction is needed also for imported
dma-buf, right?Good point. Looks like we are missing that still. Otherwise we
can
run
into the same issues with stale l2/l3/ppc.Quoted 6 lines
So if this affects only system memory could we instead of relying
on 2-
way coherency or XA, just flush at dma unmap time, because that's
typically just before releasing the pages.Quoted 8 lines
Yeah, I think we could make it work, from security pov, similar to
userptr, with the right manual flushes in KMD. Maybe just a question
if
userspace wants such a model? Anything cached in l2/l3 might require
manual flushing by userspace (if that is even possible)?Quoted 3 lines
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
Yeah, looking at BSpec 74635 (Media off case), I'm only really seeing
MEM_SETwhich userspace could potentially use by itself? But then it's
unclear if they mean to actually clear-the-memory (which is not what we
want) or using the special evict mode, but that seems to be talking more
about flushing to local memory, so not completely sure what that does on
igpu. If it's the evict mode then should in theory be possible for userpace to do a manual flush, but that would have to be done per- bo/vma?Quoted 7 lines
For imported dma-buf kernel requires 2-way or XA for security due to
the relaxed dma-buf unmap.For SVM/System allocator we'd require 2-way or XA.
Quoted 7 lines
Quoted 1 line
Otherwise KMD security is enforced by flush at dma-unmap time?
Yeah, that is my understanding. Otherwise I don't currently see what prevents the dirty non-XA cache lines being flushed at some random point
later, after we have already freed the corresponding system memory, potentially nuking the next user who allocates those pages.
So I've discussed a bit more with Tejas and since the virtual addresses are needed for the flush, flushing at dma-unmap time doesn't really work. And since this is IGFX only, where we sync on moves, a flush in xe_bo_trigger_rebind() should be completely ok, at least until affected DGFX occurs, where we might want to look at async TLB flushes.
And for simplicitly then go for the PAT restriction also for userptr, svm and imported dma-buf.
Thoughts?
Thomas
Quoted 530 lines
Quoted 530 lines
/Thomas
Quoted 526 lines
Quoted 526 lines
The exception, though, is dma-buf where the exporter can actually
release memory before all importers have given up their dma- mappings./Thomas
Quoted 517 lines
Quoted 517 lines
/Thomas
Quoted 512 lines
Quoted 512 lines
Matt
Quoted 506 lines
Quoted 506 lines
Quoted 169 lines
If something happens that changes the GTT mapping
of
an
object,
then
doesn't that already trigger a TLB invalidation
when
necessary in
the driver
today? It was my understanding that "heavy" TLB
invalidations wait
for data
values to be globally observable before starting,
so
I
think
that
would ensure
that any non-XA data makes it to RAM before any
binding
changes,
object,
destruction, etc.? Is there something special
about
userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an
overview
of
the
various flush
and invalidate cases, and I don't see anything
there
that
makes it
obvious to
me that userptr would be special.Quoted 37 lines
Quoted 37 lines
As you said, we eventually do want to force
a
flush
of
the
non-transient data as well once we're
freeing
the
underlying
pages.
So how do we do that? It's not clear to me
how
the
changes
below
are accomplishing that. Is there a way to
explicitly
request
a
full device cache flush (ignoring the
transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in
the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thought
thereQuoted 8 lines
Quoted 8 lines
might
be
some kind of GuC interface to request
"please
do
one
full
flush now, evenif media is idle."
Quoted 13 lines
Quoted 13 lines
I’m not an expert here by any means, but
everything
above
from
Matt
seems like valid concerns. Thomas also raised
some
concerns in
the
two previous revisions; again I’m not an
expert,Quoted 8 lines
Quoted 8 lines
but
reading
through
those, it doesn’t really seem like he
received
proper
answers
to hisquestions.
Quoted 4 lines
Its forcing flush via tlb invalidation PPC flag
underxe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's
another
new
synonym
for the
device cache? It's already really confusing that
some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same
device
cache
for
historical
reasons...Matt
Quoted 32 lines
Quoted 32 lines
A couple of comments below.
Matt
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3
++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3 ++-
4 files changed, 28 insertions(+), 2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evi
ct(vQuoted 8 lines
Quoted 8 lines
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ continue
;Matt R,
This flush will be still needed as there can be
non-xa
buffers
which
can be evicted while media was off and stale
entries
can be
flushed
when media comes back on. Which was not case
earlier as
full
flush
was happening at regular sync points and that’s
where
this
feature is
bringing optimization now.Tejas
Quoted 303 lines
Quoted 40 lines
Quoted 40 lines
This will trigger a TLB invalidation (and I
assume a
cache
flush)
every time we move or free memory in the 3D
stack
if
it
has a
binding. It also performs a synchronous wait
on
the
BO
being
idle.
Both of these are very expensive operations.
I
can’t
imagine
the
granularity we want here is to do this on
every
move/free
with
bindings.Also, for LR compute with preempt fences, we
would
trigger the
preempt fences during the wait, so a TLB
invalidation
after
this
seems unnecessary, though perhaps the cache
flush
is
still
required?Quoted 9 lines
Quoted 9 lines
I think this needs a bit more explanation,
because
without
knowing a
lot about the exact requirements, the
implementation
does
not
lookcorrect.
Quoted 6 lines
The thing is that we are trying to solve
problem
with
userptr
with non-XApat, consider if that BO got moved while media is
not
active.
As
soon as media
will come back active, stale cached entries of
that
object
will be
flushed as part
of full flush , which may corrupt things.Quoted 5 lines
There was thinking that with this patch we
would at
least
solve
the problemof corruption and later when
page_reclamation
feature
comes
in will
help in
performance as well. But now when page
reclamation
feature is
merged earlier
and it tightly coupled with bind/unbind some
cases
like
discussed
above
(which are not doing unbind immediately on
move/free)
are
missed in
reclamation.Quoted 6 lines
So thought was to let this solution go in with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner
solution
together.Quoted 64 lines
Tejas
Quoted 62 lines
}
if (!idle) {
diff --git
a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device
*xe)
}
}+/**
+ * xe_device_needs_cache_flush - Whether
the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs
cache
flush,
false
otherwise.
+ */
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {
+ /* XA is *always* flushed, like
at
the
end-
of-
submssion (and
+maybe
other
+ * places), just that internally
as
an
optimisation hw doesn't
+need to
make
+ * that a full flush (which will
also
include XA)
when Media is
+ * off/powergated, since it
doesn't
need
to
worry
about GT
+caches vs
MediaQuoted 5 lines
Quoted 5 lines
+ * coherency, and only CPU vs
GPU
coherency,
so
can makethat
Quoted 122 lines
Quoted 122 lines
+flush
a
+ * targeted XA flush, since
stuff
tagged
with XA
now means
+it's shared
with
+ * the CPU. The main implication
is
that
we
now
need to
+somehow
flush non-XA before
+ * freeing system memory pages,
otherwise
dirty
cachelines
+could be
flushed after the free
+ * (like if Media suddenly turns
on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct
xe_device
*xe)
{
struct xe_gt *gt;
diff --git
a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64
xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64
xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct
xe_device
*xe);
void
xe_device_l2_flush(struct xe_device *xe);diff --git
a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm
*vm, struct xe_userptr_vma *uv
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm) ||
+xe_device_needs_cache_flush(vm-
xe)) &&
+ userptr->initial_bind) {Same concern with the LR preempt fence as
above —
the
hardware
will
be interrupted via preempt fences, so it
doesn’t
seem
necessary
to
invalidate the TLBs but perhaps we need a
cflush
and
TLB
invalidation is the mechanism for that too?Matt
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 435 lines · Thomas Hellström
Quoted 420 lines · Matthew Auld
Quoted 395 lines · Thomas Hellström
Quoted 385 lines · Matthew Auld
Quoted 377 lines · Thomas Hellström
Quoted 349 lines · Matthew Auld
Quoted 341 lines · Thomas Hellström
Quoted 340 lines · Matthew Auld
Quoted 338 lines · Matt Roper
Quoted 300 lines · Jose
Quoted 282 lines · Tejas
Quoted 273 lines
-----Original Message-----
From: Roper, Matthew D
<[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>;
[email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush
userptr/shrinker bo
cachelines manuallyOn Wed, Feb 11, 2026 at 07:06:05PM +0000,
Upadhyay,
TejasQuoted 30 lines · wrote:
-----Original Message-----
From: Brost, Matthew
<[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D
<[email protected]>
Cc: Upadhyay, Tejas
<[email protected]>;
intel-
[email protected]; Auld, Matthew
<[email protected]>;
[email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg:
flush
userptr/shrinker bo
cachelines manuallyOn Tue, Feb 10, 2026 at 01:05:25PM -0800,
Matt
Roper
wrote:
On Tue, Feb 10, 2026 at 06:21:22PM +0530,
Tejas
Upadhyay
wrote:
"eXtended Architecture" (XA) tagged
memory—memory
sharedbetween
Quoted 69 lines
the
CPU and GPUI'm pretty sure this expansion of "XA" is
wrong;
where
are
you
seeing this definition? Everything in the
bspec
indicates
that XA
means "wb
- transient app" (similar to how "XD" is
'wb -
transient
display").
I'm not sure why exactly they picked "X" to
refer
to
transient in
both of these cases, but I've never seen
any
documentation
that
refers to it as "extended."is treated differently from other GPU
memory
when
the
Media
engine is
power-gated.XA is *always* flushed, like at the end-
of-
submssion
(and
maybe
otherI assume you're referring to the fact that
the
driver
performs
flushes at the end of submission (via
PIPE_CONTROL
or
MI_FLUSH_DW), and that depending on other
state/optimizations
in
the system, those flushes may flush the
entire
device
cache,
or
may only flush the subset of cache data
that is
not
marked as
transient. The way you worded this was
confusing
since
it
makes
it sound like cache flushes happen
automatically
somewhere inhardware/firmware.
Quoted 110 lines
places), just that internally as an
optimisation
hw
doesn't
need
to make that a full flush (which will
also
include
XA) when
Media is off/powergated, since it doesn't
need to
worry
about GT
caches vs Media coherency, and only CPU
vs
GPU
coherency,
so can
make that flush a targeted XA flush,
since
stuff
tagged
with XA
now means it's shared with the CPU. The
main
implication is
that
we now need to somehow flush non-XA
before
freeing
system
memory
pages, otherwise dirty cachelines could
be
flushed
after
the
free (like if Media suddenly turns on and
does a
full
flush)This description seems really confusing.
My
understanding is
that
marking something as wb-transient-app
indicates
that it
might
be
accessed by something other than our
graphics/media
IP
(i.e.,
accessed from the CPU, exported to another
device,
etc.), so
transient data truly does need to be
flushed at
the
points in
the
driver where a flush typically happens.However when something is _not_ transient,
then
either:
- it's "private" to the GPU and only
our
graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index
so
that
outside
observers like
the CPU can snoop the device cache,
even
when
the
cache
hasn't been
flushedIf media is not active, then there's really
no
need
to
include
non-transient data when an device cache
flush
happens
since
there's no real need for the data to get to
RAM.
So
that
enables
an optimization (which comes in your next
patch),
that
allows
flushes to only operate on the subset of
the
device
cache
tagged as"transient" if media is idle.
Quoted 12 lines
But what If we have stale non-XA marked pages
for
userptr,
and
that
object moves out and at the same time media
comes
back,
will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general,
active
usage,
userptr would
be data that's accessible by the CPU, so it needs
to
either
be
transient (so CPU
can see the data in RAM after explicit flushes)
or it
needs
to be
using a
coherent PAT (so that the CPU can just snoop the
GPU
cache).
If
you marked
userptr as both non-XA and non-coherent, then
that
sounds
likely to
be a
userspace bug (and probably something we can
catch
and
rejectQuoted 8 lines
as an
invalid
case on any Xe3p or later platforms that support
this)
since
the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 8 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either
coherent
or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
"Note: For userptr and externally imported dma-buf the
kernel
expects
either 1WAY or 2WAY for the @pat_index."Quoted 5 lines
Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing
GPU
caches
at the end of batch buffers.But isn't that what we're discussing here? 1-way *won't*
necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush
the
entire
cache anymore. Whenever the GuC determines that media is
inactive
and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc.
change
behavior to only flush out the subset of data that was marked
as
app-transient; anything not marked that way doesn't get flushed
now. So
there's a new requirement here that you ensure you're using
an
XA
PAT
index, or you switch to use 2-way coherency which will allow
the
CPU to
snoop the GPU's caches.Quoted 6 lines
Quoted 1 line
That exactly matches my understanding also.
This only ever affects IGFX, right? Since AFAIU we don't have
2-way
coherency with DGFX?Quoted 12 lines
Yeah, this should be igpu only. I seem to also recall that on dgpu,
Media is coherent with l2/l3, but also I don't think system memory
can
be cached in l2/l3 (only VRAM), which I assume is why there is
the
special SMRO (system-memory-read-only) cache only on dgpu, which
is
flushed when the fence signals, unlike the l2/l3.Yes that sounds reasonable.
Quoted 11 lines
Quoted 5 lines
It sounds like the same PAT restriction is needed also for imported
dma-buf, right?Good point. Looks like we are missing that still. Otherwise we
can
run
into the same issues with stale l2/l3/ppc.Quoted 6 lines
So if this affects only system memory could we instead of relying
on 2-
way coherency or XA, just flush at dma unmap time, because that's
typically just before releasing the pages.Quoted 8 lines
Yeah, I think we could make it work, from security pov, similar to
userptr, with the right manual flushes in KMD. Maybe just a question
if
userspace wants such a model? Anything cached in l2/l3 might require
manual flushing by userspace (if that is even possible)?Quoted 3 lines
So that would mean if user-space wants gpu-cpu coherency at fence synchronization points, they'd have to use either 2-way or XA pat indices, but not enforced by KMD.
Yeah, looking at BSpec 74635 (Media off case), I'm only really seeing
MEM_SETwhich userspace could potentially use by itself? But then it's
unclear if they mean to actually clear-the-memory (which is not what we
want) or using the special evict mode, but that seems to be talking more
about flushing to local memory, so not completely sure what that does on
igpu. If it's the evict mode then should in theory be possible for userpace to do a manual flush, but that would have to be done per- bo/vma?Quoted 7 lines
For imported dma-buf kernel requires 2-way or XA for security due to
the relaxed dma-buf unmap.For SVM/System allocator we'd require 2-way or XA.
Quoted 7 lines
Quoted 1 line
Otherwise KMD security is enforced by flush at dma-unmap time?
Yeah, that is my understanding. Otherwise I don't currently see what prevents the dirty non-XA cache lines being flushed at some random point
later, after we have already freed the corresponding system memory, potentially nuking the next user who allocates those pages.So I've discussed a bit more with Tejas and since the virtual addresses are needed for the flush, flushing at dma-unmap time doesn't really work. And since this is IGFX only, where we sync on moves, a flush in
xe_bo_trigger_rebind()should be completely ok, at least until affected DGFX occurs, where we might want to look at async TLB flushes.
Quoted 4 lines
And for simplicitly then go for the PAT restriction also for userptr, svm and imported dma-buf.
Thoughts?
Yeah agreed, I think that should be good enough and will hopefully cover all the missing cases.
Otherwise maybe we could somehow use a known dummy address range from the migrate vm or something, and use that to flush the PPC from unmap? I assume the address range doesn't actually matter if we just care about flushing entire PPC?
There is also the xe_page_reclaim stuff for a targeted flush instead of nuking entire PPC, which doesn't seem to need ppgtt virtual address, just a list of physical page addresses, which will be a lot better for the smaller BOs. But maybe this is more follow up stuff.
Quoted 533 lines
Thomas
Quoted 530 lines
Quoted 530 lines
/Thomas
Quoted 526 lines
Quoted 526 lines
The exception, though, is dma-buf where the exporter can actually
release memory before all importers have given up their dma- mappings./Thomas
Quoted 517 lines
Quoted 517 lines
/Thomas
Quoted 512 lines
Quoted 512 lines
Matt
Quoted 506 lines
Quoted 506 lines
Quoted 169 lines
If something happens that changes the GTT mapping
of
an
object,
then
doesn't that already trigger a TLB invalidation
when
necessary in
the driver
today? It was my understanding that "heavy" TLB
invalidations wait
for data
values to be globally observable before starting,
so
I
think
that
would ensure
that any non-XA data makes it to RAM before any
binding
changes,
object,
destruction, etc.? Is there something special
about
userptr
that
makes that
case more of a problem?I just found bspec page 74635 which gives an
overview
of
the
various flush
and invalidate cases, and I don't see anything
there
that
makes it
obvious to
me that userptr would be special.Quoted 45 lines
As you said, we eventually do want to force
a
flush
of
the
non-transient data as well once we're
freeing
the
underlying
pages.
So how do we do that? It's not clear to me
how
the
changes
below
are accomplishing that. Is there a way to
explicitly
request
a
full device cache flush (ignoring the
transient
vs
non-
transient tagging)?
Since the GuC handles the optimization in
the
next
patch
(toggling
whether flushes are full flushes vs non-
transient
flushes
depending on whether media is active), I
thought
there
might
be
some kind of GuC interface to request
"please
do
one
full
flush now, evenif media is idle."
Quoted 21 lines
I’m not an expert here by any means, but
everything
above
from
Matt
seems like valid concerns. Thomas also raised
some
concerns in
the
two previous revisions; again I’m not an
expert,
but
reading
through
those, it doesn’t really seem like he
received
proper
answers
to hisquestions.
Quoted 4 lines
Its forcing flush via tlb invalidation PPC flag
under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's
another
new
synonym
for the
device cache? It's already really confusing that
some of
our
hardware docs use
a mix of both "L2" and "L3" to refer to the same
device
cache
for
historical
reasons...Matt
Quoted 32 lines
A couple of comments below.
Matt
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3
++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_userptr.c | 3 ++-
4 files changed, 28 insertions(+), 2
deletions(-)diff --git a/drivers/gpu/drm/xe/xe_bo.c
b/drivers/gpu/drm/xe/xe_bo.c index
e9180b01a4e4..4455886b211e
100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -689,7 +689,8 @@ static int
xe_bo_trigger_rebind(struct
xe_device *xe, struct xe_bo *bo,Quoted 12 lines
Quoted 12 lines
if
(!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evi
ct(v
m_bo
,
true);
- continue;
+ if
(!xe_device_needs_cache_flush(xe))
+ continue
;Matt R,
This flush will be still needed as there can be
non-xa
buffers
which
can be evicted while media was off and stale
entries
can be
flushed
when media comes back on. Which was not case
earlier as
full
flush
was happening at regular sync points and that’s
where
this
feature is
bringing optimization now.Tejas
Quoted 303 lines
Quoted 49 lines
This will trigger a TLB invalidation (and I
assume a
cache
flush)
every time we move or free memory in the 3D
stack
if
it
has a
binding. It also performs a synchronous wait
on
the
BO
being
idle.
Both of these are very expensive operations.
I
can’t
imagine
the
granularity we want here is to do this on
every
move/free
with
bindings.Also, for LR compute with preempt fences, we
would
trigger the
preempt fences during the wait, so a TLB
invalidation
after
this
seems unnecessary, though perhaps the cache
flush
is
still
required?I think this needs a bit more explanation,
because
without
knowing a
lot about the exact requirements, the
implementation
does
not
lookcorrect.
Quoted 6 lines
The thing is that we are trying to solve
problem
with
userptr
with non-XApat, consider if that BO got moved while media is
not
active.
As
soon as media
will come back active, stale cached entries of
that
object
will be
flushed as part
of full flush , which may corrupt things.Quoted 5 lines
There was thinking that with this patch we
would at
least
solve
the problemof corruption and later when
page_reclamation
feature
comes
in will
help in
performance as well. But now when page
reclamation
feature is
merged earlier
and it tightly coupled with bind/unbind some
cases
like
discussed
above
(which are not doing unbind immediately on
move/free)
are
missed in
reclamation.Quoted 6 lines
So thought was to let this solution go in with
little
perf
hit
and discuss withpage reclamation owner to come with cleaner
solution
together.Quoted 69 lines
Tejas
}
if (!idle) {
diff --git
a/drivers/gpu/drm/xe/xe_device.c
b/drivers/gpu/drm/xe/xe_device.c index
743c18e0c580..da2abed94bc0
100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1097,6 +1097,29 @@ static void
tdf_request_sync(struct
xe_device
*xe)
}
}+/**
+ * xe_device_needs_cache_flush - Whether
the
cache
needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs
cache
flush,
false
otherwise.
+ */
+bool xe_device_needs_cache_flush(struct
xe_device
*xe) {
+ /* XA is *always* flushed, like
at
the
end-
of-
submssion (and
+maybe
other
+ * places), just that internally
as
an
optimisation hw doesn't
+need to
make
+ * that a full flush (which will
also
include XA)
when Media is
+ * off/powergated, since it
doesn't
need
to
worry
about GT
+caches vs
Media
+ * coherency, and only CPU vs
GPU
coherency,
so
can makethat
Quoted 127 lines
+flush
a
+ * targeted XA flush, since
stuff
tagged
with XA
now means
+it's shared
with
+ * the CPU. The main implication
is
that
we
now
need to
+somehow
flush non-XA before
+ * freeing system memory pages,
otherwise
dirty
cachelines
+could be
flushed after the free
+ * (like if Media suddenly turns
on
and
does
a
full flush)
+ */
+ if (GRAPHICS_VER(xe) >= 35 &&
!IS_DGFX(xe))
+ return true;
+ return false;
+}
+
void xe_device_l2_flush(struct
xe_device
*xe)
{
struct xe_gt *gt;
diff --git
a/drivers/gpu/drm/xe/xe_device.h
b/drivers/gpu/drm/xe/xe_device.h index
39464650533b..baf386e0e037
100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -184,6 +184,7 @@ void
xe_device_snapshot_print(struct
xe_device *xe, struct drm_printer *p);
u64
xe_device_canonicalize_addr(struct
xe_device
*xe, u64
address);
u64
xe_device_uncanonicalize_addr(struct
xe_device
*xe,
u64
address);+bool xe_device_needs_cache_flush(struct
xe_device
*xe);
void xe_device_td_flush(struct
xe_device
*xe);
void
xe_device_l2_flush(struct xe_device *xe);diff --git
a/drivers/gpu/drm/xe/xe_userptr.c
b/drivers/gpu/drm/xe/xe_userptr.c index
e120323c43bc..b435ea7f9b66
100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -114,7 +114,8 @@ static void
__vma_userptr_invalidate(struct
xe_vm
*vm, struct xe_userptr_vma *uvfalse,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);- if (xe_vm_in_fault_mode(vm) &&
userptr-
initial_bind) {
+ if ((xe_vm_in_fault_mode(vm) ||
+xe_device_needs_cache_flush(vm-
xe)) &&
+ userptr->initial_bind) {Same concern with the LR preempt fence as
above —
the
hardware
will
be interrupted via preempt fences, so it
doesn’t
seem
necessary
to
invalidate the TLBs but perhaps we need a
cflush
and
TLB
invalidation is the mechanism for that too?Matt
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
In reply to Matt RoperQuoted 193 lines · Matt Roper
Quoted 184 lines · Jose
Quoted 175 lines · Tejas
Quoted 166 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 5 lines
Quoted 5 lines · Matt Roper
Quoted 4 lines
Quoted 2 lines · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory
sharedbetween
Quoted 29 lines
Quoted 29 lines
the
Quoted 21 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are
you
seeing this definition? Everything in the bspec indicates
that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation
that
refers to it as "extended."Quoted 3 lines
is treated differently from other GPU memory when the Media
engine ispower-gated.
Quoted 6 lines
Quoted 5 lines
XA is *always* flushed, like at the end-of-submssion (and
maybe
otherQuoted 16 lines
Quoted 8 lines
Quoted 8 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations
in
the system, those flushes may flush the entire device cache,Quoted 8 lines
Quoted 8 lines
or
may only flush the subset of cache data that is not marked as
transient. The way you worded this was confusing since it
makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 52 lines
Quoted 52 lines
Quoted 52 lines
Quoted 16 lines
places), just that internally as an optimisation hw doesn't
need
to make that a full flush (which will also include XA) when
Media is off/powergated, since it doesn't need to worry about GT
caches vs Media coherency, and only CPU vs GPU coherency,
so can
make that flush a targeted XA flush, since stuff tagged with XA
now means it's shared with the CPU. The main implication is
thatQuoted 8 lines
we now need to somehow flush non-XA before freeing system
memory
pages, otherwise dirty cachelines could be flushed after
the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is
that
marking something as wb-transient-app indicates that it might
be
accessed by something other than our graphics/media IP (i.e.,
accessed from the CPU, exported to another device, etc.), so
transient data truly does need to be flushed at the points in
the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP
will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache
hasn't been
flushedQuoted 10 lines
Quoted 10 lines
Quoted 10 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since
there's no real need for the data to get to RAM. So that enables
an optimization (which comes in your next patch), that allows
flushes to only operate on the subset of the device cache tagged as"transient" if media is idle.
Quoted 8 lines
But what If we have stale non-XA marked pages for userptr, and
that
object moves out and at the same time media comes back, will end
up in
full flush and flush the stale entry to RAM.What makes userptr special here? During general, active usage, userptr would
be data that's accessible by the CPU, so it needs to either be transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be
using a
coherent PAT (so that the CPU can just snoop the GPU cache). If
you marked
userptr as both non-XA and non-coherent, then that sounds likely toQuoted 8 lines
be a
userspace bug (and probably something we can catch and reject as an
invalid
case on any Xe3p or later platforms that support this) since the
CPU wouldn't
have any reliable way of seeing GPU updates.Quoted 6 lines
Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA
pat index, or else KMD will reject as invalid case.The coherency restriction is already in the uAPI:
Quoted 7 lines
"Note: For userptr and externally imported dma-buf the kernel expects
either 1WAY or 2WAY for the @pat_index."Using 1 way is enough as Xe KMD does a
PIPE_CONTROLflushing GPU caches
at the end of batch buffers.
Quoted 14 lines
But isn't that what we're discussing here? 1-way *won't* necessarily be
enough anymore becausePIPE_CONTROLinstructions don't flush the entire
cache anymore. Whenever the GuC determines that media is inactive and
activates the optimization,PIPE_CONTROL,MI_FLUSH_DW, etc. change behavior to only flush out the subset of data that was marked as app-transient; anything not marked that way doesn't get flushed now. So
there's a new requirement here that you ensure you're using an XA PAT index, or you switch to use 2-way coherency which will allow the CPU to
snoop the GPU's caches.
Ah okay.
Mesa is using using PAT 19 in Gfx 35, that is 1-way coherency + Transient.
Quoted 348 lines
Matt
Quoted 344 lines
Quoted 344 lines
Quoted 116 lines
If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in
the driver
today? It was my understanding that "heavy" TLB invalidations wait
for data
values to be globally observable before starting, so I think that
would ensure
that any non-XA data makes it to RAM before any binding changes,
object,
destruction, etc.? Is there something special about userptr that
makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it
obvious to
me that userptr would be special.Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
As you said, we eventually do want to force a flush of the
non-transient data as well once we're freeing the underlying
pages.
So how do we do that? It's not clear to me how the changes
below
are accomplishing that. Is there a way to explicitly request
a
full device cache flush (ignoring the transient vs non- transient tagging)?Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might
be
some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from
Matt
seems like valid concerns. Thomas also raised some concerns in
the
two previous revisions; again I’m not an expert, but reading
through
those, it doesn’t really seem like he received proper answers
to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym
for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for
historical
reasons...Matt
Quoted 30 lines
Quoted 30 lines
A couple of comments below.
Quoted 26 lines
Matt
Quoted 23 lines
V2(MattA): Expand commit description
Signed-off-by: Tejas Upadhyay
<[email protected]>
---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static intxe_bo_trigger_rebind(struct
xe_device*xe, structxe_bo*bo,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_bo.c
Quoted 7 lines
if (!xe_vm_in_fault_mode(vm)) {
drm_gpuvm_bo_evict(vm_bo,
true);drivers/gpu/drm/xe/xe_bo.c +1
-1-continue ; + if(!xe_device_needs_cache_flush(xe))
drivers/gpu/drm/xe/xe_bo.c +1
-0+continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which
can be evicted while media was off and stale entries can be flushed
when media comes back on. Which was not case earlier as full flush
was happening at regular sync points and that’s where this feature is
bringing optimization now.Tejas
Quoted 207 lines
Quoted 22 lines
Quoted 22 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a
binding. It also performs a synchronous wait on the BO being
idle.
Both of these are very expensive operations. I can’t imagine
the
granularity we want here is to do this on every move/free with
bindings.Also, for LR compute with preempt fences, we would trigger the
preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?Quoted 5 lines
Quoted 5 lines
I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not
lookcorrect.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As
soon as media
will come back active, stale cached entries of that object will be
flushed as part
of full flush , which may corrupt things.Quoted 3 lines
There was thinking that with this patch we would at least solve
the problemof corruption and later when
page_reclamationfeature comes in will
help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed
above
(which are not doing unbind immediately on move/free) are missed in
reclamation.Quoted 4 lines
So thought was to let this solution go in with little perf hit
and discuss withpage reclamation owner to come with cleaner solution together.
Quoted 47 lines
Tejas
Quoted 45 lines
Quoted 13 lines
Quoted 11 lines
}
if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static voidQuoted 2 lines
tdf_request_sync(struct
xe_device*xe)
Quoted 18 lines
Quoted 16 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs
to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */
+boolxe_device_needs_cache_flush(struct xe_device *xe){drivers/gpu/drm/xe/xe_device.c +1
-0+/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA)
when Media isdrivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry
about GT
+caches vsMedia
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so
can makethat
Quoted 88 lines
Quoted 88 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA
now means
+it's sharedwith
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now
need to
+somehowflush non-XA before
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty
cachelines
+could beflushed after the free
Quoted 32 lines
Quoted 32 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ voidxe_device_snapshot_print(struct
xe_device*xe, structdrm_printer*p);
u64 xe_device_canonicalize_addr(structxe_device*xe, u64
address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe,
u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe);
voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware
will
be interrupted via preempt fences, so it doesn’t seem necessary
to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Thomas Hellström
maintainerRe: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
In reply to Upadhyay, TejasQuoted 252 lines · Tejas
Quoted 123 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 14 lines · Tejas
Quoted 14 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo
cachelines manuallyQuoted 4 lines
Quoted 4 lines · Matt Roper
Quoted 3 lines
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 24 lines
Quoted 24 lines
the
Quoted 17 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you
seeing this definition? Everything in the bspec indicates that XA
means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in
both of these cases, but I've never seen any documentation that
refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 5 lines
Quoted 4 lines
XA is *always* flushed, like at the end-of-submssion (and maybe
otherQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
I assume you're referring to the fact that the driver performs
flushes at the end of submission (viaPIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in
the system, those flushes may flush the entire device cache, or
may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes
it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Quoted 10 lines
places), just that internally as an optimisation hw doesn't need
to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT
caches vs Media coherency, and only CPU vs GPU coherency, so can
make that flush a targeted XA flush, since stuff tagged with XAQuoted 8 lines
now means it's shared with the CPU. The main implication is that
we now need to somehow flush non-XA before freeing system memory
pages, otherwise dirty cachelines could be flushed after the
free (like if Media suddenly turns on and does a full flush)This description seems really confusing. My understanding is that
marking something as wb-transient-app indicates that it might be
accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the
driver where a flush typically happens.However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache hasn't been
flushedQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
If media is not active, then there's really no need to include
non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables
an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as"transient" if media is idle.
Quoted 6 lines
But what If we have stale non-XA marked pages for userptr, and that
object moves out and at the same time media comes back, will end up in
full flush and flush the stale entry to RAM.Quoted 15 lines
What makes userptr special here? During general, active usage, userptr would
be data that's accessible by the CPU, so it needs to either be transient (so CPU
can see the data in RAM after explicit flushes) or it needs to be using a
coherent PAT (so that the CPU can just snoop the GPU cache). If you marked
userptr as both non-XA and non-coherent, then that sounds likely to be a
userspace bug (and probably something we can catch and reject as an invalid
case on any Xe3p or later platforms that support this) since the CPU wouldn't
have any reliable way of seeing GPU updates.Right. FYI @Mrozek, Michal @Souza, Jose
For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.Quoted 95 lines
If something happens that changes the GTT mapping of an object, then
doesn't that already trigger a TLB invalidation when necessary in the driver
today? It was my understanding that "heavy" TLB invalidations wait for data
values to be globally observable before starting, so I think that would ensure
that any non-XA data makes it to RAM before any binding changes, object,
destruction, etc.? Is there something special about userptr that makes that
case more of a problem?I just found bspec page 74635 which gives an overview of the various flush
and invalidate cases, and I don't see anything there that makes it obvious to
me that userptr would be special.Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below
are accomplishing that. Is there a way to explicitly request a
full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling
whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be
some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt
seems like valid concerns. Thomas also raised some concerns in the
two previous revisions; again I’m not an expert, but reading through
those, it doesn’t really seem like he received proper answers to hisquestions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the
device cache? It's already really confusing that some of our hardware docs use
a mix of both "L2" and "L3" to refer to the same device cache for historical
reasons...Matt
Quoted 28 lines
Quoted 28 lines
A couple of comments below.
Quoted 24 lines
Matt
Quoted 21 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode(vm)) { drm_gpuvm_bo_evict(vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.
Quoted 1 line
Tejas
This flush would effecively eliminate any asynchronous migration, so again if this is only affecting IGFX we're synchronizing on shrinking anyway, but in general I think we should avoid synchronizing here.
Could this instead be done asynchronously similar to how we flush TLB? so it would be part of the migration fence?
/Thomas
Quoted 180 lines
Quoted 180 lines
Quoted 18 lines
Quoted 18 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the
granularity we want here is to do this on every move/free with bindings.Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this
seems unnecessary, though perhaps the cache flush is still required?Quoted 4 lines
Quoted 4 lines
I think this needs a bit more explanation, because without knowing a
lot about the exact requirements, the implementation does not lookcorrect.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media
will come back active, stale cached entries of that object will be flushed as part
of full flush , which may corrupt things.Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in
performance as well. But now when page reclamation feature is merged earlier
and it tightly coupled with bind/unbind some cases like discussed above
(which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 36 lines
Tejas
Quoted 34 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 16 lines
Quoted 14 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */drivers/gpu/drm/xe/xe_device.c +2
-0+bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make
that
Quoted 79 lines
Quoted 79 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means
+it's sharedwith
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to
+somehowflush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines
+could beflushed after the free
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){
structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64
xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe, u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe); voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 9 lines
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will
be interrupted via preempt fences, so it doesn’t seem necessary to
invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);
XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
RE: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
Quoted 220 lines
-----Original Message-----
From: Thomas Hellström <[email protected]>
Sent: 16 February 2026 16:27
To: Upadhyay, Tejas <[email protected]>; Roper, Matthew D <[email protected]>; Mrozek, Michal <[email protected]>; Souza, Jose <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 206 lines · Tejas
Quoted 100 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 12 February 2026 02:41
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 12 lines · Tejas
Quoted 12 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 4 lines
Quoted 4 lines · Matt Roper
Quoted 3 lines
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared
between
Quoted 19 lines
Quoted 19 lines
the
Quoted 13 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display").
I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 2 lines
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 4 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere inhardware/firmware.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 12 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full
flush)This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be
accessing it
- it's bound with a coherent PAT index so that outside observers like
the CPU can snoop the device cache, even when the cache hasn't been
flushedQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
If media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as
"transient" if media is idle.
Quoted 4 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
Quoted 9 lines
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
Right. FYI @Mrozek, Michal @Souza, Jose For userptr, as explained above, it needs to be either coherent or XA pat index, or else KMD will reject as invalid case.
Quoted 78 lines
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages.
So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non- transient tagging)?
Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, evenif media is idle."
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his
questions.
Quoted 3 lines
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Matt
Quoted 28 lines
Quoted 28 lines
A couple of comments below.
Quoted 24 lines
Matt
Quoted 21 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>---
drivers/gpu/drm/xe/xe_bo.c | 3 ++-
drivers/gpu/drm/xe/xe_device.c | 23
+++++++++++++++++++++++
drivers/gpu/drm/xe/xe_device.h | 1 +drivers/gpu/drm/xe/xe_userptr.c| 3 ++-4 files changed, 28 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_bo.cindexe9180b01a4e4..4455886b211e
100644drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct · line 695
Quoted 6 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode(vm)) { drm_gpuvm_bo_evict(vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;Matt R,
This flush will be still needed as there can be non-xa buffers which can be evicted while media was off and stale entries can be flushed when media comes back on. Which was not case earlier as full flush was happening at regular sync points and that’s where this feature is bringing optimization now.
Quoted 8 lines
Quoted 1 line
Tejas
This flush would effecively eliminate any asynchronous migration, so again if this is only affecting IGFX we're synchronizing on shrinking anyway, but in general I think we should avoid synchronizing here.
Could this instead be done asynchronously similar to how we flush TLB? so it would be part of the migration fence?
How to make sure or know when media comes on and do full flush? because deferring or async flush would have same risk right?
Tejas
Quoted 173 lines
/Thomas
Quoted 170 lines
Quoted 170 lines
Quoted 11 lines
Quoted 11 lines
This will trigger a TLB invalidation (and I assume a cache flush)
every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle.
Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.Quoted 8 lines
Quoted 8 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look
correct.
Quoted 3 lines
The thing is that we are trying to solve problem with userptr with non-XA
pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
Quoted 2 lines
There was thinking that with this patch we would at least solve the problem
of corruption and later when
page_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.Quoted 3 lines
So thought was to let this solution go in with little perf hit and discuss with
page reclamation owner to come with cleaner solution together.
Quoted 36 lines
Tejas
Quoted 34 lines
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0
100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(structQuoted 1 line
xe_device*xe)
Quoted 16 lines
Quoted 14 lines
}
}+/**
+ *xe_device_needs_cache_flush- Whether the cache needs to be
+flushed
+ * @xe: The device to check.
+ *
+ * Return: true if the device needs cache flush, false otherwise.
+ */drivers/gpu/drm/xe/xe_device.c +2
-0+bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of- Quoted 2 lines
submssion (and
+maybeother
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't
+need tomake
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* that a full flush (which will also include XA) when Media is
drivers/gpu/drm/xe/xe_device.c +1
-0+* off/powergated, since it doesn't need to worry about GT
+caches vsMedia
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make
that
Quoted 76 lines
Quoted 76 lines
Quoted 1 line
Quoted 1 line
+flush
a
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means
+it's sharedwith
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to
+somehowflush non-XA before
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines
+could beflushed after the free
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+* (like if Media suddenly turns on and does a full flush)
drivers/gpu/drm/xe/xe_device.c +6
-0+*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void
xe_device_l2_flush(struct xe_device *xe){ structxe_gt*gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037
100644drivers/gpu/drm/xe/xe_device.h +0
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64
xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
u64 xe_device_uncanonicalize_addr(structxe_device*xe, u64
address);+bool
xe_device_needs_cache_flush(struct xe_device *xe); voidxe_device_td_flush(struct xe_device *xe); voidxe_device_l2_flush(struct xe_device *xe);Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66
100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void__vma_userptr_invalidate(struct
xe_vm*vm, struct
xe_userptr_vma*uvQuoted 10 lines
drivers/gpu/drm/xe/xe_userptr.c
Quoted 8 lines
false,
MAX_SCHEDULE_TIMEOUT);
XE_WARN_ON(err <= 0);drivers/gpu/drm/xe/xe_userptr.c +0
-1- if (xe_vm_in_fault_mode(vm) && userptr-Quoted 1 line
initial_bind) {drivers/gpu/drm/xe/xe_userptr.c +2
-0+ if ((xe_vm_in_fault_mode(vm) || +xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 7 lines
Quoted 6 lines
err =
xe_vm_invalidate_vma(vma);XE_WARN_ON(err);
}
--
2.52.0Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
In reply to Matt RoperQuoted 74 lines · Matt Roper
Quoted 69 lines · Tejas
Quoted 25 lines
-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: 11 February 2026 05:32
To: Roper, Matthew D <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 1/3] drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manuallyQuoted 2 lines · Matt Roper
Quoted 1 line · Tejas Upadhyay
"eXtended Architecture" (XA) tagged memory—memory shared between
the
Quoted 9 lines
Quoted 1 line
CPU and GPU
I'm pretty sure this expansion of "XA" is wrong; where are you seeing this definition? Everything in the bspec indicates that XA means "wb
- transient app" (similar to how "XD" is 'wb - transient display"). I'm not sure why exactly they picked "X" to refer to transient in both of these cases, but I've never seen any documentation that refers to it as "extended."Quoted 43 lines
Quoted 1 line
Quoted 1 line
is treated differently from other GPU memory when the Media engine is
power-gated.
Quoted 41 lines
Quoted 3 lines
XA is *always* flushed, like at the end-of-submssion (and maybe other
I assume you're referring to the fact that the driver performs flushes at the end of submission (via
PIPE_CONTROLorMI_FLUSH_DW), and that depending on other state/optimizations in the system, those flushes may flush the entire device cache, or may only flush the subset of cache data that is not marked as transient. The way you worded this was confusing since it makes it sound like cache flushes happen automatically somewhere in hardware/firmware.Quoted 9 lines
places), just that internally as an optimisation hw doesn't need to make that a full flush (which will also include XA) when Media is off/powergated, since it doesn't need to worry about GT caches vs Media coherency, and only CPU vs GPU coherency, so can make that flush a targeted XA flush, since stuff tagged with XA now means it's shared with the CPU. The main implication is that we now need to somehow flush non-XA before freeing system memory pages, otherwise dirty cachelines could be flushed after the free (like if Media suddenly turns on and does a full flush)
This description seems really confusing. My understanding is that marking something as wb-transient-app indicates that it might be accessed by something other than our graphics/media IP (i.e., accessed from the CPU, exported to another device, etc.), so transient data truly does need to be flushed at the points in the driver where a flush typically happens.
However when something is _not_ transient, then either:
- it's "private" to the GPU and only our graphics/media IP will be accessing it
- it's bound with a coherent PAT index so that outside observers like the CPU can snoop the device cache, even when the cache hasn't been flushedIf media is not active, then there's really no need to include non-transient data when an device cache flush happens since there's no real need for the data to get to RAM. So that enables an optimization (which comes in your next patch), that allows flushes to only operate on the subset of the device cache tagged as "transient" if media is idle.
Quoted 3 lines
But what If we have stale non-XA marked pages for userptr, and that object moves out and at the same time media comes back, will end up in full flush and flush the stale entry to RAM.
Quoted 9 lines
What makes userptr special here? During general, active usage, userptr would be data that's accessible by the CPU, so it needs to either be transient (so CPU can see the data in RAM after explicit flushes) or it needs to be using a coherent PAT (so that the CPU can just snoop the GPU cache). If you marked userptr as both non-XA and non-coherent, then that sounds likely to be a userspace bug (and probably something we can catch and reject as an invalid case on any Xe3p or later platforms that support this) since the CPU wouldn't have any reliable way of seeing GPU updates.
Yes, we have always rejected coh_none + useptr, if someone tries that with vm_bind.
My understanding is that you can now no longer use vanilla 1WAY and expect it to always be flushed from the GPU caches when the fence has signalled i.e end of submission, like when media is off. So you have to only allow 2WAY or XA for userptr, or you need a manual sync flush here, for security, before the pages potentially vanish.
Quoted 4 lines
If something happens that changes the GTT mapping of an object, then doesn't that already trigger a TLB invalidation when necessary in the driver today? It was my understanding that "heavy" TLB invalidations
Right, but the driver is clever and in some cases postpones that TLB flush (with PPC bit set) to the next re-bind, so when you next call the exec() ioctl, for example. I think the idea is you then only need one flush, instead of two. But that is way too late for this, as we need to do the flush before the memory is potentially freed. Otherwise the memory can be freed and when media next wakes up or you trigger full GPU flush on next exec() you potentially corrupt the next user of that memory.
For useptr case, this patch was just trying to make that TLB flush (with PPC bit) happen immediately before we dma unmap the physical pages, and before the memory is potentially freed.
Quoted 184 lines
wait for data values to be globally observable before starting, so I think that would ensure that any non-XA data makes it to RAM before any binding changes, object, destruction, etc.? Is there something special about userptr that makes that case more of a problem?
I just found bspec page 74635 which gives an overview of the various flush and invalidate cases, and I don't see anything there that makes it obvious to me that userptr would be special.
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
As you said, we eventually do want to force a flush of the non-transient data as well once we're freeing the underlying pages. So how do we do that? It's not clear to me how the changes below are accomplishing that. Is there a way to explicitly request a full device cache flush (ignoring the transient vs non-transient tagging)? Since the GuC handles the optimization in the next patch (toggling whether flushes are full flushes vs non-transient flushes depending on whether media is active), I thought there might be some kind of GuC interface to request "please do one full flush now, even if media is idle."
Quoted 6 lines
Quoted 4 lines
I’m not an expert here by any means, but everything above from Matt seems like valid concerns. Thomas also raised some concerns in the two previous revisions; again I’m not an expert, but reading through those, it doesn’t really seem like he received proper answers to his questions.
Its forcing flush via tlb invalidation PPC flag under
xe_invalidate_vma( ).By the way, what is "PPC?" It seems like it's another new synonym for the device cache? It's already really confusing that some of our hardware docs use a mix of both "L2" and "L3" to refer to the same device cache for historical reasons...
Matt
Quoted 145 lines
Quoted 37 lines
A couple of comments below.
Quoted 21 lines
Matt
Quoted 18 lines
V2(MattA): Expand commit description
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_bo.c | 3 ++- drivers/gpu/drm/xe/xe_device.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/xe/xe_device.h | 1 + drivers/gpu/drm/xe/xe_userptr.c | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_bo.c +0
-0@@ -689,7 +689,8 @@ static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo,Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c static int xe_bo_trigger_rebind(struct xe_device *xe, struct xe_bo *bo, · line 693
Quoted 5 lines
drivers/gpu/drm/xe/xe_bo.c +2
-1if (!xe_vm_in_fault_mode (vm)) {drm_gpuvm_bo_evict (vm_bo, true); -continue ; +if (!xe_device_needs_cache_flush (xe)) +continue ;This will trigger a TLB invalidation (and I assume a cache flush) every time we move or free memory in the 3D stack if it has a binding. It also performs a synchronous wait on the BO being idle. Both of these are very expensive operations. I can’t imagine the granularity we want here is to do this on every move/free with bindings.
Quoted 6 lines
Also, for LR compute with preempt fences, we would trigger the preempt fences during the wait, so a TLB invalidation after this seems unnecessary, though perhaps the cache flush is still required?
I think this needs a bit more explanation, because without knowing a lot about the exact requirements, the implementation does not look correct.
The thing is that we are trying to solve problem with userptr with non-XA pat, consider if that BO got moved while media is not active. As soon as media will come back active, stale cached entries of that object will be flushed as part of full flush , which may corrupt things.
There was thinking that with this patch we would at least solve the problem of corruption and later whenpage_reclamationfeature comes in will help in performance as well. But now when page reclamation feature is merged earlier and it tightly coupled with bind/unbind some cases like discussed above (which are not doing unbind immediately on move/free) are missed in reclamation.So thought was to let this solution go in with little perf hit and discuss with page reclamation owner to come with cleaner solution together.
Tejas
Quoted 95 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device
Quoted 10 lines
drivers/gpu/drm/xe/xe_bo.c +0
-0}if (!idle) {
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindex743c18e0c580..da2abed94bc0100644drivers/gpu/drm/xe/xe_device.c +0
-0@@ -1097,6 +1097,29 @@ static void tdf_request_sync(struct xe_device*xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device *xe)
Quoted 12 lines
drivers/gpu/drm/xe/xe_device.c +9
-0} } +/** +* xe_device_needs_cache_flush - Whether the cache needs to be +flushed +* @xe: The device to check. +* +* Return: true if the device needs cache flush, false otherwise. +*/ +bool xe_device_needs_cache_flush (struct xe_device *xe) { +/* XA is *always* flushed, like at the end-of-submssion (and maybe other
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1109
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* places), just that internally as an optimisation hw doesn't need to make
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1111
Quoted 2 lines
drivers/gpu/drm/xe/xe_device.c +2
-0+* that a full flush (which will also include XA) when Media is +* off/powergated, since it doesn't need to worry about GT caches vs Media
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1112
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* coherency, and only CPU vs GPU coherency, so can make that flush a
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1113
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* targeted XA flush, since stuff tagged with XA now means it's shared with
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1114
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* the CPU. The main implication is that we now need to somehow flush non-XA before
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c static void tdf_request_sync(struct xe_device · line 1115
Quoted 1 line
drivers/gpu/drm/xe/xe_device.c +1
-0+* freeing system memory pages, otherwise dirty cachelines could be flushed after the free
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_device.c +7
-0+* (like if Media suddenly turns on and does a full flush) +*/ +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe)) +return true; +return false; +} +void xe_device_l2_flush (struct xe_device *xe) {struct xe_gt *gt;(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.hindex39464650533b..baf386e0e037100644drivers/gpu/drm/xe/xe_device.h +1
-0@@ -184,6 +184,7 @@ void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);u64 xe_device_canonicalize_addr (struct xe_device *xe,u64 address);u64 xe_device_uncanonicalize_addr (struct xe_device *xe,u64 address); +bool xe_device_needs_cache_flush (struct xe_device *xe);void xe_device_td_flush (struct xe_device *xe);void
xe_device_l2_flush(struct xe_device *xe);Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_userptr.cindexe120323c43bc..b435ea7f9b66100644drivers/gpu/drm/xe/xe_userptr.c +0
-0@@ -114,7 +114,8 @@ static void __vma_userptr_invalidate(struct xe_vm*vm, struct
xe_userptr_vma*uvQuoted 7 lines
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv
Quoted 5 lines
drivers/gpu/drm/xe/xe_userptr.c +1
-1false, MAX_SCHEDULE_TIMEOUT);XE_WARN_ON (err <=0 ); -if (xe_vm_in_fault_mode (vm) && userptr->initial_bind) { + if ((xe_vm_in_fault_mode(vm) || xe_device_needs_cache_flush(vm-xe)) &&
drivers/gpu/drm/xe/xe_userptr.c static void __vma_userptr_invalidate(struct xe_vm *vm, struct xe_userptr_vma *uv · line 118
Quoted 1 line
drivers/gpu/drm/xe/xe_userptr.c +1
-0+ userptr->initial_bind) {Same concern with the LR preempt fence as above — the hardware will be interrupted via preempt fences, so it doesn’t seem necessary to invalidate the TLBs but perhaps we need a cflush and TLB invalidation is the mechanism for that too?
Matt
Quoted 12 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_userptr.c +0
-1err =xe_vm_invalidate_vma (vma);XE_WARN_ON (err); } --2.52.0
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
PATCH 2/3 drm/xe/xe3p_lpg: Enable L2 flush optimization feature
In reply to Tejas UpadhyayWhen set, the L2 flush optimization feature will control whether L2 is in Persistent or Transient mode through monitoring of media activity.
To enable L2 flush optimization include new feature flag GUC_CTL_ENABLE_L2FLUSH_OPT for Novalake platforms when media type is detected.
--- drivers/gpu/drm/xe/xe_guc.c | 3 +++ drivers/gpu/drm/xe/xe_guc_fwif.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/xe/xe_guc.c +3 -0
@@ -98,6 +98,9 @@ static u32 guc_ctl_feature_flags(struct xe_guc *guc)if (xe_guc_using_main_gamctrl_queues (guc)) flags |=GUC_CTL_MAIN_GAMCTRL_QUEUES ; +if (GRAPHICS_VER (xe) >=35 && !IS_DGFX (xe) &&xe_gt_is_media_type (guc_to_gt (guc))) + flags |=GUC_CTL_ENABLE_L2FLUSH_OPT ; +return flags; }
drivers/gpu/drm/xe/xe_guc_fwif.h +1 -0
@@ -67,6 +67,7 @@ struct guc_update_exec_queue_policy {#define GUC_CTL_ENABLE_PSMI_LOGGING BIT(7)#define GUC_CTL_MAIN_GAMCTRL_QUEUES BIT(9)#define GUC_CTL_DISABLE_SCHEDULER BIT(14) +#define GUC_CTL_ENABLE_L2FLUSH_OPT BIT(15)#define GUC_CTL_DEBUG 3#define GUC_LOG_VERBOSITY REG_GENMASK(1, 0)
Signature · 1 line
2.52.0
PATCH 3/3 drm/xe/xe3p: Skip TD flush
In reply to Tejas UpadhyayXe3p has HW ability to do transient display flush so the xe driver can enable this HW feature by default and skip the software TD flush.
Bspec: 60002
--- drivers/gpu/drm/xe/xe_device.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/xe/xe_device.c +8 -0
@@ -1166,6 +1166,14 @@ void xe_device_td_flush(struct xe_device *xe) {struct xe_gt *root_gt; +/* +* From Xe3p onward the HW takes care of flush of TD entries also along +* with flushing XA entries, which will be at the usual sync points, +* like at the end of submission, so no manual flush is needed here. +*/ +if (GRAPHICS_VER (xe) >=35 ) +return ; +if (!IS_DGFX (xe) ||GRAPHICS_VER (xe) <20 )return ;
Signature · 1 line
2.52.0
Re: [PATCH 3/3] drm/xe/xe3p: Skip TD flush
Quoted 14 lines · Tejas Upadhyay
Xe3p has HW ability to do transient display flush so the xe driver can enable this HW feature by default and skip the software TD flush.
Bspec: 60002
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_device.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/xe/xe_device.c +0
-0
drivers/gpu/drm/xe/xe_device.c void xe_device_td_flush(struct xe_device *xe) · line 1175
Quoted 10 lines
drivers/gpu/drm/xe/xe_device.c +7
-0@@ -1166,6 +1166,14 @@ void xe_device_td_flush(struct xe_device *xe) {struct xe_gt *root_gt; +/* +* From Xe3p onward the HW takes care of flush of TD entries also along +* with flushing XA entries, which will be at the usual sync points, +* like at the end of submission, so no manual flush is needed here. +*/ +if (GRAPHICS_VER (xe) >=35 ) +return ;
I guess this is just future-proofing? The Xe3p platforms we have today are either igpus (NVL-P) and thus get handled by the next condition, or dgpus that don't have display or XD pat indices at all (CRI).
Matt
Quoted 7 lines
drivers/gpu/drm/xe/xe_device.c +1
-0+if (!IS_DGFX (xe) ||GRAPHICS_VER (xe) <20 )return ;Signature · 1 line
2.52.0
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation
RE: [PATCH 3/3] drm/xe/xe3p: Skip TD flush
Quoted 32 lines
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: 11 February 2026 02:52
To: Upadhyay, Tejas <[email protected]>
Cc: [email protected]; Auld, Matthew <[email protected]>; [email protected]
Subject: Re: [PATCH 3/3] drm/xe/xe3p: Skip TD flushQuoted 15 lines · Tejas Upadhyay
Xe3p has HW ability to do transient display flush so the xe driver can enable this HW feature by default and skip the software TD flush.
Bspec: 60002
Signed-off-by Tejas Upadhyay <[email protected]>--- drivers/gpu/drm/xe/xe_device.c | 8 ++++++++ 1 file changed, 8 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/xe/xe_device.cindexda2abed94bc0..483813d45474100644drivers/gpu/drm/xe/xe_device.c void xe_device_td_flush(struct xe_device *xe) · line 1170
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +2
-0@@ -1166,6 +1166,14 @@ void xe_device_td_flush(struct xe_device *xe) {struct xe_gt *root_gt; +/* +* From Xe3p onward the HW takes care of flush of TD entries also along
Quoted 9 lines
drivers/gpu/drm/xe/xe_device.c void xe_device_td_flush(struct xe_device *xe) · line 1175
Quoted 5 lines
drivers/gpu/drm/xe/xe_device.c +5
-0+* with flushing XA entries, which will be at the usual sync points, +* like at the end of submission, so no manual flush is needed here. +*/ +if (GRAPHICS_VER (xe) >=35 ) +return ;I guess this is just future-proofing? The Xe3p platforms we have today are either igpus (NVL-P) and thus get handled by the next condition, or dgpus that don't have display or XD pat indices at all (CRI).
That is true, all coming igpu HWs will have this ability per my conversation with HW team. And next condition filters out dgpus.
Tejas
Quoted 17 lines
Matt
Quoted 7 lines
drivers/gpu/drm/xe/xe_device.c +1
-1+if (!IS_DGFX (xe) ||GRAPHICS_VER (xe) <20 )return ; --2.52.0
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
Patchwork
CI✗ CI.checkpatch: warning for drm/xe/xe3p_lpg: L2 flush optimization (rev2)
In reply to Tejas Upadhyay== Series Details ==
== Series Details ==
Series: drm/xe/xe3p_lpg: L2 flush optimization (rev2)
URL : https://patchwork.freedesktop.org/series/158017/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 1f57ba1afceae32108bd24770069f764d940a0e4
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 54bee95a5083fe306a558b2fd1af3734f10fe426
Author: Tejas Upadhyay <[email protected]> Date: Tue Feb 10 18:21:24 2026 +0530
drm/xe/xe3p: Skip TD flush
Xe3p has HW ability to do transient display flush so the xe driver can enable this HW feature by default and skip the software TD flush.
Bspec: 60002
+ /mt/dim checkpatch 5f16c3d1100e59f2fbaeb2724039cc3a948574bb drm-intel2739d651d6cd drm/xe/xe3p_lpg: flush userptr/shrinker bo cachelines manually
-:10: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #10:
"eXtended Architecture" (XA) tagged memory—memory shared between the CPU and GPU
total: 0 errors, 1 warnings, 0 checks, 54 lines checked 46aaf0b7eaea drm/xe/xe3p_lpg: Enable L2 flush optimization feature 54bee95a5083 drm/xe/xe3p: Skip TD flush
Patchwork
CI✓ CI.KUnit: success for drm/xe/xe3p_lpg: L2 flush optimization (rev2)
In reply to Tejas Upadhyay== Series Details ==
== Series Details ==
Series: drm/xe/xe3p_lpg: L2 flush optimization (rev2)
URL : https://patchwork.freedesktop.org/series/158017/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [13:35:37] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:35:41] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:36:13] Starting KUnit Kernel (1/1)... [13:36:13] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:36:13] ================== guc_buf (11 subtests) =================== [13:36:13] [PASSED] test_smallest [13:36:13] [PASSED] test_largest [13:36:13] [PASSED] test_granular [13:36:13] [PASSED] test_unique [13:36:13] [PASSED] test_overlap [13:36:13] [PASSED] test_reusable [13:36:13] [PASSED] test_too_big [13:36:13] [PASSED] test_flush [13:36:13] [PASSED] test_lookup [13:36:13] [PASSED] test_data [13:36:13] [PASSED] test_class [13:36:13] ===================== [PASSED] guc_buf ===================== [13:36:13] =================== guc_dbm (7 subtests) =================== [13:36:13] [PASSED] test_empty [13:36:13] [PASSED] test_default [13:36:13] ======================== test_size ======================== [13:36:13] [PASSED] 4 [13:36:13] [PASSED] 8 [13:36:13] [PASSED] 32 [13:36:13] [PASSED] 256 [13:36:13] ==================== [PASSED] test_size ==================== [13:36:13] ======================= test_reuse ======================== [13:36:13] [PASSED] 4 [13:36:13] [PASSED] 8 [13:36:13] [PASSED] 32 [13:36:13] [PASSED] 256 [13:36:13] =================== [PASSED] test_reuse ==================== [13:36:13] =================== test_range_overlap ==================== [13:36:13] [PASSED] 4 [13:36:13] [PASSED] 8 [13:36:13] [PASSED] 32 [13:36:13] [PASSED] 256 [13:36:13] =============== [PASSED] test_range_overlap ================ [13:36:13] =================== test_range_compact ==================== [13:36:13] [PASSED] 4 [13:36:13] [PASSED] 8 [13:36:13] [PASSED] 32 [13:36:13] [PASSED] 256 [13:36:13] =============== [PASSED] test_range_compact ================ [13:36:13] ==================== test_range_spare ===================== [13:36:13] [PASSED] 4 [13:36:13] [PASSED] 8 [13:36:13] [PASSED] 32 [13:36:13] [PASSED] 256 [13:36:13] ================ [PASSED] test_range_spare ================= [13:36:13] ===================== [PASSED] guc_dbm ===================== [13:36:13] =================== guc_idm (6 subtests) =================== [13:36:13] [PASSED] bad_init [13:36:13] [PASSED] no_init [13:36:13] [PASSED] init_fini [13:36:13] [PASSED] check_used [13:36:13] [PASSED] check_quota [13:36:13] [PASSED] check_all [13:36:13] ===================== [PASSED] guc_idm ===================== [13:36:13] ================== no_relay (3 subtests) =================== [13:36:13] [PASSED] xe_drops_guc2pf_if_not_ready [13:36:13] [PASSED] xe_drops_guc2vf_if_not_ready [13:36:13] [PASSED] xe_rejects_send_if_not_ready [13:36:13] ==================== [PASSED] no_relay ===================== [13:36:13] ================== pf_relay (14 subtests) ================== [13:36:13] [PASSED] pf_rejects_guc2pf_too_short [13:36:13] [PASSED] pf_rejects_guc2pf_too_long [13:36:13] [PASSED] pf_rejects_guc2pf_no_payload [13:36:13] [PASSED] pf_fails_no_payload [13:36:13] [PASSED] pf_fails_bad_origin [13:36:13] [PASSED] pf_fails_bad_type [13:36:13] [PASSED] pf_txn_reports_error [13:36:13] [PASSED] pf_txn_sends_pf2guc [13:36:13] [PASSED] pf_sends_pf2guc [13:36:13] [SKIPPED] pf_loopback_nop [13:36:13] [SKIPPED] pf_loopback_echo [13:36:13] [SKIPPED] pf_loopback_fail [13:36:13] [SKIPPED] pf_loopback_busy [13:36:13] [SKIPPED] pf_loopback_retry [13:36:13] ==================== [PASSED] pf_relay ===================== [13:36:13] ================== vf_relay (3 subtests) =================== [13:36:13] [PASSED] vf_rejects_guc2vf_too_short [13:36:13] [PASSED] vf_rejects_guc2vf_too_long [13:36:13] [PASSED] vf_rejects_guc2vf_no_payload [13:36:13] ==================== [PASSED] vf_relay ===================== [13:36:13] ================ pf_gt_config (6 subtests) ================= [13:36:13] [PASSED] fair_contexts_1vf [13:36:13] [PASSED] fair_doorbells_1vf [13:36:13] [PASSED] fair_ggtt_1vf [13:36:13] ====================== fair_contexts ====================== [13:36:13] [PASSED] 1 VF [13:36:13] [PASSED] 2 VFs [13:36:13] [PASSED] 3 VFs [13:36:13] [PASSED] 4 VFs [13:36:13] [PASSED] 5 VFs [13:36:13] [PASSED] 6 VFs [13:36:13] [PASSED] 7 VFs [13:36:13] [PASSED] 8 VFs [13:36:13] [PASSED] 9 VFs [13:36:13] [PASSED] 10 VFs [13:36:13] [PASSED] 11 VFs [13:36:13] [PASSED] 12 VFs [13:36:13] [PASSED] 13 VFs [13:36:13] [PASSED] 14 VFs [13:36:13] [PASSED] 15 VFs [13:36:13] [PASSED] 16 VFs [13:36:13] [PASSED] 17 VFs [13:36:13] [PASSED] 18 VFs [13:36:13] [PASSED] 19 VFs [13:36:13] [PASSED] 20 VFs [13:36:13] [PASSED] 21 VFs [13:36:13] [PASSED] 22 VFs [13:36:13] [PASSED] 23 VFs [13:36:13] [PASSED] 24 VFs [13:36:13] [PASSED] 25 VFs [13:36:13] [PASSED] 26 VFs [13:36:13] [PASSED] 27 VFs [13:36:13] [PASSED] 28 VFs [13:36:13] [PASSED] 29 VFs [13:36:13] [PASSED] 30 VFs [13:36:13] [PASSED] 31 VFs [13:36:13] [PASSED] 32 VFs [13:36:13] [PASSED] 33 VFs [13:36:13] [PASSED] 34 VFs [13:36:13] [PASSED] 35 VFs [13:36:13] [PASSED] 36 VFs [13:36:13] [PASSED] 37 VFs [13:36:13] [PASSED] 38 VFs [13:36:13] [PASSED] 39 VFs [13:36:13] [PASSED] 40 VFs [13:36:13] [PASSED] 41 VFs [13:36:13] [PASSED] 42 VFs [13:36:13] [PASSED] 43 VFs [13:36:13] [PASSED] 44 VFs [13:36:13] [PASSED] 45 VFs [13:36:13] [PASSED] 46 VFs [13:36:13] [PASSED] 47 VFs [13:36:13] [PASSED] 48 VFs [13:36:13] [PASSED] 49 VFs [13:36:13] [PASSED] 50 VFs [13:36:13] [PASSED] 51 VFs [13:36:13] [PASSED] 52 VFs [13:36:13] [PASSED] 53 VFs [13:36:13] [PASSED] 54 VFs [13:36:13] [PASSED] 55 VFs [13:36:13] [PASSED] 56 VFs [13:36:13] [PASSED] 57 VFs [13:36:13] [PASSED] 58 VFs [13:36:13] [PASSED] 59 VFs [13:36:13] [PASSED] 60 VFs [13:36:13] [PASSED] 61 VFs [13:36:13] [PASSED] 62 VFs [13:36:13] [PASSED] 63 VFs [13:36:13] ================== [PASSED] fair_contexts ================== [13:36:13] ===================== fair_doorbells ====================== [13:36:13] [PASSED] 1 VF [13:36:13] [PASSED] 2 VFs [13:36:13] [PASSED] 3 VFs [13:36:13] [PASSED] 4 VFs [13:36:13] [PASSED] 5 VFs [13:36:13] [PASSED] 6 VFs [13:36:13] [PASSED] 7 VFs [13:36:13] [PASSED] 8 VFs [13:36:13] [PASSED] 9 VFs [13:36:13] [PASSED] 10 VFs [13:36:13] [PASSED] 11 VFs [13:36:13] [PASSED] 12 VFs [13:36:13] [PASSED] 13 VFs [13:36:13] [PASSED] 14 VFs [13:36:13] [PASSED] 15 VFs [13:36:13] [PASSED] 16 VFs [13:36:13] [PASSED] 17 VFs [13:36:13] [PASSED] 18 VFs [13:36:13] [PASSED] 19 VFs [13:36:13] [PASSED] 20 VFs [13:36:13] [PASSED] 21 VFs [13:36:13] [PASSED] 22 VFs [13:36:13] [PASSED] 23 VFs [13:36:13] [PASSED] 24 VFs [13:36:13] [PASSED] 25 VFs [13:36:13] [PASSED] 26 VFs [13:36:13] [PASSED] 27 VFs [13:36:13] [PASSED] 28 VFs [13:36:13] [PASSED] 29 VFs [13:36:14] [PASSED] 30 VFs [13:36:14] [PASSED] 31 VFs [13:36:14] [PASSED] 32 VFs [13:36:14] [PASSED] 33 VFs [13:36:14] [PASSED] 34 VFs [13:36:14] [PASSED] 35 VFs [13:36:14] [PASSED] 36 VFs [13:36:14] [PASSED] 37 VFs [13:36:14] [PASSED] 38 VFs [13:36:14] [PASSED] 39 VFs [13:36:14] [PASSED] 40 VFs [13:36:14] [PASSED] 41 VFs [13:36:14] [PASSED] 42 VFs [13:36:14] [PASSED] 43 VFs [13:36:14] [PASSED] 44 VFs [13:36:14] [PASSED] 45 VFs [13:36:14] [PASSED] 46 VFs [13:36:14] [PASSED] 47 VFs [13:36:14] [PASSED] 48 VFs [13:36:14] [PASSED] 49 VFs [13:36:14] [PASSED] 50 VFs [13:36:14] [PASSED] 51 VFs [13:36:14] [PASSED] 52 VFs [13:36:14] [PASSED] 53 VFs [13:36:14] [PASSED] 54 VFs [13:36:14] [PASSED] 55 VFs [13:36:14] [PASSED] 56 VFs [13:36:14] [PASSED] 57 VFs [13:36:14] [PASSED] 58 VFs [13:36:14] [PASSED] 59 VFs [13:36:14] [PASSED] 60 VFs [13:36:14] [PASSED] 61 VFs [13:36:14] [PASSED] 62 VFs [13:36:14] [PASSED] 63 VFs [13:36:14] ================= [PASSED] fair_doorbells ================== [13:36:14] ======================== fair_ggtt ======================== [13:36:14] [PASSED] 1 VF [13:36:14] [PASSED] 2 VFs [13:36:14] [PASSED] 3 VFs [13:36:14] [PASSED] 4 VFs [13:36:14] [PASSED] 5 VFs [13:36:14] [PASSED] 6 VFs [13:36:14] [PASSED] 7 VFs [13:36:14] [PASSED] 8 VFs [13:36:14] [PASSED] 9 VFs [13:36:14] [PASSED] 10 VFs [13:36:14] [PASSED] 11 VFs [13:36:14] [PASSED] 12 VFs [13:36:14] [PASSED] 13 VFs [13:36:14] [PASSED] 14 VFs [13:36:14] [PASSED] 15 VFs [13:36:14] [PASSED] 16 VFs [13:36:14] [PASSED] 17 VFs [13:36:14] [PASSED] 18 VFs [13:36:14] [PASSED] 19 VFs [13:36:14] [PASSED] 20 VFs [13:36:14] [PASSED] 21 VFs [13:36:14] [PASSED] 22 VFs [13:36:14] [PASSED] 23 VFs [13:36:14] [PASSED] 24 VFs [13:36:14] [PASSED] 25 VFs [13:36:14] [PASSED] 26 VFs [13:36:14] [PASSED] 27 VFs [13:36:14] [PASSED] 28 VFs [13:36:14] [PASSED] 29 VFs [13:36:14] [PASSED] 30 VFs [13:36:14] [PASSED] 31 VFs [13:36:14] [PASSED] 32 VFs [13:36:14] [PASSED] 33 VFs [13:36:14] [PASSED] 34 VFs [13:36:14] [PASSED] 35 VFs [13:36:14] [PASSED] 36 VFs [13:36:14] [PASSED] 37 VFs [13:36:14] [PASSED] 38 VFs [13:36:14] [PASSED] 39 VFs [13:36:14] [PASSED] 40 VFs [13:36:14] [PASSED] 41 VFs [13:36:14] [PASSED] 42 VFs [13:36:14] [PASSED] 43 VFs [13:36:14] [PASSED] 44 VFs [13:36:14] [PASSED] 45 VFs [13:36:14] [PASSED] 46 VFs [13:36:14] [PASSED] 47 VFs [13:36:14] [PASSED] 48 VFs [13:36:14] [PASSED] 49 VFs [13:36:14] [PASSED] 50 VFs [13:36:14] [PASSED] 51 VFs [13:36:14] [PASSED] 52 VFs [13:36:14] [PASSED] 53 VFs [13:36:14] [PASSED] 54 VFs [13:36:14] [PASSED] 55 VFs [13:36:14] [PASSED] 56 VFs [13:36:14] [PASSED] 57 VFs [13:36:14] [PASSED] 58 VFs [13:36:14] [PASSED] 59 VFs [13:36:14] [PASSED] 60 VFs [13:36:14] [PASSED] 61 VFs [13:36:14] [PASSED] 62 VFs [13:36:14] [PASSED] 63 VFs [13:36:14] ==================== [PASSED] fair_ggtt ==================== [13:36:14] ================== [PASSED] pf_gt_config =================== [13:36:14] ===================== lmtt (1 subtest) ===================== [13:36:14] ======================== test_ops ========================= [13:36:14] [PASSED] 2-level [13:36:14] [PASSED] multi-level [13:36:14] ==================== [PASSED] test_ops ===================== [13:36:14] ====================== [PASSED] lmtt ======================= [13:36:14] ================= pf_service (11 subtests) ================= [13:36:14] [PASSED] pf_negotiate_any [13:36:14] [PASSED] pf_negotiate_base_match [13:36:14] [PASSED] pf_negotiate_base_newer [13:36:14] [PASSED] pf_negotiate_base_next [13:36:14] [SKIPPED] pf_negotiate_base_older [13:36:14] [PASSED] pf_negotiate_base_prev [13:36:14] [PASSED] pf_negotiate_latest_match [13:36:14] [PASSED] pf_negotiate_latest_newer [13:36:14] [PASSED] pf_negotiate_latest_next [13:36:14] [SKIPPED] pf_negotiate_latest_older [13:36:14] [SKIPPED] pf_negotiate_latest_prev [13:36:14] =================== [PASSED] pf_service ==================== [13:36:14] ================= xe_guc_g2g (2 subtests) ================== [13:36:14] ============== xe_live_guc_g2g_kunit_default ============== [13:36:14] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [13:36:14] ============== xe_live_guc_g2g_kunit_allmem =============== [13:36:14] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [13:36:14] =================== [SKIPPED] xe_guc_g2g =================== [13:36:14] =================== xe_mocs (2 subtests) =================== [13:36:14] ================ xe_live_mocs_kernel_kunit ================ [13:36:14] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [13:36:14] ================ xe_live_mocs_reset_kunit ================= [13:36:14] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [13:36:14] ==================== [SKIPPED] xe_mocs ===================== [13:36:14] ================= xe_migrate (2 subtests) ================== [13:36:14] ================= xe_migrate_sanity_kunit ================= [13:36:14] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [13:36:14] ================== xe_validate_ccs_kunit ================== [13:36:14] ============= [SKIPPED] xe_validate_ccs_kunit ============== [13:36:14] =================== [SKIPPED] xe_migrate =================== [13:36:14] ================== xe_dma_buf (1 subtest) ================== [13:36:14] ==================== xe_dma_buf_kunit ===================== [13:36:14] ================ [SKIPPED] xe_dma_buf_kunit ================ [13:36:14] =================== [SKIPPED] xe_dma_buf =================== [13:36:14] ================= xe_bo_shrink (1 subtest) ================= [13:36:14] =================== xe_bo_shrink_kunit ==================== [13:36:14] =============== [SKIPPED] xe_bo_shrink_kunit =============== [13:36:14] ================== [SKIPPED] xe_bo_shrink ================== [13:36:14] ==================== xe_bo (2 subtests) ==================== [13:36:14] ================== xe_ccs_migrate_kunit =================== [13:36:14] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [13:36:14] ==================== xe_bo_evict_kunit ==================== [13:36:14] =============== [SKIPPED] xe_bo_evict_kunit ================ [13:36:14] ===================== [SKIPPED] xe_bo ====================== [13:36:14] ==================== args (13 subtests) ==================== [13:36:14] [PASSED] count_args_test [13:36:14] [PASSED] call_args_example [13:36:14] [PASSED] call_args_test [13:36:14] [PASSED] drop_first_arg_example [13:36:14] [PASSED] drop_first_arg_test [13:36:14] [PASSED] first_arg_example [13:36:14] [PASSED] first_arg_test [13:36:14] [PASSED] last_arg_example [13:36:14] [PASSED] last_arg_test [13:36:14] [PASSED] pick_arg_example [13:36:14] [PASSED] if_args_example [13:36:14] [PASSED] if_args_test [13:36:14] [PASSED] sep_comma_example [13:36:14] ====================== [PASSED] args ======================= [13:36:14] =================== xe_pci (3 subtests) ==================== [13:36:14] ==================== check_graphics_ip ==================== [13:36:14] [PASSED] 12.00 Xe_LP [13:36:14] [PASSED] 12.10 Xe_LP+ [13:36:14] [PASSED] 12.55 Xe_HPG [13:36:14] [PASSED] 12.60 Xe_HPC [13:36:14] [PASSED] 12.70 Xe_LPG [13:36:14] [PASSED] 12.71 Xe_LPG [13:36:14] [PASSED] 12.74 Xe_LPG+ [13:36:14] [PASSED] 20.01 Xe2_HPG [13:36:14] [PASSED] 20.02 Xe2_HPG [13:36:14] [PASSED] 20.04 Xe2_LPG [13:36:14] [PASSED] 30.00 Xe3_LPG [13:36:14] [PASSED] 30.01 Xe3_LPG [13:36:14] [PASSED] 30.03 Xe3_LPG [13:36:14] [PASSED] 30.04 Xe3_LPG [13:36:14] [PASSED] 30.05 Xe3_LPG [13:36:14] [PASSED] 35.11 Xe3p_XPC [13:36:14] ================ [PASSED] check_graphics_ip ================ [13:36:14] ===================== check_media_ip ====================== [13:36:14] [PASSED] 12.00 Xe_M [13:36:14] [PASSED] 12.55 Xe_HPM [13:36:14] [PASSED] 13.00 Xe_LPM+ [13:36:14] [PASSED] 13.01 Xe2_HPM [13:36:14] [PASSED] 20.00 Xe2_LPM [13:36:14] [PASSED] 30.00 Xe3_LPM [13:36:14] [PASSED] 30.02 Xe3_LPM [13:36:14] [PASSED] 35.00 Xe3p_LPM [13:36:14] [PASSED] 35.03 Xe3p_HPM [13:36:14] ================= [PASSED] check_media_ip ================== [13:36:14] =================== check_platform_desc =================== [13:36:14] [PASSED] 0x9A60 (TIGERLAKE) [13:36:14] [PASSED] 0x9A68 (TIGERLAKE) [13:36:14] [PASSED] 0x9A70 (TIGERLAKE) [13:36:14] [PASSED] 0x9A40 (TIGERLAKE) [13:36:14] [PASSED] 0x9A49 (TIGERLAKE) [13:36:14] [PASSED] 0x9A59 (TIGERLAKE) [13:36:14] [PASSED] 0x9A78 (TIGERLAKE) [13:36:14] [PASSED] 0x9AC0 (TIGERLAKE) [13:36:14] [PASSED] 0x9AC9 (TIGERLAKE) [13:36:14] [PASSED] 0x9AD9 (TIGERLAKE) [13:36:14] [PASSED] 0x9AF8 (TIGERLAKE) [13:36:14] [PASSED] 0x4C80 (ROCKETLAKE) [13:36:14] [PASSED] 0x4C8A (ROCKETLAKE) [13:36:14] [PASSED] 0x4C8B (ROCKETLAKE) [13:36:14] [PASSED] 0x4C8C (ROCKETLAKE) [13:36:14] [PASSED] 0x4C90 (ROCKETLAKE) [13:36:14] [PASSED] 0x4C9A (ROCKETLAKE) [13:36:14] [PASSED] 0x4680 (ALDERLAKE_S) [13:36:14] [PASSED] 0x4682 (ALDERLAKE_S) [13:36:14] [PASSED] 0x4688 (ALDERLAKE_S) [13:36:14] [PASSED] 0x468A (ALDERLAKE_S) [13:36:14] [PASSED] 0x468B (ALDERLAKE_S) [13:36:14] [PASSED] 0x4690 (ALDERLAKE_S) [13:36:14] [PASSED] 0x4692 (ALDERLAKE_S) [13:36:14] [PASSED] 0x4693 (ALDERLAKE_S) [13:36:14] [PASSED] 0x46A0 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46A1 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46A2 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46A3 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46A6 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46A8 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46AA (ALDERLAKE_P) [13:36:14] [PASSED] 0x462A (ALDERLAKE_P) [13:36:14] [PASSED] 0x4626 (ALDERLAKE_P) [13:36:14] [PASSED] 0x4628 (ALDERLAKE_P) stty: 'standard input': Inappropriate ioctl for device [13:36:14] [PASSED] 0x46B0 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46B1 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46B2 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46B3 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46C0 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46C1 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46C2 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46C3 (ALDERLAKE_P) [13:36:14] [PASSED] 0x46D0 (ALDERLAKE_N) [13:36:14] [PASSED] 0x46D1 (ALDERLAKE_N) [13:36:14] [PASSED] 0x46D2 (ALDERLAKE_N) [13:36:14] [PASSED] 0x46D3 (ALDERLAKE_N) [13:36:14] [PASSED] 0x46D4 (ALDERLAKE_N) [13:36:14] [PASSED] 0xA721 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7A1 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7A9 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7AC (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7AD (ALDERLAKE_P) [13:36:14] [PASSED] 0xA720 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7A0 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7A8 (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7AA (ALDERLAKE_P) [13:36:14] [PASSED] 0xA7AB (ALDERLAKE_P) [13:36:14] [PASSED] 0xA780 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA781 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA782 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA783 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA788 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA789 (ALDERLAKE_S) [13:36:14] [PASSED] 0xA78A (ALDERLAKE_S) [13:36:14] [PASSED] 0xA78B (ALDERLAKE_S) [13:36:14] [PASSED] 0x4905 (DG1) [13:36:14] [PASSED] 0x4906 (DG1) [13:36:14] [PASSED] 0x4907 (DG1) [13:36:14] [PASSED] 0x4908 (DG1) [13:36:14] [PASSED] 0x4909 (DG1) [13:36:14] [PASSED] 0x56C0 (DG2) [13:36:14] [PASSED] 0x56C2 (DG2) [13:36:14] [PASSED] 0x56C1 (DG2) [13:36:14] [PASSED] 0x7D51 (METEORLAKE) [13:36:14] [PASSED] 0x7DD1 (METEORLAKE) [13:36:14] [PASSED] 0x7D41 (METEORLAKE) [13:36:14] [PASSED] 0x7D67 (METEORLAKE) [13:36:14] [PASSED] 0xB640 (METEORLAKE) [13:36:14] [PASSED] 0x56A0 (DG2) [13:36:14] [PASSED] 0x56A1 (DG2) [13:36:14] [PASSED] 0x56A2 (DG2) [13:36:14] [PASSED] 0x56BE (DG2) [13:36:14] [PASSED] 0x56BF (DG2) [13:36:14] [PASSED] 0x5690 (DG2) [13:36:14] [PASSED] 0x5691 (DG2) [13:36:14] [PASSED] 0x5692 (DG2) [13:36:14] [PASSED] 0x56A5 (DG2) [13:36:14] [PASSED] 0x56A6 (DG2) [13:36:14] [PASSED] 0x56B0 (DG2) [13:36:14] [PASSED] 0x56B1 (DG2) [13:36:14] [PASSED] 0x56BA (DG2) [13:36:14] [PASSED] 0x56BB (DG2) [13:36:14] [PASSED] 0x56BC (DG2) [13:36:14] [PASSED] 0x56BD (DG2) [13:36:14] [PASSED] 0x5693 (DG2) [13:36:14] [PASSED] 0x5694 (DG2) [13:36:14] [PASSED] 0x5695 (DG2) [13:36:14] [PASSED] 0x56A3 (DG2) [13:36:14] [PASSED] 0x56A4 (DG2) [13:36:14] [PASSED] 0x56B2 (DG2) [13:36:14] [PASSED] 0x56B3 (DG2) [13:36:14] [PASSED] 0x5696 (DG2) [13:36:14] [PASSED] 0x5697 (DG2) [13:36:14] [PASSED] 0xB69 (PVC) [13:36:14] [PASSED] 0xB6E (PVC) [13:36:14] [PASSED] 0xBD4 (PVC) [13:36:14] [PASSED] 0xBD5 (PVC) [13:36:14] [PASSED] 0xBD6 (PVC) [13:36:14] [PASSED] 0xBD7 (PVC) [13:36:14] [PASSED] 0xBD8 (PVC) [13:36:14] [PASSED] 0xBD9 (PVC) [13:36:14] [PASSED] 0xBDA (PVC) [13:36:14] [PASSED] 0xBDB (PVC) [13:36:14] [PASSED] 0xBE0 (PVC) [13:36:14] [PASSED] 0xBE1 (PVC) [13:36:14] [PASSED] 0xBE5 (PVC) [13:36:14] [PASSED] 0x7D40 (METEORLAKE) [13:36:14] [PASSED] 0x7D45 (METEORLAKE) [13:36:14] [PASSED] 0x7D55 (METEORLAKE) [13:36:14] [PASSED] 0x7D60 (METEORLAKE) [13:36:14] [PASSED] 0x7DD5 (METEORLAKE) [13:36:14] [PASSED] 0x6420 (LUNARLAKE) [13:36:14] [PASSED] 0x64A0 (LUNARLAKE) [13:36:14] [PASSED] 0x64B0 (LUNARLAKE) [13:36:14] [PASSED] 0xE202 (BATTLEMAGE) [13:36:14] [PASSED] 0xE209 (BATTLEMAGE) [13:36:14] [PASSED] 0xE20B (BATTLEMAGE) [13:36:14] [PASSED] 0xE20C (BATTLEMAGE) [13:36:14] [PASSED] 0xE20D (BATTLEMAGE) [13:36:14] [PASSED] 0xE210 (BATTLEMAGE) [13:36:14] [PASSED] 0xE211 (BATTLEMAGE) [13:36:14] [PASSED] 0xE212 (BATTLEMAGE) [13:36:14] [PASSED] 0xE216 (BATTLEMAGE) [13:36:14] [PASSED] 0xE220 (BATTLEMAGE) [13:36:14] [PASSED] 0xE221 (BATTLEMAGE) [13:36:14] [PASSED] 0xE222 (BATTLEMAGE) [13:36:14] [PASSED] 0xE223 (BATTLEMAGE) [13:36:14] [PASSED] 0xB080 (PANTHERLAKE) [13:36:14] [PASSED] 0xB081 (PANTHERLAKE) [13:36:14] [PASSED] 0xB082 (PANTHERLAKE) [13:36:14] [PASSED] 0xB083 (PANTHERLAKE) [13:36:14] [PASSED] 0xB084 (PANTHERLAKE) [13:36:14] [PASSED] 0xB085 (PANTHERLAKE) [13:36:14] [PASSED] 0xB086 (PANTHERLAKE) [13:36:14] [PASSED] 0xB087 (PANTHERLAKE) [13:36:14] [PASSED] 0xB08F (PANTHERLAKE) [13:36:14] [PASSED] 0xB090 (PANTHERLAKE) [13:36:14] [PASSED] 0xB0A0 (PANTHERLAKE) [13:36:14] [PASSED] 0xB0B0 (PANTHERLAKE) [13:36:14] [PASSED] 0xFD80 (PANTHERLAKE) [13:36:14] [PASSED] 0xFD81 (PANTHERLAKE) [13:36:14] [PASSED] 0xD740 (NOVALAKE_S) [13:36:14] [PASSED] 0xD741 (NOVALAKE_S) [13:36:14] [PASSED] 0xD742 (NOVALAKE_S) [13:36:14] [PASSED] 0xD743 (NOVALAKE_S) [13:36:14] [PASSED] 0xD744 (NOVALAKE_S) [13:36:14] [PASSED] 0xD745 (NOVALAKE_S) [13:36:14] [PASSED] 0x674C (CRESCENTISLAND) [13:36:14] =============== [PASSED] check_platform_desc =============== [13:36:14] ===================== [PASSED] xe_pci ====================== [13:36:14] =================== xe_rtp (2 subtests) ==================== [13:36:14] =============== xe_rtp_process_to_sr_tests ================ [13:36:14] [PASSED] coalesce-same-reg [13:36:14] [PASSED] no-match-no-add [13:36:14] [PASSED] match-or [13:36:14] [PASSED] match-or-xfail [13:36:14] [PASSED] no-match-no-add-multiple-rules [13:36:14] [PASSED] two-regs-two-entries [13:36:14] [PASSED] clr-one-set-other [13:36:14] [PASSED] set-field [13:36:14] [PASSED] conflict-duplicate [13:36:14] [PASSED] conflict-not-disjoint [13:36:14] [PASSED] conflict-reg-type [13:36:14] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [13:36:14] ================== xe_rtp_process_tests =================== [13:36:14] [PASSED] active1 [13:36:14] [PASSED] active2 [13:36:14] [PASSED] active-inactive [13:36:14] [PASSED] inactive-active [13:36:14] [PASSED] inactive-1st_or_active-inactive [13:36:14] [PASSED] inactive-2nd_or_active-inactive [13:36:14] [PASSED] inactive-last_or_active-inactive [13:36:14] [PASSED] inactive-no_or_active-inactive [13:36:14] ============== [PASSED] xe_rtp_process_tests =============== [13:36:14] ===================== [PASSED] xe_rtp ====================== [13:36:14] ==================== xe_wa (1 subtest) ===================== [13:36:14] ======================== xe_wa_gt ========================= [13:36:14] [PASSED] TIGERLAKE B0 [13:36:14] [PASSED] DG1 A0 [13:36:14] [PASSED] DG1 B0 [13:36:14] [PASSED] ALDERLAKE_S A0 [13:36:14] [PASSED] ALDERLAKE_S B0 [13:36:14] [PASSED] ALDERLAKE_S C0 [13:36:14] [PASSED] ALDERLAKE_S D0 [13:36:14] [PASSED] ALDERLAKE_P A0 [13:36:14] [PASSED] ALDERLAKE_P B0 [13:36:14] [PASSED] ALDERLAKE_P C0 [13:36:14] [PASSED] ALDERLAKE_S RPLS D0 [13:36:14] [PASSED] ALDERLAKE_P RPLU E0 [13:36:14] [PASSED] DG2 G10 C0 [13:36:14] [PASSED] DG2 G11 B1 [13:36:14] [PASSED] DG2 G12 A1 [13:36:14] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0 [13:36:14] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0 [13:36:14] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0 [13:36:14] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0 [13:36:14] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0 [13:36:14] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1 [13:36:14] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0 [13:36:14] ==================== [PASSED] xe_wa_gt ===================== [13:36:14] ====================== [PASSED] xe_wa ====================== [13:36:14] ============================================================ [13:36:14] Testing complete. Ran 512 tests: passed: 494, skipped: 18 [13:36:14] Elapsed time: 36.580s total, 4.263s configuring, 31.800s building, 0.471s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [13:36:14] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:36:15] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:36:41] Starting KUnit Kernel (1/1)... [13:36:41] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:36:41] ============ drm_test_pick_cmdline (2 subtests) ============ [13:36:41] [PASSED] drm_test_pick_cmdline_res_1920_1080_60 [13:36:41] =============== drm_test_pick_cmdline_named =============== [13:36:41] [PASSED] NTSC [13:36:41] [PASSED] NTSC-J [13:36:41] [PASSED] PAL [13:36:41] [PASSED] PAL-M [13:36:41] =========== [PASSED] drm_test_pick_cmdline_named =========== [13:36:41] ============== [PASSED] drm_test_pick_cmdline ============== [13:36:41] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [13:36:41] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [13:36:41] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [13:36:41] =========== drm_validate_clone_mode (2 subtests) =========== [13:36:41] ============== drm_test_check_in_clone_mode =============== [13:36:41] [PASSED] in_clone_mode [13:36:41] [PASSED] not_in_clone_mode [13:36:41] ========== [PASSED] drm_test_check_in_clone_mode =========== [13:36:41] =============== drm_test_check_valid_clones =============== [13:36:41] [PASSED] not_in_clone_mode [13:36:41] [PASSED] valid_clone [13:36:41] [PASSED] invalid_clone [13:36:41] =========== [PASSED] drm_test_check_valid_clones =========== [13:36:41] ============= [PASSED] drm_validate_clone_mode ============= [13:36:41] ============= drm_validate_modeset (1 subtest) ============= [13:36:41] [PASSED] drm_test_check_connector_changed_modeset [13:36:41] ============== [PASSED] drm_validate_modeset =============== [13:36:41] ====== drm_test_bridge_get_current_state (2 subtests) ====== [13:36:41] [PASSED] drm_test_drm_bridge_get_current_state_atomic [13:36:41] [PASSED] drm_test_drm_bridge_get_current_state_legacy [13:36:41] ======== [PASSED] drm_test_bridge_get_current_state ======== [13:36:41] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [13:36:41] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [13:36:41] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [13:36:41] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy [13:36:41] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [13:36:41] ============== drm_bridge_alloc (2 subtests) =============== [13:36:41] [PASSED] drm_test_drm_bridge_alloc_basic [13:36:41] [PASSED] drm_test_drm_bridge_alloc_get_put [13:36:41] ================ [PASSED] drm_bridge_alloc ================= [13:36:41] ============= drm_cmdline_parser (40 subtests) ============= [13:36:41] [PASSED] drm_test_cmdline_force_d_only [13:36:41] [PASSED] drm_test_cmdline_force_D_only_dvi [13:36:41] [PASSED] drm_test_cmdline_force_D_only_hdmi [13:36:41] [PASSED] drm_test_cmdline_force_D_only_not_digital [13:36:41] [PASSED] drm_test_cmdline_force_e_only [13:36:41] [PASSED] drm_test_cmdline_res [13:36:41] [PASSED] drm_test_cmdline_res_vesa [13:36:41] [PASSED] drm_test_cmdline_res_vesa_rblank [13:36:41] [PASSED] drm_test_cmdline_res_rblank [13:36:41] [PASSED] drm_test_cmdline_res_bpp [13:36:41] [PASSED] drm_test_cmdline_res_refresh [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [13:36:41] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [13:36:41] [PASSED] drm_test_cmdline_res_margins_force_on [13:36:41] [PASSED] drm_test_cmdline_res_vesa_margins [13:36:41] [PASSED] drm_test_cmdline_name [13:36:41] [PASSED] drm_test_cmdline_name_bpp [13:36:41] [PASSED] drm_test_cmdline_name_option [13:36:41] [PASSED] drm_test_cmdline_name_bpp_option [13:36:41] [PASSED] drm_test_cmdline_rotate_0 [13:36:41] [PASSED] drm_test_cmdline_rotate_90 [13:36:41] [PASSED] drm_test_cmdline_rotate_180 [13:36:41] [PASSED] drm_test_cmdline_rotate_270 [13:36:41] [PASSED] drm_test_cmdline_hmirror [13:36:41] [PASSED] drm_test_cmdline_vmirror [13:36:41] [PASSED] drm_test_cmdline_margin_options [13:36:41] [PASSED] drm_test_cmdline_multiple_options [13:36:41] [PASSED] drm_test_cmdline_bpp_extra_and_option [13:36:41] [PASSED] drm_test_cmdline_extra_and_option [13:36:41] [PASSED] drm_test_cmdline_freestanding_options [13:36:41] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [13:36:41] [PASSED] drm_test_cmdline_panel_orientation [13:36:41] ================ drm_test_cmdline_invalid ================= [13:36:41] [PASSED] margin_only [13:36:41] [PASSED] interlace_only [13:36:41] [PASSED] res_missing_x [13:36:41] [PASSED] res_missing_y [13:36:41] [PASSED] res_bad_y [13:36:41] [PASSED] res_missing_y_bpp [13:36:41] [PASSED] res_bad_bpp [13:36:41] [PASSED] res_bad_refresh [13:36:41] [PASSED] res_bpp_refresh_force_on_off [13:36:41] [PASSED] res_invalid_mode [13:36:41] [PASSED] res_bpp_wrong_place_mode [13:36:41] [PASSED] name_bpp_refresh [13:36:41] [PASSED] name_refresh [13:36:41] [PASSED] name_refresh_wrong_mode [13:36:41] [PASSED] name_refresh_invalid_mode [13:36:41] [PASSED] rotate_multiple [13:36:41] [PASSED] rotate_invalid_val [13:36:41] [PASSED] rotate_truncated [13:36:41] [PASSED] invalid_option [13:36:41] [PASSED] invalid_tv_option [13:36:41] [PASSED] truncated_tv_option [13:36:41] ============ [PASSED] drm_test_cmdline_invalid ============= [13:36:41] =============== drm_test_cmdline_tv_options =============== [13:36:41] [PASSED] NTSC [13:36:41] [PASSED] NTSC_443 [13:36:41] [PASSED] NTSC_J [13:36:41] [PASSED] PAL [13:36:41] [PASSED] PAL_M [13:36:41] [PASSED] PAL_N [13:36:41] [PASSED] SECAM [13:36:41] [PASSED] MONO_525 [13:36:41] [PASSED] MONO_625 [13:36:41] =========== [PASSED] drm_test_cmdline_tv_options =========== [13:36:41] =============== [PASSED] drm_cmdline_parser ================ [13:36:41] ========== drmm_connector_hdmi_init (20 subtests) ========== [13:36:41] [PASSED] drm_test_connector_hdmi_init_valid [13:36:41] [PASSED] drm_test_connector_hdmi_init_bpc_8 [13:36:41] [PASSED] drm_test_connector_hdmi_init_bpc_10 [13:36:41] [PASSED] drm_test_connector_hdmi_init_bpc_12 [13:36:41] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [13:36:41] [PASSED] drm_test_connector_hdmi_init_bpc_null [13:36:41] [PASSED] drm_test_connector_hdmi_init_formats_empty [13:36:41] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [13:36:41] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [13:36:41] [PASSED] supported_formats=0x9 yuv420_allowed=1 [13:36:41] [PASSED] supported_formats=0x9 yuv420_allowed=0 [13:36:41] [PASSED] supported_formats=0x3 yuv420_allowed=1 [13:36:41] [PASSED] supported_formats=0x3 yuv420_allowed=0 [13:36:41] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [13:36:41] [PASSED] drm_test_connector_hdmi_init_null_ddc [13:36:41] [PASSED] drm_test_connector_hdmi_init_null_product [13:36:41] [PASSED] drm_test_connector_hdmi_init_null_vendor [13:36:41] [PASSED] drm_test_connector_hdmi_init_product_length_exact [13:36:41] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [13:36:41] [PASSED] drm_test_connector_hdmi_init_product_valid [13:36:41] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [13:36:41] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [13:36:41] [PASSED] drm_test_connector_hdmi_init_vendor_valid [13:36:41] ========= drm_test_connector_hdmi_init_type_valid ========= [13:36:41] [PASSED] HDMI-A [13:36:41] [PASSED] HDMI-B [13:36:41] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [13:36:41] ======== drm_test_connector_hdmi_init_type_invalid ======== [13:36:41] [PASSED] Unknown [13:36:41] [PASSED] VGA [13:36:41] [PASSED] DVI-I [13:36:41] [PASSED] DVI-D [13:36:41] [PASSED] DVI-A [13:36:41] [PASSED] Composite [13:36:41] [PASSED] SVIDEO [13:36:41] [PASSED] LVDS [13:36:41] [PASSED] Component [13:36:41] [PASSED] DIN [13:36:41] [PASSED] DP [13:36:41] [PASSED] TV [13:36:41] [PASSED] eDP [13:36:41] [PASSED] Virtual [13:36:41] [PASSED] DSI [13:36:41] [PASSED] DPI [13:36:41] [PASSED] Writeback [13:36:41] [PASSED] SPI [13:36:41] [PASSED] USB [13:36:41] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [13:36:41] ============ [PASSED] drmm_connector_hdmi_init ============= [13:36:41] ============= drmm_connector_init (3 subtests) ============= [13:36:41] [PASSED] drm_test_drmm_connector_init [13:36:41] [PASSED] drm_test_drmm_connector_init_null_ddc [13:36:41] ========= drm_test_drmm_connector_init_type_valid ========= [13:36:41] [PASSED] Unknown [13:36:41] [PASSED] VGA [13:36:41] [PASSED] DVI-I [13:36:41] [PASSED] DVI-D [13:36:41] [PASSED] DVI-A [13:36:41] [PASSED] Composite [13:36:41] [PASSED] SVIDEO [13:36:41] [PASSED] LVDS [13:36:41] [PASSED] Component [13:36:41] [PASSED] DIN [13:36:41] [PASSED] DP [13:36:41] [PASSED] HDMI-A [13:36:41] [PASSED] HDMI-B [13:36:41] [PASSED] TV [13:36:41] [PASSED] eDP [13:36:41] [PASSED] Virtual [13:36:41] [PASSED] DSI [13:36:41] [PASSED] DPI [13:36:41] [PASSED] Writeback [13:36:41] [PASSED] SPI [13:36:41] [PASSED] USB [13:36:41] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [13:36:41] =============== [PASSED] drmm_connector_init =============== [13:36:41] ========= drm_connector_dynamic_init (6 subtests) ========== [13:36:41] [PASSED] drm_test_drm_connector_dynamic_init [13:36:41] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [13:36:41] [PASSED] drm_test_drm_connector_dynamic_init_not_added [13:36:41] [PASSED] drm_test_drm_connector_dynamic_init_properties [13:36:41] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [13:36:41] [PASSED] Unknown [13:36:41] [PASSED] VGA [13:36:41] [PASSED] DVI-I [13:36:41] [PASSED] DVI-D [13:36:41] [PASSED] DVI-A [13:36:41] [PASSED] Composite [13:36:41] [PASSED] SVIDEO [13:36:41] [PASSED] LVDS [13:36:41] [PASSED] Component [13:36:41] [PASSED] DIN [13:36:41] [PASSED] DP [13:36:41] [PASSED] HDMI-A [13:36:41] [PASSED] HDMI-B [13:36:41] [PASSED] TV [13:36:41] [PASSED] eDP [13:36:41] [PASSED] Virtual [13:36:41] [PASSED] DSI [13:36:41] [PASSED] DPI [13:36:41] [PASSED] Writeback [13:36:41] [PASSED] SPI [13:36:41] [PASSED] USB [13:36:41] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [13:36:41] ======== drm_test_drm_connector_dynamic_init_name ========= [13:36:41] [PASSED] Unknown [13:36:41] [PASSED] VGA [13:36:41] [PASSED] DVI-I [13:36:41] [PASSED] DVI-D [13:36:41] [PASSED] DVI-A [13:36:41] [PASSED] Composite [13:36:41] [PASSED] SVIDEO [13:36:41] [PASSED] LVDS [13:36:41] [PASSED] Component [13:36:41] [PASSED] DIN [13:36:41] [PASSED] DP [13:36:41] [PASSED] HDMI-A [13:36:41] [PASSED] HDMI-B [13:36:41] [PASSED] TV [13:36:41] [PASSED] eDP [13:36:41] [PASSED] Virtual [13:36:41] [PASSED] DSI [13:36:41] [PASSED] DPI [13:36:41] [PASSED] Writeback [13:36:41] [PASSED] SPI [13:36:41] [PASSED] USB [13:36:41] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [13:36:41] =========== [PASSED] drm_connector_dynamic_init ============ [13:36:41] ==== drm_connector_dynamic_register_early (4 subtests) ===== [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [13:36:41] ====== [PASSED] drm_connector_dynamic_register_early ======= [13:36:41] ======= drm_connector_dynamic_register (7 subtests) ======== [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_on_list [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_no_init [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [13:36:41] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [13:36:41] ========= [PASSED] drm_connector_dynamic_register ========== [13:36:41] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [13:36:41] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [13:36:41] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [13:36:41] === [PASSED] drm_connector_attach_broadcast_rgb_property === [13:36:41] ========== drm_get_tv_mode_from_name (2 subtests) ========== [13:36:41] ========== drm_test_get_tv_mode_from_name_valid =========== [13:36:41] [PASSED] NTSC [13:36:41] [PASSED] NTSC-443 [13:36:41] [PASSED] NTSC-J [13:36:41] [PASSED] PAL [13:36:41] [PASSED] PAL-M [13:36:41] [PASSED] PAL-N [13:36:41] [PASSED] SECAM [13:36:41] [PASSED] Mono [13:36:41] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [13:36:41] [PASSED] drm_test_get_tv_mode_from_name_truncated [13:36:41] ============ [PASSED] drm_get_tv_mode_from_name ============ [13:36:41] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [13:36:41] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [13:36:41] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [13:36:41] [PASSED] VIC 96 [13:36:41] [PASSED] VIC 97 [13:36:41] [PASSED] VIC 101 [13:36:41] [PASSED] VIC 102 [13:36:41] [PASSED] VIC 106 [13:36:41] [PASSED] VIC 107 [13:36:41] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [13:36:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [13:36:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [13:36:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [13:36:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [13:36:41] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [13:36:41] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [13:36:41] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [13:36:41] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [13:36:41] [PASSED] Automatic [13:36:41] [PASSED] Full [13:36:41] [PASSED] Limited 16:235 [13:36:41] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [13:36:41] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [13:36:41] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [13:36:41] == drm_hdmi_connector_get_output_format_name (2 subtests) == [13:36:41] === drm_test_drm_hdmi_connector_get_output_format_name ==== [13:36:41] [PASSED] RGB [13:36:41] [PASSED] YUV 4:2:0 [13:36:41] [PASSED] YUV 4:2:2 [13:36:41] [PASSED] YUV 4:4:4 [13:36:41] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [13:36:41] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [13:36:41] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [13:36:41] ============= drm_damage_helper (21 subtests) ============== [13:36:41] [PASSED] drm_test_damage_iter_no_damage [13:36:41] [PASSED] drm_test_damage_iter_no_damage_fractional_src [13:36:41] [PASSED] drm_test_damage_iter_no_damage_src_moved [13:36:41] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [13:36:41] [PASSED] drm_test_damage_iter_no_damage_not_visible [13:36:41] [PASSED] drm_test_damage_iter_no_damage_no_crtc [13:36:41] [PASSED] drm_test_damage_iter_no_damage_no_fb [13:36:41] [PASSED] drm_test_damage_iter_simple_damage [13:36:41] [PASSED] drm_test_damage_iter_single_damage [13:36:41] [PASSED] drm_test_damage_iter_single_damage_intersect_src [13:36:41] [PASSED] drm_test_damage_iter_single_damage_outside_src [13:36:41] [PASSED] drm_test_damage_iter_single_damage_fractional_src [13:36:41] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [13:36:41] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [13:36:41] [PASSED] drm_test_damage_iter_single_damage_src_moved [13:36:41] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [13:36:41] [PASSED] drm_test_damage_iter_damage [13:36:41] [PASSED] drm_test_damage_iter_damage_one_intersect [13:36:41] [PASSED] drm_test_damage_iter_damage_one_outside [13:36:41] [PASSED] drm_test_damage_iter_damage_src_moved [13:36:41] [PASSED] drm_test_damage_iter_damage_not_visible [13:36:41] ================ [PASSED] drm_damage_helper ================ [13:36:41] ============== drm_dp_mst_helper (3 subtests) ============== [13:36:41] ============== drm_test_dp_mst_calc_pbn_mode ============== [13:36:41] [PASSED] Clock 154000 BPP 30 DSC disabled [13:36:41] [PASSED] Clock 234000 BPP 30 DSC disabled [13:36:41] [PASSED] Clock 297000 BPP 24 DSC disabled [13:36:41] [PASSED] Clock 332880 BPP 24 DSC enabled [13:36:41] [PASSED] Clock 324540 BPP 24 DSC enabled [13:36:41] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [13:36:41] ============== drm_test_dp_mst_calc_pbn_div =============== [13:36:41] [PASSED] Link rate 2000000 lane count 4 [13:36:41] [PASSED] Link rate 2000000 lane count 2 [13:36:41] [PASSED] Link rate 2000000 lane count 1 [13:36:41] [PASSED] Link rate 1350000 lane count 4 [13:36:41] [PASSED] Link rate 1350000 lane count 2 [13:36:41] [PASSED] Link rate 1350000 lane count 1 [13:36:41] [PASSED] Link rate 1000000 lane count 4 [13:36:41] [PASSED] Link rate 1000000 lane count 2 [13:36:41] [PASSED] Link rate 1000000 lane count 1 [13:36:41] [PASSED] Link rate 810000 lane count 4 [13:36:41] [PASSED] Link rate 810000 lane count 2 [13:36:41] [PASSED] Link rate 810000 lane count 1 [13:36:41] [PASSED] Link rate 540000 lane count 4 [13:36:41] [PASSED] Link rate 540000 lane count 2 [13:36:41] [PASSED] Link rate 540000 lane count 1 [13:36:41] [PASSED] Link rate 270000 lane count 4 [13:36:41] [PASSED] Link rate 270000 lane count 2 [13:36:41] [PASSED] Link rate 270000 lane count 1 [13:36:41] [PASSED] Link rate 162000 lane count 4 [13:36:41] [PASSED] Link rate 162000 lane count 2 [13:36:41] [PASSED] Link rate 162000 lane count 1 [13:36:41] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [13:36:41] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [13:36:41] [PASSED] DP_ENUM_PATH_RESOURCES with port number [13:36:41] [PASSED] DP_POWER_UP_PHY with port number [13:36:41] [PASSED] DP_POWER_DOWN_PHY with port number [13:36:41] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [13:36:41] [PASSED] DP_ALLOCATE_PAYLOAD with port number [13:36:41] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [13:36:41] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [13:36:41] [PASSED] DP_QUERY_PAYLOAD with port number [13:36:41] [PASSED] DP_QUERY_PAYLOAD with VCPI [13:36:41] [PASSED] DP_REMOTE_DPCD_READ with port number [13:36:41] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [13:36:41] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [13:36:41] [PASSED] DP_REMOTE_DPCD_WRITE with port number [13:36:41] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [13:36:41] [PASSED] DP_REMOTE_DPCD_WRITE with data array [13:36:41] [PASSED] DP_REMOTE_I2C_READ with port number [13:36:41] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [13:36:41] [PASSED] DP_REMOTE_I2C_READ with transactions array [13:36:41] [PASSED] DP_REMOTE_I2C_WRITE with port number [13:36:41] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [13:36:41] [PASSED] DP_REMOTE_I2C_WRITE with data array [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [13:36:41] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [13:36:41] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [13:36:41] ================ [PASSED] drm_dp_mst_helper ================ [13:36:41] ================== drm_exec (7 subtests) =================== [13:36:41] [PASSED] sanitycheck [13:36:41] [PASSED] test_lock [13:36:41] [PASSED] test_lock_unlock [13:36:41] [PASSED] test_duplicates [13:36:41] [PASSED] test_prepare [13:36:41] [PASSED] test_prepare_array [13:36:41] [PASSED] test_multiple_loops [13:36:41] ==================== [PASSED] drm_exec ===================== [13:36:41] =========== drm_format_helper_test (17 subtests) =========== [13:36:41] ============== drm_test_fb_xrgb8888_to_gray8 ============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [13:36:41] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [13:36:41] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [13:36:41] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [13:36:41] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [13:36:41] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [13:36:41] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [13:36:41] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [13:36:41] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [13:36:41] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [13:36:41] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [13:36:41] ============== drm_test_fb_xrgb8888_to_mono =============== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [13:36:41] ==================== drm_test_fb_swab ===================== [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ================ [PASSED] drm_test_fb_swab ================= [13:36:41] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [13:36:41] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [13:36:41] [PASSED] single_pixel_source_buffer [13:36:41] [PASSED] single_pixel_clip_rectangle [13:36:41] [PASSED] well_known_colors [13:36:41] [PASSED] destination_pitch [13:36:41] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [13:36:41] ================= drm_test_fb_clip_offset ================= [13:36:41] [PASSED] pass through [13:36:41] [PASSED] horizontal offset [13:36:41] [PASSED] vertical offset [13:36:41] [PASSED] horizontal and vertical offset [13:36:41] [PASSED] horizontal offset (custom pitch) [13:36:41] [PASSED] vertical offset (custom pitch) [13:36:41] [PASSED] horizontal and vertical offset (custom pitch) [13:36:41] ============= [PASSED] drm_test_fb_clip_offset ============= [13:36:41] =================== drm_test_fb_memcpy ==================== [13:36:41] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [13:36:41] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [13:36:41] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [13:36:41] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [13:36:41] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [13:36:41] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [13:36:41] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [13:36:41] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [13:36:41] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [13:36:41] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [13:36:41] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [13:36:41] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [13:36:41] =============== [PASSED] drm_test_fb_memcpy ================ [13:36:41] ============= [PASSED] drm_format_helper_test ============== [13:36:41] ================= drm_format (18 subtests) ================= [13:36:41] [PASSED] drm_test_format_block_width_invalid [13:36:41] [PASSED] drm_test_format_block_width_one_plane [13:36:41] [PASSED] drm_test_format_block_width_two_plane [13:36:41] [PASSED] drm_test_format_block_width_three_plane [13:36:41] [PASSED] drm_test_format_block_width_tiled [13:36:41] [PASSED] drm_test_format_block_height_invalid [13:36:41] [PASSED] drm_test_format_block_height_one_plane [13:36:41] [PASSED] drm_test_format_block_height_two_plane [13:36:41] [PASSED] drm_test_format_block_height_three_plane [13:36:41] [PASSED] drm_test_format_block_height_tiled [13:36:41] [PASSED] drm_test_format_min_pitch_invalid [13:36:41] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [13:36:41] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [13:36:41] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [13:36:41] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [13:36:41] [PASSED] drm_test_format_min_pitch_two_plane [13:36:41] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [13:36:41] [PASSED] drm_test_format_min_pitch_tiled [13:36:41] =================== [PASSED] drm_format ==================== [13:36:41] ============== drm_framebuffer (10 subtests) =============== [13:36:41] ========== drm_test_framebuffer_check_src_coords ========== [13:36:41] [PASSED] Success: source fits into fb [13:36:41] [PASSED] Fail: overflowing fb with x-axis coordinate [13:36:41] [PASSED] Fail: overflowing fb with y-axis coordinate [13:36:41] [PASSED] Fail: overflowing fb with source width [13:36:41] [PASSED] Fail: overflowing fb with source height [13:36:41] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [13:36:41] [PASSED] drm_test_framebuffer_cleanup [13:36:41] =============== drm_test_framebuffer_create =============== [13:36:41] [PASSED] ABGR8888 normal sizes [13:36:41] [PASSED] ABGR8888 max sizes [13:36:41] [PASSED] ABGR8888 pitch greater than min required [13:36:41] [PASSED] ABGR8888 pitch less than min required [13:36:41] [PASSED] ABGR8888 Invalid width [13:36:41] [PASSED] ABGR8888 Invalid buffer handle [13:36:41] [PASSED] No pixel format [13:36:41] [PASSED] ABGR8888 Width 0 [13:36:41] [PASSED] ABGR8888 Height 0 [13:36:41] [PASSED] ABGR8888 Out of bound height * pitch combination [13:36:41] [PASSED] ABGR8888 Large buffer offset [13:36:41] [PASSED] ABGR8888 Buffer offset for inexistent plane [13:36:41] [PASSED] ABGR8888 Invalid flag [13:36:41] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [13:36:41] [PASSED] ABGR8888 Valid buffer modifier [13:36:41] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [13:36:41] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] NV12 Normal sizes [13:36:41] [PASSED] NV12 Max sizes [13:36:41] [PASSED] NV12 Invalid pitch [13:36:41] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [13:36:41] [PASSED] NV12 different modifier per-plane [13:36:41] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [13:36:41] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] NV12 Modifier for inexistent plane [13:36:41] [PASSED] NV12 Handle for inexistent plane [13:36:41] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [13:36:41] [PASSED] YVU420 Normal sizes [13:36:41] [PASSED] YVU420 Max sizes [13:36:41] [PASSED] YVU420 Invalid pitch [13:36:41] [PASSED] YVU420 Different pitches [13:36:41] [PASSED] YVU420 Different buffer offsets/pitches [13:36:41] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [13:36:41] [PASSED] YVU420 Valid modifier [13:36:41] [PASSED] YVU420 Different modifiers per plane [13:36:41] [PASSED] YVU420 Modifier for inexistent plane [13:36:41] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [13:36:41] [PASSED] X0L2 Normal sizes [13:36:41] [PASSED] X0L2 Max sizes [13:36:41] [PASSED] X0L2 Invalid pitch [13:36:41] [PASSED] X0L2 Pitch greater than minimum required [13:36:41] [PASSED] X0L2 Handle for inexistent plane [13:36:41] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [13:36:41] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [13:36:41] [PASSED] X0L2 Valid modifier [13:36:41] [PASSED] X0L2 Modifier for inexistent plane [13:36:41] =========== [PASSED] drm_test_framebuffer_create =========== [13:36:41] [PASSED] drm_test_framebuffer_free [13:36:41] [PASSED] drm_test_framebuffer_init [13:36:41] [PASSED] drm_test_framebuffer_init_bad_format [13:36:41] [PASSED] drm_test_framebuffer_init_dev_mismatch [13:36:41] [PASSED] drm_test_framebuffer_lookup [13:36:41] [PASSED] drm_test_framebuffer_lookup_inexistent [13:36:41] [PASSED] drm_test_framebuffer_modifiers_not_supported [13:36:41] ================= [PASSED] drm_framebuffer ================= [13:36:41] ================ drm_gem_shmem (8 subtests) ================ [13:36:41] [PASSED] drm_gem_shmem_test_obj_create [13:36:41] [PASSED] drm_gem_shmem_test_obj_create_private [13:36:41] [PASSED] drm_gem_shmem_test_pin_pages [13:36:41] [PASSED] drm_gem_shmem_test_vmap [13:36:41] [PASSED] drm_gem_shmem_test_get_sg_table [13:36:41] [PASSED] drm_gem_shmem_test_get_pages_sgt [13:36:41] [PASSED] drm_gem_shmem_test_madvise [13:36:41] [PASSED] drm_gem_shmem_test_purge [13:36:41] ================== [PASSED] drm_gem_shmem ================== [13:36:41] === drm_atomic_helper_connector_hdmi_check (27 subtests) === [13:36:41] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [13:36:41] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [13:36:41] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [13:36:41] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [13:36:41] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [13:36:41] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [13:36:41] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [13:36:41] [PASSED] Automatic [13:36:41] [PASSED] Full [13:36:41] [PASSED] Limited 16:235 [13:36:41] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [13:36:41] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [13:36:41] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [13:36:41] [PASSED] drm_test_check_disable_connector [13:36:41] [PASSED] drm_test_check_hdmi_funcs_reject_rate [13:36:41] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [13:36:41] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [13:36:41] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [13:36:41] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [13:36:41] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [13:36:41] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [13:36:41] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [13:36:41] [PASSED] drm_test_check_output_bpc_dvi [13:36:41] [PASSED] drm_test_check_output_bpc_format_vic_1 [13:36:41] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [13:36:41] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [13:36:41] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [13:36:41] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [13:36:41] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [13:36:41] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [13:36:41] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [13:36:41] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [13:36:41] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [13:36:41] [PASSED] drm_test_check_broadcast_rgb_value [13:36:41] [PASSED] drm_test_check_bpc_8_value [13:36:41] [PASSED] drm_test_check_bpc_10_value [13:36:41] [PASSED] drm_test_check_bpc_12_value [13:36:41] [PASSED] drm_test_check_format_value [13:36:41] [PASSED] drm_test_check_tmds_char_value [13:36:41] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [13:36:41] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) = [13:36:41] [PASSED] drm_test_check_mode_valid [13:36:41] [PASSED] drm_test_check_mode_valid_reject [13:36:41] [PASSED] drm_test_check_mode_valid_reject_rate [13:36:41] [PASSED] drm_test_check_mode_valid_reject_max_clock [13:36:41] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [13:36:41] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) = [13:36:41] [PASSED] drm_test_check_infoframes [13:36:41] [PASSED] drm_test_check_reject_avi_infoframe [13:36:41] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8 [13:36:41] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10 [13:36:41] [PASSED] drm_test_check_reject_audio_infoframe [13:36:41] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes === [13:36:41] ================= drm_managed (2 subtests) ================= [13:36:41] [PASSED] drm_test_managed_release_action [13:36:41] [PASSED] drm_test_managed_run_action [13:36:41] =================== [PASSED] drm_managed =================== [13:36:41] =================== drm_mm (6 subtests) ==================== [13:36:41] [PASSED] drm_test_mm_init [13:36:41] [PASSED] drm_test_mm_debug [13:36:41] [PASSED] drm_test_mm_align32 [13:36:41] [PASSED] drm_test_mm_align64 [13:36:41] [PASSED] drm_test_mm_lowest [13:36:41] [PASSED] drm_test_mm_highest [13:36:41] ===================== [PASSED] drm_mm ====================== [13:36:41] ============= drm_modes_analog_tv (5 subtests) ============= [13:36:41] [PASSED] drm_test_modes_analog_tv_mono_576i [13:36:41] [PASSED] drm_test_modes_analog_tv_ntsc_480i [13:36:41] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [13:36:41] [PASSED] drm_test_modes_analog_tv_pal_576i [13:36:41] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [13:36:41] =============== [PASSED] drm_modes_analog_tv =============== [13:36:41] ============== drm_plane_helper (2 subtests) =============== [13:36:41] =============== drm_test_check_plane_state ================ [13:36:41] [PASSED] clipping_simple [13:36:41] [PASSED] clipping_rotate_reflect [13:36:41] [PASSED] positioning_simple [13:36:41] [PASSED] upscaling [13:36:41] [PASSED] downscaling [13:36:41] [PASSED] rounding1 [13:36:41] [PASSED] rounding2 [13:36:41] [PASSED] rounding3 [13:36:41] [PASSED] rounding4 [13:36:41] =========== [PASSED] drm_test_check_plane_state ============ [13:36:41] =========== drm_test_check_invalid_plane_state ============ [13:36:41] [PASSED] positioning_invalid [13:36:41] [PASSED] upscaling_invalid [13:36:41] [PASSED] downscaling_invalid [13:36:41] ======= [PASSED] drm_test_check_invalid_plane_state ======== [13:36:41] ================ [PASSED] drm_plane_helper ================= [13:36:41] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [13:36:41] ====== drm_test_connector_helper_tv_get_modes_check ======= [13:36:41] [PASSED] None [13:36:41] [PASSED] PAL [13:36:41] [PASSED] NTSC [13:36:41] [PASSED] Both, NTSC Default [13:36:41] [PASSED] Both, PAL Default [13:36:41] [PASSED] Both, NTSC Default, with PAL on command-line [13:36:41] [PASSED] Both, PAL Default, with NTSC on command-line [13:36:41] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [13:36:41] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [13:36:41] ================== drm_rect (9 subtests) =================== [13:36:41] [PASSED] drm_test_rect_clip_scaled_div_by_zero [13:36:41] [PASSED] drm_test_rect_clip_scaled_not_clipped [13:36:41] [PASSED] drm_test_rect_clip_scaled_clipped [13:36:41] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [13:36:41] ================= drm_test_rect_intersect ================= [13:36:41] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [13:36:41] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [13:36:41] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [13:36:41] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [13:36:41] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [13:36:41] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [13:36:41] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [13:36:41] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [13:36:41] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [13:36:41] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [13:36:41] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [13:36:41] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [13:36:41] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [13:36:41] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [13:36:41] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [13:36:41] ============= [PASSED] drm_test_rect_intersect ============= [13:36:41] ================ drm_test_rect_calc_hscale ================ [13:36:41] [PASSED] normal use [13:36:41] [PASSED] out of max range [13:36:41] [PASSED] out of min range [13:36:41] [PASSED] zero dst [13:36:41] [PASSED] negative src [13:36:41] [PASSED] negative dst [13:36:41] ============ [PASSED] drm_test_rect_calc_hscale ============ [13:36:41] ================ drm_test_rect_calc_vscale ================ [13:36:41] [PASSED] normal use [13:36:41] [PASSED] out of max range [13:36:41] [PASSED] out of min range [13:36:41] [PASSED] zero dst [13:36:41] [PASSED] negative src [13:36:41] [PASSED] negative dst stty: 'standard input': Inappropriate ioctl for device [13:36:41] ============ [PASSED] drm_test_rect_calc_vscale ============ [13:36:41] ================== drm_test_rect_rotate =================== [13:36:41] [PASSED] reflect-x [13:36:41] [PASSED] reflect-y [13:36:41] [PASSED] rotate-0 [13:36:41] [PASSED] rotate-90 [13:36:41] [PASSED] rotate-180 [13:36:41] [PASSED] rotate-270 [13:36:41] ============== [PASSED] drm_test_rect_rotate =============== [13:36:41] ================ drm_test_rect_rotate_inv ================= [13:36:41] [PASSED] reflect-x [13:36:41] [PASSED] reflect-y [13:36:41] [PASSED] rotate-0 [13:36:41] [PASSED] rotate-90 [13:36:41] [PASSED] rotate-180 [13:36:41] [PASSED] rotate-270 [13:36:41] ============ [PASSED] drm_test_rect_rotate_inv ============= [13:36:41] ==================== [PASSED] drm_rect ===================== [13:36:41] ============ drm_sysfb_modeset_test (1 subtest) ============ [13:36:41] ============ drm_test_sysfb_build_fourcc_list ============= [13:36:41] [PASSED] no native formats [13:36:41] [PASSED] XRGB8888 as native format [13:36:41] [PASSED] remove duplicates [13:36:41] [PASSED] convert alpha formats [13:36:41] [PASSED] random formats [13:36:41] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [13:36:41] ============= [PASSED] drm_sysfb_modeset_test ============== [13:36:41] ================== drm_fixp (2 subtests) =================== [13:36:41] [PASSED] drm_test_int2fixp [13:36:41] [PASSED] drm_test_sm2fixp [13:36:41] ==================== [PASSED] drm_fixp ===================== [13:36:41] ============================================================ [13:36:41] Testing complete. Ran 621 tests: passed: 621 [13:36:41] Elapsed time: 27.348s total, 1.658s configuring, 25.518s building, 0.138s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [13:36:41] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [13:36:43] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [13:36:53] Starting KUnit Kernel (1/1)... [13:36:53] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [13:36:53] ================= ttm_device (5 subtests) ================== [13:36:53] [PASSED] ttm_device_init_basic [13:36:53] [PASSED] ttm_device_init_multiple [13:36:53] [PASSED] ttm_device_fini_basic [13:36:53] [PASSED] ttm_device_init_no_vma_man [13:36:53] ================== ttm_device_init_pools ================== [13:36:53] [PASSED] No DMA allocations, no DMA32 required [13:36:53] [PASSED] DMA allocations, DMA32 required [13:36:53] [PASSED] No DMA allocations, DMA32 required [13:36:53] [PASSED] DMA allocations, no DMA32 required [13:36:53] ============== [PASSED] ttm_device_init_pools ============== [13:36:53] =================== [PASSED] ttm_device ==================== [13:36:53] ================== ttm_pool (8 subtests) =================== [13:36:53] ================== ttm_pool_alloc_basic =================== [13:36:53] [PASSED] One page [13:36:53] [PASSED] More than one page [13:36:53] [PASSED] Above the allocation limit [13:36:53] [PASSED] One page, with coherent DMA mappings enabled [13:36:53] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [13:36:53] ============== [PASSED] ttm_pool_alloc_basic =============== [13:36:53] ============== ttm_pool_alloc_basic_dma_addr ============== [13:36:53] [PASSED] One page [13:36:53] [PASSED] More than one page [13:36:53] [PASSED] Above the allocation limit [13:36:53] [PASSED] One page, with coherent DMA mappings enabled [13:36:53] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [13:36:53] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [13:36:53] [PASSED] ttm_pool_alloc_order_caching_match [13:36:53] [PASSED] ttm_pool_alloc_caching_mismatch [13:36:53] [PASSED] ttm_pool_alloc_order_mismatch [13:36:53] [PASSED] ttm_pool_free_dma_alloc [13:36:53] [PASSED] ttm_pool_free_no_dma_alloc [13:36:53] [PASSED] ttm_pool_fini_basic [13:36:53] ==================== [PASSED] ttm_pool ===================== [13:36:53] ================ ttm_resource (8 subtests) ================= [13:36:53] ================= ttm_resource_init_basic ================= [13:36:53] [PASSED] Init resource in TTM_PL_SYSTEM [13:36:53] [PASSED] Init resource in TTM_PL_VRAM [13:36:53] [PASSED] Init resource in a private placement [13:36:53] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [13:36:53] ============= [PASSED] ttm_resource_init_basic ============= [13:36:53] [PASSED] ttm_resource_init_pinned [13:36:53] [PASSED] ttm_resource_fini_basic [13:36:53] [PASSED] ttm_resource_manager_init_basic [13:36:53] [PASSED] ttm_resource_manager_usage_basic [13:36:53] [PASSED] ttm_resource_manager_set_used_basic [13:36:53] [PASSED] ttm_sys_man_alloc_basic [13:36:53] [PASSED] ttm_sys_man_free_basic [13:36:53] ================== [PASSED] ttm_resource =================== [13:36:53] =================== ttm_tt (15 subtests) =================== [13:36:53] ==================== ttm_tt_init_basic ==================== [13:36:53] [PASSED] Page-aligned size [13:36:53] [PASSED] Extra pages requested [13:36:53] ================ [PASSED] ttm_tt_init_basic ================ [13:36:53] [PASSED] ttm_tt_init_misaligned [13:36:53] [PASSED] ttm_tt_fini_basic [13:36:53] [PASSED] ttm_tt_fini_sg [13:36:53] [PASSED] ttm_tt_fini_shmem [13:36:53] [PASSED] ttm_tt_create_basic [13:36:53] [PASSED] ttm_tt_create_invalid_bo_type [13:36:53] [PASSED] ttm_tt_create_ttm_exists [13:36:53] [PASSED] ttm_tt_create_failed [13:36:53] [PASSED] ttm_tt_destroy_basic [13:36:53] [PASSED] ttm_tt_populate_null_ttm [13:36:53] [PASSED] ttm_tt_populate_populated_ttm [13:36:53] [PASSED] ttm_tt_unpopulate_basic [13:36:53] [PASSED] ttm_tt_unpopulate_empty_ttm [13:36:53] [PASSED] ttm_tt_swapin_basic [13:36:53] ===================== [PASSED] ttm_tt ====================== [13:36:53] =================== ttm_bo (14 subtests) =================== [13:36:53] =========== ttm_bo_reserve_optimistic_no_ticket =========== [13:36:53] [PASSED] Cannot be interrupted and sleeps [13:36:53] [PASSED] Cannot be interrupted, locks straight away [13:36:53] [PASSED] Can be interrupted, sleeps [13:36:53] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [13:36:53] [PASSED] ttm_bo_reserve_locked_no_sleep [13:36:53] [PASSED] ttm_bo_reserve_no_wait_ticket [13:36:53] [PASSED] ttm_bo_reserve_double_resv [13:36:53] [PASSED] ttm_bo_reserve_interrupted [13:36:53] [PASSED] ttm_bo_reserve_deadlock [13:36:53] [PASSED] ttm_bo_unreserve_basic [13:36:53] [PASSED] ttm_bo_unreserve_pinned [13:36:53] [PASSED] ttm_bo_unreserve_bulk [13:36:53] [PASSED] ttm_bo_fini_basic [13:36:53] [PASSED] ttm_bo_fini_shared_resv [13:36:53] [PASSED] ttm_bo_pin_basic [13:36:53] [PASSED] ttm_bo_pin_unpin_resource [13:36:53] [PASSED] ttm_bo_multiple_pin_one_unpin [13:36:53] ===================== [PASSED] ttm_bo ====================== [13:36:53] ============== ttm_bo_validate (21 subtests) =============== [13:36:53] ============== ttm_bo_init_reserved_sys_man =============== [13:36:53] [PASSED] Buffer object for userspace [13:36:53] [PASSED] Kernel buffer object [13:36:53] [PASSED] Shared buffer object [13:36:53] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [13:36:53] ============== ttm_bo_init_reserved_mock_man ============== [13:36:53] [PASSED] Buffer object for userspace [13:36:53] [PASSED] Kernel buffer object [13:36:53] [PASSED] Shared buffer object [13:36:53] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [13:36:53] [PASSED] ttm_bo_init_reserved_resv [13:36:53] ================== ttm_bo_validate_basic ================== [13:36:53] [PASSED] Buffer object for userspace [13:36:53] [PASSED] Kernel buffer object [13:36:53] [PASSED] Shared buffer object [13:36:53] ============== [PASSED] ttm_bo_validate_basic ============== [13:36:53] [PASSED] ttm_bo_validate_invalid_placement [13:36:53] ============= ttm_bo_validate_same_placement ============== [13:36:53] [PASSED] System manager [13:36:53] [PASSED] VRAM manager [13:36:53] ========= [PASSED] ttm_bo_validate_same_placement ========== [13:36:53] [PASSED] ttm_bo_validate_failed_alloc [13:36:53] [PASSED] ttm_bo_validate_pinned [13:36:53] [PASSED] ttm_bo_validate_busy_placement [13:36:53] ================ ttm_bo_validate_multihop ================= [13:36:53] [PASSED] Buffer object for userspace [13:36:53] [PASSED] Kernel buffer object [13:36:53] [PASSED] Shared buffer object [13:36:53] ============ [PASSED] ttm_bo_validate_multihop ============= [13:36:53] ========== ttm_bo_validate_no_placement_signaled ========== [13:36:53] [PASSED] Buffer object in system domain, no page vector [13:36:53] [PASSED] Buffer object in system domain with an existing page vector [13:36:53] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [13:36:53] ======== ttm_bo_validate_no_placement_not_signaled ======== [13:36:53] [PASSED] Buffer object for userspace [13:36:53] [PASSED] Kernel buffer object [13:36:53] [PASSED] Shared buffer object [13:36:53] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [13:36:53] [PASSED] ttm_bo_validate_move_fence_signaled [13:36:53] ========= ttm_bo_validate_move_fence_not_signaled ========= [13:36:53] [PASSED] Waits for GPU [13:36:53] [PASSED] Tries to lock straight away [13:36:53] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [13:36:53] [PASSED] ttm_bo_validate_happy_evict [13:36:53] [PASSED] ttm_bo_validate_all_pinned_evict [13:36:53] [PASSED] ttm_bo_validate_allowed_only_evict [13:36:53] [PASSED] ttm_bo_validate_deleted_evict [13:36:53] [PASSED] ttm_bo_validate_busy_domain_evict [13:36:53] [PASSED] ttm_bo_validate_evict_gutting [13:36:53] [PASSED] ttm_bo_validate_recrusive_evict stty: 'standard input': Inappropriate ioctl for device [13:36:53] ================= [PASSED] ttm_bo_validate ================= [13:36:53] ============================================================ [13:36:53] Testing complete. Ran 101 tests: passed: 101 [13:36:53] Elapsed time: 11.625s total, 1.683s configuring, 9.726s building, 0.176s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✗ Xe.CI.BAT: failure for drm/xe/xe3p_lpg: L2 flush optimization (rev2)
In reply to Tejas Upadhyay== Series Details ==
== Series Details ==
Series: drm/xe/xe3p_lpg: L2 flush optimization (rev2)
URL : https://patchwork.freedesktop.org/series/158017/
State : failure
== Summary ==
CI Bug Log - changes from xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb_BAT -> xe-pw-158017v2_BAT
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with xe-pw-158017v2_BAT absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in xe-pw-158017v2_BAT, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (12 -> 12)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in xe-pw-158017v2_BAT:
### IGT changes ###
#### Possible regressions ####
* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-null-rebind:
- bat-bmg-3: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/bat-bmg-3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/bat-bmg-3/igt@[email protected]
Build changes
-------------
* Linux: xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb -> xe-pw-158017v2
IGT_8746: 8746
xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb: 5f16c3d1100e59f2fbaeb2724039cc3a948574bb
xe-pw-158017v2: 158017v2
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/index.html
Patchwork
CI✗ Xe.CI.FULL: failure for drm/xe/xe3p_lpg: L2 flush optimization (rev2)
In reply to Tejas Upadhyay== Series Details ==
== Series Details ==
Series: drm/xe/xe3p_lpg: L2 flush optimization (rev2)
URL : https://patchwork.freedesktop.org/series/158017/
State : failure
== Summary ==
CI Bug Log - changes from xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb_FULL -> xe-pw-158017v2_FULL
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with xe-pw-158017v2_FULL absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in xe-pw-158017v2_FULL, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (2 -> 2)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in xe-pw-158017v2_FULL:
### IGT changes ###
#### Possible regressions ####
* igt@kms_ccs@crc-primary-suspend-4-tiled-lnl-ccs@pipe-c-edp-1:
- shard-lnl: [PASS][1] -> [INCOMPLETE][2] +1 other test incomplete
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-lnl-3/igt@kms_ccs@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-lnl-1/igt@kms_ccs@[email protected]
* igt@kms_flip@2x-flip-vs-rmfb-interruptible@ac-dp2-hdmi-a3:
- shard-bmg: [PASS][3] -> [INCOMPLETE][4] +1 other test incomplete
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-7/igt@kms_flip@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-3/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a3:
- shard-bmg: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-8/igt@kms_flip@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_flip@[email protected]
Known issues
------------
Here are the changes found in xe-pw-158017v2_FULL that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_big_fb@4-tiled-64bpp-rotate-270:
- shard-bmg: NOTRUN -> [SKIP][7] ([Intel XE#2327])
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0:
- shard-bmg: NOTRUN -> [SKIP][8] ([Intel XE#1124])
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_ccs@crc-primary-basic-4-tiled-mtl-mc-ccs:
- shard-bmg: NOTRUN -> [SKIP][9] ([Intel XE#2887]) +4 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@kms_ccs@crc-primary-suspend-4-tiled-lnl-ccs@pipe-d-hdmi-a-3:
- shard-bmg: NOTRUN -> [SKIP][10] ([Intel XE#2652] / [Intel XE#787]) +8 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@kms_ccs@[email protected]
* igt@kms_chamelium_edid@hdmi-edid-change-during-hibernate:
- shard-bmg: NOTRUN -> [SKIP][11] ([Intel XE#2252]) +1 other test skip
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_color_pipeline@plane-lut3d-green-only@pipe-a-dp-2:
- shard-bmg: NOTRUN -> [SKIP][12] ([Intel XE#6969]) +2 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_color_pipeline@[email protected]
* igt@kms_color_pipeline@plane-lut3d-green-only@pipe-d-dp-2:
- shard-bmg: NOTRUN -> [SKIP][13] ([Intel XE#6969] / [Intel XE#7006]) +1 other test skip
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_color_pipeline@[email protected]
* igt@kms_content_protection@srm@pipe-a-dp-2:
- shard-bmg: NOTRUN -> [FAIL][14] ([Intel XE#1178] / [Intel XE#3304]) +1 other test fail
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_content_protection@[email protected]
* igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
- shard-bmg: [PASS][15] -> [SKIP][16] ([Intel XE#2291]) +3 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-10/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html
* igt@kms_dither@fb-8bpc-vs-panel-6bpc:
- shard-bmg: [PASS][17] -> [SKIP][18] ([Intel XE#1340])
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_dsc@dsc-with-bpc-formats:
- shard-bmg: NOTRUN -> [SKIP][19] ([Intel XE#2244])
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible@ab-dp2-hdmi-a3:
- shard-bmg: NOTRUN -> [INCOMPLETE][20] ([Intel XE#6819])
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-3/igt@kms_flip@[email protected]
* igt@kms_flip@2x-nonexisting-fb:
- shard-bmg: [PASS][21] -> [SKIP][22] ([Intel XE#2316]) +6 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-10/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-bmg: [PASS][23] -> [FAIL][24] ([Intel XE#7030])
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-8/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
- shard-bmg: NOTRUN -> [SKIP][25] ([Intel XE#4141]) +3 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen.html
* igt@kms_frontbuffer_tracking@fbc-argb161616f-draw-mmap-wc:
- shard-bmg: NOTRUN -> [SKIP][26] ([Intel XE#7061])
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-tiling-y:
- shard-bmg: NOTRUN -> [SKIP][27] ([Intel XE#2352])
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-cur-indfb-draw-mmap-wc:
- shard-bmg: NOTRUN -> [SKIP][28] ([Intel XE#2311]) +5 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-cur-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-pgflip-blt:
- shard-bmg: NOTRUN -> [SKIP][29] ([Intel XE#2313]) +7 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-indfb-msflip-blt:
- shard-bmg: NOTRUN -> [SKIP][30] ([Intel XE#2312]) +1 other test skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@kms_hdr@static-toggle-suspend:
- shard-bmg: [PASS][31] -> [SKIP][32] ([Intel XE#1503])
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-7/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_plane@pixel-format-4-tiled-dg2-mc-ccs-modifier@pipe-b-plane-3:
- shard-bmg: NOTRUN -> [SKIP][33] ([Intel XE#7130]) +8 other tests skip
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_plane@[email protected]
* igt@kms_plane@pixel-format-4-tiled-dg2-mc-ccs-modifier@pipe-b-plane-5:
- shard-bmg: NOTRUN -> [SKIP][34] ([Intel XE#7111] / [Intel XE#7130]) +1 other test skip
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_plane@[email protected]
* igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping:
- shard-bmg: NOTRUN -> [SKIP][35] ([Intel XE#7111] / [Intel XE#7130] / [Intel XE#7131])
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping.html
* igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping@pipe-a-plane-5:
- shard-bmg: NOTRUN -> [SKIP][36] ([Intel XE#7131])
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping@pipe-a-plane-5.html
* igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping@pipe-b-plane-5:
- shard-bmg: NOTRUN -> [SKIP][37] ([Intel XE#7111] / [Intel XE#7131])
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@kms_plane@pixel-format-y-tiled-gen12-mc-ccs-modifier-source-clamping@pipe-b-plane-5.html
* igt@kms_plane_multiple@2x-tiling-x:
- shard-bmg: [PASS][38] -> [SKIP][39] ([Intel XE#4596])
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-4/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_plane_scaling@2x-scaler-multi-pipe:
- shard-bmg: [PASS][40] -> [SKIP][41] ([Intel XE#2571])
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-4/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_pm_backlight@fade-with-dpms:
- shard-bmg: NOTRUN -> [SKIP][42] ([Intel XE#870])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@kms_psr2_sf@fbc-pr-overlay-primary-update-sf-dmg-area:
- shard-bmg: NOTRUN -> [SKIP][43] ([Intel XE#1406] / [Intel XE#1489]) +2 other tests skip
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@kms_psr2_su@page_flip-p010:
- shard-bmg: NOTRUN -> [SKIP][44] ([Intel XE#1406] / [Intel XE#2387])
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@kms_psr2_su@page_flip-p010.html
* igt@kms_psr@psr-primary-blt:
- shard-bmg: NOTRUN -> [SKIP][45] ([Intel XE#1406] / [Intel XE#2234] / [Intel XE#2850]) +2 other tests skip
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-lnl: [PASS][46] -> [FAIL][47] ([Intel XE#1874])
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-lnl-4/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-lnl-2/igt@[email protected]
* igt@kms_rotation_crc@primary-y-tiled-reflect-x-0:
- shard-bmg: NOTRUN -> [SKIP][48] ([Intel XE#2330])
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@kms_setmode@clone-exclusive-crtc:
- shard-bmg: [PASS][49] -> [SKIP][50] ([Intel XE#1435])
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-10/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_vrr@flip-suspend:
- shard-bmg: NOTRUN -> [SKIP][51] ([Intel XE#1499]) +1 other test skip
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@xe_compute@ccs-mode-compute-kernel:
- shard-bmg: NOTRUN -> [SKIP][52] ([Intel XE#6599])
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@xe_eudebug@basic-connect:
- shard-bmg: NOTRUN -> [SKIP][53] ([Intel XE#4837]) +1 other test skip
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@[email protected]
* igt@xe_eudebug_online@writes-caching-vram-bb-vram-target-sram:
- shard-bmg: NOTRUN -> [SKIP][54] ([Intel XE#4837] / [Intel XE#6665]) +1 other test skip
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@xe_evict@evict-mixed-many-threads-small:
- shard-bmg: [PASS][55] -> [INCOMPLETE][56] ([Intel XE#6321])
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-9/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-4/igt@[email protected]
* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue:
- shard-bmg: NOTRUN -> [SKIP][57] ([Intel XE#2322]) +2 other tests skip
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue.html
* igt@xe_exec_fault_mode@many-multi-queue-userptr-rebind:
- shard-bmg: NOTRUN -> [SKIP][58] ([Intel XE#7136]) +1 other test skip
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@xe_exec_multi_queue@few-execs-preempt-mode-userptr-invalidate:
- shard-bmg: NOTRUN -> [SKIP][59] ([Intel XE#6874]) +5 other tests skip
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@xe_exec_multi_queue@few-execs-preempt-mode-userptr-invalidate.html
* igt@xe_exec_system_allocator@many-64k-mmap-huge:
- shard-bmg: NOTRUN -> [SKIP][60] ([Intel XE#5007])
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@xe_exec_system_allocator@process-many-large-execqueues-mmap-free-huge-nomemset:
- shard-bmg: NOTRUN -> [SKIP][61] ([Intel XE#4943]) +3 other tests skip
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@xe_exec_system_allocator@process-many-large-execqueues-mmap-free-huge-nomemset.html
* igt@xe_exec_threads@threads-multi-queue-mixed-fd-userptr-invalidate-race:
- shard-bmg: NOTRUN -> [SKIP][62] ([Intel XE#7138])
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@xe_exec_threads@threads-multi-queue-mixed-fd-userptr-invalidate-race.html
* igt@xe_multigpu_svm@mgpu-latency-prefetch:
- shard-bmg: NOTRUN -> [SKIP][63] ([Intel XE#6964])
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
* igt@xe_pm@s3-vm-bind-userptr:
- shard-bmg: NOTRUN -> [ABORT][64] ([Intel XE#7169])
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@xe_query@multigpu-query-oa-units:
- shard-bmg: NOTRUN -> [SKIP][65] ([Intel XE#944])
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-10/igt@[email protected]
#### Possible fixes ####
* igt@kms_cursor_legacy@cursora-vs-flipb-atomic:
- shard-bmg: [SKIP][66] ([Intel XE#2291]) -> [PASS][67] +1 other test pass
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-1/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-bmg: [FAIL][68] ([Intel XE#6715]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-9/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-7/igt@[email protected]
* igt@kms_dp_linktrain_fallback@dp-fallback:
- shard-bmg: [SKIP][70] ([Intel XE#4294]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-1/igt@[email protected]
* igt@kms_flip@2x-flip-vs-dpms:
- shard-bmg: [SKIP][72] ([Intel XE#2316]) -> [PASS][73] +3 other tests pass
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-1/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-lnl: [FAIL][74] ([Intel XE#301]) -> [PASS][75] +1 other test pass
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-lnl-7/igt@kms_flip@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-lnl-3/igt@kms_flip@[email protected]
* igt@kms_hdr@static-toggle-dpms:
- shard-bmg: [SKIP][76] ([Intel XE#1503]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-5/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@[email protected]
* igt@kms_sequence@queue-busy@pipe-c-dp-2:
- shard-bmg: [FAIL][78] -> [PASS][79] +1 other test pass
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-3/igt@kms_sequence@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-9/igt@kms_sequence@[email protected]
* igt@kms_vrr@cmrr@pipe-a-edp-1:
- shard-lnl: [FAIL][80] ([Intel XE#4459]) -> [PASS][81] +1 other test pass
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-lnl-2/igt@kms_vrr@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-lnl-5/igt@kms_vrr@[email protected]
* igt@xe_prime_self_import@basic-with_two_bos:
- shard-bmg: [ABORT][82] ([Intel XE#7169]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-5/igt@xe_prime_self_import@basic-with_two_bos.html
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@xe_prime_self_import@basic-with_two_bos.html
#### Warnings ####
* igt@kms_content_protection@lic-type-0:
- shard-bmg: [FAIL][84] ([Intel XE#1178] / [Intel XE#3304]) -> [SKIP][85] ([Intel XE#2341])
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-7/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@[email protected]
* igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible:
- shard-bmg: [SKIP][86] ([Intel XE#2316]) -> [INCOMPLETE][87] ([Intel XE#6819])
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible.html
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-3/igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render:
- shard-bmg: [SKIP][88] ([Intel XE#4141]) -> [SKIP][89] ([Intel XE#2312]) +6 other tests skip
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-4/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render.html
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-pgflip-blt:
- shard-bmg: [SKIP][90] ([Intel XE#2312]) -> [SKIP][91] ([Intel XE#4141]) +1 other test skip
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-shrfb-plflip-blt:
- shard-bmg: [SKIP][92] ([Intel XE#2311]) -> [SKIP][93] ([Intel XE#2312]) +15 other tests skip
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-10/igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-shrfb-plflip-blt.html
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-shrfb-plflip-blt.html
* igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-spr-indfb-onoff:
- shard-bmg: [SKIP][94] ([Intel XE#2312]) -> [SKIP][95] ([Intel XE#2311]) +8 other tests skip
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-spr-indfb-onoff.html
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-1/igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-spr-indfb-onoff.html
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-render:
- shard-bmg: [SKIP][96] ([Intel XE#2312]) -> [SKIP][97] ([Intel XE#2313]) +7 other tests skip
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-render.html
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-1/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-msflip-blt:
- shard-bmg: [SKIP][98] ([Intel XE#2313]) -> [SKIP][99] ([Intel XE#2312]) +17 other tests skip
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-10/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-msflip-blt.html
[99]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-6/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-msflip-blt.html
* igt@kms_tiled_display@basic-test-pattern:
- shard-bmg: [SKIP][100] ([Intel XE#2426]) -> [FAIL][101] ([Intel XE#1729])
[100]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb/shard-bmg-3/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/shard-bmg-4/igt@[email protected]
[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1178
[Intel XE#1340]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1340
[Intel XE#1406]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1406
[Intel XE#1435]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1435
[Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
[Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
[Intel XE#1503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1503
[Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
[Intel XE#1874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1874
[Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
[Intel XE#2244]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2244
[Intel XE#2252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2252
[Intel XE#2291]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2291
[Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
[Intel XE#2312]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2312
[Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
[Intel XE#2316]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2316
[Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
[Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
[Intel XE#2330]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2330
[Intel XE#2341]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2341
[Intel XE#2352]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2352
[Intel XE#2387]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2387
[Intel XE#2426]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2426
[Intel XE#2571]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2571
[Intel XE#2652]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2652
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
[Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
[Intel XE#3304]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3304
[Intel XE#4141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4141
[Intel XE#4294]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4294
[Intel XE#4459]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4459
[Intel XE#4596]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4596
[Intel XE#4837]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4837
[Intel XE#4943]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4943
[Intel XE#5007]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5007
[Intel XE#6321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6321
[Intel XE#6599]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6599
[Intel XE#6665]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6665
[Intel XE#6715]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6715
[Intel XE#6819]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6819
[Intel XE#6874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6874
[Intel XE#6964]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6964
[Intel XE#6969]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6969
[Intel XE#7006]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7006
[Intel XE#7030]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7030
[Intel XE#7061]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7061
[Intel XE#7111]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7111
[Intel XE#7130]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7130
[Intel XE#7131]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7131
[Intel XE#7136]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7136
[Intel XE#7138]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7138
[Intel XE#7169]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7169
[Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
[Intel XE#870]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/870
[Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944
Build changes
-------------
* Linux: xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb -> xe-pw-158017v2
IGT_8746: 8746
xe-4536-5f16c3d1100e59f2fbaeb2724039cc3a948574bb: 5f16c3d1100e59f2fbaeb2724039cc3a948574bb
xe-pw-158017v2: 158017v2
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158017v2/index.html