Re: [PATCH 0/7] Add a DRM driver to support AI Processing Unit (APU)

2023-05-26 Thread Alexandre Bailon
On 5/24/23 12:40, Daniel Vetter wrote: On Wed, May 24, 2023 at 01:27:00PM +0300, Oded Gabbay wrote: On Wed, May 24, 2023 at 2:34 AM Kevin Hilman wrote: Jeffrey Hugo writes: On 5/17/2023 8:52 AM, Alexandre Bailon wrote: This adds a DRM driver that implements communication between the

Re: [PATCH 5/7] drm/apu: allow platform driver to implement their own mmap function

2023-05-26 Thread Alexandre Bailon
On 5/17/23 21:45, Krzysztof Kozlowski wrote: On 17/05/2023 16:52, Alexandre Bailon wrote: From: Julien Stephan By default we will call drm_gem_mmap() unless the apu driver has declared it's own mmap handler. Signed-off-by: Julien Stephan Reviewed-by: Julien Stephan One does not

Re: [PATCH 7/7] dt-bindings: Add bidings for mtk,apu-drm

2023-05-22 Thread Alexandre Bailon
On 5/17/23 17:04, AngeloGioacchino Del Regno wrote: Il 17/05/23 16:52, Alexandre Bailon ha scritto: This adds the device tree bindings for the APU DRM driver. Signed-off-by: Alexandre Bailon Reviewed-by: Julien Stephan ---   .../devicetree/bindings/gpu/mtk,apu-drm.yaml  | 38

[PATCH 7/7] dt-bindings: Add bidings for mtk,apu-drm

2023-05-17 Thread Alexandre Bailon
This adds the device tree bindings for the APU DRM driver. Signed-off-by: Alexandre Bailon Reviewed-by: Julien Stephan --- .../devicetree/bindings/gpu/mtk,apu-drm.yaml | 38 +++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/mtk,apu

[PATCH 5/7] drm/apu: allow platform driver to implement their own mmap function

2023-05-17 Thread Alexandre Bailon
From: Julien Stephan By default we will call drm_gem_mmap() unless the apu driver has declared it's own mmap handler. Signed-off-by: Julien Stephan Reviewed-by: Julien Stephan --- drivers/gpu/drm/apu/apu_drv.c | 38 +- drivers/gpu/drm/apu/apu_internal.h | 2 +

[PATCH 4/7] drm/apu: Add support of IOMMU

2023-05-17 Thread Alexandre Bailon
Some APU devices are behind an IOMMU. For some of these devices, we can't use DMA API because they use static addresses so we have to manually use IOMMU API to correctly map the buffers. This adds support of IOMMU. Signed-off-by: Alexandre Bailon Reviewed-by: Julien Stephan --- drivers/gp

[PATCH 6/7] drm/apu: Add support for a simulated APU

2023-05-17 Thread Alexandre Bailon
From: Julien Stephan This implements a driver to use with a simulation APU. This is useful for testing purpose and can be used as a basis to implement real platform driver. Communication between the simulated APU and the driver is done using netlink socket. Signed-off-by: Julien Stephan --- d

[PATCH 3/7] drm/apu: Add support of requests

2023-05-17 Thread Alexandre Bailon
This updates the APU driver to with two new ioctls to queue and dequeue requests. This uses DRM scheduler to manage the requests. The requests allocation and send and receive operations are platform specifics and must be implemented as callback. Signed-off-by: Alexandre Bailon Reviewed-by

[PATCH 2/7] drm/apu: Add memory allocator

2023-05-17 Thread Alexandre Bailon
This adds a new ioctl to allocate GEM object. Signed-off-by: Alexandre Bailon Reviewed-by: Julien Stephan --- drivers/gpu/drm/apu/Makefile | 1 + drivers/gpu/drm/apu/apu_drv.c | 2 ++ drivers/gpu/drm/apu/apu_gem.c | 56 ++ drivers/gpu/drm/apu

[PATCH 1/7] drm: Add support of AI Processor Unit (APU)

2023-05-17 Thread Alexandre Bailon
takes care to register itself to DRM. Signed-off-by: Alexandre Bailon Reviewed-by: Julien Stephan --- drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/apu/Kconfig| 12 ++ drivers/gpu/drm/apu/Makefile | 5 + drivers/gpu/drm/apu

[PATCH 0/7] Add a DRM driver to support AI Processing Unit (APU)

2023-05-17 Thread Alexandre Bailon
currently blocked): https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=620429 Alexandre Bailon (5): drm: Add support of AI Processor Unit (APU) drm/apu: Add memory allocator drm/apu: Add support of requests drm/apu: Add support of IOMMU dt-bindings: Add bidings for mtk,apu-drm

[RFC PATCH 4/4] ARM64: mt8183-pumpkin: Add the APU DRM device

2021-09-18 Thread Alexandre Bailon
This add the APU DRM device to pumkpin. Signed-off-by: Alexandre Bailon --- arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts index

