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 committed Jun 26, 2024
1 parent 5bbe846 commit f030c99
Show file tree
Hide file tree
Showing 15 changed files with 2,526 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 @@ -228,6 +228,24 @@
//status = "disabled";/*disabled, okay*/
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_gpio_provider.dtsi"
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/configs/k230_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,4 @@ CONFIG_RCU_EQS_DEBUG=y
CONFIG_MEMTEST=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_COMMON_CLK_K230=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 f030c99

Please sign in to comment.