]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/v3d: Support Big/Super Pages when writing out PTEs
authorMaíra Canal <mcanal@igalia.com>
Mon, 23 Sep 2024 13:55:12 +0000 (10:55 -0300)
committerMaíra Canal <mcanal@igalia.com>
Wed, 25 Sep 2024 11:40:23 +0000 (08:40 -0300)
commite4c17720262f394f6320a2b6e17a128bfdabb37c
tree4365a06a56852e79954b75125cdcbee6aa029752
parent8dd6074d4719644b676adf9f07d71292bee28e3a
drm/v3d: Support Big/Super Pages when writing out PTEs

The V3D MMU also supports 64KB and 1MB pages, called big and super pages,
respectively. In order to set a 64KB page or 1MB page in the MMU, we need
to make sure that page table entries for all 4KB pages within a big/super
page must be correctly configured.

In order to create a big/super page, we need a contiguous memory region.
That's why we use a separate mountpoint with THP enabled. In order to
place the page table entries in the MMU, we iterate over the 16 4KB pages
(for big pages) or 256 4KB pages (for super pages) and insert the PTE.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240923141348.2422499-9-mcanal@igalia.com
drivers/gpu/drm/v3d/v3d_drv.h
drivers/gpu/drm/v3d/v3d_mmu.c