aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunsang Jeong <chunsang.jeong@linaro.org>2012-03-29 14:48:20 +0900
committerChunsang Jeong <chunsang.jeong@linaro.org>2012-03-29 14:48:20 +0900
commit172b3329b0046b9c329b36449354507e8f70252f (patch)
tree774c4bdc5628080497ca7ba6df498e51732a29cb
parentd2b7b58cd361356204f562eeff84bacd707172bd (diff)
Updates r2p4-02rel, which was released Mar. 2nd at malideveloper.comlinaro-3.0-2012.03
-rw-r--r--drivers/gpu/arm/mali/Kconfig10
-rwxr-xr-xdrivers/gpu/arm/mali/Makefile10
-rw-r--r--drivers/gpu/arm/mali/common/mali_block_allocator.c2
-rw-r--r--drivers/gpu/arm/mali/common/mali_block_allocator.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_GP2.c23
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_MALI200.c60
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_common.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_core.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_core.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.c2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_gp.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_l2_cache.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_l2_cache.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_mem.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_mem_buddy.c15
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.c87
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_mem_os.c2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_mem_os.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_memory_engine.c2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_memory_engine.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_pp.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_profiling.c17
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_profiling.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_rendercore.c167
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_rendercore.h106
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_session_manager.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_subsystem.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_utilization.c28
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_kernel_utilization.h6
-rw-r--r--drivers/gpu/arm/mali/common/mali_kernel_vsync.c28
-rw-r--r--drivers/gpu/arm/mali/common/mali_osk.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_osk_bitops.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_osk_list.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/mali_osk_mali.h2
-rw-r--r--drivers/gpu/arm/mali/common/mali_uk_types.h20
-rw-r--r--drivers/gpu/arm/mali/common/mali_ukk.h2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm.c2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.h2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.c2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.h2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.h2
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm_state.c5
-rw-r--r--drivers/gpu/arm/mali/common/pmm/mali_pmm_state.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/common/pmm/mali_pmm_system.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_device_pause_resume.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_device_pause_resume.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_ioctl.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_linux.c8
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_linux.h7
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_pm.c3
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_pm.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_sysfs.c4
-rw-r--r--drivers/gpu/arm/mali/linux/mali_kernel_sysfs.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_linux_dvfs_pause_resume.c72
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_linux_pm.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_linux_pm_testsuite.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_atomics.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_osk_irq.c31
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_osk_locks.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_low_level_mem.c5
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_osk_mali.c3
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_math.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_memory.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/linux/mali_osk_misc.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_notification.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_pm.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_specific.h2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_time.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_timers.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_core.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_gp.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_mem.c6
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_pp.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_profiling.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_vsync.c2
-rw-r--r--drivers/gpu/arm/mali/linux/mali_ukk_wrappers.h2
-rw-r--r--drivers/gpu/arm/mali/platform/default/mali_platform.c2
-rw-r--r--drivers/gpu/arm/mali/platform/mali_platform.h2
-rw-r--r--drivers/gpu/arm/mali/regs/mali_200_regs.h2
-rw-r--r--drivers/gpu/arm/mali/regs/mali_gp_regs.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/timestamp-default/mali_timestamp.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/mali/timestamp-default/mali_timestamp.h2
-rw-r--r--drivers/gpu/arm/ump/common/ump_kernel_api.c2
-rw-r--r--drivers/gpu/arm/ump/common/ump_kernel_common.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/common/ump_kernel_common.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.h2
-rw-r--r--drivers/gpu/arm/ump/common/ump_kernel_memory_backend.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/common/ump_kernel_ref_drv.c2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/common/ump_kernel_types.h2
-rw-r--r--drivers/gpu/arm/ump/common/ump_osk.h2
-rw-r--r--drivers/gpu/arm/ump/common/ump_uk_types.h2
-rw-r--r--drivers/gpu/arm/ump/common/ump_ukk.h2
-rw-r--r--drivers/gpu/arm/ump/include/ump_kernel_interface.h2
-rw-r--r--drivers/gpu/arm/ump/include/ump_kernel_interface_ref_drv.h2
-rw-r--r--drivers/gpu/arm/ump/include/ump_kernel_platform.h2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_ioctl.h2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_kernel_linux.c4
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/linux/ump_kernel_linux.h2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.h2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.h2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_memory_backend.c4
-rw-r--r--drivers/gpu/arm/ump/linux/ump_osk_atomics.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_osk_low_level_mem.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_osk_misc.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.h2
-rw-r--r--[-rwxr-xr-x]drivers/gpu/arm/ump/linux/ump_ukk_wrappers.c2
-rw-r--r--drivers/gpu/arm/ump/linux/ump_ukk_wrappers.h2
120 files changed, 541 insertions, 378 deletions
diff --git a/drivers/gpu/arm/mali/Kconfig b/drivers/gpu/arm/mali/Kconfig
index 8de7a00986b9..416c231de87d 100644
--- a/drivers/gpu/arm/mali/Kconfig
+++ b/drivers/gpu/arm/mali/Kconfig
@@ -28,35 +28,35 @@ config USING_OS_MEMORY
config USING_PMM
bool "Enable Power Management"
depends on MALI400MP
- default "0"
+ default n
---help---
This enables for Mali Power Management.
config USING_GPU_UTILIZATION
bool "GPU utilization"
depends on MALI400MP
- default "0"
+ default n
---help---
This enables GPU utilization information.
config USING_MALI_RUN_TIME_PM
bool "Using Run time Power Management"
depends on MALI400MP
- default "0"
+ default n
---help---
This enables Mali working with run time power management.
config USING_MALI_PMM_TESTSUITE
bool "Power Management Test Suite"
depends on MALI400MP
- default "0"
+ default n
---help---
This enables Power management Test Suite.
config USING_PROFILING
bool "Enable Profiling"
depends on MALI400MP
- default "0"
+ default n
---help---
This support Profiling on Mali.
diff --git a/drivers/gpu/arm/mali/Makefile b/drivers/gpu/arm/mali/Makefile
index d4f009aee84c..525a23e28e37 100755
--- a/drivers/gpu/arm/mali/Makefile
+++ b/drivers/gpu/arm/mali/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2010 ARM Limited. All rights reserved.
+# Copyright (C) 2010-2012 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 licence.
@@ -8,6 +8,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
+USE_UMPV2=0
+
OSKOS :=linux
FILES_PREFIX=
MALI_FILE_PREFIX := $(srctree)/drivers/gpu/arm/mali
@@ -70,7 +72,11 @@ TIMESTAMP ?= default
TARGET_PLATFORM ?= default
ifeq ($(USING_UMP),1)
- UMP_SYMVERS_FILE = ../ump/Module.symvers
+ifeq ($(USE_UMPV2),1)
+ UMP_SYMVERS_FILE ?= ../umpv2/Module.symvers
+else
+ UMP_SYMVERS_FILE ?= ../ump/Module.symvers
+endif
KBUILD_EXTRA_SYMBOLS = $(KBUILD_EXTMOD)/$(UMP_SYMVERS_FILE)
endif
diff --git a/drivers/gpu/arm/mali/common/mali_block_allocator.c b/drivers/gpu/arm/mali/common/mali_block_allocator.c
index 5416ca9ea4d0..5c2c49a71a2b 100644
--- a/drivers/gpu/arm/mali/common/mali_block_allocator.c
+++ b/drivers/gpu/arm/mali/common/mali_block_allocator.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_block_allocator.h b/drivers/gpu/arm/mali/common/mali_block_allocator.h
index d3f0f9be60ad..6c6f13eec34a 100644
--- a/drivers/gpu/arm/mali/common/mali_block_allocator.h
+++ b/drivers/gpu/arm/mali/common/mali_block_allocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_GP2.c b/drivers/gpu/arm/mali/common/mali_kernel_GP2.c
index 70f07343e66c..0006d6f64daa 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_GP2.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_GP2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -736,7 +736,6 @@ static u32 subsystem_maligp_irq_handler_upper_half(mali_core_renderunit * core)
irq_readout = mali_core_renderunit_register_read(core, MALIGP2_REG_ADDR_MGMT_INT_STAT);
-
if ( MALIGP2_REG_VAL_IRQ_MASK_NONE != irq_readout )
{
/* Mask out all IRQs from this core until IRQ is handled */
@@ -1098,6 +1097,7 @@ static _mali_osk_errcode_t subsystem_maligp_get_new_job_from_user(struct mali_co
job = GET_JOB_EMBEDDED_PTR(jobgp);
job->session = session;
+ job->flags = MALI_UK_START_JOB_FLAG_DEFAULT; /* Current flags only make sence for PP jobs */
job_priority_set(job, jobgp->user_input.priority);
job_watchdog_set(job, jobgp->user_input.watchdog_msecs );
jobgp->heap_current_addr = jobgp->user_input.frame_registers[4];
@@ -1111,16 +1111,11 @@ static _mali_osk_errcode_t subsystem_maligp_get_new_job_from_user(struct mali_co
jobgp->tid = _mali_osk_get_tid();
#endif
- if (NULL != session->job_waiting_to_run)
+ if (mali_job_queue_full(session))
{
- /* IF NOT( newjow HAS HIGHER PRIORITY THAN waitingjob) EXIT_NOT_START new job */
- if(!job_has_higher_priority(job, session->job_waiting_to_run))
- {
- /* The job we try to add does NOT have higher pri than current */
- /* Cause jobgp to free: */
- user_ptr_job_input->status = _MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE;
- goto function_exit;
- }
+ /* Cause jobgp to free: */
+ user_ptr_job_input->status = _MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE;
+ goto function_exit;
}
/* We now know that we have a job, and a slot to put it in */
@@ -1282,9 +1277,9 @@ static void subsystem_maligp_return_job_to_user( mali_core_job * job, mali_subsy
job_input= &(jobgp->user_input);
session = job->session;
- MALI_DEBUG_PRINT(5, ("Mali GP: Job: 0x%08x OUTPUT to user. Runtime: %d ms, irq readout %x\n",
+ MALI_DEBUG_PRINT(5, ("Mali GP: Job: 0x%08x OUTPUT to user. Runtime: %d us, irq readout %x\n",
(u32)jobgp->user_input.user_job_ptr,
- job->render_time_msecs,
+ job->render_time_usecs,
jobgp->irq_status)) ;
_mali_osk_memset(job_out, 0 , sizeof(_mali_uk_gp_job_finished_s));
@@ -1319,7 +1314,7 @@ static void subsystem_maligp_return_job_to_user( mali_core_job * job, mali_subsy
job_out->perf_counter1 = jobgp->perf_counter1;
job_out->perf_counter_src0 = jobgp->user_input.perf_counter_src0 ;
job_out->perf_counter_src1 = jobgp->user_input.perf_counter_src1 ;
- job_out->render_time = job->render_time_msecs;
+ job_out->render_time = job->render_time_usecs;
#if defined(USING_MALI400_L2_CACHE)
job_out->perf_counter_l2_src0 = jobgp->perf_counter_l2_src0;
job_out->perf_counter_l2_src1 = jobgp->perf_counter_l2_src1;
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_MALI200.c b/drivers/gpu/arm/mali/common/mali_kernel_MALI200.c
index 292c8f31f3d7..21d51668e3b3 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_MALI200.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_MALI200.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -551,26 +551,35 @@ static _mali_osk_errcode_t subsystem_mali200_start_job(mali_core_job * job, mali
&(job200->user_input.frame_registers[0]),
MALI200_NUM_REGS_FRAME);
- /* Write Back unit 0. Copy from mem to physical registers*/
- mali_core_renderunit_register_write_array(
+ /* Write Back unit 0. Copy from mem to physical registers only if the WB unit will be used. */
+ if (job200->user_input.wb0_registers[0])
+ {
+ mali_core_renderunit_register_write_array(
core,
MALI200_REG_ADDR_WB0,
&(job200->user_input.wb0_registers[0]),
MALI200_NUM_REGS_WBx);
+ }
- /* Write Back unit 1. Copy from mem to physical registers */
- mali_core_renderunit_register_write_array(
+ /* Write Back unit 1. Copy from mem to physical registers only if the WB unit will be used. */
+ if (job200->user_input.wb1_registers[0])
+ {
+ mali_core_renderunit_register_write_array(
core,
MALI200_REG_ADDR_WB1,
&(job200->user_input.wb1_registers[0]),
MALI200_NUM_REGS_WBx);
+ }
- /* Write Back unit 2. Copy from mem to physical registers */
- mali_core_renderunit_register_write_array(
- core,
- MALI200_REG_ADDR_WB2,
- &(job200->user_input.wb2_registers[0]),
- MALI200_NUM_REGS_WBx);
+ /* Write Back unit 2. Copy from mem to physical registers only if the WB unit will be used. */
+ if (job200->user_input.wb2_registers[0])
+ {
+ mali_core_renderunit_register_write_array(
+ core,
+ MALI200_REG_ADDR_WB2,
+ &(job200->user_input.wb2_registers[0]),
+ MALI200_NUM_REGS_WBx);
+ }
/* This selects which performance counters we are reading */
@@ -644,7 +653,14 @@ static _mali_osk_errcode_t subsystem_mali200_start_job(mali_core_job * job, mali
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE | MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(core->core_number) | MALI_PROFILING_EVENT_REASON_SINGLE_HW_FLUSH, job200->user_input.frame_builder_id, job200->user_input.flush_id, 0, 0, 0);
- _mali_profiling_add_event(MALI_PROFILING_EVENT_TYPE_START|MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(core->core_number), job200->pid, job200->tid, 0, 0, 0);
+ _mali_profiling_add_event(MALI_PROFILING_EVENT_TYPE_START|MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(core->core_number), job200->pid, job200->tid,
+#if defined(USING_MALI400_L2_CACHE)
+ (job200->user_input.perf_counter_l2_src0 << 16) | (job200->user_input.perf_counter_l2_src1 << 24),
+ job200->perf_counter_l2_val0, job200->perf_counter_l2_val1
+#else
+ 0, 0, 0
+#endif
+ );
#endif
MALI_SUCCESS;
@@ -768,7 +784,7 @@ static int subsystem_mali200_irq_handler_bottom_half(struct mali_core_renderunit
job200->user_input.perf_counter_src0 | (job200->user_input.perf_counter_src1 << 8)
#if defined(USING_MALI400_L2_CACHE)
| (job200->user_input.perf_counter_l2_src0 << 16) | (job200->user_input.perf_counter_l2_src1 << 24),
- job200->perf_counter_l2_val0, job200->perf_counter_l2_val1
+ job200->perf_counter_l2_val0_raw, job200->perf_counter_l2_val1_raw
#else
, 0, 0
#endif
@@ -899,6 +915,7 @@ static _mali_osk_errcode_t subsystem_mali200_get_new_job_from_user(struct mali_c
job = GET_JOB_EMBEDDED_PTR(job200);
job->session = session;
+ job->flags = user_ptr_job_input->flags;
job_priority_set(job, job200->user_input.priority);
job_watchdog_set(job, job200->user_input.watchdog_msecs );
@@ -908,15 +925,10 @@ static _mali_osk_errcode_t subsystem_mali200_get_new_job_from_user(struct mali_c
#endif
job->abort_id = job200->user_input.abort_id;
- if (NULL != session->job_waiting_to_run)
+ if (mali_job_queue_full(session))
{
- /* IF NOT( newjow HAS HIGHER PRIORITY THAN waitingjob) EXIT_NOT_START newjob */
- if(!job_has_higher_priority(job, session->job_waiting_to_run))
- {
- /* The job we try to add does NOT have higher pri than current */
- user_ptr_job_input->status = _MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE;
- goto function_exit;
- }
+ user_ptr_job_input->status = _MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE;
+ goto function_exit;
}
/* We now know that we has a job, and a empty session slot to put it in */
@@ -1025,9 +1037,9 @@ static void subsystem_mali200_return_job_to_user( mali_core_job * job, mali_subs
job_input= &(job200->user_input);
session = job->session;
- MALI_DEBUG_PRINT(4, ("Mali PP: Job: 0x%08x OUTPUT to user. Runtime: %dms\n",
+ MALI_DEBUG_PRINT(4, ("Mali PP: Job: 0x%08x OUTPUT to user. Runtime: %dus\n",
(u32)job200->user_input.user_job_ptr,
- job->render_time_msecs)) ;
+ job->render_time_usecs)) ;
_mali_osk_memset(job_out, 0 , sizeof(_mali_uk_pp_job_finished_s));
@@ -1055,7 +1067,7 @@ static void subsystem_mali200_return_job_to_user( mali_core_job * job, mali_subs
job_out->irq_status = job200->irq_status;
job_out->perf_counter0 = job200->perf_counter0;
job_out->perf_counter1 = job200->perf_counter1;
- job_out->render_time = job->render_time_msecs;
+ job_out->render_time = job->render_time_usecs;
#if defined(USING_MALI400_L2_CACHE)
job_out->perf_counter_l2_src0 = job200->perf_counter_l2_src0;
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_common.h b/drivers/gpu/arm/mali/common/mali_kernel_common.h
index 1a9459bff2b8..d9388ff18a23 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_common.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_core.c b/drivers/gpu/arm/mali/common/mali_kernel_core.c
index f8ca4030fd8e..5e3626dece44 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_core.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_core.h b/drivers/gpu/arm/mali/common/mali_kernel_core.h
index ced6b8fb118a..b2fc3f0e388b 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_core.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_core.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.c b/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.c
index 8b2a97d15452..2ea2d3d319eb 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.h b/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.h
index 745be9235e73..b02f16fbeb59 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_descriptor_mapping.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_gp.h b/drivers/gpu/arm/mali/common/mali_kernel_gp.h
index c2467edc677f..ecd10e84d403 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_gp.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_gp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.c b/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.c
index 3c4c68d74bde..7177979ee647 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.h b/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.h
index de3229a0688b..1588850c1c72 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_l2_cache.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem.h b/drivers/gpu/arm/mali/common/mali_kernel_mem.h
index 681b6dd47c9e..dddf16223312 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem_buddy.c b/drivers/gpu/arm/mali/common/mali_kernel_mem_buddy.c
index 60f5ebd77ecc..49190db7ada9 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem_buddy.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem_buddy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -430,7 +430,6 @@ static void mali_memory_core_terminate(mali_kernel_subsystem_identifier id)
MALI_DEBUG_CODE(int usage_count = _mali_osk_atomic_read(&bank->num_active_allocations));
/*
Report leaked memory
- If this happens we have a bug in our session cleanup code.
*/
MALI_DEBUG_PRINT_IF(1, 0 != usage_count, ("%d allocation(s) from memory bank at 0x%X still in use\n", usage_count, bank->base_addr));
@@ -897,11 +896,9 @@ static void mali_memory_core_session_end(struct mali_session_data * mali_session
/* clear our slot */
*slot = NULL;
- /*
- First free all memory still being used.
- This can happen if the caller has leaked memory or
- the application has crashed forcing an auto-session end.
- */
+ /* First free all memory still being used. This can happen if the
+ * caller has leaked memory or the application has crashed forcing an
+ * auto-session end. */
if (0 == _mali_osk_list_empty(&session_data->memory_head))
{
mali_memory_block * block, * temp;
@@ -958,7 +955,9 @@ static _mali_osk_errcode_t mali_memory_core_system_info_fill(_mali_system_info*
/* check input */
MALI_CHECK_NON_NULL(info, _MALI_OSK_ERR_INVALID_ARGS);
- /* make sure we won't leak any memory. It could also be that it's an uninitialized variable, but that would be a bug in the caller */
+ /* Make sure we won't leak any memory. It could also be that it's an
+ * uninitialized variable, but the caller should have zeroed the
+ * variable. */
MALI_DEBUG_ASSERT(NULL == info->mem_info);
mem_info_tail = &info->mem_info;
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.c b/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.c
index 46eaea8eea5f..be0cc6702e88 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -63,6 +63,11 @@
#define MALI_MMU_ENTRY_ADDRESS(value) ((value) & 0xFFFFFC00)
/**
+ * Calculate memory address from PDE and PTE
+ */
+#define MALI_MMU_ADDRESS(pde, pte) (((pde)<<22) | ((pte)<<12))
+
+/**
* Linux kernel version has marked SA_SHIRQ as deprecated, IRQF_SHARED should be used.
* This is to handle older kernels which haven't done this swap.
*/
@@ -932,7 +937,9 @@ static _mali_osk_errcode_t mali_memory_core_system_info_fill(_mali_system_info*
{
_mali_mem_info * mem_info;
- /* make sure we won't leak any memory. It could also be that it's an uninitialized variable, but that would be a bug in the caller */
+ /* Make sure we won't leak any memory. It could also be that it's an
+ * uninitialized variable, but the caller should have zeroed the
+ * variable. */
MALI_DEBUG_ASSERT(NULL == info->mem_info);
info->has_mmu = 1;
@@ -1196,13 +1203,16 @@ static _mali_osk_errcode_t mali_kernel_memory_mmu_interrupt_handler_upper_half(v
mmu = (mali_kernel_memory_mmu *)data;
MALI_DEBUG_ASSERT_POINTER(mmu);
-
+
+ /* Pointer to core holding this MMU */
core = (mali_core_renderunit *)mmu->core;
- if(core && (CORE_OFF == core->state))
+
+ if(CORE_OFF == core->state)
{
MALI_SUCCESS;
}
-
+
+
/* check if it was our device which caused the interrupt (we could be sharing the IRQ line) */
int_stat = mali_mmu_register_read(mmu, MALI_MMU_REGISTER_INT_STATUS);
if (0 == int_stat)
@@ -1210,7 +1220,6 @@ static _mali_osk_errcode_t mali_kernel_memory_mmu_interrupt_handler_upper_half(v
MALI_ERROR(_MALI_OSK_ERR_FAULT); /* no bits set, we are sharing the IRQ line and someone else caused the interrupt */
}
-
mali_mmu_register_write(mmu, MALI_MMU_REGISTER_INT_MASK, 0);
mali_mmu_register_read(mmu, MALI_MMU_REGISTER_STATUS);
@@ -1439,10 +1448,11 @@ void mali_kernel_mmu_force_bus_reset(void * input_mmu)
static void mali_kernel_memory_mmu_interrupt_handler_bottom_half(void * data)
{
- mali_kernel_memory_mmu * mmu;
+ mali_kernel_memory_mmu *mmu;
u32 raw, fault_address, status;
mali_core_renderunit *core;
+ MALI_DEBUG_PRINT(1, ("mali_kernel_memory_mmu_interrupt_handler_bottom_half\n"));
if (NULL == data)
{
MALI_PRINT_ERROR(("MMU IRQ work queue: NULL argument"));
@@ -1450,18 +1460,19 @@ static void mali_kernel_memory_mmu_interrupt_handler_bottom_half(void * data)
}
mmu = (mali_kernel_memory_mmu*)data;
+
MALI_DEBUG_PRINT(4, ("Locking subsystems\n"));
/* lock all subsystems */
_mali_kernel_core_broadcast_subsystem_message(MMU_KILL_STEP0_LOCK_SUBSYSTEM, (u32)mmu);
/* Pointer to core holding this MMU */
- core = (mali_core_renderunit *)mmu->core;
-
+ core = (mali_core_renderunit *)mmu->core;
+
if(CORE_OFF == core->state)
- {
- _mali_kernel_core_broadcast_subsystem_message(MMU_KILL_STEP4_UNLOCK_SUBSYSTEM, (u32)mmu);
- return;
- }
+ {
+ _mali_kernel_core_broadcast_subsystem_message(MMU_KILL_STEP4_UNLOCK_SUBSYSTEM, (u32)mmu);
+ return;
+ }
raw = mali_mmu_register_read(mmu, MALI_MMU_REGISTER_INT_RAWSTAT);
status = mali_mmu_register_read(mmu, MALI_MMU_REGISTER_STATUS);
@@ -2206,17 +2217,6 @@ void mali_mmu_release_table_page(u32 pa)
_mali_osk_lock_signal(page_table_cache.lock, _MALI_OSK_LOCKMODE_RW);
}
-void mali_memory_core_mmu_owner(void *core, void *mmu_ptr)
-{
- mali_kernel_memory_mmu *mmu;
-
- MALI_DEBUG_ASSERT_POINTER(mmu_ptr);
- MALI_DEBUG_ASSERT_POINTER(core);
-
- mmu = (mali_kernel_memory_mmu *)mmu_ptr;
- mmu->core = core;
-}
-
void* mali_memory_core_mmu_lookup(u32 id)
{
mali_kernel_memory_mmu * mmu, * temp_mmu;
@@ -2231,6 +2231,17 @@ void* mali_memory_core_mmu_lookup(u32 id)
return NULL;
}
+void mali_memory_core_mmu_owner(void *core, void *mmu_ptr)
+{
+ mali_kernel_memory_mmu *mmu;
+
+ MALI_DEBUG_ASSERT_POINTER(mmu_ptr);
+ MALI_DEBUG_ASSERT_POINTER(core);
+
+ mmu = (mali_kernel_memory_mmu *)mmu_ptr;
+ mmu->core = core;
+}
+
void mali_mmu_activate_address_space(mali_kernel_memory_mmu * mmu, u32 page_directory)
{
mali_mmu_enable_stall(mmu); /* this might fail, but changing the DTE address and ZAP should work anyway... */
@@ -2608,11 +2619,22 @@ static void mali_address_manager_release(mali_memory_allocation * descriptor)
for (i = first_pde_idx; i <= last_pde_idx; i++)
{
- const int size_inside_pte = left < 0x400000 ? left : 0x400000;
+ int size_inside_pte = left < 0x400000 ? left : 0x400000;
+ const int first_pte_idx = MALI_MMU_PTE_ENTRY(mali_address);
+ int last_pte_idx = MALI_MMU_PTE_ENTRY(mali_address + size_inside_pte - 1);
- MALI_DEBUG_ASSERT_POINTER(session_data->page_entries_mapped[i]);
- MALI_DEBUG_ASSERT(0 != session_data->page_entries_usage_count[i]);
- MALI_DEBUG_PRINT(4, ("PDE %d\n", i));
+ if (last_pte_idx < first_pte_idx)
+ {
+ /* The last_pte_idx is into the next PTE, crop it to fit into this */
+ last_pte_idx = 1023; /* 1024 PTE entries, so 1023 is the last one */
+ size_inside_pte = MALI_MMU_ADDRESS(i + 1, 0) - mali_address;
+ }
+
+ MALI_DEBUG_ASSERT_POINTER(session_data->page_entries_mapped[i]);
+ MALI_DEBUG_ASSERT(0 != session_data->page_entries_usage_count[i]);
+ MALI_DEBUG_PRINT(4, ("PDE %d: zapping entries %d through %d, address 0x%08X, size 0x%08X, left 0x%08X (page table at 0x%08X)\n",
+ i, first_pte_idx, last_pte_idx, mali_address, size_inside_pte, left,
+ MALI_MMU_ENTRY_ADDRESS(_mali_osk_mem_ioread32(session_data->page_directory_mapped, i * sizeof(u32)))));
session_data->page_entries_usage_count[i]--;
@@ -2630,20 +2652,12 @@ static void mali_address_manager_release(mali_memory_allocation * descriptor)
else
{
int j;
- const int first_pte_idx = MALI_MMU_PTE_ENTRY(mali_address);
- const int last_pte_idx = MALI_MMU_PTE_ENTRY(mali_address + size_inside_pte - 1);
-
- MALI_DEBUG_PRINT(4, ("Partial page table fill detected, zapping entries %d through %d (page table at 0x%08X)\n", first_pte_idx, last_pte_idx, MALI_MMU_ENTRY_ADDRESS(_mali_osk_mem_ioread32(session_data->page_directory_mapped, i * sizeof(u32)))));
for (j = first_pte_idx; j <= last_pte_idx; j++)
{
_mali_osk_mem_iowrite32(session_data->page_entries_mapped[i], j * sizeof(u32), 0);
}
- MALI_DEBUG_PRINT(5, ("zap complete\n"));
-
- mali_address += size_inside_pte;
-
#if defined USING_MALI400_L2_CACHE
if (1 == has_active_mmus)
{
@@ -2653,6 +2667,7 @@ static void mali_address_manager_release(mali_memory_allocation * descriptor)
#endif
}
left -= size_inside_pte;
+ mali_address += size_inside_pte;
}
#if defined USING_MALI400_L2_CACHE
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.h b/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.h
index 986108039781..0462f6603855 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem_mmu.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem_os.c b/drivers/gpu/arm/mali/common/mali_kernel_mem_os.c
index 65958576c7a4..9ac122d05b89 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem_os.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem_os.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_mem_os.h b/drivers/gpu/arm/mali/common/mali_kernel_mem_os.h
index 0946169f79d0..59e6494c5eb6 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_mem_os.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_mem_os.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.c b/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.c
index f6860c78a0ba..8bb80e63cbf2 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.h b/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.h
index 1ef7a089e95b..367219f191d6 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_memory_engine.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_pp.h b/drivers/gpu/arm/mali/common/mali_kernel_pp.h
index ff1e153678c3..61721e786fce 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_pp.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_pp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_profiling.c b/drivers/gpu/arm/mali/common/mali_kernel_profiling.c
index 1f3eb4aa778d..ee6f858ef6ac 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_profiling.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_profiling.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -96,11 +96,19 @@ inline _mali_osk_errcode_t _mali_profiling_start(u32 * limit)
{
_mali_osk_errcode_t ret;
+ mali_profiling_entry *new_profile_entries = _mali_osk_valloc(*limit * sizeof(mali_profiling_entry));
+
+ if(NULL == new_profile_entries)
+ {
+ return _MALI_OSK_ERR_NOMEM;
+ }
+
_mali_osk_lock_wait(lock, _MALI_OSK_LOCKMODE_RW);
if (prof_state != MALI_PROFILING_STATE_IDLE)
{
_mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW);
+ _mali_osk_vfree(new_profile_entries);
return _MALI_OSK_ERR_INVALID_ARGS; /* invalid to call this function in this state */
}
@@ -109,13 +117,8 @@ inline _mali_osk_errcode_t _mali_profiling_start(u32 * limit)
*limit = MALI_PROFILING_MAX_BUFFER_ENTRIES;
}
- profile_entries = _mali_osk_valloc(*limit * sizeof(mali_profiling_entry));
+ profile_entries = new_profile_entries;
profile_entry_count = *limit;
- if (NULL == profile_entries)
- {
- _mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW);
- return _MALI_OSK_ERR_NOMEM;
- }
ret = _mali_timestamp_reset();
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_profiling.h b/drivers/gpu/arm/mali/common/mali_kernel_profiling.h
index fe650e81e415..074b2b3149b5 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_profiling.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_profiling.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_rendercore.c b/drivers/gpu/arm/mali/common/mali_kernel_rendercore.c
index b123b4bc61bb..c0507716b68c 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_rendercore.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_rendercore.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -35,7 +35,7 @@
#define WATCHDOG_MSECS_MAX 3600000 /* 1 hour */
#define WATCHDOG_MSECS_DEFAULT 900000 /* 15 mins */
-/* max value that will be converted from jiffies to msecs and written to job->render_time_msecs */
+/* max value that will be converted from jiffies to micro seconds and written to job->render_time_usecs */
#define JOB_MAX_JIFFIES 100000
int mali_hang_check_interval = HANG_CHECK_MSECS_DEFAULT;
@@ -851,14 +851,16 @@ static void find_and_abort(mali_core_session* session, u32 abort_id)
MALI_CORE_SUBSYSTEM_MUTEX_GRAB( subsystem );
- job = session->job_waiting_to_run;
- if ( (job!=NULL) && job_should_be_aborted (job, abort_id) )
+ job = mali_job_queue_abort_job(session, abort_id);
+ if (NULL != job)
{
MALI_DEBUG_PRINT(3, ("Core: Aborting %s job, with id nr: %u, from the waiting_to_run slot.\n", subsystem->name, abort_id ));
- session->job_waiting_to_run = NULL;
- _mali_osk_list_delinit(&(session->awaiting_sessions_list));
+ if (mali_job_queue_empty(session))
+ {
+ _mali_osk_list_delinit(&(session->awaiting_sessions_list));
+ }
subsystem->awaiting_sessions_sum_all_priorities--;
- subsystem->return_job_to_user( job , JOB_STATUS_END_ABORT);
+ subsystem->return_job_to_user(job , JOB_STATUS_END_ABORT);
}
_MALI_OSK_LIST_FOREACHENTRY( core, tmp, &session->renderunits_working_head, mali_core_renderunit, list )
@@ -1023,6 +1025,7 @@ static void mali_core_subsystem_move_set_working(mali_core_renderunit *core, mal
{
mali_core_subsystem *subsystem;
mali_core_session *session;
+ u64 time_now;
session = job->session;
subsystem = core->subsystem;
@@ -1035,9 +1038,14 @@ static void mali_core_subsystem_move_set_working(mali_core_renderunit *core, mal
MALI_DEBUG_PRINT(5, ("Core: subsystem_move_set_working: %s\n", core->description) ) ;
+ time_now = _mali_osk_time_get_ns();
+ job->start_time = time_now;
+#if MALI_GPU_UTILIZATION
+ mali_utilization_core_start(time_now);
+#endif
+
core->current_job = job ;
core->state = CORE_WORKING ;
- job->start_time_jiffies = _mali_osk_time_tickcount();
_mali_osk_list_move( &core->list, &session->renderunits_working_head );
}
@@ -1056,7 +1064,7 @@ static void mali_core_subsystem_move_core_set_off(mali_core_renderunit *core)
/* Cores must be idle before powering off */
MALI_DEBUG_ASSERT(core->state == CORE_IDLE);
- MALI_DEBUG_PRINT(5, ("Core: subsystem_move_core_set_off: %s\n", core->description) ) ;
+ MALI_DEBUG_PRINT(5, ("Core: subsystem_move_core_set_off: %s\n", core->description) ) ;
core->current_job = NULL ;
core->state = CORE_OFF ;
@@ -1099,10 +1107,26 @@ static mali_core_job * mali_core_subsystem_release_session_get_job(mali_core_sub
MALI_CHECK_SUBSYSTEM(subsystem);
MALI_ASSERT_MUTEX_IS_GRABBED(subsystem);
- _mali_osk_list_delinit(&session->awaiting_sessions_list);
+ job = mali_job_queue_get_job(session);
subsystem->awaiting_sessions_sum_all_priorities--;
- job = session->job_waiting_to_run;
- session->job_waiting_to_run = NULL;
+
+ if(mali_job_queue_empty(session))
+ {
+ /* This is the last job, so remove it from the list */
+ _mali_osk_list_delinit(&session->awaiting_sessions_list);
+ }
+ else
+ {
+ if (0 == (job->flags & MALI_UK_START_JOB_FLAG_MORE_JOBS_FOLLOW))
+ {
+ /* There are more jobs, but the follow flag is not set, so let other sessions run their jobs first */
+ _mali_osk_list_del(&(session->awaiting_sessions_list));
+ _mali_osk_list_addtail(&(session->awaiting_sessions_list), &(subsystem->awaiting_sessions_head[
+ session->queue[session->queue_head]->priority]));
+ }
+ /* else; keep on list, follow flag is set and there are more jobs in queue for this session */
+ }
+
MALI_CHECK_JOB(job);
return job;
}
@@ -1133,23 +1157,22 @@ static void mali_core_job_start_on_core(mali_core_job *job, mali_core_renderunit
mali_core_subsystem_move_set_working(core, job);
#if defined USING_MALI400_L2_CACHE
- /* Invalidate the L2 cache */
- if (_MALI_OSK_ERR_OK != mali_kernel_l2_cache_invalidate_all() )
+ if (0 == (job->flags & MALI_UK_START_JOB_FLAG_NO_FLUSH))
{
- MALI_DEBUG_PRINT(4, ("Core: Clear of L2 failed, return job. System may not be usable for some reason.\n"));
- mali_core_subsystem_move_core_set_idle(core);
- subsystem->return_job_to_user(job,JOB_STATUS_END_SYSTEM_UNUSABLE );
- return;
+ /* Invalidate the L2 cache */
+ if (_MALI_OSK_ERR_OK != mali_kernel_l2_cache_invalidate_all() )
+ {
+ MALI_DEBUG_PRINT(4, ("Core: Clear of L2 failed, return job. System may not be usable for some reason.\n"));
+ mali_core_subsystem_move_core_set_idle(core);
+ subsystem->return_job_to_user(job,JOB_STATUS_END_SYSTEM_UNUSABLE );
+ return;
+ }
}
#endif
/* Tries to start job on the core. Returns MALI_FALSE if the job could not be started */
err = subsystem->start_job(job, core);
-#if MALI_GPU_UTILIZATION
- mali_utilization_core_start();
-#endif
-
if ( _MALI_OSK_ERR_OK != err )
{
/* This will happen only if there is something in the job object
@@ -1286,6 +1309,7 @@ static void mali_core_subsystem_schedule(mali_core_subsystem * subsystem)
void mali_core_session_begin(mali_core_session * session)
{
mali_core_subsystem * subsystem;
+ int i;
subsystem = session->subsystem;
if ( NULL == subsystem )
@@ -1299,7 +1323,12 @@ void mali_core_session_begin(mali_core_session * session)
_MALI_OSK_INIT_LIST_HEAD(&session->renderunits_working_head);
- session->job_waiting_to_run = NULL;
+ for (i = 0; i < MALI_JOB_QUEUE_SIZE; i++)
+ {
+ session->queue[i] = NULL;
+ }
+ session->queue_head = 0;
+ session->queue_tail = 0;
_MALI_OSK_INIT_LIST_HEAD(&session->awaiting_sessions_list);
_MALI_OSK_INIT_LIST_HEAD(&session->all_sessions_list);
@@ -1338,12 +1367,17 @@ void mali_core_session_close(mali_core_session * session)
is owned by the subsystem */
MALI_CORE_SUBSYSTEM_MUTEX_GRAB( subsystem );
+ /* Remove this session from the global sessionlist */
+ _mali_osk_list_delinit(&session->all_sessions_list);
+
+ _mali_osk_list_delinit(&(session->awaiting_sessions_list));
+
/* Return the potensial waiting job to user */
- if ( session->job_waiting_to_run )
+ while ( !mali_job_queue_empty(session) )
{
- subsystem->return_job_to_user( session->job_waiting_to_run, JOB_STATUS_END_SHUTDOWN );
- session->job_waiting_to_run = NULL;
- _mali_osk_list_delinit(&(session->awaiting_sessions_list));
+ /* Queue not empty */
+ mali_core_job *job = mali_job_queue_get_job(session);
+ subsystem->return_job_to_user( job, JOB_STATUS_END_SHUTDOWN );
subsystem->awaiting_sessions_sum_all_priorities--;
}
@@ -1357,9 +1391,6 @@ void mali_core_session_close(mali_core_session * session)
}
_MALI_OSK_INIT_LIST_HEAD(&session->renderunits_working_head); /* Not necessary - we will _mali_osk_free session*/
- /* Remove this session from the global sessionlist */
- _mali_osk_list_delinit(&session->all_sessions_list);
-
MALI_DEBUG_PRINT(5, ("Core: session_close: for %s FINISHED\n", session->subsystem->name )) ;
MALI_CORE_SUBSYSTEM_MUTEX_RELEASE( subsystem );
}
@@ -1382,34 +1413,26 @@ _mali_osk_errcode_t mali_core_session_add_job(mali_core_session * session, mali_
MALI_DEBUG_ASSERT_POINTER(job_return);
*job_return = NULL;
- if ( NULL != session->job_waiting_to_run)
+ if (mali_job_queue_empty(session))
{
- MALI_DEBUG_PRINT(5, ("The session already had a job waiting\n")) ;
- /* Checing if the new job has a higher priority than the one that was pending.*/
- if ( job_has_higher_priority(job,session->job_waiting_to_run))
- {
- /* Remove this session from current priority */
- _mali_osk_list_del( &(session->awaiting_sessions_list));
- subsystem->awaiting_sessions_sum_all_priorities--;
- /* Returning the previous waiting job through the input double pointer*/
- *job_return = session->job_waiting_to_run;
- }
- else
+ /* Add session to the wait list only if it didn't already have a job waiting. */
+ _mali_osk_list_addtail( &(session->awaiting_sessions_list), &(subsystem->awaiting_sessions_head[job->priority]));
+ }
+
+
+ if (_MALI_OSK_ERR_OK != mali_job_queue_add_job(session, job))
+ {
+ if (mali_job_queue_empty(session))
{
- MALI_PRINT_ERROR(("Illegal internal state."));
- /* There was a job waiting in this session, and the priority of this job
- we try to add was NOT higher. Return -1 indicated new job NOT enqueued.*/
- /* We check prior to calling this function that we are not in this state.*/
- MALI_ERROR(_MALI_OSK_ERR_FAULT);
+ _mali_osk_list_delinit(&(session->awaiting_sessions_list));
}
+ MALI_DEBUG_PRINT(4, ("Core: session_add_job: %s queue is full\n", subsystem->name));
+ MALI_ERROR(_MALI_OSK_ERR_FAULT);
}
+
/* Continue to add the new job as the next job from this session */
MALI_DEBUG_PRINT(6, ("Core: session_add_job job=0x%x\n", job));
- /* Adding this session to the subsystem list of sessions with pending job, with priority */
- session->job_waiting_to_run = job;
-
- _mali_osk_list_addtail( &(session->awaiting_sessions_list), &(subsystem->awaiting_sessions_head[job->priority]));
subsystem->awaiting_sessions_sum_all_priorities++;
mali_core_subsystem_schedule(subsystem);
@@ -1419,16 +1442,12 @@ _mali_osk_errcode_t mali_core_session_add_job(mali_core_session * session, mali_
MALI_SUCCESS;
}
-static void mali_core_job_set_run_time(mali_core_job * job)
-{
- u32 jiffies_used;
- jiffies_used = _mali_osk_time_tickcount() - job->start_time_jiffies;
- if ( jiffies_used > JOB_MAX_JIFFIES )
+static void mali_core_job_set_run_time(mali_core_job * job, u64 end_time)
{
- MALI_PRINT_ERROR(("Job used too many jiffies: %d\n", jiffies_used ));
- jiffies_used = 0;
- }
- job->render_time_msecs = _mali_osk_time_tickstoms(jiffies_used);
+ u32 time_used_nano_seconds;
+
+ time_used_nano_seconds = end_time - job->start_time;
+ job->render_time_usecs = time_used_nano_seconds / 1000;
}
static void mali_core_renderunit_detach_job_from_core(mali_core_renderunit* core, mali_subsystem_reschedule_option reschedule, mali_subsystem_job_end_code end_status)
@@ -1436,10 +1455,12 @@ static void mali_core_renderunit_detach_job_from_core(mali_core_renderunit* core
mali_core_job * job;
mali_core_subsystem * subsystem;
mali_bool already_in_detach_function;
+ u64 time_now;
+ MALI_DEBUG_ASSERT(CORE_IDLE != core->state);
+ time_now = _mali_osk_time_get_ns();
job = core->current_job;
subsystem = core->subsystem;
- MALI_DEBUG_ASSERT(CORE_IDLE != core->state);
/* The reset_core() called some lines below might call this detach
* funtion again. To protect the core object from being modified by
@@ -1447,12 +1468,13 @@ static void mali_core_renderunit_detach_job_from_core(mali_core_renderunit* core
*/
already_in_detach_function = core->in_detach_function;
+
if ( MALI_FALSE == already_in_detach_function )
{
core->in_detach_function = MALI_TRUE;
if ( NULL != job )
{
- mali_core_job_set_run_time(job);
+ mali_core_job_set_run_time(job, time_now);
core->current_job = NULL;
}
}
@@ -1471,7 +1493,7 @@ static void mali_core_renderunit_detach_job_from_core(mali_core_renderunit* core
if ( CORE_IDLE != core->state )
{
#if MALI_GPU_UTILIZATION
- mali_utilization_core_end();
+ mali_utilization_core_end(time_now);
#endif
mali_core_subsystem_move_core_set_idle(core);
}
@@ -1917,12 +1939,21 @@ u32 mali_core_renderunit_dump_state(mali_core_subsystem* subsystem, char *buf, u
(u32)(subsystem->mali_core_array[i]->current_job));
if (subsystem->mali_core_array[i]->current_job)
{
+ u64 time_used_nano_seconds;
+ u32 time_used_micro_seconds;
+ u64 time_now = _mali_osk_time_get_ns();
+
+ time_used_nano_seconds = time_now - subsystem->mali_core_array[i]->current_job->start_time;
+ time_used_micro_seconds = ((u32)(time_used_nano_seconds)) / 1000;
+
len += _mali_osk_snprintf(buf + len, size - len, " Current job session: 0x%X\n",
subsystem->mali_core_array[i]->current_job->session);
len += _mali_osk_snprintf(buf + len, size - len, " Current job number: %d\n",
subsystem->mali_core_array[i]->current_job->job_nr);
- len += _mali_osk_snprintf(buf + len, size - len, " Current job render_time jiffies: %d\n",
- _mali_osk_time_tickcount()-subsystem->mali_core_array[i]->current_job->start_time_jiffies);
+ len += _mali_osk_snprintf(buf + len, size - len, " Current job render_time micro seconds: %d\n",
+ time_used_micro_seconds );
+ len += _mali_osk_snprintf(buf + len, size - len, " Current job start time micro seconds: %d\n",
+ (u32) (subsystem->mali_core_array[i]->current_job->start_time >>10) );
}
len += _mali_osk_snprintf(buf + len, size - len, " Core version: 0x%X\n",
subsystem->mali_core_array[i]->core_version);
@@ -1952,7 +1983,9 @@ u32 mali_core_renderunit_dump_state(mali_core_subsystem* subsystem, char *buf, u
len += _mali_osk_snprintf(buf + len, size - len,
" Session 0x%X:\n", (u32)session);
len += _mali_osk_snprintf(buf + len, size - len,
- " Waiting job: 0x%X\n", (u32)session->job_waiting_to_run);
+ " Queue depth: %u\n", mali_job_queue_size(session));
+ len += _mali_osk_snprintf(buf + len, size - len,
+ " First waiting job: 0x%p\n", session->queue[session->queue_head]);
len += _mali_osk_snprintf(buf + len, size - len, " Notification queue: %s\n",
_mali_osk_notification_queue_is_empty(session->notification_queue) ? "EMPTY" : "NON-EMPTY");
len += _mali_osk_snprintf(buf + len, size - len,
@@ -1976,7 +2009,7 @@ u32 mali_core_renderunit_dump_state(mali_core_subsystem* subsystem, char *buf, u
{
len += _mali_osk_snprintf(buf + len, size - len, " Session 0x%X:\n", (u32)session);
len += _mali_osk_snprintf(buf + len, size - len, " Waiting job: 0x%X\n",
- (u32)session->job_waiting_to_run);
+ (u32)session->queue[session->queue_head]);
len += _mali_osk_snprintf(buf + len, size - len, " Notification queue: %s\n",
_mali_osk_notification_queue_is_empty(session->notification_queue) ? "EMPTY" : "NON-EMPTY");
}
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_rendercore.h b/drivers/gpu/arm/mali/common/mali_kernel_rendercore.h
index c4a13796ba93..6d0c11dd1885 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_rendercore.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_rendercore.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -172,13 +172,17 @@ typedef struct mali_core_renderunit
} mali_core_renderunit;
+#define MALI_JOB_QUEUE_SIZE 8
/* Per open FILE data. */
/* You must held subsystem->mutex before any transactions to this datatype. */
typedef struct mali_core_session
{
struct mali_core_subsystem * subsystem; /* The session belongs to this subsystem */
_mali_osk_list_t renderunits_working_head; /* List of renderunits working for this session */
- struct mali_core_job *job_waiting_to_run; /* The next job from this session to run */
+ struct mali_core_job *queue[MALI_JOB_QUEUE_SIZE]; /* The next job from this session to run */
+ int queue_head;
+ int queue_tail;
+ int queue_size;
_mali_osk_list_t awaiting_sessions_list; /* Linked list of sessions with jobs, for each priority */
_mali_osk_list_t all_sessions_list; /* Linked list of all sessions on the system. */
@@ -197,7 +201,6 @@ typedef struct mali_core_session
#endif
} mali_core_session;
-
/* This must be embedded into a specific mali_core_job struct */
/* use this macro to get spesific mali_core_job: container_of(ptr, type, member)*/
typedef struct mali_core_job
@@ -207,13 +210,106 @@ typedef struct mali_core_job
u32 magic_nr;
u32 priority;
u32 watchdog_msecs;
- u32 render_time_msecs ;
- u32 start_time_jiffies;
+ u32 render_time_usecs ;
+ u64 start_time;
unsigned long watchdog_jiffies;
u32 abort_id;
u32 job_nr;
+ _mali_uk_start_job_flags flags;
} mali_core_job;
+MALI_STATIC_INLINE mali_bool mali_job_queue_empty(mali_core_session *session)
+{
+ if (0 == session->queue_size)
+ {
+ return MALI_TRUE;
+ }
+ return MALI_FALSE;
+}
+
+MALI_STATIC_INLINE mali_bool mali_job_queue_full(mali_core_session *session)
+{
+ if (MALI_JOB_QUEUE_SIZE == session->queue_size)
+ {
+ return MALI_TRUE;
+ }
+ return MALI_FALSE;
+}
+
+
+MALI_STATIC_INLINE _mali_osk_errcode_t mali_job_queue_add_job(mali_core_session *session, struct mali_core_job *job)
+{
+ if (mali_job_queue_full(session))
+ {
+ MALI_ERROR(_MALI_OSK_ERR_FAULT);
+ }
+
+ session->queue[session->queue_tail] = job;
+ session->queue_tail = (session->queue_tail + 1) % MALI_JOB_QUEUE_SIZE;
+ session->queue_size++;
+
+ MALI_SUCCESS;
+}
+
+MALI_STATIC_INLINE struct mali_core_job *mali_job_queue_get_job(mali_core_session *session)
+{
+ struct mali_core_job *job;
+ MALI_DEBUG_ASSERT(!mali_job_queue_empty(session));
+
+ job = session->queue[session->queue_head];
+
+ MALI_DEBUG_ASSERT_POINTER(job);
+
+ session->queue[session->queue_head] = NULL;
+ session->queue_head = (session->queue_head + 1) % MALI_JOB_QUEUE_SIZE;
+ session->queue_size--;
+
+ return job;
+}
+
+MALI_STATIC_INLINE u32 mali_job_queue_size(mali_core_session *session)
+{
+ return (u32)(session->queue_size);
+}
+
+MALI_STATIC_INLINE struct mali_core_job *mali_job_queue_abort_job(mali_core_session *session, u32 abort_id)
+{
+ int i;
+ int n;
+ struct mali_core_job *job = NULL;
+
+ for (i = session->queue_head, n = session->queue_size; n > 0; n--, i = (i+1)%MALI_JOB_QUEUE_SIZE)
+ {
+ if (session->queue[i]->abort_id == abort_id)
+ {
+ /* Remove job from queue */
+ job = session->queue[i];
+ session->queue[i] = NULL;
+
+ session->queue_size -= 1;
+ n--;
+ break;
+ }
+ }
+ if (NULL == job)
+ {
+ return NULL;
+ }
+
+ /* Rearrange queue */
+ while (n > 0)
+ {
+ int next = (i + 1) % MALI_JOB_QUEUE_SIZE;
+ session->queue[i] = session->queue[next];
+ i = next;
+ n--;
+ }
+ session->queue_tail = i;
+
+ return job;
+}
+
+
/*
* The rendercode subsystem is included in the subsystems[] array.
*/
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_session_manager.h b/drivers/gpu/arm/mali/common/mali_kernel_session_manager.h
index 8cc41d7f9372..821f0fd906b0 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_session_manager.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_session_manager.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_subsystem.h b/drivers/gpu/arm/mali/common/mali_kernel_subsystem.h
index 9efba566bd9d..1828913a9d80 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_subsystem.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_subsystem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_utilization.c b/drivers/gpu/arm/mali/common/mali_kernel_utilization.c
index a8acd8c2cce6..72eb4b0c6090 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_utilization.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_utilization.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -156,7 +156,7 @@ void mali_utilization_term(void)
-void mali_utilization_core_start(void)
+void mali_utilization_core_start(u64 time_now)
{
if (_mali_osk_atomic_inc_return(&num_running_cores) == 1)
{
@@ -167,8 +167,16 @@ void mali_utilization_core_start(void)
_mali_osk_lock_wait(time_data_lock, _MALI_OSK_LOCKMODE_RW);
- work_start_time = _mali_osk_time_get_ns();
+ if (time_now < period_start_time)
+ {
+ /*
+ * This might happen if the calculate_gpu_utilization() was able
+ * to run between the sampling of time_now and us grabbing the lock above
+ */
+ time_now = period_start_time;
+ }
+ work_start_time = time_now;
if (timer_running != MALI_TRUE)
{
timer_running = MALI_TRUE;
@@ -187,18 +195,24 @@ void mali_utilization_core_start(void)
-void mali_utilization_core_end(void)
+void mali_utilization_core_end(u64 time_now)
{
if (_mali_osk_atomic_dec_return(&num_running_cores) == 0)
{
/*
* No more cores are working, so accumulate the time we was busy.
*/
- u64 time_now;
-
_mali_osk_lock_wait(time_data_lock, _MALI_OSK_LOCKMODE_RW);
- time_now = _mali_osk_time_get_ns();
+ if (time_now < work_start_time)
+ {
+ /*
+ * This might happen if the calculate_gpu_utilization() was able
+ * to run between the sampling of time_now and us grabbing the lock above
+ */
+ time_now = work_start_time;
+ }
+
accumulated_work_time += (time_now - work_start_time);
work_start_time = 0;
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_utilization.h b/drivers/gpu/arm/mali/common/mali_kernel_utilization.h
index f64850067293..1f605179d8fc 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_utilization.h
+++ b/drivers/gpu/arm/mali/common/mali_kernel_utilization.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -28,7 +28,7 @@ void mali_utilization_term(void);
/**
* Should be called when a job is about to execute a job
*/
-void mali_utilization_core_start(void);
+void mali_utilization_core_start(u64 time_now);
/**
* Should be called to stop the utilization timer during system suspend
@@ -38,7 +38,7 @@ void mali_utilization_suspend(void);
/**
* Should be called when a job has completed executing a job
*/
-void mali_utilization_core_end(void);
+void mali_utilization_core_end(u64 time_now);
#endif /* __MALI_KERNEL_UTILIZATION_H__ */
diff --git a/drivers/gpu/arm/mali/common/mali_kernel_vsync.c b/drivers/gpu/arm/mali/common/mali_kernel_vsync.c
index 8dfa3a393ba6..686f84c7933d 100644
--- a/drivers/gpu/arm/mali/common/mali_kernel_vsync.c
+++ b/drivers/gpu/arm/mali/common/mali_kernel_vsync.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2011-2012 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 licence.
@@ -12,8 +12,11 @@
#include "mali_osk.h"
#include "mali_osk_mali.h"
#include "mali_ukk.h"
-/*#include "mali_timestamp.h"
-*/
+/*#include "mali_timestamp.h"*/
+
+#if MALI_TIMELINE_PROFILING_ENABLED
+#include "mali_kernel_profiling.h"
+#endif
_mali_osk_errcode_t _mali_ukk_vsync_event_report(_mali_uk_vsync_event_report_s *args)
{
@@ -22,8 +25,25 @@ _mali_osk_errcode_t _mali_ukk_vsync_event_report(_mali_uk_vsync_event_report_s *
/* u64 ts = _mali_timestamp_get();
*/
- MALI_DEBUG_PRINT(4, ("Received VSYNC event: %d\n", event));
+#if MALI_TIMELINE_PROFILING_ENABLED
+ if ( event==_MALI_UK_VSYNC_EVENT_BEGIN_WAIT)
+ {
+ _mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SUSPEND |
+ MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
+ MALI_PROFILING_EVENT_REASON_SUSPEND_RESUME_SW_VSYNC,
+ 0, 0, 0, 0, 0);
+ }
+ if ( event==_MALI_UK_VSYNC_EVENT_END_WAIT)
+ {
+
+ _mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_RESUME |
+ MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
+ MALI_PROFILING_EVENT_REASON_SUSPEND_RESUME_SW_VSYNC,
+ 0, 0, 0, 0, 0);
+ }
+#endif
+ MALI_DEBUG_PRINT(4, ("Received VSYNC event: %d\n", event));
MALI_SUCCESS;
}
diff --git a/drivers/gpu/arm/mali/common/mali_osk.h b/drivers/gpu/arm/mali/common/mali_osk.h
index d1fb0a9a168d..51817cae394e 100644
--- a/drivers/gpu/arm/mali/common/mali_osk.h
+++ b/drivers/gpu/arm/mali/common/mali_osk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_osk_bitops.h b/drivers/gpu/arm/mali/common/mali_osk_bitops.h
index f262f7dad37d..ada1488eef67 100644
--- a/drivers/gpu/arm/mali/common/mali_osk_bitops.h
+++ b/drivers/gpu/arm/mali/common/mali_osk_bitops.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_osk_list.h b/drivers/gpu/arm/mali/common/mali_osk_list.h
index a8d15f2a107c..5987b0a9149e 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_osk_list.h
+++ b/drivers/gpu/arm/mali/common/mali_osk_list.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_osk_mali.h b/drivers/gpu/arm/mali/common/mali_osk_mali.h
index 9a046fb91eb2..704a436523bc 100755..100644
--- a/drivers/gpu/arm/mali/common/mali_osk_mali.h
+++ b/drivers/gpu/arm/mali/common/mali_osk_mali.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/mali_uk_types.h b/drivers/gpu/arm/mali/common/mali_uk_types.h
index 855e421a799a..a55003ae3045 100644
--- a/drivers/gpu/arm/mali/common/mali_uk_types.h
+++ b/drivers/gpu/arm/mali/common/mali_uk_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -373,6 +373,14 @@ typedef enum
_MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE /**< Job could not be started at this time. Try starting the job again */
} _mali_uk_start_job_status;
+/** @brief Status indicating the result of starting a Vertex or Fragment processor job */
+typedef enum
+{
+ MALI_UK_START_JOB_FLAG_DEFAULT = 0, /**< Default behaviour; Flush L2 caches before start, no following jobs */
+ MALI_UK_START_JOB_FLAG_NO_FLUSH = 1, /**< No need to flush L2 caches before start */
+ MALI_UK_START_JOB_FLAG_MORE_JOBS_FOLLOW = 2, /**< More related jobs follows, try to schedule them as soon as possible after this job */
+} _mali_uk_start_job_flags;
+
/** @brief Status indicating the result of the execution of a Vertex or Fragment processor job */
typedef enum
@@ -487,7 +495,7 @@ typedef struct
u32 perf_counter_src1; /**< [out] source id for performance counter 1 (see ARM DDI0415A, Table 3-60) */
u32 perf_counter0; /**< [out] value of perfomance counter 0 (see ARM DDI0415A) */
u32 perf_counter1; /**< [out] value of perfomance counter 1 (see ARM DDI0415A) */
- u32 render_time; /**< [out] number of milliseconds it took for the job to render */
+ u32 render_time; /**< [out] number of microseconds it took for the job to render */
u32 perf_counter_l2_src0; /**< [out] soruce id for Mali-400 MP L2 cache performance counter 0 */
u32 perf_counter_l2_src1; /**< [out] soruce id for Mali-400 MP L2 cache performance counter 1 */
u32 perf_counter_l2_val0; /**< [out] Value of the Mali-400 MP L2 cache performance counter 0 */
@@ -579,6 +587,7 @@ typedef struct
u32 perf_counter_l2_src1; /**< [in] source id for Mali-400 MP L2 cache performance counter 1 */
u32 frame_builder_id; /**< [in] id of the originating frame builder */
u32 flush_id; /**< [in] flush id within the originating frame builder */
+ _mali_uk_start_job_flags flags; /**< [in] Flags for job, see _mali_uk_start_job_flags for more information */
} _mali_uk_pp_start_job_s;
/** @} */ /* end group _mali_uk_ppstartjob_s */
@@ -592,7 +601,7 @@ typedef struct
u32 perf_counter_src1; /**< [out] source id for performance counter 1 (see ARM DDI0415A, Table 3-60) */
u32 perf_counter0; /**< [out] value of perfomance counter 0 (see ARM DDI0415A) */
u32 perf_counter1; /**< [out] value of perfomance counter 1 (see ARM DDI0415A) */
- u32 render_time; /**< [out] number of milliseconds it took for the job to render */
+ u32 render_time; /**< [out] number of microseconds it took for the job to render */
u32 perf_counter_l2_src0; /**< [out] soruce id for Mali-400 MP L2 cache performance counter 0 */
u32 perf_counter_l2_src1; /**< [out] soruce id for Mali-400 MP L2 cache performance counter 1 */
u32 perf_counter_l2_val0; /**< [out] Value of the Mali-400 MP L2 cache performance counter 0 */
@@ -738,7 +747,8 @@ typedef struct
* The 16bit integer is stored twice in a 32bit integer
* For example, for version 1 the value would be 0x00010001
*/
-#define _MALI_API_VERSION 9
+//#define _MALI_API_VERSION 10
+#define _MALI_API_VERSION 9
#define _MALI_UK_API_VERSION _MAKE_VERSION_ID(_MALI_API_VERSION)
/**
@@ -1027,7 +1037,7 @@ typedef struct
typedef struct
{
void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 enable_events; /**< [out] 1 if user space process should generate events, 0 if not */
+ u32 enable_events; /**< [out] 1 if user space process should generate events, 0 if not */
} _mali_uk_profiling_get_config_s;
diff --git a/drivers/gpu/arm/mali/common/mali_ukk.h b/drivers/gpu/arm/mali/common/mali_ukk.h
index c70dccc3c20f..e95fa30123af 100644
--- a/drivers/gpu/arm/mali/common/mali_ukk.h
+++ b/drivers/gpu/arm/mali/common/mali_ukk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm.c b/drivers/gpu/arm/mali/common/pmm/mali_pmm.c
index 1b17a9ffe951..3c015ba26fe4 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm.c
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm.h
index 6157746da0c7..4a667bbe5d28 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.c b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.c
index 327e8b4c8538..8958ee8bd8d6 100755..100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.c
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.h
index 739c4c4ef174..b3598fab1581 100755..100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.c b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.c
index a4b893b21e63..bca5f8a8b6c4 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.c
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.h
index da13224d955b..9dc78a46e8a3 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_alwayson.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.c b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.c
index 7f3397183542..3a194f9672e8 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.c
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.h
index f1e7c2d9a82a..71af3b15d032 100755..100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_policy_jobcontrol.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.c b/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.c
index 2e05555cf292..c50a56799aec 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.c
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -199,7 +199,7 @@ mali_pmm_core_mask pmm_cores_to_power_down( _mali_pmm_internal_state_t *pmm, mal
}
else
{
- MALI_DEBUG_PRINT(1,("The error in PMM is ...%x...%x",err,*ppowered));
+ MALI_DEBUG_PRINT(1,("PMM: In pmm_cores_to_power_down, the error and cores powered are..%x....%x",err,*ppowered));
MALI_DEBUG_ASSERT( err == _MALI_OSK_ERR_BUSY ||
(err == _MALI_OSK_ERR_FAULT &&
(*ppowered & cores_list[n]) == 0) );
@@ -407,6 +407,7 @@ mali_bool pmm_invoke_power_up( _mali_pmm_internal_state_t *pmm )
if( err != _MALI_OSK_ERR_OK )
{
+ MALI_DEBUG_PRINT(1,("In pmm_invoke_power_up:: The error and pending cores to be powered up are...%x...%x",err,*ppendup));
MALI_DEBUG_ASSERT( (err == _MALI_OSK_ERR_FAULT &&
(*ppendup & cores_list[n]) == 0) );
/* We only expect this to fail when we are shutting down
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.h
index 849fe8b80487..0fb62d2a6423 100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_state.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/common/pmm/mali_pmm_system.h b/drivers/gpu/arm/mali/common/pmm/mali_pmm_system.h
index f5106479e333..1be5b847c889 100755..100644
--- a/drivers/gpu/arm/mali/common/pmm/mali_pmm_system.h
+++ b/drivers/gpu/arm/mali/common/pmm/mali_pmm_system.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_device_pause_resume.c b/drivers/gpu/arm/mali/linux/mali_device_pause_resume.c
index 7a69ae950115..da9cdd99d270 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_device_pause_resume.c
+++ b/drivers/gpu/arm/mali/linux/mali_device_pause_resume.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_device_pause_resume.h b/drivers/gpu/arm/mali/linux/mali_device_pause_resume.h
index 155a3e69d485..c770cb6f5328 100644
--- a/drivers/gpu/arm/mali/linux/mali_device_pause_resume.h
+++ b/drivers/gpu/arm/mali/linux/mali_device_pause_resume.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_ioctl.h b/drivers/gpu/arm/mali/linux/mali_kernel_ioctl.h
index 47b67cccb829..5386566010aa 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_ioctl.h
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_ioctl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_linux.c b/drivers/gpu/arm/mali/linux/mali_kernel_linux.c
index 3c0d4cc8cdae..a4cf0d169e8d 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_linux.c
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_linux.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -144,12 +144,16 @@ void mali_driver_exit(void)
{
mali_kernel_destructor();
-#if USING_MALI_PMM
#if MALI_LICENSE_IS_GPL
+#if USING_MALI_PMM
#ifdef CONFIG_PM
_mali_dev_platform_unregister();
#endif
#endif
+
+ flush_workqueue(mali_wq);
+ destroy_workqueue(mali_wq);
+ mali_wq = NULL;
#endif
}
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_linux.h b/drivers/gpu/arm/mali/linux/mali_kernel_linux.h
index c362a7c77c50..b63baa90b7f4 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_linux.h
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_linux.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -28,6 +28,11 @@ struct mali_dev
#endif
};
+#if MALI_LICENSE_IS_GPL
+/* Defined in mali_osk_irq.h */
+extern struct workqueue_struct * mali_wq;
+#endif
+
_mali_osk_errcode_t initialize_kernel_device(void);
void terminate_kernel_device(void);
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_pm.c b/drivers/gpu/arm/mali/linux/mali_kernel_pm.c
index 7b525142ac87..0c036789c652 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_pm.c
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_pm.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -53,7 +53,6 @@ static int is_os_pmm_thread_waiting = 0;
/* kernel should be configured with power management support */
#ifdef CONFIG_PM
-/* License should be GPL */
#if MALI_LICENSE_IS_GPL
/* Linux kernel major version */
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_pm.h b/drivers/gpu/arm/mali/linux/mali_kernel_pm.h
index db910102d764..7ee1572a534f 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_pm.h
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_pm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.c b/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.c
index 60c77a7a3594..08d0d0d79cb0 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.c
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2011-2012 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 licence.
@@ -385,7 +385,7 @@ int mali_sysfs_unregister(struct mali_dev *device, dev_t dev, const char *mali_d
#else
-/* Dummy implementations for non-GPL */
+/* Dummy implementations for when the sysfs API isn't available. */
int mali_sysfs_register(struct mali_dev *device, dev_t dev, const char *mali_dev_name)
{
diff --git a/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.h b/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.h
index d79a88622694..26a60745ffc0 100644
--- a/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.h
+++ b/drivers/gpu/arm/mali/linux/mali_kernel_sysfs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2011-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_linux_dvfs_pause_resume.c b/drivers/gpu/arm/mali/linux/mali_linux_dvfs_pause_resume.c
deleted file mode 100644
index 3d60d18e005b..000000000000
--- a/drivers/gpu/arm/mali/linux/mali_linux_dvfs_pause_resume.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (C) 2010-2011 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 licence.
- *
- * A copy of the licence is included with the program, and can also be obtained from Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-/**
- * @file mali_linux_dvfs_pause_resume.c
- * Implementation of the Mali pause/resume functionality
- */
-#if USING_MALI_PMM
-#include <linux/version.h>
-#include <linux/sched.h>
-#include <linux/module.h>
-#include "mali_osk.h"
-#include "mali_kernel_common.h"
-#include "mali_platform.h"
-#include "mali_linux_pm.h"
-#include "mali_linux_dvfs_pause_resume.h"
-#include "mali_pmm.h"
-#include "mali_kernel_license.h"
-#ifdef CONFIG_PM
-#if MALI_LICENSE_IS_GPL
-
-/* Mali Pause Resume APIs */
-int mali_dev_dvfs_pause()
-{
- int err = 0;
- _mali_osk_lock_wait(lock, _MALI_OSK_LOCKMODE_RW);
- if ((mali_dvfs_device_state == _MALI_DEVICE_SUSPEND) || (mali_device_state == _MALI_DEVICE_SUSPEND_IN_PROGRESS)
- || (mali_device_state == _MALI_DEVICE_SUSPEND))
- {
- err = -EPERM;
- }
- if ((mali_dvfs_device_state == _MALI_DEVICE_RESUME) && (!err))
- {
- mali_device_suspend(MALI_PMM_EVENT_DVFS_PAUSE, &dvfs_pm_thread);
- mali_dvfs_device_state = _MALI_DEVICE_SUSPEND;
- }
- _mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW);
- return err;
-}
-
-EXPORT_SYMBOL(mali_dev_dvfs_pause);
-
-int mali_dev_dvfs_resume()
-{
- int err = 0;
- _mali_osk_lock_wait(lock, _MALI_OSK_LOCKMODE_RW);
- if ((mali_dvfs_device_state == _MALI_DEVICE_RESUME) || (mali_device_state == _MALI_DEVICE_SUSPEND_IN_PROGRESS)
- || (mali_device_state == _MALI_DEVICE_SUSPEND))
- {
- err = -EPERM;
- }
- if (!err)
- {
- mali_device_resume(MALI_PMM_EVENT_DVFS_RESUME, &dvfs_pm_thread);
- mali_dvfs_device_state = _MALI_DEVICE_RESUME;
- }
- _mali_osk_lock_signal(lock, _MALI_OSK_LOCKMODE_RW);
- return err;
-}
-
-EXPORT_SYMBOL(mali_dev_dvfs_resume);
-
-#endif /* MALI_LICENSE_IS_GPL */
-#endif /* CONFIG_PM */
-#endif /* USING_MALI_PMM */
diff --git a/drivers/gpu/arm/mali/linux/mali_linux_pm.h b/drivers/gpu/arm/mali/linux/mali_linux_pm.h
index d401697f2f46..ad69853333e8 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_linux_pm.h
+++ b/drivers/gpu/arm/mali/linux/mali_linux_pm.h
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_linux_pm_testsuite.h b/drivers/gpu/arm/mali/linux/mali_linux_pm_testsuite.h
index c80b0b0a5e38..e88ce94281fa 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_linux_pm_testsuite.h
+++ b/drivers/gpu/arm/mali/linux/mali_linux_pm_testsuite.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_atomics.c b/drivers/gpu/arm/mali/linux/mali_osk_atomics.c
index 05831c542723..32f8e6bdac7c 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_atomics.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_atomics.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.c b/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.c
index 7297218b9b64..883409ecf51c 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.h b/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.h
index f87739bb8f98..5c0b1f0340d1 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.h
+++ b/drivers/gpu/arm/mali/linux/mali_osk_indir_mmap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_irq.c b/drivers/gpu/arm/mali/linux/mali_osk_irq.c
index b667961a0ac3..ed43b4fa0c4c 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_irq.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_irq.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -15,11 +15,13 @@
#include <linux/slab.h> /* For memory allocation */
#include <linux/workqueue.h>
+#include <linux/version.h>
#include "mali_osk.h"
#include "mali_kernel_core.h"
#include "mali_kernel_common.h"
#include "mali_kernel_license.h"
+#include "mali_kernel_linux.h"
#include "linux/interrupt.h"
typedef struct _mali_osk_irq_t_struct
@@ -33,6 +35,7 @@ typedef struct _mali_osk_irq_t_struct
#if MALI_LICENSE_IS_GPL
static struct workqueue_struct *pmm_wq=NULL;
+struct workqueue_struct *mali_wq = NULL;
#endif
typedef void (*workqueue_func_t)(void *);
@@ -60,6 +63,22 @@ _mali_osk_irq_t *_mali_osk_irq_init( u32 irqnum, _mali_osk_irq_uhandler_t uhandl
irq_object = kmalloc(sizeof(mali_osk_irq_object_t), GFP_KERNEL);
if (NULL == irq_object) return NULL;
+#if MALI_LICENSE_IS_GPL
+ if (NULL == mali_wq)
+ {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+ mali_wq = alloc_workqueue("mali", WQ_UNBOUND, 0);
+#else
+ mali_wq = create_workqueue("mali");
+#endif
+ if(NULL == mali_wq)
+ {
+ MALI_PRINT_ERROR(("Unable to create Mali workqueue\n"));
+ return NULL;
+ }
+ }
+#endif
+
/* workqueue API changed in 2.6.20, support both versions: */
#if defined(INIT_DELAYED_WORK)
/* New syntax: INIT_WORK( struct work_struct *work, void (*function)(struct work_struct *)) */
@@ -153,10 +172,10 @@ void _mali_osk_irq_schedulework( _mali_osk_irq_t *irq )
}
else
{
-#endif
- schedule_work(&irq_object->work_queue_irq_handle);
-#if MALI_LICENSE_IS_GPL
+ queue_work(mali_wq, &irq_object->work_queue_irq_handle);
}
+#else
+ schedule_work(&irq_object->work_queue_irq_handle);
#endif
}
@@ -168,6 +187,10 @@ void _mali_osk_flush_workqueue( _mali_osk_irq_t *irq )
{
flush_workqueue(pmm_wq);
}
+ else
+ {
+ flush_workqueue(mali_wq);
+ }
#endif
}
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_locks.c b/drivers/gpu/arm/mali/linux/mali_osk_locks.c
index 139dc5e3de32..30af91deb6f2 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_locks.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_locks.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_low_level_mem.c b/drivers/gpu/arm/mali/linux/mali_osk_low_level_mem.c
index 4cd9d7b56eed..210d82260742 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_low_level_mem.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_low_level_mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -76,7 +76,7 @@ static void _allocation_list_item_release(AllocationList * item);
/* Variable declarations */
-spinlock_t allocation_list_spinlock;
+static DEFINE_SPINLOCK(allocation_list_spinlock);
static AllocationList * pre_allocated_memory = (AllocationList*) NULL ;
static int pre_allocated_memory_size_current = 0;
#ifdef MALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB
@@ -99,7 +99,6 @@ static struct vm_operations_struct mali_kernel_vm_ops =
void mali_osk_low_level_mem_init(void)
{
- spin_lock_init( &allocation_list_spinlock );
pre_allocated_memory = (AllocationList*) NULL ;
}
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_mali.c b/drivers/gpu/arm/mali/linux/mali_osk_mali.c
index 5b84549ef861..3a7f3629a7ef 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_mali.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_mali.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -19,7 +19,6 @@
#include "mali_osk.h" /* kernel side OS functions */
#include "mali_uk_types.h"
#include "mali_kernel_linux.h" /* exports initialize/terminate_kernel_device() definition of mali_osk_low_level_mem_init() and term */
-#include <mach/irqs.h>
#include <mach/mali/config.h> /* contains the configuration of the arch we are compiling for */
/* is called from mali_kernel_constructor in common code */
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_math.c b/drivers/gpu/arm/mali/linux/mali_osk_math.c
index 3e62e519cbac..bb25e7dc7ddc 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_math.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_math.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_memory.c b/drivers/gpu/arm/mali/linux/mali_osk_memory.c
index 7bb470f8828d..5354e855e8dc 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_memory.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_memory.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_misc.c b/drivers/gpu/arm/mali/linux/mali_osk_misc.c
index 12f4299ee9b7..3a61c6f0822e 100755..100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_misc.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_misc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_notification.c b/drivers/gpu/arm/mali/linux/mali_osk_notification.c
index 539f9ab68b04..fb4907eefce8 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_notification.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_notification.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_pm.c b/drivers/gpu/arm/mali/linux/mali_osk_pm.c
index 6fb587ef3df0..e5b8ea1a78a0 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_pm.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_pm.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_specific.h b/drivers/gpu/arm/mali/linux/mali_osk_specific.h
index 6aacf17d3878..465c10d36268 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_specific.h
+++ b/drivers/gpu/arm/mali/linux/mali_osk_specific.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_time.c b/drivers/gpu/arm/mali/linux/mali_osk_time.c
index da9b8656b703..b399b8748801 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_time.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_time.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_timers.c b/drivers/gpu/arm/mali/linux/mali_osk_timers.c
index 3dfba76bcb3c..2353fdb6ecf7 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_timers.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_timers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_core.c b/drivers/gpu/arm/mali/linux/mali_ukk_core.c
index 0f7454926133..6c7fed5d0b6e 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_core.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_gp.c b/drivers/gpu/arm/mali/linux/mali_ukk_gp.c
index 58ff1de5108b..13a8e25bc411 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_gp.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_gp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_mem.c b/drivers/gpu/arm/mali/linux/mali_ukk_mem.c
index 05214b703d32..6ec41a59339b 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_mem.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -230,7 +230,7 @@ int mem_dump_mmu_page_table_wrapper(struct mali_session_data *session_data, _mal
if (!access_ok(VERIFY_WRITE, buffer, kargs.size)) goto err_exit;
/* allocate temporary buffer (kernel side) to store mmu page table info */
- kargs.buffer = _mali_osk_malloc(kargs.size);
+ kargs.buffer = _mali_osk_valloc(kargs.size);
if (NULL == kargs.buffer)
{
rc = -ENOMEM;
@@ -254,7 +254,7 @@ int mem_dump_mmu_page_table_wrapper(struct mali_session_data *session_data, _mal
rc = 0;
err_exit:
- if (kargs.buffer) _mali_osk_free(kargs.buffer);
+ if (kargs.buffer) _mali_osk_vfree(kargs.buffer);
return rc;
}
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_pp.c b/drivers/gpu/arm/mali/linux/mali_ukk_pp.c
index 31e2a6ac065e..98e01739de3a 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_pp.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_pp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_profiling.c b/drivers/gpu/arm/mali/linux/mali_ukk_profiling.c
index b9c5ef3aec86..ab71b75ff973 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_profiling.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_profiling.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_vsync.c b/drivers/gpu/arm/mali/linux/mali_ukk_vsync.c
index 965ee4115359..d27fac1dae88 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_vsync.c
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_vsync.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2011-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/linux/mali_ukk_wrappers.h b/drivers/gpu/arm/mali/linux/mali_ukk_wrappers.h
index 57108a27a615..af56efdde430 100644
--- a/drivers/gpu/arm/mali/linux/mali_ukk_wrappers.h
+++ b/drivers/gpu/arm/mali/linux/mali_ukk_wrappers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/platform/default/mali_platform.c b/drivers/gpu/arm/mali/platform/default/mali_platform.c
index 9e64ce75344b..d966f25f6c44 100644
--- a/drivers/gpu/arm/mali/platform/default/mali_platform.c
+++ b/drivers/gpu/arm/mali/platform/default/mali_platform.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/platform/mali_platform.h b/drivers/gpu/arm/mali/platform/mali_platform.h
index 5e4deeb47c88..078bcefa11b1 100644
--- a/drivers/gpu/arm/mali/platform/mali_platform.h
+++ b/drivers/gpu/arm/mali/platform/mali_platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/regs/mali_200_regs.h b/drivers/gpu/arm/mali/regs/mali_200_regs.h
index e9da7ab81101..36981043266d 100644
--- a/drivers/gpu/arm/mali/regs/mali_200_regs.h
+++ b/drivers/gpu/arm/mali/regs/mali_200_regs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/regs/mali_gp_regs.h b/drivers/gpu/arm/mali/regs/mali_gp_regs.h
index 14719a3efe92..2b1c021c2042 100644
--- a/drivers/gpu/arm/mali/regs/mali_gp_regs.h
+++ b/drivers/gpu/arm/mali/regs/mali_gp_regs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.c b/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.c
index a6b1d76d567f..242685348218 100755..100644
--- a/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.c
+++ b/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.h b/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.h
index 3279daede459..05517260cad6 100755..100644
--- a/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.h
+++ b/drivers/gpu/arm/mali/timestamp-arm11-cc/mali_timestamp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.c b/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.c
index a6b1d76d567f..242685348218 100755..100644
--- a/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.c
+++ b/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.h b/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.h
index 94b842a10088..e6d3f2aaf516 100755..100644
--- a/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.h
+++ b/drivers/gpu/arm/mali/timestamp-default/mali_timestamp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_api.c b/drivers/gpu/arm/ump/common/ump_kernel_api.c
index 083910f5af95..c6ea89634b1a 100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_api.c
+++ b/drivers/gpu/arm/ump/common/ump_kernel_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_common.c b/drivers/gpu/arm/ump/common/ump_kernel_common.c
index 602e0bad3404..946286c83c50 100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_common.c
+++ b/drivers/gpu/arm/ump/common/ump_kernel_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_common.h b/drivers/gpu/arm/ump/common/ump_kernel_common.h
index 0c55b14bc94a..3e3636a0401a 100755..100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_common.h
+++ b/drivers/gpu/arm/ump/common/ump_kernel_common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.c b/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.c
index 2531f8021279..d6b59b74e351 100755..100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.c
+++ b/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.h b/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.h
index 92bbe54bd35f..05b39827ce33 100755..100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.h
+++ b/drivers/gpu/arm/ump/common/ump_kernel_descriptor_mapping.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_memory_backend.h b/drivers/gpu/arm/ump/common/ump_kernel_memory_backend.h
index f45783d25bdb..a91ae28672a7 100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_memory_backend.h
+++ b/drivers/gpu/arm/ump/common/ump_kernel_memory_backend.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_ref_drv.c b/drivers/gpu/arm/ump/common/ump_kernel_ref_drv.c
index 5a997e222a71..e98f801cb962 100755..100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_ref_drv.c
+++ b/drivers/gpu/arm/ump/common/ump_kernel_ref_drv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_kernel_types.h b/drivers/gpu/arm/ump/common/ump_kernel_types.h
index dc79b6f289be..fa3d9fb8e70a 100755..100644
--- a/drivers/gpu/arm/ump/common/ump_kernel_types.h
+++ b/drivers/gpu/arm/ump/common/ump_kernel_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_osk.h b/drivers/gpu/arm/ump/common/ump_osk.h
index 7022da1fc797..56ec07048319 100644
--- a/drivers/gpu/arm/ump/common/ump_osk.h
+++ b/drivers/gpu/arm/ump/common/ump_osk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_uk_types.h b/drivers/gpu/arm/ump/common/ump_uk_types.h
index 9e61b26a64fc..ac0f1ceef41b 100644
--- a/drivers/gpu/arm/ump/common/ump_uk_types.h
+++ b/drivers/gpu/arm/ump/common/ump_uk_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/common/ump_ukk.h b/drivers/gpu/arm/ump/common/ump_ukk.h
index 1867cf4431f5..ff5176841980 100644
--- a/drivers/gpu/arm/ump/common/ump_ukk.h
+++ b/drivers/gpu/arm/ump/common/ump_ukk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/include/ump_kernel_interface.h b/drivers/gpu/arm/ump/include/ump_kernel_interface.h
index ba81a07fee09..042c8b1b45bd 100644
--- a/drivers/gpu/arm/ump/include/ump_kernel_interface.h
+++ b/drivers/gpu/arm/ump/include/ump_kernel_interface.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/include/ump_kernel_interface_ref_drv.h b/drivers/gpu/arm/ump/include/ump_kernel_interface_ref_drv.h
index eb57fd88f3f2..c9937461a0ff 100644
--- a/drivers/gpu/arm/ump/include/ump_kernel_interface_ref_drv.h
+++ b/drivers/gpu/arm/ump/include/ump_kernel_interface_ref_drv.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/include/ump_kernel_platform.h b/drivers/gpu/arm/ump/include/ump_kernel_platform.h
index 1b5af40e9637..4349605e8593 100644
--- a/drivers/gpu/arm/ump/include/ump_kernel_platform.h
+++ b/drivers/gpu/arm/ump/include/ump_kernel_platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_ioctl.h b/drivers/gpu/arm/ump/linux/ump_ioctl.h
index 0c0ff6f62727..531de7371378 100644
--- a/drivers/gpu/arm/ump/linux/ump_ioctl.h
+++ b/drivers/gpu/arm/ump/linux/ump_ioctl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_linux.c b/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
index 4845818d6d95..479a604c0560 100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
@@ -409,6 +409,8 @@ static int ump_file_mmap(struct file * filp, struct vm_area_struct * vma)
vma->vm_flags = vma->vm_flags | VM_SHARED | VM_MAYSHARE ;
DBG_MSG(3, ("UMP Map function: Forcing the CPU to use cache\n"));
}
+ /* By setting this flag, during a process fork; the child process will not have the parent UMP mappings */
+ vma->vm_flags |= VM_DONTCOPY;
DBG_MSG(4, ("UMP vma->flags: %x\n", vma->vm_flags ));
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_linux.h b/drivers/gpu/arm/ump/linux/ump_kernel_linux.h
index 464c035974b1..4ec5a4760c1f 100755..100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_linux.h
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_linux.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.c b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.c
index cdcf19bc13d5..463e6097eadf 100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.c
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.h b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.h
index fa4bdccfe32c..ca8faae847fa 100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.h
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_dedicated.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.c b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.c
index cb557cfebc19..fc3afa89fd68 100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.c
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.h b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.h
index f924705cf742..6f7e610324ff 100644
--- a/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.h
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_memory_backend_os.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_memory_backend.c b/drivers/gpu/arm/ump/linux/ump_memory_backend.c
index 37a0fccd7d03..d4444cad7e14 100644
--- a/drivers/gpu/arm/ump/linux/ump_memory_backend.c
+++ b/drivers/gpu/arm/ump/linux/ump_memory_backend.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
@@ -11,7 +11,7 @@
#include <linux/module.h> /* kernel module definitions */
#include <linux/ioport.h> /* request_mem_region */
-#include "arch/config.h" /* Configuration for current platform. The symlink for arch is set by Makefile */
+#include <mach/ump/config.h> /* Configuration for current platform. The symlink for arch is set by Makefile */
#include "ump_osk.h"
#include "ump_kernel_common.h"
diff --git a/drivers/gpu/arm/ump/linux/ump_osk_atomics.c b/drivers/gpu/arm/ump/linux/ump_osk_atomics.c
index ef1902e5391b..b117d99bd77b 100644
--- a/drivers/gpu/arm/ump/linux/ump_osk_atomics.c
+++ b/drivers/gpu/arm/ump/linux/ump_osk_atomics.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_osk_low_level_mem.c b/drivers/gpu/arm/ump/linux/ump_osk_low_level_mem.c
index 43183225d9c2..b37fd28721ab 100644
--- a/drivers/gpu/arm/ump/linux/ump_osk_low_level_mem.c
+++ b/drivers/gpu/arm/ump/linux/ump_osk_low_level_mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_osk_misc.c b/drivers/gpu/arm/ump/linux/ump_osk_misc.c
index 12066eb76307..3be6fedcb0b9 100644
--- a/drivers/gpu/arm/ump/linux/ump_osk_misc.c
+++ b/drivers/gpu/arm/ump/linux/ump_osk_misc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.c b/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.c
index e701f1bc9eed..6a2791e28c2d 100644
--- a/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.c
+++ b/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.h b/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.h
index 9ebc35533970..a3e3cb0c2f64 100644
--- a/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.h
+++ b/drivers/gpu/arm/ump/linux/ump_ukk_ref_wrappers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.c b/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.c
index d986e9f51d63..7fa805993b8e 100755..100644
--- a/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.c
+++ b/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * Copyright (C) 2010-2012 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 licence.
diff --git a/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.h b/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.h
index 4892c31327e4..b04445a2c7a3 100644
--- a/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.h
+++ b/drivers/gpu/arm/ump/linux/ump_ukk_wrappers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 ARM Limited. All rights reserved.
+ * Copyright (C) 2010, 2012 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 licence.