Skip to content

Commit 35b1376

Browse files
jlawrynodanvet
authored andcommitted
accel/ivpu: Introduce a new DRM driver for Intel VPU
VPU stands for Versatile Processing Unit and it's a CPU-integrated inference accelerator for Computer Vision and Deep Learning applications. The VPU device consist of following components: - Buttress - provides CPU to VPU integration, interrupt, frequency and power management. - Memory Management Unit (based on ARM MMU-600) - translates VPU to host DMA addresses, isolates user workloads. - RISC based microcontroller - executes firmware that provides job execution API for the kernel-mode driver - Neural Compute Subsystem (NCS) - does the actual work, provides Compute and Copy engines. - Network on Chip (NoC) - network fabric connecting all the components This driver supports VPU IP v2.7 integrated into Intel Meteor Lake client CPUs (14th generation). Module sources are at drivers/accel/ivpu and module name is "intel_vpu.ko". This patch includes only very besic functionality: - module, PCI device and IRQ initialization - register definitions and low level register manipulation functions - SET/GET_PARAM ioctls - power up without firmware Co-developed-by: Krystian Pradzynski <[email protected]> Signed-off-by: Krystian Pradzynski <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6f84981 commit 35b1376

File tree

14 files changed

+2272
-0
lines changed

14 files changed

+2272
-0
lines changed

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6894,6 +6894,15 @@ T: git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git
68946894
F: Documentation/accel/
68956895
F: drivers/accel/
68966896

6897+
DRM ACCEL DRIVERS FOR INTEL VPU
6898+
M: Jacek Lawrynowicz <[email protected]>
6899+
M: Stanislaw Gruszka <[email protected]>
6900+
6901+
S: Supported
6902+
T: git git://anongit.freedesktop.org/drm/drm-misc
6903+
F: drivers/accel/ivpu/
6904+
F: include/uapi/drm/ivpu_accel.h
6905+
68976906
DRM DRIVERS FOR ALLWINNER A10
68986907
M: Maxime Ripard <[email protected]>
68996908
M: Chen-Yu Tsai <[email protected]>

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,4 @@ obj-$(CONFIG_COUNTER) += counter/
189189
obj-$(CONFIG_MOST) += most/
190190
obj-$(CONFIG_PECI) += peci/
191191
obj-$(CONFIG_HTE) += hte/
192+
obj-$(CONFIG_DRM_ACCEL) += accel/

drivers/accel/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ menuconfig DRM_ACCEL
2222
major number than GPUs, and will be exposed to user-space using
2323
different device files, called accel/accel* (in /dev, sysfs
2424
and debugfs).
25+
26+
source "drivers/accel/ivpu/Kconfig"

drivers/accel/Makefile

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-only
2+
3+
obj-y += ivpu/

drivers/accel/ivpu/Kconfig

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-only
2+
3+
config DRM_ACCEL_IVPU
4+
tristate "Intel VPU for Meteor Lake and newer"
5+
depends on DRM_ACCEL
6+
depends on X86_64 && !UML
7+
depends on PCI && PCI_MSI
8+
select FW_LOADER
9+
select SHMEM
10+
help
11+
Choose this option if you have a system that has an 14th generation Intel CPU
12+
or newer. VPU stands for Versatile Processing Unit and it's a CPU-integrated
13+
inference accelerator for Computer Vision and Deep Learning applications.
14+
15+
If "M" is selected, the module will be called intel_vpu.

drivers/accel/ivpu/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# Copyright (C) 2023 Intel Corporation
3+
4+
intel_vpu-y := \
5+
ivpu_drv.o \
6+
ivpu_hw_mtl.o
7+
8+
obj-$(CONFIG_DRM_ACCEL_IVPU) += intel_vpu.o

drivers/accel/ivpu/TODO

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- Move to threaded_irqs to mitigate potential infinite loop in ivpu_ipc_irq_handler()
2+
- Implement support for BLOB IDs
3+
- Add debugfs support to improve debugging and testing
4+
- Add tracing events for performance debugging
5+
- Implement HW based scheduling support
6+
- Use syncobjs for submit/sync
7+
- Refactor IPC protocol to improve message latency
8+
- Implement BO cache and MADVISE IOCTL
9+
- Add support for user allocated buffers using prime import and dma-buf heaps
10+
- Refactor struct ivpu_bo to use struct drm_gem_shmem_object
11+
- Add driver/device documentation

0 commit comments

Comments
 (0)