Skip to content

Commit a4b1b51

Browse files
mlankhorstThomas Hellström
authored andcommitted
drm/xe: Move DSB l2 flush to a more sensible place
Flushing l2 is only needed after all data has been written. Fixes: 01570b4 ("drm/xe/bmg: implement Wa_16023588340") Signed-off-by: Maarten Lankhorst <[email protected]> Cc: Matthew Auld <[email protected]> Cc: [email protected] # v6.12+ Reviewed-by: Matthew Auld <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit 0dd2dd0) Signed-off-by: Thomas Hellström <[email protected]>
1 parent 9127a69 commit a4b1b51

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

drivers/gpu/drm/xe/display/xe_dsb_buffer.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ u32 intel_dsb_buffer_ggtt_offset(struct intel_dsb_buffer *dsb_buf)
1717

1818
void intel_dsb_buffer_write(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val)
1919
{
20-
struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
21-
2220
iosys_map_wr(&dsb_buf->vma->bo->vmap, idx * 4, u32, val);
23-
xe_device_l2_flush(xe);
2421
}
2522

2623
u32 intel_dsb_buffer_read(struct intel_dsb_buffer *dsb_buf, u32 idx)
@@ -30,12 +27,9 @@ u32 intel_dsb_buffer_read(struct intel_dsb_buffer *dsb_buf, u32 idx)
3027

3128
void intel_dsb_buffer_memset(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val, size_t size)
3229
{
33-
struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
34-
3530
WARN_ON(idx > (dsb_buf->buf_size - size) / sizeof(*dsb_buf->cmd_buf));
3631

3732
iosys_map_memset(&dsb_buf->vma->bo->vmap, idx * 4, val, size);
38-
xe_device_l2_flush(xe);
3933
}
4034

4135
bool intel_dsb_buffer_create(struct intel_crtc *crtc, struct intel_dsb_buffer *dsb_buf, size_t size)
@@ -74,9 +68,12 @@ void intel_dsb_buffer_cleanup(struct intel_dsb_buffer *dsb_buf)
7468

7569
void intel_dsb_buffer_flush_map(struct intel_dsb_buffer *dsb_buf)
7670
{
71+
struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
72+
7773
/*
7874
* The memory barrier here is to ensure coherency of DSB vs MMIO,
7975
* both for weak ordering archs and discrete cards.
8076
*/
81-
xe_device_wmb(dsb_buf->vma->bo->tile->xe);
77+
xe_device_wmb(xe);
78+
xe_device_l2_flush(xe);
8279
}

0 commit comments

Comments
 (0)