]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/panfrost: Check sgt to know whether pages are already mapped
authorAdrián Larumbe <adrian.larumbe@collabora.com>
Sun, 19 Oct 2025 14:52:10 +0000 (15:52 +0100)
committerSteven Price <steven.price@arm.com>
Mon, 20 Oct 2025 15:05:17 +0000 (16:05 +0100)
commit3d7c626716aae6e96d7d463f184a09df4cd4bdb2
treeda325ac9319210bcc8562ef991c5f76135970718
parentf45f73c68c59b66485f5fa7494762a31c490d4e8
drm/panfrost: Check sgt to know whether pages are already mapped

In the MMU's page fault ISR for a heap object, determine whether the
faulting address belongs to a 2MiB block that was already mapped by
checking its corresponding sgt in the Panfrost BO.

This is done in preparation for a future commit in which the MMU mapping
helper might fail, but the page array is left populated, so this cannot
be used as a check for an early bail-out.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Link: https://lore.kernel.org/r/20251019145225.3621989-6-adrian.larumbe@collabora.com
Signed-off-by: Steven Price <steven.price@arm.com>
drivers/gpu/drm/panfrost/panfrost_mmu.c