Hi all, This series of patches adds GFX2D support. The GFX2D is a 2D GPU embedded in some Microchip SoCs such as the SAM9X60 and SAM9X75.
Patches have been developped on top the 'linux-6.12-mchp' branch of the https://github.com/linux4microchip/linux.git repository and tested on mainly on a sam9x75-curiosity board and also on a sam9x60-ek board. Then patches have been rebased on top of the 'drm-misc-next' branch of the https://gitlab.freedesktop.org/drm/misc/kernel.git repository for mainlining. About the tests, the GFX2D driver was used with the M2D (Multi 2D) library: https://github.com/linux4sam/libm2d This is an open source library that abstracts 2D GPUs like the Microchip GFX2D (and later the Vivante GC520UL), providing graphics applications of libraries with a unified API, inspired from OpenGL but focused on 2D GPUs. The libm2d library itself relies on the libdrm library to send commands to the relevant DRM driver in the Linux kernel. M2D comes with a m2d_test program to run basic unitary tests. In addition, libm2d has been integrated to two graphics frameworks: - EGT: https://github.com/linux4sam/egt - LVGL: https://github.com/lvgl/lvgl/pull/8729 BR, Cyrille Signed-off-by: Cyrille Pitchen <[email protected]> --- Changes in v6: - Shrank the size of the register set in the device tree from 0x4000 down to 0x100 (patches 1, 3 and 4). - Collected Reviewed-by and Acked-by tags from Nicolas Ferre on patches 1 and 5. - Rebased onto the 'drm-misc-next' branch on 2026-01-20. - Link to v5: https://lore.kernel.org/r/[email protected] Changes in v5: - Fixed compilation issues in patch 2: + Included <drm/drm_print.h> from mchp_gfx2d_cmd.c, mchp_gfx2d_drv.c and mchp_gfx2d_gem.c. + Replaced '.remove_new' with '.remove' in definition of 'struct platform_driver mchp_gfx2d_platform_driver' to match the latest definition of 'struct platform_driver'. + Removed the '.date' member from the definition of 'struct drm_driver mchp_gfx2d_drm_driver' since this 'date' member has been removed from 'struct drm_driver'. - Fixed typos in doxygen documentations of two functions: + mchp_gfx2d_process_completed_commands() + mchp_gfx2d_init_command_queue() - Link to v4: https://lore.kernel.org/r/[email protected] Changes in v4: - Rebased onto the 'drm-misc-next' branch on 2026-01-12. - Link to v3: https://lore.kernel.org/r/[email protected] Changes in v3: - Collected Acked-by tag from Conor Dooley on patch 1 - Rebased onto the 'drm-misc-next' branch on 2025-11-24. - Link to v2: https://lore.kernel.org/r/[email protected] Changes in v2: - Renamed microchip,gfx2d.yaml into microchip,sam9x60-gfx2d.yaml. - Removed the 'clock-names' property from the DT bindings. - Renamed the GPU node from 'gfx2d' to 'gpu' in sam9x{60,7}.dtsi files. - Link to v1: https://lore.kernel.org/r/[email protected] --- Cyrille Pitchen (5): dt-bindings: gpu: add bindings for the Microchip GFX2D GPU drm/microchip: add a driver for the Microchip GFX2D GPU ARM: dts: microchip: sam9x60: Add GFX2D GPU ARM: dts: microchip: sam9x7: Add GFX2D GPU ARM: configs: at91_dt_defconfig: enable GFX2D driver .../bindings/gpu/microchip,sam9x60-gfx2d.yaml | 46 + MAINTAINERS | 10 + arch/arm/boot/dts/microchip/sam9x60.dtsi | 8 + arch/arm/boot/dts/microchip/sam9x7.dtsi | 8 + arch/arm/configs/at91_dt_defconfig | 1 + drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/microchip/Kconfig | 21 + drivers/gpu/drm/microchip/Makefile | 8 + drivers/gpu/drm/microchip/mchp_gfx2d_cmd.c | 1809 ++++++++++++++++++++ drivers/gpu/drm/microchip/mchp_gfx2d_cmd.h | 169 ++ drivers/gpu/drm/microchip/mchp_gfx2d_drv.c | 350 ++++ drivers/gpu/drm/microchip/mchp_gfx2d_drv.h | 132 ++ drivers/gpu/drm/microchip/mchp_gfx2d_gem.c | 264 +++ drivers/gpu/drm/microchip/mchp_gfx2d_gem.h | 90 + drivers/gpu/drm/microchip/mchp_gfx2d_ioctl.c | 274 +++ drivers/gpu/drm/microchip/mchp_gfx2d_ioctl.h | 17 + include/uapi/drm/microchip_drm.h | 286 ++++ 18 files changed, 3495 insertions(+) --- base-commit: ce76a267341cb306016beedb24a205e892613716 change-id: 20250911-cpitchen-mainline_gfx2d-6631e9352af7 Best regards, -- Cyrille Pitchen <[email protected]>
