You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
MALI: rockchip: upgrade bifrost DDK to g7p1-01bet0, from g6p0-01eac0
Including modifications under drivers/base/ from the new DDK. Resolve lots of conflicts. Fix compilation errors when CONFIG_DEBUG_FS is disabled. Change-Id: I69f9ac87d927441d0b92b8dac8b704922aeb6a0a Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
@@ -15,10 +15,11 @@
|
||||
|
||||
What: /sys/class/misc/mali%u/device/core_mask
|
||||
Description:
|
||||
This attribute is used to restrict number of shader core
|
||||
available, is useful for debugging purposes. Reading
|
||||
this attribute provides us mask of cores available.
|
||||
Writing to it will set the current core mask.
|
||||
This attribute is used to restrict the number of shader cores
|
||||
available in this instance, is useful for debugging purposes.
|
||||
Reading this attribute provides us mask of all cores available.
|
||||
Writing to it will set the current core mask. Doesn't
|
||||
allow disabling all the cores present in this instance.
|
||||
|
||||
What: /sys/class/misc/mali%u/device/debug_command
|
||||
Description:
|
||||
@@ -43,6 +44,14 @@ Description:
|
||||
Its a readonly attribute and on reading gives details on the
|
||||
options used with the dummy workaround.
|
||||
|
||||
What: /sys/class/misc/mali%u/device/fw_timeout
|
||||
Description:
|
||||
This attribute is available only with mali platform
|
||||
device-driver that supports a CSF GPU. This attribute is
|
||||
used to set the duration value in milliseconds for the
|
||||
waiting timeout used for a GPU status change request being
|
||||
acknowledged by the FW.
|
||||
|
||||
What: /sys/class/misc/mali%u/device/gpuinfo
|
||||
Description:
|
||||
This attribute provides description of the present Mali GPU.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2013-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
@@ -97,6 +97,8 @@ for details.
|
||||
are used at different points so care should be taken to configure
|
||||
both power models in the device tree (specifically dynamic-coefficient,
|
||||
static-coefficient and scale) to best match the platform.
|
||||
- power_policy : Sets the GPU power policy at probe time. Available options are
|
||||
"coarse_demand" and "always_on". If not set, then "coarse_demand" is used.
|
||||
- system-coherency : Sets the coherency protocol to be used for coherent
|
||||
accesses made from the GPU.
|
||||
If not set then no coherency is used.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2019-2020 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2020 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2020-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2019-2020 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2017, 2019-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
|
||||
42
Documentation/dma-buf-test-exporter.txt
Normal file
42
Documentation/dma-buf-test-exporter.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2012-2013, 2020-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
=====================
|
||||
dma-buf-test-exporter
|
||||
=====================
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The dma-buf-test-exporter is a simple exporter of dma_buf objects.
|
||||
It has a private API to allocate and manipulate the buffers which are represented as dma_buf fds.
|
||||
The private API allows:
|
||||
* simple allocation of physically non-contiguous buffers
|
||||
* simple allocation of physically contiguous buffers
|
||||
* query kernel side API usage stats (number of attachments, number of mappings, mmaps)
|
||||
* failure mode configuration (fail attach, mapping, mmap)
|
||||
* kernel side memset of buffers
|
||||
|
||||
The buffers support all of the dma_buf API, including mmap.
|
||||
|
||||
It supports being compiled as a module both in-tree and out-of-tree.
|
||||
|
||||
See include/linux/dma-buf-test-exporter.h for the ioctl interface.
|
||||
See Documentation/dma-buf-sharing.txt for details on dma_buf.
|
||||
@@ -183,8 +183,7 @@ config SOC_BUS
|
||||
|
||||
source "drivers/base/regmap/Kconfig"
|
||||
|
||||
source "drivers/base/arm/memory_group_manager/Kconfig"
|
||||
source "drivers/base/arm/protected_memory_allocator/Kconfig"
|
||||
source "drivers/base/arm/Kconfig"
|
||||
|
||||
config DMA_SHARED_BUFFER
|
||||
bool
|
||||
|
||||
34
drivers/base/arm/Kbuild
Normal file
34
drivers/base/arm/Kbuild
Normal file
@@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# ccflags
|
||||
#
|
||||
ccflags-y += -I$(src)/../../../include
|
||||
|
||||
subdir-ccflags-y += $(ccflags-y)
|
||||
|
||||
#
|
||||
# Kernel modules
|
||||
#
|
||||
obj-$(CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER) += dma_buf_test_exporter/
|
||||
obj-$(CONFIG_MALI_MEMORY_GROUP_MANAGER) += memory_group_manager/
|
||||
obj-$(CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR) += protected_memory_allocator/
|
||||
|
||||
64
drivers/base/arm/Kconfig
Normal file
64
drivers/base/arm/Kconfig
Normal file
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
menuconfig MALI_BASE_MODULES
|
||||
bool "Mali Base extra modules"
|
||||
default n
|
||||
help
|
||||
Enable this option to build support for a Arm Mali base modules.
|
||||
Those modules provide extra features or debug interfaces and,
|
||||
are optional for the use of the Mali GPU modules.
|
||||
|
||||
config DMA_SHARED_BUFFER_TEST_EXPORTER
|
||||
bool "Build dma-buf framework test exporter module"
|
||||
depends on MALI_BASE_MODULES && DMA_SHARED_BUFFER
|
||||
default y
|
||||
help
|
||||
This option will build the dma-buf framework test exporter module.
|
||||
Usable to help test importers.
|
||||
|
||||
Modules:
|
||||
- dma-buf-test-exporter.ko
|
||||
|
||||
config MALI_MEMORY_GROUP_MANAGER
|
||||
bool "Build Mali Memory Group Manager module"
|
||||
depends on MALI_BASE_MODULES
|
||||
default y
|
||||
help
|
||||
This option will build the memory group manager module.
|
||||
This is an example implementation for allocation and release of pages
|
||||
for memory pools managed by Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- memory_group_manager.ko
|
||||
|
||||
config MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
bool "Build Mali Protected Memory Allocator module"
|
||||
depends on MALI_BASE_MODULES && MALI_CSF_SUPPORT
|
||||
default y
|
||||
help
|
||||
This option will build the protected memory allocator module.
|
||||
This is an example implementation for allocation and release of pages
|
||||
of secure memory intended to be used by the firmware
|
||||
of Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- protected_memory_allocator.ko
|
||||
|
||||
98
drivers/base/arm/Makefile
Normal file
98
drivers/base/arm/Makefile
Normal file
@@ -0,0 +1,98 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
|
||||
KDIR ?= $(KERNEL_SRC)
|
||||
|
||||
ifeq ($(KDIR),)
|
||||
$(error Must specify KDIR to point to the kernel to target))
|
||||
endif
|
||||
|
||||
vars :=
|
||||
#
|
||||
# Default configuration values
|
||||
#
|
||||
CONFIG_MALI_BASE_MODULES ?= n
|
||||
|
||||
ifeq ($(CONFIG_MALI_BASE_MODULES),y)
|
||||
CONFIG_MALI_CSF_SUPPORT ?= n
|
||||
|
||||
ifneq ($(CONFIG_DMA_SHARED_BUFFER),n)
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER ?= y
|
||||
else
|
||||
# Prevent misuse when CONFIG_DMA_SHARED_BUFFER=n
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER = n
|
||||
endif
|
||||
|
||||
CONFIG_MALI_MEMORY_GROUP_MANAGER ?= y
|
||||
|
||||
ifneq ($(CONFIG_MALI_CSF_SUPPORT), n)
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR ?= y
|
||||
endif
|
||||
|
||||
else
|
||||
# Prevent misuse when CONFIG_MALI_BASE_MODULES=n
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER = n
|
||||
CONFIG_MALI_MEMORY_GROUP_MANAGER = n
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR = n
|
||||
|
||||
endif
|
||||
|
||||
CONFIGS := \
|
||||
CONFIG_MALI_BASE_MODULES \
|
||||
CONFIG_MALI_CSF_SUPPORT \
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER \
|
||||
CONFIG_MALI_MEMORY_GROUP_MANAGER \
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
|
||||
|
||||
#
|
||||
# MAKE_ARGS to pass the custom CONFIGs on out-of-tree build
|
||||
#
|
||||
# Generate the list of CONFIGs and values.
|
||||
# $(value config) is the name of the CONFIG option.
|
||||
# $(value $(value config)) is its value (y, m).
|
||||
# When the CONFIG is not set to y or m, it defaults to n.
|
||||
MAKE_ARGS := $(foreach config,$(CONFIGS), \
|
||||
$(if $(filter y m,$(value $(value config))), \
|
||||
$(value config)=$(value $(value config)), \
|
||||
$(value config)=n))
|
||||
|
||||
#
|
||||
# EXTRA_CFLAGS to define the custom CONFIGs on out-of-tree build
|
||||
#
|
||||
# Generate the list of CONFIGs defines with values from CONFIGS.
|
||||
# $(value config) is the name of the CONFIG option.
|
||||
# When set to y or m, the CONFIG gets defined to 1.
|
||||
EXTRA_CFLAGS := $(foreach config,$(CONFIGS), \
|
||||
$(if $(filter y m,$(value $(value config))), \
|
||||
-D$(value config)=1))
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KDIR) M=$(CURDIR) $(MAKE_ARGS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" modules
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C $(KDIR) M=$(CURDIR) $(MAKE_ARGS) modules_install
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KDIR) M=$(CURDIR) $(MAKE_ARGS) clean
|
||||
64
drivers/base/arm/Mconfig
Normal file
64
drivers/base/arm/Mconfig
Normal file
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
menuconfig MALI_BASE_MODULES
|
||||
bool "Mali Base extra modules"
|
||||
default y if BACKEND_KERNEL
|
||||
help
|
||||
Enable this option to build support for a Arm Mali base modules.
|
||||
Those modules provide extra features or debug interfaces and,
|
||||
are optional for the use of the Mali GPU modules.
|
||||
|
||||
config DMA_SHARED_BUFFER_TEST_EXPORTER
|
||||
bool "Build dma-buf framework test exporter module"
|
||||
depends on MALI_BASE_MODULES
|
||||
default y
|
||||
help
|
||||
This option will build the dma-buf framework test exporter module.
|
||||
Usable to help test importers.
|
||||
|
||||
Modules:
|
||||
- dma-buf-test-exporter.ko
|
||||
|
||||
config MALI_MEMORY_GROUP_MANAGER
|
||||
bool "Build Mali Memory Group Manager module"
|
||||
depends on MALI_BASE_MODULES
|
||||
default y
|
||||
help
|
||||
This option will build the memory group manager module.
|
||||
This is an example implementation for allocation and release of pages
|
||||
for memory pools managed by Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- memory_group_manager.ko
|
||||
|
||||
config MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
bool "Build Mali Protected Memory Allocator module"
|
||||
depends on MALI_BASE_MODULES && GPU_HAS_CSF
|
||||
default y
|
||||
help
|
||||
This option will build the protected memory allocator module.
|
||||
This is an example implementation for allocation and release of pages
|
||||
of secure memory intended to be used by the firmware
|
||||
of Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- protected_memory_allocator.ko
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2012, 2020-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
@@ -18,9 +18,6 @@
|
||||
#
|
||||
#
|
||||
|
||||
config MALI_KUTF
|
||||
tristate "Mali Kernel Unit Test Framework"
|
||||
default m
|
||||
help
|
||||
Enables MALI testing framework. To compile it as a module,
|
||||
choose M here - this will generate a single module called kutf.
|
||||
ifeq ($(CONFIG_DMA_SHARED_BUFFER), y)
|
||||
obj-m := dma_buf_lock.o
|
||||
endif
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2012, 2020-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
@@ -27,8 +27,10 @@ ARCH ?= $(shell uname -m)
|
||||
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
|
||||
KDIR ?= $(KERNEL_SRC)
|
||||
|
||||
all:
|
||||
$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) EXTRA_CFLAGS="-I$(CURDIR)/../../../../include" modules CONFIG_MALI_MEMORY_GROUP_MANAGER=m
|
||||
all: dma_buf_lock
|
||||
|
||||
dma_buf_lock:
|
||||
$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) EXTRA_CFLAGS="-I$(CURDIR)/../../../../../include"
|
||||
|
||||
clean:
|
||||
$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
|
||||
898
drivers/base/arm/dma_buf_lock/src/dma_buf_lock.c
Normal file
898
drivers/base/arm/dma_buf_lock/src/dma_buf_lock.c
Normal file
File diff suppressed because it is too large
Load Diff
46
drivers/base/arm/dma_buf_lock/src/dma_buf_lock.h
Normal file
46
drivers/base/arm/dma_buf_lock/src/dma_buf_lock.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2012, 2020-2021 ARM Limited. All rights reserved.
|
||||
*
|
||||
* This program is free software and is provided to you under the terms of the
|
||||
* GNU General Public License version 2 as published by the Free Software
|
||||
* Foundation, and any use by you of this program is subject to the terms
|
||||
* of such GNU license.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you can access it online at
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DMA_BUF_LOCK_H
|
||||
#define _DMA_BUF_LOCK_H
|
||||
|
||||
typedef enum dma_buf_lock_exclusive
|
||||
{
|
||||
DMA_BUF_LOCK_NONEXCLUSIVE = 0,
|
||||
DMA_BUF_LOCK_EXCLUSIVE = -1
|
||||
} dma_buf_lock_exclusive;
|
||||
|
||||
typedef struct dma_buf_lock_k_request
|
||||
{
|
||||
int count;
|
||||
int *list_of_dma_buf_fds;
|
||||
int timeout;
|
||||
dma_buf_lock_exclusive exclusive;
|
||||
} dma_buf_lock_k_request;
|
||||
|
||||
#define DMA_BUF_LOCK_IOC_MAGIC '~'
|
||||
|
||||
#define DMA_BUF_LOCK_FUNC_LOCK_ASYNC _IOW(DMA_BUF_LOCK_IOC_MAGIC, 11, dma_buf_lock_k_request)
|
||||
|
||||
#define DMA_BUF_LOCK_IOC_MINNR 11
|
||||
#define DMA_BUF_LOCK_IOC_MAXNR 11
|
||||
|
||||
#endif /* _DMA_BUF_LOCK_H */
|
||||
23
drivers/base/arm/dma_buf_test_exporter/Kbuild
Normal file
23
drivers/base/arm/dma_buf_test_exporter/Kbuild
Normal file
@@ -0,0 +1,23 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2012, 2020-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program is free software and is provided to you under the terms of the
|
||||
# GNU General Public License version 2 as published by the Free Software
|
||||
# Foundation, and any use by you of this program is subject to the terms
|
||||
# of such GNU license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
#
|
||||
|
||||
ifeq ($(CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER), y)
|
||||
obj-m += dma-buf-test-exporter.o
|
||||
endif
|
||||
36
drivers/base/arm/dma_buf_test_exporter/build.bp
Normal file
36
drivers/base/arm/dma_buf_test_exporter/build.bp
Normal file
@@ -0,0 +1,36 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2017, 2020-2021 ARM Limited. All rights reserved.
|
||||
*
|
||||
* This program is free software and is provided to you under the terms of the
|
||||
* GNU General Public License version 2 as published by the Free Software
|
||||
* Foundation, and any use by you of this program is subject to the terms
|
||||
* of such GNU license.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you can access it online at
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
*
|
||||
*/
|
||||
|
||||
bob_kernel_module {
|
||||
name: "dma-buf-test-exporter",
|
||||
defaults: [
|
||||
"kernel_defaults"
|
||||
],
|
||||
srcs: [
|
||||
"Kbuild",
|
||||
"dma-buf-test-exporter.c",
|
||||
],
|
||||
enabled: false,
|
||||
dma_shared_buffer_test_exporter: {
|
||||
kbuild_options: ["CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER=y"],
|
||||
enabled: true,
|
||||
},
|
||||
}
|
||||
824
drivers/base/arm/dma_buf_test_exporter/dma-buf-test-exporter.c
Normal file
824
drivers/base/arm/dma_buf_test_exporter/dma-buf-test-exporter.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
#
|
||||
@@ -18,4 +18,6 @@
|
||||
#
|
||||
#
|
||||
|
||||
obj-$(CONFIG_MALI_MEMORY_GROUP_MANAGER) := memory_group_manager.o
|
||||
ifeq ($(CONFIG_MALI_MEMORY_GROUP_MANAGER), y)
|
||||
obj-m := memory_group_manager.o
|
||||
endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user