diff options
author | Maíra Canal <mcanal@igalia.com> | 2024-02-14 16:34:52 -0300 |
---|---|---|
committer | Maíra Canal <mcanal@igalia.com> | 2024-02-23 16:37:20 -0300 |
commit | 51b76c1f3017217f0a2eeb21d373af6fc5181449 (patch) | |
tree | 194b952f291d4b24f327d743b10b6d8c605d4f22 /drivers/gpu/drm/v3d/v3d_debugfs.c | |
parent | 155ad86b5eca49e1f9716d13d88f2db13e5a5b19 (diff) | |
download | lwn-51b76c1f3017217f0a2eeb21d373af6fc5181449.tar.gz lwn-51b76c1f3017217f0a2eeb21d373af6fc5181449.zip |
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
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/v3d_debugfs.c index dc3cf708d02e..19e3ee7ac897 100644 --- a/drivers/gpu/drm/v3d/v3d_debugfs.c +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c @@ -219,7 +219,7 @@ static int v3d_debugfs_bo_stats(struct seq_file *m, void *unused) seq_printf(m, "allocated bos: %d\n", v3d->bo_stats.num_allocated); seq_printf(m, "allocated bo size (kb): %ld\n", - (long)v3d->bo_stats.pages_allocated << (PAGE_SHIFT - 10)); + (long)v3d->bo_stats.pages_allocated << (V3D_MMU_PAGE_SHIFT - 10)); mutex_unlock(&v3d->bo_lock); return 0; |