[Intel-gfx] [PATCH] drm/i915: Ensure bo is dirty when WB-mapped on !llc in pagefault handler
Chris Wilson
chris at chris-wilson.co.uk
Mon Sep 21 08:54:49 UTC 2020
Quoting Zbigniew Kempczyński (2020-09-21 04:50:17)
> On !llc platforms when buffer is mapped with WB using GEM_MMAP_OFFSET
> pagefault handler clears its dirty flag. This has consequences
> buffer is not flushed on exec before moving to render domain.
> So make sure we keep dirty flag for buffers mapped to write until
> it leaves cpu domain.
So the faulthandler is only tangentially associated with cache domains.
In that a fresh fault is likely to indicate utilisation of the cpu
domain, but it is not definitive; there may either be no fault between
domain changes or the fault does not incur any.
So we do not touch the domain during the fault, that is required to be
tracked by set-domain around the access. This ensures the fault has no
implicit domain changes, waits or locks.
In particular, the path of interest here is relatively new, using the
old mmap ioctl, we do not see the fault at all.
The bug you are looking for is in set_domain_ioctl.
-Chris
More information about the Intel-gfx
mailing list