1.. _arm2d:
2
3==========
4Arm-2D GPU
5==========
6
7Arm-2D is not a GPU but **an abstraction layer for 2D GPUs dedicated to
8Microcontrollers**. It supports all Cortex-M processors ranging from
9Cortex-M0 to the latest Cortex-M85.
10
11Arm-2D accelerates LVGL9 with two modes: **Synchronous Mode** and
12**Asynchronous Mode**.
13
14- When **Helium** and **ACI (Arm Custom Instruction)** are available, it is recommend
15  to use **Synchronous Mode** to accelerate LVGL.
16- When Arm-2D backed 2D-GPUs are available, for example, **DMAC-350 based 2D
17  GPUs**, it is recommend to use **Asynchronous Mode** to accelerate LVGL.
18
19Arm-2D is an open-source project on GitHub. For more, please refer to:
20https://github.com/ARM-software/Arm-2D.
21
22
23How to Use
24**********
25
26In general:
27
28- you can set the macro :c:macro:`LV_USE_DRAW_ARM2D_SYNC` to ``1`` and
29  :c:macro:`LV_DRAW_SW_ASM` to ``LV_DRAW_SW_ASM_HELIUM`` in ``lv_conf.h`` to
30  enable Arm-2D synchronous acceleration for LVGL.
31- You can set
32  the macro :c:macro:`LV_USE_DRAW_ARM2D_ASYNC` to ``1`` in ``lv_conf.h`` to enable
33  Arm-2D Asynchronous acceleration for LVGL.
34
35If you are using
36`CMSIS-Pack <https://github.com/lvgl/lvgl/tree/master/env_support/cmsis-pack>`__
37to deploy the LVGL. You don't have to define the macro
38:c:macro:`LV_USE_DRAW_ARM2D_SYNC` manually, instead the lv_conf_cmsis.h will
39check the environment and set the :c:macro:`LV_USE_DRAW_ARM2D_SYNC` accordingly.
40
41Design Considerations
42*********************
43
44As mentioned before, Arm-2D is an abstraction layer for 2D GPU; hence if
45there is no accelerator or dedicated instruction set (such as Helium or
46ACI) available for Arm-2D, it provides negligible performance boost for
47LVGL (sometimes worse) for regular Cortex-M processors.
48
49**We highly recommend you enable Arm-2D acceleration for LVGL** when:
50
51-  The target processors are **Cortex-M55**, **Cortex-M52** and **Cortex-M85**
52-  The target processors support
53   `Helium <https://developer.arm.com/documentation/102102/0103/?lang=en>`__.
54-  The device vendor provides an arm-2d compliant driver for their
55   proprietary 2D accelerators and/or ACI (Arm Customized Instruction).
56-  The target device contains
57   `DMAC-350 <https://community.arm.com/arm-community-blogs/b/internet-of-things-blog/posts/arm-corelink-dma-350-next-generation-direct-memory-access-for-endpoint-ai>`__
58
59Examples
60********
61
62-  `A Cortex-M55 (supports Helium) based MDK Project, PC emulation is
63   available. <https://github.com/lvgl/lv_port_an547_cm55_sim>`__
64
65API
66***
67
68:ref:`lv_draw_sw_arm2d_h`
69
70:ref:`lv_blend_arm2d_h`
71