]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/xe3p_lpg: flush shrinker bo cachelines manually
authorTejas Upadhyay <tejas.upadhyay@intel.com>
Thu, 5 Mar 2026 12:19:04 +0000 (17:49 +0530)
committerTejas Upadhyay <tejas.upadhyay@intel.com>
Mon, 23 Mar 2026 09:53:24 +0000 (15:23 +0530)
commit4e7ebff69aed345f65f590a17b3119c0cb5eadde
treee4234712515e796818914f90f2fb09da29d66540
parent61e7649a1a253609769063a30018e68b970324d6
drm/xe/xe3p_lpg: flush shrinker bo cachelines manually

XA, new pat_index introduced post xe3p_lpg, is 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)

V4: Add comments for L2 flush path
V3(Thomas/MattA/MattR): Restrict userptr with non-xa, then no need to
                        flush manually
V2(MattA): Expand commit description

Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/20260305121902.1892593-7-tejas.upadhyay@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_device.h