Skip to content

Commit c075a7c

Browse files
Dylan.Wuopsiff
authored andcommitted
Add Mali VPU driver for CIX platform.
adds support for vpu on the CIX platform. Signed-off-by: wenxue.ding <Wenxue.Ding@cixtech.com> Signed-off-by: "Dylan.Wu" <Dylan.Wu@cixtech.com>
1 parent 8361c9f commit c075a7c

69 files changed

Lines changed: 39243 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/arm64/configs/deepin_arm64_desktop_defconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,7 @@ CONFIG_REGULATOR_WM8400=m
27712771
CONFIG_REGULATOR_WM8994=m
27722772
CONFIG_USB_PULSE8_CEC=m
27732773
CONFIG_USB_RAINSHADOW_CEC=m
2774-
CONFIG_MEDIA_SUPPORT=m
2774+
CONFIG_MEDIA_SUPPORT=y
27752775
CONFIG_VIDEO_FIXED_MINOR_RANGES=y
27762776
CONFIG_DVB_MAX_ADAPTERS=8
27772777
CONFIG_MEDIA_USB_SUPPORT=y
@@ -2870,7 +2870,7 @@ CONFIG_VIDEO_AMPHION_VPU=m
28702870
CONFIG_VIDEO_CADENCE_CSI2RX=m
28712871
CONFIG_VIDEO_CADENCE_CSI2TX=m
28722872
CONFIG_VIDEO_CODA=m
2873-
CONFIG_VIDEO_CAFE_CCIC=m
2873+
CONFIG_VIDEO_CAFE_CCIC=y
28742874
CONFIG_VIDEO_MEDIATEK_VPU=m
28752875
CONFIG_VIDEO_TEGRA_VDE=m
28762876
CONFIG_VIDEO_IMX7_CSI=m

drivers/soc/cix/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ config CIX_SOC_ACPI
2828

2929
source "drivers/soc/cix/gpu/arm/Kconfig"
3030
source "drivers/soc/cix/npu/Kconfig"
31+
source "drivers/soc/cix/vpu/Kconfig"
3132
source "drivers/soc/cix/scmi/Kconfig"
3233
endmenu

drivers/soc/cix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ obj-$(CONFIG_CIX_SOC_ACPI) += gpu/
66
obj-$(CONFIG_CIX_SOC_ACPI) += scmi/
77
obj-$(CONFIG_CIX_SOC_ACPI) += pcie/
88
obj-$(CONFIG_CIX_SOC_ACPI) += npu/
9-
9+
obj-$(CONFIG_CIX_SOC_ACPI) += vpu/

drivers/soc/cix/vpu/Kconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2+
#
3+
# (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved.
4+
#
5+
# This program is free software and is provided to you under the terms of the
6+
# GNU General Public License version 2 as published by the Free Software
7+
# Foundation, and any use by you of this program is subject to the terms
8+
# of such GNU license.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program; if not, you can access it online at
17+
# http://www.gnu.org/licenses/gpl-2.0.html.
18+
#
19+
#
20+
21+
menu "VPU Configuration"
22+
source "drivers/soc/cix/vpu/driver/Kconfig"
23+
endmenu

drivers/soc/cix/vpu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-y += driver/

drivers/soc/cix/vpu/driver/Kbuild

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
###########################################################
2+
# Set the include-path according to the defined interface.
3+
###########################################################
4+
5+
ccflags-y += -I$(src) -I$(src)/if -I$(src)/dev -I$(src)/if/v4l2 -I$(src)/external
6+
ccflags-$(CONFIG_VIDEO_LINLON_FTRACE) += -DMVX_LOG_FTRACE_ENABLE
7+
ccflags-$(CONFIG_VIDEO_LINLON_PRINT_FILE) += -DMVX_LOG_PRINT_FILE_ENABLE
8+
ccflags-y += $(EXTRA_CCFLAGS)
9+
10+
###########################################################
11+
# Define build targets and what files to include.
12+
###########################################################
13+
14+
# Amvx module
15+
obj-$(CONFIG_VIDEO_LINLON) := amvx.o
16+
17+
# Add objects for if module.
18+
if-y := if/mvx_if.o \
19+
if/mvx_buffer.o \
20+
if/mvx_firmware_cache.o \
21+
if/mvx_firmware.o \
22+
if/mvx_firmware_v2.o \
23+
if/mvx_firmware_v3.o \
24+
if/mvx_mmu.o \
25+
if/mvx_secure.o \
26+
if/mvx_session.o
27+
28+
# Add external interface.
29+
if-y += if/v4l2/mvx_ext_v4l2.o \
30+
if/v4l2/mvx_v4l2_buffer.o \
31+
if/v4l2/mvx_v4l2_session.o \
32+
if/v4l2/mvx_v4l2_vidioc.o \
33+
if/v4l2/mvx_v4l2_fops.o \
34+
if/v4l2/mvx_v4l2_ctrls.o
35+
36+
# Add objects for dev module.
37+
dev-y := dev/mvx_dev.o \
38+
dev/mvx_hwreg.o \
39+
dev/mvx_hwreg_v500.o \
40+
dev/mvx_hwreg_v550.o \
41+
dev/mvx_hwreg_v61.o \
42+
dev/mvx_hwreg_v52_v76.o \
43+
dev/mvx_lsid.o \
44+
dev/mvx_scheduler.o \
45+
mvx_pm_runtime.o
46+
47+
# Add driver objects.
48+
amvx-y := mvx_driver.o \
49+
mvx_seq.o \
50+
mvx_log.o \
51+
mvx_log_group.o \
52+
$(if-y) $(dev-y)

drivers/soc/cix/vpu/driver/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
config VIDEO_LINLON
2+
tristate "Linlon VPU support."
3+
depends on VIDEO_DEV
4+
default m
5+
help
6+
This enables support for the Linlon VPU family.
7+
8+
config VIDEO_LINLON_FTRACE
9+
depends on VIDEO_LINLON
10+
bool "Send kernel space logs to ftrace."
11+
default n
12+
help
13+
Send kernel space logs to ftrace.
14+
15+
config VIDEO_LINLON_PRINT_FILE
16+
depends on VIDEO_LINLON
17+
bool "Append file and line number to kernel space log messages."
18+
default y
19+
help
20+
Append file and line number to kernel space log messages.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
all: mono_v4l2
2+
3+
mono_v4l2:
4+
@env CONFIG_VIDEO_LINLON=m CONFIG_VIDEO_LINLON_MONO=y CONFIG_VIDEO_LINLON_IF_V4L2=y $(MAKE) -C $(KDIR) M=$(CURDIR) modules
5+
6+
clean:
7+
@rm -rf *.ko
8+
@find . -type f -name '*.o' -delete
9+
@rm -rf *.mod.c
10+
@rm -f Module.symvers
11+
@rm -f modules.order

0 commit comments

Comments
 (0)