void intel_dsb_buffer_write(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val)
 {
-       struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
-
        iosys_map_wr(&dsb_buf->vma->bo->vmap, idx * 4, u32, val);
-       xe_device_l2_flush(xe);
 }
 
 u32 intel_dsb_buffer_read(struct intel_dsb_buffer *dsb_buf, u32 idx)
 
 void intel_dsb_buffer_memset(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val, size_t size)
 {
-       struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
-
        WARN_ON(idx > (dsb_buf->buf_size - size) / sizeof(*dsb_buf->cmd_buf));
 
        iosys_map_memset(&dsb_buf->vma->bo->vmap, idx * 4, val, size);
-       xe_device_l2_flush(xe);
 }
 
 bool intel_dsb_buffer_create(struct intel_crtc *crtc, struct intel_dsb_buffer *dsb_buf, size_t size)
 
 void intel_dsb_buffer_flush_map(struct intel_dsb_buffer *dsb_buf)
 {
+       struct xe_device *xe = dsb_buf->vma->bo->tile->xe;
+
        /*
         * The memory barrier here is to ensure coherency of DSB vs MMIO,
         * both for weak ordering archs and discrete cards.
         */
-       xe_device_wmb(dsb_buf->vma->bo->tile->xe);
+       xe_device_wmb(xe);
+       xe_device_l2_flush(xe);
 }