]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpu: host1x: Remove mid-job CDMA flushes
authorMikko Perttunen <mperttunen@nvidia.com>
Tue, 4 Feb 2025 02:45:46 +0000 (02:45 +0000)
committerThierry Reding <treding@nvidia.com>
Wed, 7 May 2025 15:49:59 +0000 (17:49 +0200)
commit33ca5aafc3592a27375cf7a249cf162c90f5e653
tree4a032779886216bb7f4ff8136fcf1aaf1124d10c
parent408ec8e406d980b073f7c2d6144fdddbb093d4fd
gpu: host1x: Remove mid-job CDMA flushes

The current code can issue CDMA flushes (DMAPUT bumps) in the middle
of a job, before all opcodes have been written into the pushbuffer.
This can happen when pushbuffer fills up. Presumably this made sense
at some point in the past, but it doesn't anymore, as it cannot lead
to more space appearing in the pushbuffer as it is only cleaned full
jobs at a time.

Mid-job flushes can also cause problems, as in an extreme situation
(seen in practice), the hardware can run through the entire pushbuffer
including the prefix of a partially written job without the driver
being able to process any CDMA updates. This can cause the engine
MLOCK to be taken and held for extended periods as the tail of the
job is not yet available to hardware.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250204024546.1168126-1-mperttunen@nvidia.com
drivers/gpu/host1x/cdma.c