Skip to content

Commit 24b7d26

Browse files
committed
Revert "Revert "MALI: Midgard: update to r13p0-00rel0""
This reverts commit 2fe451d. Change-Id: I339ae6f8e4bec5f9539e07edf9553c6591b1a94d
1 parent 73caa78 commit 24b7d26

99 files changed

Lines changed: 9293 additions & 4057 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/arm/midgard/Kbuild

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
# Driver version string which is returned to userspace via an ioctl
18-
MALI_RELEASE_NAME ?= "r9p0-05rel0"
18+
MALI_RELEASE_NAME ?= "r13p0-00rel0"
1919

2020
# Paths required for build
2121
KBASE_PATH = $(src)
@@ -88,7 +88,6 @@ SRC := \
8888
mali_kbase_context.c \
8989
mali_kbase_pm.c \
9090
mali_kbase_config.c \
91-
mali_kbase_instr.c \
9291
mali_kbase_vinstr.c \
9392
mali_kbase_softjobs.c \
9493
mali_kbase_10969_workaround.c \
@@ -104,25 +103,27 @@ SRC := \
104103
mali_kbase_replay.c \
105104
mali_kbase_mem_profile_debugfs.c \
106105
mali_kbase_mmu_mode_lpae.c \
106+
mali_kbase_mmu_mode_aarch64.c \
107107
mali_kbase_disjoint_events.c \
108108
mali_kbase_gator_api.c \
109109
mali_kbase_debug_mem_view.c \
110110
mali_kbase_debug_job_fault.c \
111111
mali_kbase_smc.c \
112112
mali_kbase_mem_pool.c \
113-
mali_kbase_mem_pool_debugfs.c
113+
mali_kbase_mem_pool_debugfs.c \
114+
mali_kbase_tlstream.c \
115+
mali_kbase_strings.c \
116+
mali_kbase_as_fault_debugfs.c
114117

115-
ifeq ($(CONFIG_MALI_MIPE_ENABLED),y)
116-
SRC += mali_kbase_tlstream.c
117-
ifeq ($(MALI_UNIT_TEST),1)
118-
SRC += mali_kbase_tlstream_test.c
119-
endif
118+
ifeq ($(MALI_UNIT_TEST),1)
119+
SRC += mali_kbase_tlstream_test.c
120120
endif
121121

122122
ifeq ($(MALI_CUSTOMER_RELEASE),0)
123123
SRC += mali_kbase_regs_dump_debugfs.c
124124
endif
125125

126+
126127
# Job Scheduler Policy: Completely Fair Scheduler
127128
SRC += mali_kbase_js_policy_cfs.c
128129

@@ -200,13 +201,7 @@ obj-$(CONFIG_MALI_MIDGARD) += mali_kbase.o
200201
# Tell the Linux build system to enable building of our .c files
201202
mali_kbase-y := $(SRC:.c=.o)
202203

203-
ifneq ($(wildcard $(src)/internal/Kbuild),)
204-
ifeq ($(MALI_CUSTOMER_RELEASE),0)
205-
# This include may set MALI_BACKEND_PATH and CONFIG_MALI_BACKEND_REAL
206-
include $(src)/internal/Kbuild
207-
mali_kbase-y += $(INTERNAL:.c=.o)
208-
endif
209-
endif
204+
mali_kbase-$(CONFIG_MALI_DMA_FENCE) += mali_kbase_dma_fence.o
210205

211206
MALI_BACKEND_PATH ?= backend
212207
CONFIG_MALI_BACKEND ?= gpu

drivers/gpu/arm/midgard/Kconfig

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,23 @@
1616

1717
menuconfig MALI_MIDGARD
1818
tristate "Mali Midgard series support"
19+
select GPU_TRACEPOINTS if ANDROID
1920
default n
2021
help
2122
Enable this option to build support for a ARM Mali Midgard GPU.
2223

2324
To compile this driver as a module, choose M here:
2425
this will generate a single module, called mali_kbase.
2526

