[PATCH v4 0/2] drm: Add DRM driver for GlandaGPU (VHDL soft-IP GPU)
From: Leander Kieweg <hidden>
Date: 2026-09-13 20:50:14
Also in:
dri-devel
This is v4 of the GlandaGPU DRM driver series [1][2][3]. It addresses review feedback from Thomas Zimmermann and the automated review bot on v3. GlandaGPU is a small VHDL soft-IP 2D display controller, currently targeting a Terasic DE10-Standard (Cyclone V SoC). This series has been tested against a QEMU digital twin and on real hardware. Hardware/VHDL: https://github.com/stiangglanda/GlandaGPU QEMU fork: https://github.com/stiangglanda/qemu-glandagpu Userspace tests: https://github.com/stiangglanda/GlandaGPU-userspace-tests Changes since v3: dt-bindings: - Fix alphabetical ordering of the '^kieweg,.*' vendor prefix in vendor-prefixes.yaml. driver core: - Use devm_ioremap_wc() instead of devm_ioremap() for the VRAM mapping in both the platform and PCI probe paths, avoiding a severe performance regression from uncached writes (Sashiko bot). - Only enable the hardware VSYNC interrupt when an IRQ handler is actually registered. enable_vblank() now returns -EINVAL when falling back to polling mode, instead of risking an unhandled interrupt storm (Sashiko bot). - Stop unconditionally enabling the VSYNC interrupt during probe. Let the DRM core enable/disable it through enable_vblank()/ disable_vblank() as needed (Thomas Zimmermann, Sashiko bot). - Guard the PCI probe/remove code and pci_driver structure with #ifdef CONFIG_PCI so the driver builds with CONFIG_COMPILE_TEST=y && CONFIG_PCI=n (Sashiko bot). - Use container_of_const() instead of container_of() (Thomas Zimmermann). - Add glanda_plane_atomic_disable(), which blanks VRAM when the plane is disabled, instead of silently returning on a NULL fb (Thomas Zimmermann). - Wrap direct access to the shadow-plane buffer object in drm_gem_fb_begin_cpu_access()/drm_gem_fb_end_cpu_access() to synchronize against imported buffers (Thomas Zimmermann). - Switch atomic_update() to damage-clipped blitting via drm_atomic_helper_damage_iter instead of copying the whole frame on every update (Thomas Zimmermann). - Always call drm_atomic_helper_check_plane_state() in atomic_check(), even when the plane has no CRTC yet (Thomas Zimmermann). - Support panning within a larger, system-allocated framebuffer by calculating the correct source offset when reading pixel data (Thomas Zimmermann). - Remove glanda_connector_detect(). The default "connected" status is sufficient (Thomas Zimmermann). - Wrap hardware register access in enable_vblank()/disable_vblank() with drm_dev_enter()/drm_dev_exit() (Thomas Zimmermann). - Use drm_crtc_vblank_atomic_enable()/drm_crtc_vblank_atomic_disable() instead of custom wrapper functions (Thomas Zimmermann). - Use drmm_mode_config_init() so the mode-config pipeline is cleaned up automatically (Thomas Zimmermann). - Raise mode_config.max_width/max_height to DRM_SHADOW_PLANE_MAX_WIDTH/DRM_SHADOW_PLANE_MAX_HEIGHT instead of the fixed 640x480, so userspace can allocate larger framebuffers (Thomas Zimmermann). - Call drm_plane_enable_fb_damage_clips() to enable damage clipping (Thomas Zimmermann). - Move drm_vblank_init() to right before drm_mode_config_reset() (Thomas Zimmermann). - Remove the manual drm_helper_probe_single_connector_modes() call during init. The DRM core probes modes on demand (Thomas Zimmermann). - Simplify glanda_drm_fini() to just drm_dev_unplug(). The DRM core handles vblank/IRQ teardown after unplug (Thomas Zimmermann). - Drop "Hardware Accelerated" from the driver description (Thomas Zimmermann). Regarding the panning support: Since the physical VRAM is fixed to 640x480, the display output itself cannot be panned. Instead, the panning is handled on the source side. If userspace allocates a larger framebuffer, the driver now calculates the correct src_x and src_y offsets from the plane state and copies only the requested sub-region into VRAM. Please let me know if this implementation matches what you had in mind with the sysfb reference. [1] v1: https://lore.kernel.org/dri-devel/20260714101146.200416-1-kieweg.leander@gmail.com/T/#t (local) [2] v2: https://lore.kernel.org/dri-devel/20260730173643.256052-1-kieweg.leander@gmail.com/T/#t (local) [3] v3: https://lore.kernel.org/dri-devel/20260824195418.17707-1-kieweg.leander@gmail.com/T/#t (local) Leander Kieweg (2): dt-bindings: display: Add GlandaGPU binding drm/glanda: Add initial DRM driver for GlandaGPU .../bindings/display/kieweg,gpu.yaml | 55 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 6 + drivers/gpu/drm/tiny/Kconfig | 11 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/glandagpu.c | 642 ++++++++++++++++++ 6 files changed, 717 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/kieweg,gpu.yaml create mode 100644 drivers/gpu/drm/tiny/glandagpu.c -- 2.43.0