]> www.infradead.org Git - linux.git/commit
drm/panthor: Fix firmware initialization on systems with a page size > 4k
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 30 Oct 2024 15:02:31 +0000 (16:02 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 30 Oct 2024 15:30:21 +0000 (16:30 +0100)
commit5d01b56f0518d80211812420a8907ca0b6c6e4e3
tree4e0dfaedd6b1ce31c3eabac649129f8dce4ad4e5
parent72f7e16eccddde99386a10eb2d08833e805917c6
drm/panthor: Fix firmware initialization on systems with a page size > 4k

The system and GPU MMU page size might differ, which becomes a
problem for FW sections that need to be mapped at explicit addresses
since our PAGE_SIZE alignment might cover a VA range that's
expected to be used for another section.

Make sure we never map more than we need.

Changes in v3:
- Add R-bs

Changes in v2:
- Plan for per-VM page sizes so the MCU VM and user VM can
  have different pages sizes

Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241030150231.768949-1-boris.brezillon@collabora.com
drivers/gpu/drm/panthor/panthor_fw.c
drivers/gpu/drm/panthor/panthor_gem.c
drivers/gpu/drm/panthor/panthor_mmu.c
drivers/gpu/drm/panthor/panthor_mmu.h