26-
choice
27-
prompt "Streamline support"
28-
depends on MALI_MIDGARD
29-
default MALI_TIMELINE_DISABLED
30-
help
31-
Select streamline support configuration.
32-
33-
config MALI_TIMELINE_DISABLED
34-
bool "Streamline support disabled"
35-
help
36-
Disable support for ARM Streamline Performance Analyzer.
37-
38-
Timeline support will not be included in
39-
kernel code.
40-
Debug stream will not be generated.
41-
4227
config MALI_GATOR_SUPPORT
4328
bool "Streamline support via Gator"
29+
depends on MALI_MIDGARD
30+
default n
4431
help
4532
Adds diagnostic support for use with the ARM Streamline Performance Analyzer.
4633
You will need the Gator device driver already loaded before loading this driver when enabling
4734
Streamline debug support.
48-
49-
config MALI_MIPE_ENABLED
50-
bool "Streamline support via MIPE"
51-
help
52-
Adds diagnostic support for use with the ARM Streamline Performance Analyzer.
53-
54-
Stream will be transmitted directly to Mali GPU library.
55-
Compatible version of the library is required to read debug stream generated by kernel.
56-
57-
endchoice
35+
This is a legacy interface required by older versions of Streamline.
5836

5937
config MALI_MIDGARD_DVFS
6038
bool "Enable legacy DVFS"
@@ -81,6 +59,15 @@ config MALI_DEVFREQ
8159
governor, the frequency of Mali will be dynamically selected from the
8260
available OPPs.
8361

62+
config MALI_DMA_FENCE
63+
bool "DMA_BUF fence support for Mali"
64+
depends on MALI_MIDGARD && !KDS
65+
default n
66+
help
67+
Support DMA_BUF fences for Mali.
68+
69+
This option should only be enabled if KDS is not present and
70+
the Linux Kernel has built in support for DMA_BUF fences.
8471

8572
# MALI_EXPERT configuration options
8673

@@ -92,13 +79,18 @@ menuconfig MALI_EXPERT
9279
Enabling this option and modifying the default settings may produce a driver with performance or
9380
other limitations.
9481

95-
config MALI_DEBUG_SHADER_SPLIT_FS
96-
bool "Allow mapping of shader cores via sysfs"
82+
config MALI_PRFCNT_SET_SECONDARY
83+
bool "Use secondary set of performance counters"
9784
depends on MALI_MIDGARD && MALI_EXPERT
9885
default n
9986
help
100-
Select this option to provide a sysfs entry for runtime configuration of shader
101-
core affinity masks.
87+
Select this option to use secondary set of performance counters. Kernel
88+
features that depend on an access to the primary set of counters may
89+
become unavailable. Enabling this option will prevent power management
90+
from working optimally and may cause instrumentation tools to return
91+
bogus results.
92+
93+
If unsure, say N.
10294

10395
config MALI_PLATFORM_FAKE
10496
bool "Enable fake platform device support"
@@ -162,6 +154,23 @@ config MALI_DEBUG
162154
help
163155
Select this option for increased checking and reporting of errors.
164156

157+
config MALI_FENCE_DEBUG
158+
bool "Debug sync fence usage"
159+
depends on MALI_MIDGARD && MALI_EXPERT && SYNC
160+
default y if MALI_DEBUG
161+
help
162+
Select this option to enable additional checking and reporting on the
163+
use of sync fences in the Mali driver.
164+
165+
This will add a 3s timeout to all sync fence waits in the Mali
166+
driver, so that when work for Mali has been waiting on a sync fence
167+
for a long time a debug message will be printed, detailing what fence
168+
is causing the block, and which dependent Mali atoms are blocked as a
169+
result of this.
170+
171+
The timeout can be changed at runtime through the js_soft_timeout
172+
device attribute, where the timeout is specified in milliseconds.
173+
165174
config MALI_NO_MALI
166175
bool "No Mali"
167176
depends on MALI_MIDGARD && MALI_EXPERT
@@ -198,11 +207,19 @@ config MALI_SYSTEM_TRACE
198207
minimal overhead when not in use. Enable only if you know what
199208
you are doing.
200209

