Skip to content

Commit

Permalink
drivers: gpu: add VGLite gpu driver
Browse files Browse the repository at this point in the history
Signed-off-by: 黄子懿 <[email protected]>
  • Loading branch information
MrThanlon authored and RevySR committed Jun 27, 2024
1 parent a07b498 commit 1d79908
Show file tree
Hide file tree
Showing 15 changed files with 2,542 additions and 1 deletion.
18 changes: 18 additions & 0 deletions arch/riscv/boot/dts/canaan/k230.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,24 @@
clock-frequency = <400000>;
status = "disabled";
};

gpu: gpu@90800000 {
compatible = "verisilicon,gc8000ul";
reg = <0x0 0x90800000 0x0 0x1000>;
interrupts = <135 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&sysctl_power K230_PM_DOMAIN_DISP>;
resets = <
&sysctl_reset
K230_RESET_V2P5D_REG_OFFSET
K230_RESET_V2P5D_TYPE
K230_RESET_V2P5D_DONE_BIT
K230_RESET_V2P5D_ASSERT_BIT
>;
reset-names = "vglite";
clocks = <&disp_gpu>;
clock-names = "vglite";
status = "okay";
};
};
};
#include "k230_clock_provider.dtsi"
1 change: 1 addition & 0 deletions arch/riscv/configs/k230_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,4 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
CONFIG_INPUT_EVDEV=y
CONFIG_GPU_VGLITE=y
2 changes: 1 addition & 1 deletion drivers/gpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# drm/tegra depends on host1x, so if both drivers are built-in care must be
# taken to initialize them in the correct order. Link order is the only way
# to ensure this currently.
obj-y += host1x/ drm/ vga/
obj-y += host1x/ drm/ vga/ vglite/
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
obj-$(CONFIG_TRACE_GPU_MEM) += trace/
8 changes: 8 additions & 0 deletions drivers/gpu/vglite/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
config GPU_VGLITE
tristate "VGLite device driver"
help
Add support for Verisilicon VGLite GPU driver.
This driver is for single-thread context
use. Make sure to control the GPU in single
thread.
3 changes: 3 additions & 0 deletions drivers/gpu/vglite/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
vglite-objs := vg_lite_hal.o vg_lite_kernel.o
obj-$(CONFIG_GPU_VGLITE) += vglite.o
Loading

0 comments on commit 1d79908

Please sign in to comment.