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 g15p0-01eac0, from g13p0-01eac0
Note, the corresponding mali_csffw.bin for DDK g15 MUST be used. Change-Id: Ic30634fa6247d62bf96f506c64d13b89e16b02e6 Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
@@ -236,6 +236,7 @@ Description:
|
||||
device-driver that supports a CSF GPU. The duration value unit
|
||||
is in milliseconds and is used for configuring csf scheduling
|
||||
tick duration.
|
||||
|
||||
What: /sys/class/misc/mali%u/device/reset_timeout
|
||||
Description:
|
||||
This attribute is used to set the number of milliseconds to
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2013-2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2013-2022 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
|
||||
@@ -129,7 +129,7 @@ for details.
|
||||
set and the setting coresponding to the SYSC_ALLOC register.
|
||||
|
||||
|
||||
Example for a Mali GPU with 1 clock and no regulators:
|
||||
Example for a Mali GPU with 1 clock and 1 regulator:
|
||||
|
||||
gpu@0xfc010000 {
|
||||
compatible = "arm,malit602", "arm,malit60x", "arm,malit6xx", "arm,mali-midgard";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2021-2022 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
|
||||
@@ -28,7 +28,6 @@ subdir-ccflags-y += $(ccflags-y)
|
||||
#
|
||||
# Kernel modules
|
||||
#
|
||||
obj-$(CONFIG_DMA_BUF_LOCK) += dma_buf_lock/src/
|
||||
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/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2021-2022 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
|
||||
@@ -26,16 +26,6 @@ menuconfig MALI_BASE_MODULES
|
||||
Those modules provide extra features or debug interfaces and,
|
||||
are optional for the use of the Mali GPU modules.
|
||||
|
||||
config DMA_BUF_LOCK
|
||||
bool "Build dma-buf lock module"
|
||||
depends on MALI_BASE_MODULES && MALI_DMA_FENCE
|
||||
default y
|
||||
help
|
||||
This option will build the dma_buf_lock module.
|
||||
|
||||
Modules:
|
||||
- dma_buf_lock.ko
|
||||
|
||||
config DMA_SHARED_BUFFER_TEST_EXPORTER
|
||||
bool "Build dma-buf framework test exporter module"
|
||||
depends on MALI_BASE_MODULES && DMA_SHARED_BUFFER
|
||||
|
||||
@@ -38,11 +38,9 @@ ifeq ($(CONFIG_MALI_BASE_MODULES),y)
|
||||
CONFIG_MALI_CSF_SUPPORT ?= n
|
||||
|
||||
ifneq ($(CONFIG_DMA_SHARED_BUFFER),n)
|
||||
CONFIG_DMA_BUF_LOCK ?= y
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER ?= y
|
||||
else
|
||||
# Prevent misuse when CONFIG_DMA_SHARED_BUFFER=n
|
||||
CONFIG_DMA_BUF_LOCK = n
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER = n
|
||||
endif
|
||||
|
||||
@@ -54,7 +52,6 @@ ifeq ($(CONFIG_MALI_BASE_MODULES),y)
|
||||
|
||||
else
|
||||
# Prevent misuse when CONFIG_MALI_BASE_MODULES=n
|
||||
CONFIG_DMA_BUF_LOCK = n
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER = n
|
||||
CONFIG_MALI_MEMORY_GROUP_MANAGER = n
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR = n
|
||||
@@ -64,10 +61,9 @@ endif
|
||||
CONFIGS := \
|
||||
CONFIG_MALI_BASE_MODULES \
|
||||
CONFIG_MALI_CSF_SUPPORT \
|
||||
CONFIG_DMA_BUF_LOCK \
|
||||
CONFIG_DMA_SHARED_BUFFER_TEST_EXPORTER \
|
||||
CONFIG_MALI_MEMORY_GROUP_MANAGER \
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
CONFIG_MALI_PROTECTED_MEMORY_ALLOCATOR \
|
||||
|
||||
|
||||
#
|
||||
@@ -92,26 +88,47 @@ EXTRA_CFLAGS := $(foreach config,$(CONFIGS), \
|
||||
$(if $(filter y m,$(value $(value config))), \
|
||||
-D$(value config)=1))
|
||||
|
||||
# The following were added to align with W=1 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree
|
||||
KBUILD_CFLAGS += -Wall -Werror
|
||||
|
||||
# The following were added to align with W=1 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree (v5.18.14)
|
||||
KBUILD_CFLAGS += -Wextra -Wunused -Wno-unused-parameter
|
||||
KBUILD_CFLAGS += -Wmissing-declarations
|
||||
KBUILD_CFLAGS += -Wmissing-format-attribute
|
||||
KBUILD_CFLAGS += -Wmissing-prototypes
|
||||
KBUILD_CFLAGS += -Wold-style-definition
|
||||
KBUILD_CFLAGS += -Wmissing-include-dirs
|
||||
# The -Wmissing-include-dirs cannot be enabled as the path to some of the
|
||||
# included directories change depending on whether it is an in-tree or
|
||||
# out-of-tree build.
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-but-set-variable)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
|
||||
# The following turn off the warnings enabled by -Wextra
|
||||
KBUILD_CFLAGS += -Wno-missing-field-initializers
|
||||
KBUILD_CFLAGS += -Wno-sign-compare
|
||||
KBUILD_CFLAGS += -Wno-type-limits
|
||||
KBUILD_CFLAGS += -Wno-shift-negative-value
|
||||
# This flag is needed to avoid build errors on older kernels
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wno-cast-function-type)
|
||||
|
||||
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1
|
||||
|
||||
# The following were added to align with W=2 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree (v5.18.14)
|
||||
KBUILD_CFLAGS += -Wdisabled-optimization
|
||||
# The -Wshadow flag cannot be enabled unless upstream kernels are
|
||||
# patched to fix redefinitions of certain built-in functions and
|
||||
# global variables.
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
|
||||
KBUILD_CFLAGS += -Wmissing-field-initializers
|
||||
KBUILD_CFLAGS += -Wtype-limits
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
|
||||
|
||||
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2
|
||||
|
||||
# This warning is disabled to avoid build failures in some kernel versions
|
||||
KBUILD_CFLAGS += -Wno-ignored-qualifiers
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KDIR) M=$(CURDIR) $(MAKE_ARGS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" modules
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2021-2022 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
|
||||
@@ -26,16 +26,6 @@ menuconfig MALI_BASE_MODULES
|
||||
Those modules provide extra features or debug interfaces and,
|
||||
are optional for the use of the Mali GPU modules.
|
||||
|
||||
config DMA_BUF_LOCK
|
||||
bool "Build dma-buf lock module"
|
||||
depends on MALI_BASE_MODULES && MALI_DMA_FENCE
|
||||
default y
|
||||
help
|
||||
This option will build the dma_buf_lock module.
|
||||
|
||||
Modules:
|
||||
- dma_buf_lock.ko
|
||||
|
||||
config DMA_SHARED_BUFFER_TEST_EXPORTER
|
||||
bool "Build dma-buf framework test exporter module"
|
||||
depends on MALI_BASE_MODULES
|
||||
@@ -45,7 +35,7 @@ config DMA_SHARED_BUFFER_TEST_EXPORTER
|
||||
Usable to help test importers.
|
||||
|
||||
Modules:
|
||||
- dma-buf-test-exporter.ko
|
||||
- dma-buf-test-exporter.ko
|
||||
|
||||
config MALI_MEMORY_GROUP_MANAGER
|
||||
bool "Build Mali Memory Group Manager module"
|
||||
@@ -57,7 +47,7 @@ config MALI_MEMORY_GROUP_MANAGER
|
||||
for memory pools managed by Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- memory_group_manager.ko
|
||||
- memory_group_manager.ko
|
||||
|
||||
config MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
bool "Build Mali Protected Memory Allocator module"
|
||||
@@ -70,5 +60,5 @@ config MALI_PROTECTED_MEMORY_ALLOCATOR
|
||||
of Mali GPU device drivers.
|
||||
|
||||
Modules:
|
||||
- protected_memory_allocator.ko
|
||||
- protected_memory_allocator.ko
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2017, 2020-2021 ARM Limited. All rights reserved.
|
||||
* (C) COPYRIGHT 2017, 2020-2022 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
|
||||
@@ -22,7 +22,7 @@
|
||||
bob_kernel_module {
|
||||
name: "dma-buf-test-exporter",
|
||||
defaults: [
|
||||
"kernel_defaults"
|
||||
"kernel_defaults",
|
||||
],
|
||||
srcs: [
|
||||
"Kbuild",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/dma-buf-test-exporter.h>
|
||||
#include <uapi/base/arm/dma_buf_test_exporter/dma-buf-test-exporter.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#define DMA_BUF_TE_VER_MAJOR 1
|
||||
#define DMA_BUF_TE_VER_MINOR 0
|
||||
|
||||
/* Maximum size allowed in a single DMA_BUF_TE_ALLOC call */
|
||||
#define DMA_BUF_TE_ALLOC_MAX_SIZE ((8ull << 30) >> PAGE_SHIFT) /* 8 GB */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
* (C) COPYRIGHT 2019-2022 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
|
||||
@@ -22,7 +22,7 @@
|
||||
bob_kernel_module {
|
||||
name: "memory_group_manager",
|
||||
defaults: [
|
||||
"kernel_defaults"
|
||||
"kernel_defaults",
|
||||
],
|
||||
srcs: [
|
||||
"Kbuild",
|
||||
|
||||
@@ -265,8 +265,8 @@ static struct page *example_mgm_alloc_page(
|
||||
struct mgm_groups *const data = mgm_dev->data;
|
||||
struct page *p;
|
||||
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%p, group_id=%d gfp_mask=0x%x order=%u\n",
|
||||
__func__, (void *)mgm_dev, group_id, gfp_mask, order);
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%pK, group_id=%d gfp_mask=0x%x order=%u\n", __func__,
|
||||
(void *)mgm_dev, group_id, gfp_mask, order);
|
||||
|
||||
if (WARN_ON(group_id < 0) ||
|
||||
WARN_ON(group_id >= MEMORY_GROUP_MANAGER_NR_GROUPS))
|
||||
@@ -291,8 +291,8 @@ static void example_mgm_free_page(
|
||||
{
|
||||
struct mgm_groups *const data = mgm_dev->data;
|
||||
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%p, group_id=%d page=%p order=%u\n",
|
||||
__func__, (void *)mgm_dev, group_id, (void *)page, order);
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%pK, group_id=%d page=%pK order=%u\n", __func__,
|
||||
(void *)mgm_dev, group_id, (void *)page, order);
|
||||
|
||||
if (WARN_ON(group_id < 0) ||
|
||||
WARN_ON(group_id >= MEMORY_GROUP_MANAGER_NR_GROUPS))
|
||||
@@ -309,9 +309,8 @@ static int example_mgm_get_import_memory_id(
|
||||
{
|
||||
struct mgm_groups *const data = mgm_dev->data;
|
||||
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%p, import_data=%p (type=%d)\n",
|
||||
__func__, (void *)mgm_dev, (void *)import_data,
|
||||
(int)import_data->type);
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%pK, import_data=%pK (type=%d)\n", __func__, (void *)mgm_dev,
|
||||
(void *)import_data, (int)import_data->type);
|
||||
|
||||
if (!WARN_ON(!import_data)) {
|
||||
WARN_ON(!import_data->u.dma_buf);
|
||||
@@ -329,9 +328,8 @@ static u64 example_mgm_update_gpu_pte(
|
||||
{
|
||||
struct mgm_groups *const data = mgm_dev->data;
|
||||
|
||||
dev_dbg(data->dev,
|
||||
"%s(mgm_dev=%p, group_id=%d, mmu_level=%d, pte=0x%llx)\n",
|
||||
__func__, (void *)mgm_dev, group_id, mmu_level, pte);
|
||||
dev_dbg(data->dev, "%s(mgm_dev=%pK, group_id=%d, mmu_level=%d, pte=0x%llx)\n", __func__,
|
||||
(void *)mgm_dev, group_id, mmu_level, pte);
|
||||
|
||||
if (WARN_ON(group_id < 0) ||
|
||||
WARN_ON(group_id >= MEMORY_GROUP_MANAGER_NR_GROUPS))
|
||||
@@ -367,9 +365,9 @@ static vm_fault_t example_mgm_vmf_insert_pfn_prot(
|
||||
vm_fault_t fault;
|
||||
|
||||
dev_dbg(data->dev,
|
||||
"%s(mgm_dev=%p, group_id=%d, vma=%p, addr=0x%lx, pfn=0x%lx, prot=0x%llx)\n",
|
||||
"%s(mgm_dev=%pK, group_id=%d, vma=%pK, addr=0x%lx, pfn=0x%lx, prot=0x%llx)\n",
|
||||
__func__, (void *)mgm_dev, group_id, (void *)vma, addr, pfn,
|
||||
(unsigned long long) pgprot_val(prot));
|
||||
(unsigned long long)pgprot_val(prot));
|
||||
|
||||
if (WARN_ON(group_id < 0) ||
|
||||
WARN_ON(group_id >= MEMORY_GROUP_MANAGER_NR_GROUPS))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
* (C) COPYRIGHT 2019-2022 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
|
||||
@@ -22,7 +22,7 @@
|
||||
bob_kernel_module {
|
||||
name: "protected_memory_allocator",
|
||||
defaults: [
|
||||
"kernel_defaults"
|
||||
"kernel_defaults",
|
||||
],
|
||||
srcs: [
|
||||
"Kbuild",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2012-2022 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
|
||||
@@ -59,10 +59,8 @@ ifeq ($(CONFIG_MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS), y)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MALI_BIFROST_FENCE_DEBUG), y)
|
||||
ifneq ($(CONFIG_SYNC), y)
|
||||
ifneq ($(CONFIG_SYNC_FILE), y)
|
||||
$(error CONFIG_MALI_BIFROST_FENCE_DEBUG depends on CONFIG_SYNC || CONFIG_SYNC_FILE to be set in Kernel configuration)
|
||||
endif
|
||||
ifneq ($(CONFIG_SYNC_FILE), y)
|
||||
$(error CONFIG_MALI_BIFROST_FENCE_DEBUG depends on CONFIG_SYNC_FILE to be set in Kernel configuration)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -71,7 +69,7 @@ endif
|
||||
#
|
||||
|
||||
# Driver version string which is returned to userspace via an ioctl
|
||||
MALI_RELEASE_NAME ?= '"g13p0-01eac0"'
|
||||
MALI_RELEASE_NAME ?= '"g15p0-01eac0"'
|
||||
# Set up defaults if not defined by build system
|
||||
ifeq ($(CONFIG_MALI_BIFROST_DEBUG), y)
|
||||
MALI_UNIT_TEST = 1
|
||||
@@ -151,6 +149,7 @@ bifrost_kbase-y := \
|
||||
mali_kbase_cache_policy.o \
|
||||
mali_kbase_ccswe.o \
|
||||
mali_kbase_mem.o \
|
||||
mali_kbase_mem_migrate.o \
|
||||
mali_kbase_mem_pool_group.o \
|
||||
mali_kbase_native_mgm.o \
|
||||
mali_kbase_ctx_sched.o \
|
||||
@@ -159,12 +158,6 @@ bifrost_kbase-y := \
|
||||
mali_kbase_config.o \
|
||||
mali_kbase_kinstr_prfcnt.o \
|
||||
mali_kbase_vinstr.o \
|
||||
mali_kbase_hwcnt.o \
|
||||
mali_kbase_hwcnt_gpu.o \
|
||||
mali_kbase_hwcnt_gpu_narrow.o \
|
||||
mali_kbase_hwcnt_types.o \
|
||||
mali_kbase_hwcnt_virtualizer.o \
|
||||
mali_kbase_hwcnt_watchdog_if_timer.o \
|
||||
mali_kbase_softjobs.o \
|
||||
mali_kbase_hw.o \
|
||||
mali_kbase_debug.o \
|
||||
@@ -175,6 +168,7 @@ bifrost_kbase-y := \
|
||||
mali_kbase_disjoint_events.o \
|
||||
mali_kbase_debug_mem_view.o \
|
||||
mali_kbase_debug_mem_zones.o \
|
||||
mali_kbase_debug_mem_allocs.o \
|
||||
mali_kbase_smc.o \
|
||||
mali_kbase_mem_pool.o \
|
||||
mali_kbase_mem_pool_debugfs.o \
|
||||
@@ -191,24 +185,14 @@ bifrost_kbase-$(CONFIG_DEBUG_FS) += mali_kbase_pbha_debugfs.o
|
||||
|
||||
bifrost_kbase-$(CONFIG_MALI_CINSTR_GWT) += mali_kbase_gwt.o
|
||||
|
||||
bifrost_kbase-$(CONFIG_SYNC) += \
|
||||
mali_kbase_sync_android.o \
|
||||
mali_kbase_sync_common.o
|
||||
|
||||
bifrost_kbase-$(CONFIG_SYNC_FILE) += \
|
||||
mali_kbase_fence_ops.o \
|
||||
mali_kbase_sync_file.o \
|
||||
mali_kbase_sync_common.o
|
||||
|
||||
ifeq ($(CONFIG_MALI_CSF_SUPPORT),y)
|
||||
bifrost_kbase-y += \
|
||||
mali_kbase_hwcnt_backend_csf.o \
|
||||
mali_kbase_hwcnt_backend_csf_if_fw.o
|
||||
else
|
||||
ifneq ($(CONFIG_MALI_CSF_SUPPORT),y)
|
||||
bifrost_kbase-y += \
|
||||
mali_kbase_jm.o \
|
||||
mali_kbase_hwcnt_backend_jm.o \
|
||||
mali_kbase_hwcnt_backend_jm_watchdog.o \
|
||||
mali_kbase_dummy_job_wa.o \
|
||||
mali_kbase_debug_job_fault.o \
|
||||
mali_kbase_event.o \
|
||||
@@ -218,11 +202,6 @@ else
|
||||
mali_kbase_js_ctx_attr.o \
|
||||
mali_kbase_kinstr_jm.o
|
||||
|
||||
bifrost_kbase-$(CONFIG_MALI_BIFROST_DMA_FENCE) += \
|
||||
mali_kbase_fence_ops.o \
|
||||
mali_kbase_dma_fence.o \
|
||||
mali_kbase_fence.o
|
||||
|
||||
bifrost_kbase-$(CONFIG_SYNC_FILE) += \
|
||||
mali_kbase_fence_ops.o \
|
||||
mali_kbase_fence.o
|
||||
@@ -236,6 +215,7 @@ INCLUDE_SUBDIR = \
|
||||
$(src)/backend/gpu/Kbuild \
|
||||
$(src)/mmu/Kbuild \
|
||||
$(src)/tl/Kbuild \
|
||||
$(src)/hwcnt/Kbuild \
|
||||
$(src)/gpu/Kbuild \
|
||||
$(src)/thirdparty/Kbuild \
|
||||
$(src)/platform/$(MALI_PLATFORM_DIR)/Kbuild
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2012-2022 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
|
||||
@@ -91,16 +91,6 @@ config MALI_BIFROST_ENABLE_TRACE
|
||||
Enables tracing in kbase. Trace log available through
|
||||
the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
|
||||
|
||||
config MALI_BIFROST_DMA_FENCE
|
||||
bool "Enable DMA_BUF fence support for Mali"
|
||||
depends on MALI_BIFROST
|
||||
default n
|
||||
help
|
||||
Support DMA_BUF fences for Mali.
|
||||
|
||||
This option should only be enabled if the Linux Kernel has built in
|
||||
support for DMA_BUF fences.
|
||||
|
||||
config MALI_ARBITER_SUPPORT
|
||||
bool "Enable arbiter support for Mali"
|
||||
depends on MALI_BIFROST && !MALI_CSF_SUPPORT
|
||||
@@ -117,7 +107,7 @@ config MALI_DMA_BUF_MAP_ON_DEMAND
|
||||
depends on MALI_BIFROST
|
||||
default n
|
||||
help
|
||||
This option caused kbase to set up the GPU mapping of imported
|
||||
This option will cause kbase to set up the GPU mapping of imported
|
||||
dma-buf when needed to run atoms. This is the legacy behavior.
|
||||
|
||||
This is intended for testing and the option will get removed in the
|
||||
@@ -237,7 +227,7 @@ config MALI_BIFROST_DEBUG
|
||||
|
||||
config MALI_BIFROST_FENCE_DEBUG
|
||||
bool "Enable debug sync fence usage"
|
||||
depends on MALI_BIFROST && MALI_BIFROST_EXPERT && (SYNC || SYNC_FILE)
|
||||
depends on MALI_BIFROST && MALI_BIFROST_EXPERT && SYNC_FILE
|
||||
default y if MALI_BIFROST_DEBUG
|
||||
help
|
||||
Select this option to enable additional checking and reporting on the
|
||||
@@ -385,9 +375,6 @@ config MALI_ARBITRATION
|
||||
virtualization setup for Mali
|
||||
If unsure, say N.
|
||||
|
||||
if MALI_ARBITRATION
|
||||
source "drivers/gpu/arm/bifrost/arbitration/Kconfig"
|
||||
endif
|
||||
|
||||
# source "drivers/gpu/arm/bifrost/tests/Kconfig"
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ ifeq ($(CONFIG_MALI_BIFROST),m)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XEN),y)
|
||||
ifneq ($(CONFIG_MALI_ARBITRATION), n)
|
||||
ifneq ($(CONFIG_MALI_ARBITER_SUPPORT), n)
|
||||
CONFIG_MALI_XEN ?= m
|
||||
endif
|
||||
endif
|
||||
@@ -91,14 +91,10 @@ ifeq ($(CONFIG_MALI_BIFROST),m)
|
||||
CONFIG_MALI_BIFROST_ENABLE_TRACE ?= y
|
||||
CONFIG_MALI_BIFROST_SYSTEM_TRACE ?= y
|
||||
|
||||
ifeq ($(CONFIG_SYNC), y)
|
||||
ifeq ($(CONFIG_SYNC_FILE), y)
|
||||
CONFIG_MALI_BIFROST_FENCE_DEBUG ?= y
|
||||
else
|
||||
ifeq ($(CONFIG_SYNC_FILE), y)
|
||||
CONFIG_MALI_BIFROST_FENCE_DEBUG ?= y
|
||||
else
|
||||
CONFIG_MALI_BIFROST_FENCE_DEBUG = n
|
||||
endif
|
||||
CONFIG_MALI_BIFROST_FENCE_DEBUG = n
|
||||
endif
|
||||
else
|
||||
# Prevent misuse when CONFIG_MALI_BIFROST_DEBUG=n
|
||||
@@ -160,7 +156,6 @@ CONFIGS := \
|
||||
CONFIG_MALI_BIFROST \
|
||||
CONFIG_MALI_CSF_SUPPORT \
|
||||
CONFIG_MALI_BIFROST_GATOR_SUPPORT \
|
||||
CONFIG_MALI_BIFROST_DMA_FENCE \
|
||||
CONFIG_MALI_ARBITER_SUPPORT \
|
||||
CONFIG_MALI_ARBITRATION \
|
||||
CONFIG_MALI_ARBITER_MODULES \
|
||||
@@ -227,26 +222,47 @@ EXTRA_CFLAGS += -DCONFIG_MALI_PLATFORM_NAME=$(CONFIG_MALI_PLATFORM_NAME)
|
||||
# KBUILD_EXTRA_SYMBOLS to prevent warnings about unknown functions
|
||||
#
|
||||
|
||||
# The following were added to align with W=1 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree
|
||||
KBUILD_CFLAGS += -Wall -Werror
|
||||
|
||||
# The following were added to align with W=1 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree (v5.18.14)
|
||||
KBUILD_CFLAGS += -Wextra -Wunused -Wno-unused-parameter
|
||||
KBUILD_CFLAGS += -Wmissing-declarations
|
||||
KBUILD_CFLAGS += -Wmissing-format-attribute
|
||||
KBUILD_CFLAGS += -Wmissing-prototypes
|
||||
KBUILD_CFLAGS += -Wold-style-definition
|
||||
KBUILD_CFLAGS += -Wmissing-include-dirs
|
||||
# The -Wmissing-include-dirs cannot be enabled as the path to some of the
|
||||
# included directories change depending on whether it is an in-tree or
|
||||
# out-of-tree build.
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-but-set-variable)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-const-variable)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wpacked-not-aligned)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
|
||||
# The following turn off the warnings enabled by -Wextra
|
||||
KBUILD_CFLAGS += -Wno-missing-field-initializers
|
||||
KBUILD_CFLAGS += -Wno-sign-compare
|
||||
KBUILD_CFLAGS += -Wno-type-limits
|
||||
KBUILD_CFLAGS += -Wno-shift-negative-value
|
||||
# This flag is needed to avoid build errors on older kernels
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wno-cast-function-type)
|
||||
|
||||
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1
|
||||
|
||||
# The following were added to align with W=2 in scripts/Makefile.extrawarn
|
||||
# from the Linux source tree (v5.18.14)
|
||||
KBUILD_CFLAGS += -Wdisabled-optimization
|
||||
# The -Wshadow flag cannot be enabled unless upstream kernels are
|
||||
# patched to fix redefinitions of certain built-in functions and
|
||||
# global variables.
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
|
||||
KBUILD_CFLAGS += -Wmissing-field-initializers
|
||||
KBUILD_CFLAGS += -Wtype-limits
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
|
||||
KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
|
||||
|
||||
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2
|
||||
|
||||
# This warning is disabled to avoid build failures in some kernel versions
|
||||
KBUILD_CFLAGS += -Wno-ignored-qualifiers
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KDIR) M=$(CURDIR) $(MAKE_ARGS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" modules
|
||||
|
||||
|
||||
@@ -97,16 +97,6 @@ config MALI_BIFROST_ENABLE_TRACE
|
||||
Enables tracing in kbase. Trace log available through
|
||||
the "mali_trace" debugfs file, when the CONFIG_DEBUG_FS is enabled
|
||||
|
||||
config MALI_BIFROST_DMA_FENCE
|
||||
bool "Enable DMA_BUF fence support for Mali"
|
||||
depends on MALI_BIFROST
|
||||
default n
|
||||
help
|
||||
Support DMA_BUF fences for Mali.
|
||||
|
||||
This option should only be enabled if the Linux Kernel has built in
|
||||
support for DMA_BUF fences.
|
||||
|
||||
config MALI_ARBITER_SUPPORT
|
||||
bool "Enable arbiter support for Mali"
|
||||
depends on MALI_BIFROST && !MALI_CSF_SUPPORT
|
||||
@@ -129,7 +119,7 @@ config MALI_DMA_BUF_MAP_ON_DEMAND
|
||||
default n
|
||||
default y if !DMA_BUF_SYNC_IOCTL_SUPPORTED
|
||||
help
|
||||
This option caused kbase to set up the GPU mapping of imported
|
||||
This option will cause kbase to set up the GPU mapping of imported
|
||||
dma-buf when needed to run atoms. This is the legacy behavior.
|
||||
|
||||
This is intended for testing and the option will get removed in the
|
||||
@@ -157,17 +147,6 @@ menuconfig MALI_BIFROST_EXPERT
|
||||
Enabling this option and modifying the default settings may produce
|
||||
a driver with performance or other limitations.
|
||||
|
||||
config MALI_2MB_ALLOC
|
||||
bool "Attempt to allocate 2MB pages"
|
||||
depends on MALI_BIFROST && MALI_BIFROST_EXPERT
|
||||
default n
|
||||
help
|
||||
Rather than allocating all GPU memory page-by-page, attempt to
|
||||
allocate 2MB pages from the kernel. This reduces TLB pressure and
|
||||
helps to prevent memory fragmentation.
|
||||
|
||||
If in doubt, say N
|
||||
|
||||
config MALI_MEMORY_FULLY_BACKED
|
||||
bool "Enable memory fully physically-backed"
|
||||
depends on MALI_BIFROST && MALI_BIFROST_EXPERT
|
||||
@@ -200,10 +179,10 @@ config MALI_FW_CORE_DUMP
|
||||
|
||||
Example:
|
||||
* To explicitly request core dump:
|
||||
echo 1 >/sys/kernel/debug/mali0/fw_core_dump
|
||||
echo 1 >/sys/kernel/debug/mali0/fw_core_dump
|
||||
* To output current core dump (after explicitly requesting a core dump,
|
||||
or kernel driver reported an internal firmware error):
|
||||
cat /sys/kernel/debug/mali0/fw_core_dump
|
||||
or kernel driver reported an internal firmware error):
|
||||
cat /sys/kernel/debug/mali0/fw_core_dump
|
||||
|
||||
choice
|
||||
prompt "Error injection level"
|
||||
@@ -343,5 +322,5 @@ config MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE
|
||||
slowest clock will be selected.
|
||||
|
||||
|
||||
source "kernel/drivers/gpu/arm/midgard/arbitration/Mconfig"
|
||||
source "kernel/drivers/gpu/arm/arbitration/Mconfig"
|
||||
source "kernel/drivers/gpu/arm/midgard/tests/Mconfig"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
/*
|
||||
*
|
||||
* (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
|
||||
* (C) COPYRIGHT 2019-2022 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
|
||||
@@ -28,12 +28,12 @@
|
||||
#include <tl/mali_kbase_tracepoints.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include "mali_kbase_arbiter_interface.h"
|
||||
#include "linux/mali_arbiter_interface.h"
|
||||
|
||||
/* Arbiter interface version against which was implemented this module */
|
||||
#define MALI_REQUIRED_KBASE_ARBITER_INTERFACE_VERSION 5
|
||||
#if MALI_REQUIRED_KBASE_ARBITER_INTERFACE_VERSION != \
|
||||
MALI_KBASE_ARBITER_INTERFACE_VERSION
|
||||
MALI_ARBITER_INTERFACE_VERSION
|
||||
#error "Unsupported Mali Arbiter interface version."
|
||||
#endif
|
||||
|
||||
@@ -205,6 +205,7 @@ int kbase_arbif_init(struct kbase_device *kbdev)
|
||||
|
||||
if (!pdev->dev.driver || !try_module_get(pdev->dev.driver->owner)) {
|
||||
dev_err(kbdev->dev, "arbiter_if driver not available\n");
|
||||
put_device(&pdev->dev);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
kbdev->arb.arb_dev = &pdev->dev;
|
||||
@@ -212,6 +213,7 @@ int kbase_arbif_init(struct kbase_device *kbdev)
|
||||
if (!arb_if) {
|
||||
dev_err(kbdev->dev, "arbiter_if driver not ready\n");
|
||||
module_put(pdev->dev.driver->owner);
|
||||
put_device(&pdev->dev);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
@@ -233,6 +235,7 @@ int kbase_arbif_init(struct kbase_device *kbdev)
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Failed to register with arbiter\n");
|
||||
module_put(pdev->dev.driver->owner);
|
||||
put_device(&pdev->dev);
|
||||
if (err != -EPROBE_DEFER)
|
||||
err = -EFAULT;
|
||||
return err;
|
||||
@@ -262,8 +265,10 @@ void kbase_arbif_destroy(struct kbase_device *kbdev)
|
||||
arb_if->vm_ops.vm_arb_unregister_dev(kbdev->arb.arb_if);
|
||||
}
|
||||
kbdev->arb.arb_if = NULL;
|
||||
if (kbdev->arb.arb_dev)
|
||||
if (kbdev->arb.arb_dev) {
|
||||
module_put(kbdev->arb.arb_dev->driver->owner);
|
||||
put_device(kbdev->arb.arb_dev);
|
||||
}
|
||||
kbdev->arb.arb_dev = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note OR MIT
|
||||
#
|
||||
# (C) COPYRIGHT 2012-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.
|
||||
#
|
||||
#
|
||||
|
||||
config MALI_XEN
|
||||
tristate "Enable Xen Interface reference code"
|
||||
depends on MALI_ARBITRATION && XEN
|
||||
default n
|
||||
help
|
||||
Enables the build of xen interface modules used in the reference
|
||||
virtualization setup for Mali
|
||||
If unsure, say N.
|
||||
|
||||
config MALI_ARBITER_MODULES
|
||||
tristate "Enable mali arbiter modules"
|
||||
depends on MALI_ARBITRATION
|
||||
default y
|
||||
help
|
||||
Enables the build of the arbiter modules used in the reference
|
||||
virtualization setup for Mali
|
||||
If unsure, say N
|
||||
|
||||
config MALI_GPU_POWER_MODULES
|
||||
tristate "Enable gpu power modules"
|
||||
depends on MALI_ARBITRATION
|
||||
default y
|
||||
help
|
||||
Enables the build of the gpu power modules used in the reference
|
||||
virtualization setup for Mali
|
||||
If unsure, say N
|
||||
|
||||
|
||||
source "drivers/gpu/arm/bifrost/arbitration/ptm/Kconfig"
|
||||
@@ -1,28 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note OR MIT
|
||||
#
|
||||
# (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.
|
||||
#
|
||||
#
|
||||
|
||||
config MALI_PARTITION_MANAGER
|
||||
tristate "Enable compilation of partition manager modules"
|
||||
depends on MALI_ARBITRATION
|
||||
default n
|
||||
help
|
||||
This option enables the compilation of the partition manager
|
||||
modules used to configure the Mali-G78AE GPU.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
#
|
||||
# (C) COPYRIGHT 2014-2021 ARM Limited. All rights reserved.
|
||||
# (C) COPYRIGHT 2014-2022 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user