201-
config MALI_GPU_TRACEPOINTS
202-
bool "Enable GPU tracepoints"
203-
depends on MALI_MIDGARD && ANDROID
204-
select GPU_TRACEPOINTS
210+
config MALI_GPU_MMU_AARCH64
211+
bool "Use AArch64 page tables"
212+
depends on MALI_MIDGARD && MALI_EXPERT
213+
default n
205214
help
206-
Enables GPU tracepoints using Android trace event definitions.
215+
Use AArch64 format page tables for the GPU instead of LPAE-style.
216+
The two formats have the same functionality and performance but a
217+
future GPU may deprecate or remove the legacy LPAE-style format.
218+
219+
The LPAE-style format is supported on all Midgard and current Bifrost
220+
GPUs. Enabling AArch64 format restricts the driver to only supporting
221+
Bifrost GPUs.
222+
223+
If in doubt, say N.
207224

208225
source "drivers/gpu/arm/midgard/platform/Kconfig"

drivers/gpu/arm/midgard/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (C) COPYRIGHT 2010-2015 ARM Limited. All rights reserved.
2+
# (C) COPYRIGHT 2010-2016 ARM Limited. All rights reserved.
33
#
44
# This program is free software and is provided to you under the terms of the
55
# GNU General Public License version 2 as published by the Free Software
@@ -26,10 +26,6 @@ ifeq ($(MALI_UNIT_TEST), 1)
2626
EXTRA_SYMBOLS += $(KBASE_PATH_RELATIVE)/tests/internal/src/kernel_assert_module/linux/Module.symvers
2727
endif
2828

29-
ifneq ($(wildcard $(CURDIR)/internal/Makefile.in),)
30-
include $(CURDIR)/internal/Makefile.in
31-
endif
32-
3329
ifeq ($(MALI_BUS_LOG), 1)
3430
#Add bus logger symbols
3531
EXTRA_SYMBOLS += $(BUSLOG_PATH_RELATIVE)/drivers/base/bus_logger/Module.symvers

drivers/gpu/arm/midgard/backend/gpu/mali_kbase_cache_policy_backend.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* (C) COPYRIGHT 2015 ARM Limited. All rights reserved.
3+
* (C) COPYRIGHT 2015-2016 ARM Limited. All rights reserved.
44
*
55
* This program is free software and is provided to you under the terms of the
66
* GNU General Public License version 2 as published by the Free Software
@@ -16,7 +16,12 @@
1616

1717

1818
#include "backend/gpu/mali_kbase_cache_policy_backend.h"
19-
#include <backend/gpu/mali_kbase_pm_internal.h>
2019
#include <backend/gpu/mali_kbase_device_internal.h>
2120

21+
void kbase_cache_set_coherency_mode(struct kbase_device *kbdev,
22+
u32 mode)
23+
{
24+
if (kbase_hw_has_feature(kbdev, BASE_HW_FEATURE_COHERENCY_REG))
25+
kbase_reg_write(kbdev, COHERENCY_ENABLE, mode, NULL);
26+
}
2227

drivers/gpu/arm/midgard/backend/gpu/mali_kbase_cache_policy_backend.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* (C) COPYRIGHT 2015 ARM Limited. All rights reserved.
3+
* (C) COPYRIGHT 2015-2016 ARM Limited. All rights reserved.
44
*
55
* This program is free software and is provided to you under the terms of the
66
* GNU General Public License version 2 as published by the Free Software
@@ -22,5 +22,13 @@
2222
#include "mali_kbase.h"
2323
#include "mali_base_kernel.h"
2424

25+
/**
26+
* kbase_cache_set_coherency_mode() - Sets the system coherency mode
27+
* in the GPU.
28+
* @kbdev: Device pointer
29+
* @mode: Coherency mode. COHERENCY_ACE/ACE_LITE
30+
*/
31+
void kbase_cache_set_coherency_mode(struct kbase_device *kbdev,
32+
u32 mode);
2533

2634
#endif /* _KBASE_CACHE_POLICY_H_ */

0 commit comments

Comments
 (0)