[RFC PATCH 2/4] DRM: Add support of AI Processor Unit (APU)

2021-09-18 Thread Alexandre Bailon
and get some important data from it. But, the driver is quite generic and it should possible to manage accelerator using another ways. This driver doesn't manage itself the data transmitions. It must be registered by another driver implementing the transmitions. Signed-off-by: Alexandre B

[RFC PATCH 1/4] dt-bindings: Add bidings for mtk,apu-drm

2021-09-18 Thread Alexandre Bailon
This adds the device tree bindings for the APU DRM driver. Signed-off-by: Alexandre Bailon --- .../devicetree/bindings/gpu/mtk,apu-drm.yaml | 38 +++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/mtk,apu-drm.yaml diff --git a

[RFC PATCH 3/4] rpmsg: Add support of AI Processor Unit (APU)

2021-09-18 Thread Alexandre Bailon
Some Mediatek SoC provides hardware accelerator for AI / ML. This driver use the DRM driver to manage the shared memory, and use rpmsg to execute jobs on the APU. Signed-off-by: Alexandre Bailon --- drivers/rpmsg/Kconfig | 10 +++ drivers/rpmsg/Makefile| 1 + drivers/rpmsg

[RFC PATCH 0/4] Add a DRM driver to support AI Processing Unit (APU)

2021-09-18 Thread Alexandre Bailon
DRM: https://patchwork.kernel.org/project/linux-remoteproc/cover/20200930115350.5272-1-abai...@baylibre.com/ Alexandre Bailon (4): dt-bindings: Add bidings for mtk,apu-drm DRM: Add support of AI Processor Unit (APU) rpmsg: Add support of AI Processor Unit (APU) ARM64: mt8183-pumpkin: Add

Re: [RFC PATCH 1/4] Add a RPMSG driver for the APU in the mt8183

2021-07-21 Thread Alexandre Bailon
Hi Mathieu, On Wed, Oct 14, 2020 at 04:55:34PM -0600, Mathieu Poirier wrote: Hi Alexandre, On Wed, Sep 30, 2020 at 01:53:47PM +0200, Alexandre Bailon wrote: This adds a driver to communicate with the APU available in the mt8183. The driver is generic and could be used for other APU. It

Re: [RFC PATCH 0/4] Add a RPMsg driver to support AI Processing Unit (APU)

2020-10-02 Thread Alexandre Bailon
Hi Daniel, On 10/1/20 10:48 AM, Daniel Vetter wrote: On Wed, Sep 30, 2020 at 01:53:46PM +0200, Alexandre Bailon wrote: This adds a RPMsg driver that implements communication between the CPU and an APU. This uses VirtIO buffer to exchange messages but for sharing data, this uses a dmabuf

[RFC PATCH 4/4] rpmsg: apu_rpmsg: Add an IOCTL to request IOMMU mapping

2020-10-01 Thread Alexandre Bailon
. Signed-off-by: Alexandre Bailon --- drivers/rpmsg/apu_rpmsg.c | 52 ++ include/uapi/linux/apu_rpmsg.h | 7 + 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/drivers/rpmsg/apu_rpmsg.c b/drivers/rpmsg/apu_rpmsg.c index 343bd08a859a..4c064feddf5a

[RFC PATCH 2/4] rpmsg: apu_rpmsg: Add support for async apu request

2020-10-01 Thread Alexandre Bailon
From: Julien STEPHAN In order to improve performances and flexibility, add support of async request. Signed-off-by: Julien STEPHAN Signed-off-by: Alexandre Bailon --- drivers/rpmsg/apu_rpmsg.c | 208 ++--- include/uapi/linux/apu_rpmsg.h | 6 +- 2 files

[RFC PATCH 1/4] Add a RPMSG driver for the APU in the mt8183

2020-10-01 Thread Alexandre Bailon
This adds a driver to communicate with the APU available in the mt8183. The driver is generic and could be used for other APU. It mostly provides a userspace interface to send messages and and share big buffers with the APU. Signed-off-by: Alexandre Bailon --- drivers/rpmsg/Kconfig

[RFC PATCH 0/4] Add a RPMsg driver to support AI Processing Unit (APU)

2020-10-01 Thread Alexandre Bailon
hardware accelerator for AI if they use support remoteproc and VirtIO. For the people interested by the firmware or userspace library, the sources are available here: https://github.com/BayLibre/open-amp/tree/v2020.01-mtk/apps/examples/apu Alexandre Bailon (3): Add a RPMSG driver for the APU in

[RFC PATCH 3/4] rpmsg: apu_rpmsg: update the way to store IOMMU mapping

2020-10-01 Thread Alexandre Bailon
In order to reduce the memory mapping operations we are going to add an IOCTL to request a mapping. To make easier to add this new operation, use 2 lists to store the mappings, one for the request and one for the device. Signed-off-by: Alexandre Bailon --- drivers/rpmsg/apu_rpmsg.c | 104