Skip to content

drm-shim: Support kernels with >4k pages

Alyssa Rosenzweig requested to merge alyssa/mesa:drm-shim-fix into main

mmap requires its offset is page alignment, but the current code only guarantees 4k alignment, causing drm-shim to break badly on kernels with

4k page sizes. This fixes drm-shim on my Apple M1, running bare metal Linux with 16k pages. It probably also fixes exotic PowerPC systems with 64k pages.

Cc @anholt

Merge request reports