Skip to content

Commit a0795bf

Browse files
committed
Merge branch '7.0/amd-isp4' into 7.0/base
Signed-off-by: Eric Naim <dnaim@cachyos.org>
2 parents 028ef9c + ebb965a commit a0795bf

22 files changed

Lines changed: 4137 additions & 0 deletions
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
.. include:: <isonum.txt>
4+
5+
====================================
6+
AMD Image Signal Processor (amdisp4)
7+
====================================
8+
9+
Introduction
10+
============
11+
12+
This file documents the driver for the AMD ISP4 that is part of
13+
AMD Ryzen AI Max 300 Series.
14+
15+
The driver is located under drivers/media/platform/amd/isp4 and uses
16+
the Media-Controller API.
17+
18+
The driver exposes one video capture device to userspace and provide
19+
web camera like interface. Internally the video device is connected
20+
to the isp4 sub-device responsible for communication with the CCPU FW.
21+
22+
Topology
23+
========
24+
25+
.. _amdisp4_topology_graph:
26+
27+
.. kernel-figure:: amdisp4.dot
28+
:alt: Diagram of the media pipeline topology
29+
:align: center
30+
31+
32+
33+
The driver has 1 sub-device: Representing isp4 image signal processor.
34+
The driver has 1 video device: Capture device for retrieving images.
35+
36+
- ISP4 Image Signal Processing Subdevice Node
37+
38+
---------------------------------------------
39+
40+
The isp4 is represented as a single V4L2 subdev, the sub-device does not
41+
provide interface to the user space. The sub-device is connected to one video node
42+
(isp4_capture) with immutable active link. The sub-device represents ISP with
43+
connected sensor similar to smart cameras (sensors with integrated ISP).
44+
sub-device has only one link to the video device for capturing the frames.
45+
The sub-device communicates with CCPU FW for streaming configuration and
46+
buffer management.
47+
48+
49+
- isp4_capture - Frames Capture Video Node
50+
51+
------------------------------------------
52+
53+
Isp4_capture is a capture device to capture frames to memory.
54+
The entity is connected to isp4 sub-device. The video device
55+
provides web camera like interface to userspace. It supports
56+
mmap and dma buf types of memory.
57+
58+
Capturing Video Frames Example
59+
==============================
60+
61+
.. code-block:: bash
62+
63+
v4l2-ctl "-d" "/dev/video0" "--set-fmt-video=width=1920,height=1080,pixelformat=NV12" "--stream-mmap" "--stream-count=10"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
digraph board {
2+
rankdir=TB
3+
n00000001 [label="{{} | amd isp4\n | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
4+
n00000001:port0 -> n00000003 [style=bold]
5+
n00000003 [label="Preview\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
6+
}

Documentation/admin-guide/media/v4l-drivers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Video4Linux (V4L) driver-specific documentation
99
.. toctree::
1010
:maxdepth: 2
1111

12+
amdisp4-1
1213
bttv
1314
c3-isp
1415
cafe_ccic

MAINTAINERS

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,31 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git
11601160
F: drivers/iommu/amd/
11611161
F: include/linux/amd-iommu.h
11621162

1163+
AMD ISP4 DRIVER
1164+
M: Bin Du <bin.du@amd.com>
1165+
M: Nirujogi Pratap <pratap.nirujogi@amd.com>
1166+
L: linux-media@vger.kernel.org
1167+
S: Maintained
1168+
T: git git://linuxtv.org/media.git
1169+
F: Documentation/admin-guide/media/amdisp4-1.rst
1170+
F: Documentation/admin-guide/media/amdisp4.dot
1171+
F: drivers/media/platform/amd/Kconfig
1172+
F: drivers/media/platform/amd/Makefile
1173+
F: drivers/media/platform/amd/isp4/Kconfig
1174+
F: drivers/media/platform/amd/isp4/Makefile
1175+
F: drivers/media/platform/amd/isp4/isp4.c
1176+
F: drivers/media/platform/amd/isp4/isp4.h
1177+
F: drivers/media/platform/amd/isp4/isp4_debug.c
1178+
F: drivers/media/platform/amd/isp4/isp4_debug.h
1179+
F: drivers/media/platform/amd/isp4/isp4_fw_cmd_resp.h
1180+
F: drivers/media/platform/amd/isp4/isp4_hw_reg.h
1181+
F: drivers/media/platform/amd/isp4/isp4_interface.c
1182+
F: drivers/media/platform/amd/isp4/isp4_interface.h
1183+
F: drivers/media/platform/amd/isp4/isp4_subdev.c
1184+
F: drivers/media/platform/amd/isp4/isp4_subdev.h
1185+
F: drivers/media/platform/amd/isp4/isp4_video.c
1186+
F: drivers/media/platform/amd/isp4/isp4_video.h
1187+
11631188
AMD KFD
11641189
M: Felix Kuehling <Felix.Kuehling@amd.com>
11651190
L: amd-gfx@lists.freedesktop.org

drivers/media/platform/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ config VIDEO_MUX
6363

6464
# Platform drivers - Please keep it alphabetically sorted
6565
source "drivers/media/platform/allegro-dvt/Kconfig"
66+
source "drivers/media/platform/amd/Kconfig"
6667
source "drivers/media/platform/amlogic/Kconfig"
6768
source "drivers/media/platform/amphion/Kconfig"
6869
source "drivers/media/platform/arm/Kconfig"

drivers/media/platform/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Place here, alphabetically sorted by directory
77
# (e. g. LC_ALL=C sort Makefile)
88
obj-y += allegro-dvt/
9+
obj-y += amd/
910
obj-y += amlogic/
1011
obj-y += amphion/
1112
obj-y += arm/

drivers/media/platform/amd/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
3+
source "drivers/media/platform/amd/isp4/Kconfig"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
3+
obj-y += isp4/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
3+
config VIDEO_AMD_ISP4_CAPTURE
4+
tristate "AMD ISP4 and camera driver"
5+
depends on DRM_AMD_ISP && VIDEO_DEV && HAS_DMA
6+
select VIDEOBUF2_CORE
7+
select VIDEOBUF2_MEMOPS
8+
select VIDEOBUF2_V4L2
9+
select VIDEOBUF2_VMALLOC
10+
select VIDEO_V4L2_SUBDEV_API
11+
help
12+
This is support for AMD ISP4 and camera subsystem driver.
13+
Say Y here to enable the ISP4 and camera device for video capture.
14+
To compile this driver as a module, choose M here. The module will
15+
be called amd_isp4_capture.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
#
3+
# Copyright (C) 2025 Advanced Micro Devices, Inc.
4+
5+
obj-$(CONFIG_VIDEO_AMD_ISP4_CAPTURE) += amd_isp4_capture.o
6+
amd_isp4_capture-objs := isp4.o \
7+
isp4_debug.o \
8+
isp4_interface.o \
9+
isp4_subdev.o \
10+
isp4_video.o

0 commit comments

Comments
 (0)