Skip to content

Commit e7a8dbe

Browse files
authored
Merge branch 'deepin-community:linux-6.6.y' into linux-6.6.y
2 parents f15332e + a14cd83 commit e7a8dbe

26 files changed

Lines changed: 5310 additions & 0 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/staging/phytium-npu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
title: Phytium NPU controller
7+
maintainers:
8+
- Cheng Quan <chengquan@phytium.com.cn>
9+
properties:
10+
compatible:
11+
const: phytium,npu
12+
13+
reg:
14+
items: 2
15+
- description: NPU registers and PM registers
16+
17+
interrupts:
18+
maxItems: 1
19+
20+
dma-mask:
21+
maxItems: 1
22+
- description: NPU dma capability
23+
24+
required:
25+
- compatible
26+
- reg
27+
- interrupts
28+
29+
examples:
30+
- |
31+
npu@26d00000 {
32+
compatible = "phytium,npu";
33+
reg = <0x0 0x26d00000 0x0 0x80000
34+
0x0 0x26fcc060 0x0 0x20>;
35+
interrupts = <0 74 4>;
36+
dma-mask=<0xff 0xffffffff>;
37+
};

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6170,9 +6170,11 @@ S: Maintained
61706170
T: git git://anongit.freedesktop.org/drm/drm-misc
61716171
F: Documentation/driver-api/dma-buf.rst
61726172
F: drivers/dma-buf/
6173+
F: drivers/dma-buf/heaps/phytium_npu_heap.c
61736174
F: include/linux/*fence.h
61746175
F: include/linux/dma-buf.h
61756176
F: include/linux/dma-resv.h
6177+
F: include/linux/phytium_npu_dma_buf_heap.h
61766178
K: \bdma_(?:buf|fence|resv)\b
61776179

61786180
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM

drivers/dma-buf/heaps/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ config DMABUF_HEAPS_CMA
1212
Choose this option to enable dma-buf CMA heap. This heap is backed
1313
by the Contiguous Memory Allocator (CMA). If your system has these
1414
regions, you should say Y here.
15+
16+
config DMABUF_HEAPS_NPU_SYSTEM
17+
bool "DMA-BUF for Phytium NPU system Heap"
18+
depends on DMABUF_HEAPS && ARCH_PHYTIUM
19+
help
20+
Choose this option to enable a new dma-buf system heap for the
21+
Phytium's NPU. The npu system heap is backed by pages from the buddy
22+
allocator. If your system has NPU driver, you should say Y here.

drivers/dma-buf/heaps/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-$(CONFIG_DMABUF_HEAPS_SYSTEM) += system_heap.o
33
obj-$(CONFIG_DMABUF_HEAPS_CMA) += cma_heap.o
4+
obj-$(CONFIG_DMABUF_HEAPS_NPU_SYSTEM) += phytium_npu_heap.o

0 commit comments

Comments
 (0)