drm/v3d: Enable V3D to use different PAGE_SIZE
authorMaíra Canal <mcanal@igalia.com>
Wed, 14 Feb 2024 19:34:52 +0000 (16:34 -0300)
committerMaíra Canal <mcanal@igalia.com>
Fri, 23 Feb 2024 19:37:20 +0000 (16:37 -0300)
commit51b76c1f3017217f0a2eeb21d373af6fc5181449
tree194b952f291d4b24f327d743b10b6d8c605d4f22
parent155ad86b5eca49e1f9716d13d88f2db13e5a5b19
drm/v3d: Enable V3D to use different PAGE_SIZE

Currently, the V3D driver uses PAGE_SHIFT over the assumption that
PAGE_SHIFT = 12, as the PAGE_SIZE = 4KB. But, the RPi 5 is using
PAGE_SIZE = 16KB, so the MMU PAGE_SHIFT is different than the system's
PAGE_SHIFT.

Enable V3D to be used in system's with any PAGE_SIZE by making sure that
everything MMU-related uses the MMU page shift.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240214193503.164462-1-mcanal@igalia.com
drivers/gpu/drm/v3d/v3d_bo.c
drivers/gpu/drm/v3d/v3d_debugfs.c
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_irq.c
drivers/gpu/drm/v3d/v3d_mmu.c