Skip to content

RFC drm/gma500: prepare GEM and MMU for 3D rendering and hybrid 2D

Gabriel Gama dri-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest6 patches 6 repliesIn review
  2. v1 RFC6 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Patch 3: Fixes tag for 8c8f1c958ab5.
- Patch 5: Fixes tag for ae012bdc5799.
- Patch 6: safe partial-init cleanup, checked with allocation failures.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm/gma500: use the common dumb-buffer size helperdrivers/gpu/drm/gma500/gem.c+5 -111 reply
2/6drm/gma500: do not underflow an unpinned GEM objectdrivers/gpu/drm/gma500/gem.c+2 -11 reply
3/6drm/gma500: Fix SGX page-table cache-flush mapping lifetimedrivers/gpu/drm/gma500/mmu.c+4 -41 reply
4/6drm/gma500: Make SGX MMU insertion checked and transactionaldrivers/gpu/drm/gma500/mmu.c drivers/gpu/drm/gma500/mmu.h+158 -581 reply
5/6drm/gma500: Propagate SGX MMU setup and GEM pin failuresdrivers/gpu/drm/gma500/gem.c drivers/gpu/drm/gma500/psb_drv.c+16 -52 replies
6/6drm/gma500: Add software-only KUnit coverage for SGX page tablesdrivers/gpu/drm/gma500/Kconfig drivers/gpu/drm/gma500/Makefile drivers/gpu/drm/gma500/mmu_test.c+242 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/6] drm/gma500: prepare GEM and MMU for 3D rendering and hybrid 2D

Hi,

This v2 targets Linux 7.4-rc2 at 7475ea8b58616b33c04afb976cf0fbaad9dd63fb. The six patches improve existing gma500 GEM and SGX MMU handling as prerequisites for future 3D rendering and hybrid CPU/GPU 2D. They do not enable either rendering path or add a userspace ABI. Display GTT and SGX page tables remain separate mappings.

Since v1, I verified the introducing commits for patches 3 and 5 and added Fixes tags. Patch 6 now handles initialization failure correctly: KUnit still invokes the per-case exit callback, so partial resources are released once through a NULL-safe cleanup rather than freed again through stale pointers. The successful fixture path is unchanged.

Cross-builds and native/UBSan checks ran in Debian AArch64 Linux userspace under PRoot. The i386 LLVM 19 W=1/HIGHMEM4G kernel linked successfully, and all nine MMU KUnit cases passed in a QEMU TCG guest. Eleven host allocation budgets checked fixture init failure and repeated cleanup. Physical Mini12 testing remains pending; no hardware rendering result is claimed.

Changes since v1:
- Patch 3: Fixes tag for 8c8f1c958ab5.
- Patch 5: Fixes tag for ae012bdc5799.
- Patch 6: safe partial-init cleanup, checked with allocation failures.

Patch list:
1. Use the common dumb-buffer size helper.
2. Prevent GEM unpin underflow.
3. Fix SGX page-table cache-flush mapping lifetime.
4. Make MMU insertion checked and transactional.
5. Propagate MMU setup and GEM pin failures.
6. Add software-only MMU KUnit coverage.

Previous version: Message-ID <[email protected]>

Thanks,
Gabriel Gama