Skip to content

Commit 6df106e

Browse files
matt-auldlucasdemarchi
authored andcommitted
drm/xe/bmg: improve cache flushing behaviour
The BSpec says that EN_L3_RW_CCS_CACHE_FLUSH must be toggled on for manual global invalidation to take effect and actually flush device cache, however this also turns on flushing for things like pipecontrol, which occurs between submissions for compute/render. This sounds like massive overkill for our needs, where we already have the manual flushing on the display side with the global invalidation. Some observations on BMG: 1. Disabling l2 caching for host writes and stubbing out the driver global invalidation but keeping EN_L3_RW_CCS_CACHE_FLUSH enabled, has no impact on wb-transient-vs-display IGT, which makes sense since the pipecontrol is now flushing the device cache after the render copy. Without EN_L3_RW_CCS_CACHE_FLUSH the test then fails, which is also expected since device cache is now dirty and display engine can't see the writes. 2. Disabling EN_L3_RW_CCS_CACHE_FLUSH, but keeping the driver global invalidation also has no impact on wb-transient-vs-display. This suggests that the global invalidation still works as expected and is flushing the device cache without EN_L3_RW_CCS_CACHE_FLUSH turned on. With that drop EN_L3_RW_CCS_CACHE_FLUSH. This helps some workloads since we no longer flush the device cache between submissions as part of pipecontrol. Edit: We now also have clarification from HW side that BSpec was indeed wrong here. v2: - Rebase and update commit message. BSpec: 71718 Signed-off-by: Matthew Auld <[email protected]> Cc: Vitasta Wattal <[email protected]> Cc: Matt Roper <[email protected]> Cc: Nirmoy Das <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 67ec9f8) [ Fix conflict due to changed xe_mmio_write32() signature ] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 816b186 commit 6df106e

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

drivers/gpu/drm/xe/regs/xe_gt_regs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,6 @@
393393

394394
#define XE2_GLOBAL_INVAL XE_REG(0xb404)
395395

396-
#define SCRATCH1LPFC XE_REG(0xb474)
397-
#define EN_L3_RW_CCS_CACHE_FLUSH REG_BIT(0)
398-
399396
#define XE2LPM_L3SQCREG2 XE_REG_MCR(0xb604)
400397

401398
#define XE2LPM_L3SQCREG3 XE_REG_MCR(0xb608)

drivers/gpu/drm/xe/xe_gt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ static void xe_gt_enable_host_l2_vram(struct xe_gt *gt)
108108
return;
109109

110110
if (!xe_gt_is_media_type(gt)) {
111-
xe_mmio_write32(gt, SCRATCH1LPFC, EN_L3_RW_CCS_CACHE_FLUSH);
112111
reg = xe_gt_mcr_unicast_read_any(gt, XE2_GAMREQSTRM_CTRL);
113112
reg |= CG_DIS_CNTLBUS;
114113
xe_gt_mcr_multicast_write(gt, XE2_GAMREQSTRM_CTRL, reg);

0 commit comments

Comments
 (0)