This is v2 of the GlandaGPU DRM driver series [1], addressing review feedback from Thomas Zimmermann, Conor Dooley, Uwe Kleine-König, and the automated review bot on v1.
GlandaGPU is a small VHDL soft-IP 2D display controller, currently targeting a Terasic DE10-Standard (Cyclone V SoC). This series has been tested both 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 v1: dt-bindings: - add a link to the GlandaGPU project in the binding description - add clocks to the required properties - fix the example to use interrupt-parent and the GIC_SPI/ IRQ_TYPE_LEVEL_HIGH macros instead of raw numbers - fix missing trailing newline driver core: - drop the struct device *dev field, use drm_device.dev instead - open-code drm_encoder_init() instead of drm_simple_encoder_init(), which is being phased out - switch the plane update path from manual dma_resv_lock()/ drm_gem_shmem_vmap_locked() to DRM_GEM_SHADOW_PLANE_HELPER_FUNCS/ DRM_GEM_SHADOW_PLANE_FUNCS. This also fixes sleeping calls being made from atomic-commit context and a raw map.vaddr dereference, both flagged by automated review - use drm_gem_fb_create_with_dirty() instead of a custom fb_create implementation - remove the redundant new_state == NULL check in the CRTC flush helper - remove the ioctl-based UAPI (CLEAR/RECT/LINE) entirely. As Thomas pointed out in v1, fixed-function 2D ioctls aren't a good fit for mainline DRM, and userspace rendering into the shadow-plane framebuffer covers the same functionality - fix a double drm_mode_config_cleanup() call in the probe and remove error paths (devres already handles this) - call drm_atomic_helper_shutdown() on remove - fix a teardown race where in-flight work could touch already unmapped MMIO, using drm_dev_unplug()/drm_dev_enter()/ drm_dev_exit() - move IRQ registration to after CRTC initialization, avoiding a potential NULL pointer dereference from an early-firing shared IRQ - fix platform_get_irq() error handling. Negative error codes such as -EPROBE_DEFER were previously misread as "no IRQ available" new in v2: - add PCI probe support alongside the existing platform_driver/ devicetree path, backed by a matching QEMU device model, so the driver can be tested against a virtual device without needing devicetree or real hardware. Real hardware continues to use the platform_driver path unchanged. This replaces the old x86 test device patch 3/3, reducing the series from 3 to 2 patches. Known open item: the QEMU test device currently uses a placeholder ID from the range QEMU reserves for experimental, unregistered use (1af4:10f0, see [2]). I've requested a permanent ID from Gerd Hoffmann and will post a follow-up once it's assigned. [1] https://lore.kernel.org/dri-devel/[email protected]/T/#t [2] https://www.qemu.org/docs/master/specs/pci-ids.html Leander Kieweg (2): dt-bindings: display: Add GlandaGPU binding drm/glanda: Add initial DRM driver for GlandaGPU .../bindings/display/glanda,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 | 579 ++++++++++++++++++ 6 files changed, 654 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/glanda,gpu.yaml create mode 100644 drivers/gpu/drm/tiny/glandagpu.c -- 2.43.0
