From 3c621eac5a4b40eef4ca470b82620fa7a50b3471 Mon Sep 17 00:00:00 2001 From: Kasin Lee Date: Tue, 18 Dec 2012 14:24:20 +0800 Subject: [PATCH] update mali to r3p2 EAC --- mali/Kbuild | 20 +- mali/Kconfig | 1 + mali/Makefile | 14 +- mali/arch-aml-meson-m400-1/config.h | 75 ----- mali/arch-aml-meson-m400-2/config.h | 112 -------- mali/arch-aml-meson-m400-4-nobr/config.h | 149 ---------- mali/arch-pb-virtex5-m300/config.h | 85 ------ mali/arch-pb-virtex5-m400-1-direct/config.h | 92 ------ mali/arch-pb-virtex5-m400-1-pmu/config.h | 85 ------ mali/arch-pb-virtex5-m400-1/config.h | 77 ----- mali/arch-pb-virtex5-m400-2/config.h | 91 ------ mali/arch-pb-virtex5-m400-3/config.h | 105 ------- mali/arch-pb-virtex5-m400-4/config.h | 119 -------- mali/arch-ve-virtex6-m450-8/config.h | 168 ----------- mali/common/mali_block_allocator.c | 14 +- mali/common/mali_block_allocator.h | 14 +- mali/common/mali_broadcast.c | 71 ++--- mali/common/mali_broadcast.h | 30 +- mali/common/mali_cluster.c | 218 -------------- mali/common/mali_cluster.h | 44 --- mali/common/mali_device_pause_resume.c | 14 +- mali/common/mali_device_pause_resume.h | 14 +- mali/common/mali_dlbu.c | 21 +- mali/common/mali_dlbu.h | 14 +- mali/common/mali_gp.c | 14 +- mali/common/mali_gp.h | 14 +- mali/common/mali_gp_job.c | 40 +-- mali/common/mali_gp_job.h | 14 +- mali/common/mali_gp_scheduler.c | 73 ++--- mali/common/mali_gp_scheduler.h | 14 +- mali/common/mali_group.c | 264 ++++++++++++----- mali/common/mali_group.h | 14 +- mali/common/mali_hw_core.c | 14 +- mali/common/mali_hw_core.h | 18 +- mali/common/mali_kernel_common.h | 14 +- mali/common/mali_kernel_core.c | 80 ++++-- mali/common/mali_kernel_core.h | 14 +- mali/common/mali_kernel_descriptor_mapping.c | 14 +- mali/common/mali_kernel_descriptor_mapping.h | 14 +- mali/common/mali_kernel_mem_os.c | 14 +- mali/common/mali_kernel_mem_os.h | 14 +- mali/common/mali_kernel_memory_engine.c | 14 +- mali/common/mali_kernel_memory_engine.h | 14 +- mali/common/mali_kernel_utilization.c | 14 +- mali/common/mali_kernel_utilization.h | 14 +- mali/common/mali_kernel_vsync.c | 14 +- mali/common/mali_l2_cache.c | 29 +- mali/common/mali_l2_cache.h | 14 +- mali/common/mali_mem_validation.c | 14 +- mali/common/mali_mem_validation.h | 14 +- mali/common/mali_memory.c | 14 +- mali/common/mali_memory.h | 14 +- mali/common/mali_mmu.c | 14 +- mali/common/mali_mmu.h | 28 +- mali/common/mali_mmu_page_directory.c | 14 +- mali/common/mali_mmu_page_directory.h | 14 +- mali/common/mali_osk.h | 22 +- mali/common/mali_osk_bitops.h | 14 +- mali/common/mali_osk_list.h | 49 ++-- mali/common/mali_osk_mali.h | 14 +- mali/common/mali_osk_profiling.h | 14 +- mali/common/mali_pm.c | 14 +- mali/common/mali_pm.h | 14 +- mali/common/mali_pmu.c | 14 +- mali/common/mali_pmu.h | 14 +- mali/common/mali_pp.c | 14 +- mali/common/mali_pp.h | 14 +- mali/common/mali_pp_job.c | 52 ++-- mali/common/mali_pp_job.h | 14 +- mali/common/mali_pp_scheduler.c | 179 +++++++++--- mali/common/mali_pp_scheduler.h | 15 +- mali/common/mali_scheduler.c | 14 +- mali/common/mali_scheduler.h | 14 +- mali/common/mali_session.c | 14 +- mali/common/mali_session.h | 14 +- mali/common/mali_ukk.h | 14 +- mali/common/mali_user_settings_db.c | 14 +- mali/common/mali_user_settings_db.h | 14 +- mali/include/linux/mali/mali_utgard.h | 14 +- .../include/linux/mali/mali_utgard_counters.h | 14 +- mali/include/linux/mali/mali_utgard_ioctl.h | 14 +- .../linux/mali/mali_utgard_profiling_events.h | 17 +- .../include/linux/mali/mali_utgard_uk_types.h | 16 +- mali/linux/license/gpl/mali_kernel_license.h | 2 +- mali/linux/mali_dma_buf.c | 14 +- mali/linux/mali_dma_buf.h | 14 +- mali/linux/mali_kernel_linux.c | 22 +- mali/linux/mali_kernel_linux.h | 14 +- mali/linux/mali_kernel_pm.c | 265 ------------------ mali/linux/mali_kernel_pm.h | 17 -- mali/linux/mali_kernel_sysfs.c | 14 +- mali/linux/mali_kernel_sysfs.h | 14 +- mali/linux/mali_linux_pm.h | 50 ---- mali/linux/mali_linux_pm_testsuite.h | 14 +- mali/linux/mali_linux_trace.h | 14 +- mali/linux/mali_osk_atomics.c | 14 +- mali/linux/mali_osk_irq.c | 14 +- mali/linux/mali_osk_locks.c | 14 +- mali/linux/mali_osk_low_level_mem.c | 16 +- mali/linux/mali_osk_mali.c | 14 +- mali/linux/mali_osk_math.c | 14 +- mali/linux/mali_osk_memory.c | 14 +- mali/linux/mali_osk_misc.c | 14 +- mali/linux/mali_osk_notification.c | 36 ++- mali/linux/mali_osk_pm.c | 14 +- mali/linux/mali_osk_profiling.c | 26 +- mali/linux/mali_osk_specific.h | 24 +- mali/linux/mali_osk_time.c | 14 +- mali/linux/mali_osk_timers.c | 14 +- mali/linux/mali_osk_wait_queue.c | 14 +- mali/linux/mali_osk_wq.c | 14 +- mali/linux/mali_pmu_power_up_down.c | 14 +- mali/linux/mali_profiling_events.h | 14 +- mali/linux/mali_profiling_internal.c | 14 +- mali/linux/mali_profiling_internal.h | 14 +- mali/linux/mali_sync.c | 32 ++- mali/linux/mali_sync.h | 16 +- mali/linux/mali_sync_user.c | 14 +- mali/linux/mali_uk_types.h | 14 +- mali/linux/mali_ukk_core.c | 15 +- mali/linux/mali_ukk_gp.c | 14 +- mali/linux/mali_ukk_mem.c | 14 +- mali/linux/mali_ukk_pp.c | 14 +- mali/linux/mali_ukk_profiling.c | 14 +- mali/linux/mali_ukk_vsync.c | 14 +- mali/linux/mali_ukk_wrappers.h | 14 +- mali/platform/default/mali_platform.c | 43 --- mali/platform/mali_platform.h | 80 ------ .../mali_platform_pmu_testing/mali_platform.c | 66 ----- mali/regs/mali_200_regs.h | 14 +- mali/regs/mali_gp_regs.h | 14 +- mali/timestamp-arm11-cc/mali_timestamp.c | 14 +- mali/timestamp-arm11-cc/mali_timestamp.h | 14 +- mali/timestamp-default/mali_timestamp.c | 14 +- mali/timestamp-default/mali_timestamp.h | 14 +- ump/Kbuild | 35 +-- ump/Makefile.common | 2 +- ump/arch-pb-virtex5/config.h | 18 -- ump/include/ump/ump_kernel_interface.h | 2 +- .../ump/ump_kernel_interface_ref_drv.h | 2 +- ump/include/ump/ump_kernel_platform.h | 2 +- ump/linux/license/gpl/ump_kernel_license.h | 2 +- .../ump_kernel_memory_backend_dedicated.c | 2 +- .../ump_kernel_memory_backend_dedicated.h | 2 +- ump/linux/ump_kernel_memory_backend_os.c | 2 +- ump/linux/ump_kernel_memory_backend_os.h | 2 +- ump/linux/ump_memory_backend.c | 2 +- ump/linux/ump_osk_atomics.c | 2 +- ump/linux/ump_osk_misc.c | 2 +- ump/linux/ump_ukk_ref_wrappers.c | 2 +- ump/linux/ump_ukk_ref_wrappers.h | 2 +- 151 files changed, 1371 insertions(+), 3097 deletions(-) delete mode 100644 mali/arch-aml-meson-m400-1/config.h delete mode 100644 mali/arch-aml-meson-m400-2/config.h delete mode 100644 mali/arch-aml-meson-m400-4-nobr/config.h delete mode 100644 mali/arch-pb-virtex5-m300/config.h delete mode 100644 mali/arch-pb-virtex5-m400-1-direct/config.h delete mode 100644 mali/arch-pb-virtex5-m400-1-pmu/config.h delete mode 100644 mali/arch-pb-virtex5-m400-1/config.h delete mode 100644 mali/arch-pb-virtex5-m400-2/config.h delete mode 100644 mali/arch-pb-virtex5-m400-3/config.h delete mode 100644 mali/arch-pb-virtex5-m400-4/config.h delete mode 100644 mali/arch-ve-virtex6-m450-8/config.h delete mode 100644 mali/common/mali_cluster.c delete mode 100644 mali/common/mali_cluster.h delete mode 100644 mali/linux/mali_kernel_pm.c delete mode 100644 mali/linux/mali_kernel_pm.h delete mode 100644 mali/linux/mali_linux_pm.h delete mode 100644 mali/platform/default/mali_platform.c delete mode 100644 mali/platform/mali_platform.h delete mode 100644 mali/platform/mali_platform_pmu_testing/mali_platform.c delete mode 100644 ump/arch-pb-virtex5/config.h diff --git a/mali/Kbuild b/mali/Kbuild index e4e14e9..f8fabbc 100644 --- a/mali/Kbuild +++ b/mali/Kbuild @@ -1,11 +1,11 @@ # -# This confidential and proprietary software may be used only as -# authorised by a licensing agreement from ARM Limited -# (C) COPYRIGHT 2007-2011 ARM Limited -# ALL RIGHTS RESERVED -# The entire notice above must be reproduced on all authorised -# copies and copies may only be made to the extent permitted -# by a licensing agreement from ARM Limited. +# 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. # # This file is called by the Linux build system. @@ -50,6 +50,7 @@ endif MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP ?= 0 MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED ?= 0 MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS ?= 0 +MALI_UPPER_HALF_SCHEDULING ?= 1 # Get path to driver source from Linux build system DRIVER_DIR=$(src) @@ -153,6 +154,10 @@ ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) ccflags-y += -DMALI_FAKE_PLATFORM_DEVICE +ifeq ($(MALI_UPPER_HALF_SCHEDULING),1) + ccflags-y += -DMALI_UPPER_HALF_SCHEDULING +endif + ccflags-$(CONFIG_MALI400_UMP) += -I$(src)/../ump/include/ump ccflags-$(CONFIG_MALI400_DEBUG) += -DDEBUG @@ -196,6 +201,7 @@ VERSION_STRINGS += USING_UMP=$(CONFIG_MALI400_UMP) VERSION_STRINGS += USING_PROFILING=$(CONFIG_MALI400_PROFILING) VERSION_STRINGS += USING_INTERNAL_PROFILING=$(CONFIG_MALI400_INTERNAL_PROFILING) VERSION_STRINGS += USING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) +VERSION_STRINGS += MALI_UPPER_HALF_SCHEDULING=$(MALI_UPPER_HALF_SCHEDULING) # Create file with Mali driver configuration $(TOP_KBUILD_SRC)$(DRIVER_DIR)/__malidrv_build_info.c: diff --git a/mali/Kconfig b/mali/Kconfig index 0bf5de4..67a51a6 100644 --- a/mali/Kconfig +++ b/mali/Kconfig @@ -36,6 +36,7 @@ config MALI400_PROFILING select HIGH_RES_TIMERS select HW_PERF_EVENTS select CPU_FREQ + select TRACEPOINTS ---help--- This enables gator profiling of Mali GPU events. diff --git a/mali/Makefile b/mali/Makefile index 76fb524..1351e09 100644 --- a/mali/Makefile +++ b/mali/Makefile @@ -1,11 +1,11 @@ # -# This confidential and proprietary software may be used only as -# authorised by a licensing agreement from ARM Limited -# (C) COPYRIGHT 2007-2012 ARM Limited -# ALL RIGHTS RESERVED -# The entire notice above must be reproduced on all authorised -# copies and copies may only be made to the extent permitted -# by a licensing agreement from ARM Limited. +# 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. +# +# 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. # USE_UMPV2=0 diff --git a/mali/arch-aml-meson-m400-1/config.h b/mali/arch-aml-meson-m400-1/config.h deleted file mode 100644 index f263bcd..0000000 --- a/mali/arch-aml-meson-m400-1/config.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2012 Amlogic, Inc. 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. - */ - - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -#define INT_MALI_GP 48 -#define INT_MALI_GP_MMU 49 -#define INT_MALI_PP 50 -#define INT_MALI_PP_MMU 51 - -/* Configuration for the AMLOGIC MESON platform */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xd0060000, - .irq = INT_MALI_GP, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xd0068000, - .irq = INT_MALI_PP, - .description = "Mali-400 PP", - .mmu_id = 2 - }, -#if USING_MMU - { - .type = MMU, - .base = 0xd0063000, - .irq = INT_MALI_GP_MMU, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xd0064000, - .irq = INT_MALI_PP_MMU, - .description = "Mali-400 MMU for PP", - .mmu_id = 2 - }, -#endif - { - .type = OS_MEMORY, - .description = "Mali Memory", - .alloc_order = 5, /* Medium preference for this memory */ - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0x84000000, - .size = 0x06000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xD0061000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-aml-meson-m400-2/config.h b/mali/arch-aml-meson-m400-2/config.h deleted file mode 100644 index 387beb6..0000000 --- a/mali/arch-aml-meson-m400-2/config.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2012 Amlogic, Inc. 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. - */ - - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -#ifdef CONFIG_ARM_GIC -#define INT_MALI_GP (48+32) -#define INT_MALI_GP_MMU (49+32) -#define INT_MALI_PP (50+32) -#define INT_MALI_PP2 ( 6+32) -#define INT_MALI_PP_MMU (51+32) -#define INT_MALI_PMU (52+32) -#define INT_MALI_PP2_MMU ( 6+32) -#else -#define INT_MALI_GP (48) -#define INT_MALI_GP_MMU (49) -#define INT_MALI_PP (50) -#define INT_MALI_PP2 ( 6) -#define INT_MALI_PP_MMU (51) -#define INT_MALI_PMU (52) -#define INT_MALI_PP2_MMU ( 6) -#endif - -/* Configuration for the AMLOGIC MESON-6 platform */ - -static _mali_osk_resource_t arch_configuration [] = -{ -#if 0 - { - .type = PMU, - .description = "Mali-400 PMU", - .base = 0xd0062000, - .irq = INT_MALI_PMU, - .mmu_id = 0 - }, -#endif - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xd0060000, - .irq = INT_MALI_GP, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xd0068000, - .irq = INT_MALI_PP, - .description = "Mali-400 PP 0", - .mmu_id = 2 - }, - { - .type = MALI400PP, - .base = 0xd006a000, - /* IRQ redirected */ - .irq = INT_MALI_PP_MMU, - .description = "Mali-400 PP 1", - .mmu_id = 3 - }, - { - .type = MMU, - .base = 0xd0063000, - .irq = INT_MALI_GP_MMU, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xd0064000, - /* bridged */ - .irq = INT_MALI_PP2_MMU, - .description = "Mali-400 MMU for PP 0", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xd0065000, - /* bridged */ - .irq = INT_MALI_PP2_MMU, - .description = "Mali-400 MMU for PP 1", - .mmu_id = 3 - }, - { - .type = OS_MEMORY, - .description = "Mali Memory", - .alloc_order = 5, /* Medium preference for this memory */ - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0x84000000, - .size = 0x06000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xD0061000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-aml-meson-m400-4-nobr/config.h b/mali/arch-aml-meson-m400-4-nobr/config.h deleted file mode 100644 index 02028bc..0000000 --- a/mali/arch-aml-meson-m400-4-nobr/config.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2012 Amlogic, Inc. 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. - */ - -/* - * 4 pp core without bridge. - * - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -#ifdef CONFIG_ARM_GIC -#define INT_MALI_GP (48+32) -#define INT_MALI_GP_MMU (49+32) -#define INT_MALI_PP (50+32) -#define INT_MALI_PP2 (58+32) -#define INT_MALI_PP3 (60+32) -#define INT_MALI_PP4 (62+32) -#define INT_MALI_PP_MMU (51+32) -#define INT_MALI_PP2_MMU (59+32) -#define INT_MALI_PP3_MMU (61+32) -#define INT_MALI_PP4_MMU (63+32) -#define INT_MALI_PMU (52+32) -#else -#define INT_MALI_GP (48) -#define INT_MALI_GP_MMU (49) -#define INT_MALI_PP (50) -#define INT_MALI_PP2 (58) -#define INT_MALI_PP3 (60) -#define INT_MALI_PP4 (62) -#define INT_MALI_PP_MMU (51) -#define INT_MALI_PP2_MMU (59) -#define INT_MALI_PP3_MMU (61) -#define INT_MALI_PP4_MMU (63) -#define INT_MALI_PMU (52) -#endif - -/* Configuration for the AMLOGIC MESON-6 platform */ - -static _mali_osk_resource_t arch_configuration [] = -{ -#if 0 - { - .type = PMU, - .description = "Mali-400 PMU", - .base = 0xd0062000, - .irq = INT_MALI_PMU, - .mmu_id = 0 - }, -#endif - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xd0060000, - .irq = INT_MALI_GP, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xd0068000, - .irq = INT_MALI_PP, - .description = "Mali-400 PP 1", - .mmu_id = 2 - }, - { - .type = MALI400PP, - .base = 0xd006a000, - .irq = INT_MALI_PP2, - .description = "Mali-400 PP 2", - .mmu_id = 3 - }, - { - .type = MALI400PP, - .base = 0xd006c000, - .irq = INT_MALI_PP3, - .description = "Mali-400 PP 3", - .mmu_id = 4 - }, - { - .type = MALI400PP, - .base = 0xd006e000, - .irq = INT_MALI_PP4, - .description = "Mali-400 PP 4", - .mmu_id = 5 - }, - { - .type = MMU, - .base = 0xd0063000, - .irq = INT_MALI_GP_MMU, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xd0064000, - .irq = INT_MALI_PP_MMU, - .description = "Mali-400 MMU for PP 1", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xd0065000, - .irq = INT_MALI_PP2_MMU, - .description = "Mali-400 MMU for PP 2", - .mmu_id = 3 - }, - { - .type = MMU, - .base = 0xd0066000, - .irq = INT_MALI_PP3_MMU, - .description = "Mali-400 MMU for PP 3", - .mmu_id = 4 - }, - { - .type = MMU, - .base = 0xd0067000, - .irq = INT_MALI_PP4_MMU, - .description = "Mali-400 MMU for PP 4", - .mmu_id = 5 - }, - { - .type = OS_MEMORY, - .description = "Mali Memory", - .alloc_order = 5, /* Medium preference for this memory */ - .size = 0x20000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0x84000000, - .size = 0x06000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xD0061000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m300/config.h b/mali/arch-pb-virtex5-m300/config.h deleted file mode 100644 index 5d5ef16..0000000 --- a/mali/arch-pb-virtex5-m300/config.h +++ /dev/null @@ -1,85 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = PMU, - .description = "Mali-300 PMU", - .base = 0xC0002000, - .irq = -1, - .mmu_id = 0 - - }, - { - .type = MALI300GP, - .description = "Mali-300 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI300PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-300 PP", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = -1, - .description = "Mali-300 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = -1, - .description = "Mali-300 MMU for PP", - .mmu_id = 2 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI300L2, - .base = 0xC0001000, - .description = "Mali-300 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-1-direct/config.h b/mali/arch-pb-virtex5-m400-1-direct/config.h deleted file mode 100644 index 58fc5f2..0000000 --- a/mali/arch-pb-virtex5-m400-1-direct/config.h +++ /dev/null @@ -1,92 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - - { - .type = PMU, - .description = "Mali-400 PMU", - .base = 0xC0002000, - .irq = -1, - .mmu_id = 0 - }, - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = -1, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = -1, - .description = "Mali-400 MMU for PP", - .mmu_id = 2 - }, - { - .type = OS_MEMORY, - .description = "OS Memory", - .alloc_order = 10, /* Lowest preference for this memory */ - .size = 96 * 1024 * 1024, /* 96 MB */ - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = 0, - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0x80000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-1-pmu/config.h b/mali/arch-pb-virtex5-m400-1-pmu/config.h deleted file mode 100644 index d85c090..0000000 --- a/mali/arch-pb-virtex5-m400-1-pmu/config.h +++ /dev/null @@ -1,85 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = PMU, - .description = "Mali-400 PMU", - .base = 0xC0002000, - .irq = -1, - .mmu_id = 0 - - }, - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = -1, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = -1, - .description = "Mali-400 MMU for PP", - .mmu_id = 2 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-1/config.h b/mali/arch-pb-virtex5-m400-1/config.h deleted file mode 100644 index 50393a2..0000000 --- a/mali/arch-pb-virtex5-m400-1/config.h +++ /dev/null @@ -1,77 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = -1, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = -1, - .description = "Mali-400 MMU for PP", - .mmu_id = 2 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-2/config.h b/mali/arch-pb-virtex5-m400-2/config.h deleted file mode 100644 index ec45706..0000000 --- a/mali/arch-pb-virtex5-m400-2/config.h +++ /dev/null @@ -1,91 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP 0", - .mmu_id = 2 - }, - { - .type = MALI400PP, - .base = 0xc000A000, - .irq = -1, - .description = "Mali-400 PP 1", - .mmu_id = 3 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = -1, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = -1, - .description = "Mali-400 MMU for PP 0", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0005000, - .irq = -1, - .description = "Mali-400 MMU for PP 1", - .mmu_id = 3 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-3/config.h b/mali/arch-pb-virtex5-m400-3/config.h deleted file mode 100644 index 03d8fae..0000000 --- a/mali/arch-pb-virtex5-m400-3/config.h +++ /dev/null @@ -1,105 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the PB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP 0", - .mmu_id = 2 - }, - { - .type = MALI400PP, - .base = 0xc000A000, - .irq = -1, - .description = "Mali-400 PP 1", - .mmu_id = 3 - }, - { - .type = MALI400PP, - .base = 0xc000C000, - .irq = -1, - .description = "Mali-400 PP 2", - .mmu_id = 4 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = 102, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = 102, - .description = "Mali-400 MMU for PP 0", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0005000, - .irq = 102, - .description = "Mali-400 MMU for PP 1", - .mmu_id = 3 - }, - { - .type = MMU, - .base = 0xC0006000, - .irq = 102, - .description = "Mali-400 MMU for PP 2", - .mmu_id = 4 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-pb-virtex5-m400-4/config.h b/mali/arch-pb-virtex5-m400-4/config.h deleted file mode 100644 index 71da797..0000000 --- a/mali/arch-pb-virtex5-m400-4/config.h +++ /dev/null @@ -1,119 +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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the EB platform with ZBT memory enabled */ - -static _mali_osk_resource_t arch_configuration [] = -{ - { - .type = MALI400GP, - .description = "Mali-400 GP", - .base = 0xC0000000, - .irq = -1, - .mmu_id = 1 - }, - { - .type = MALI400PP, - .base = 0xc0008000, - .irq = -1, - .description = "Mali-400 PP 0", - .mmu_id = 2 - }, - { - .type = MALI400PP, - .base = 0xc000A000, - .irq = -1, - .description = "Mali-400 PP 1", - .mmu_id = 3 - }, - { - .type = MALI400PP, - .base = 0xc000C000, - .irq = -1, - .description = "Mali-400 PP 2", - .mmu_id = 4 - }, - { - .type = MALI400PP, - .base = 0xc000E000, - .irq = -1, - .description = "Mali-400 PP 3", - .mmu_id = 5 - }, - { - .type = MMU, - .base = 0xC0003000, - .irq = 102, - .description = "Mali-400 MMU for GP", - .mmu_id = 1 - }, - { - .type = MMU, - .base = 0xC0004000, - .irq = 102, - .description = "Mali-400 MMU for PP 0", - .mmu_id = 2 - }, - { - .type = MMU, - .base = 0xC0005000, - .irq = 102, - .description = "Mali-400 MMU for PP 1", - .mmu_id = 3 - }, - { - .type = MMU, - .base = 0xC0006000, - .irq = 102, - .description = "Mali-400 MMU for PP 2", - .mmu_id = 4 - }, - { - .type = MMU, - .base = 0xC0007000, - .irq = 102, - .description = "Mali-400 MMU for PP 3", - .mmu_id = 5 - }, - { - .type = MEMORY, - .description = "Mali SDRAM remapped to baseboard", - .cpu_usage_adjust = -0x50000000, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0xD0000000, - .size = 0x10000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEMORY, - .description = "Mali ZBT", - .alloc_order = 5, /* Medium preference for this memory */ - .base = 0xe1000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, - { - .type = MALI400L2, - .base = 0xC0001000, - .description = "Mali-400 L2 cache" - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/arch-ve-virtex6-m450-8/config.h b/mali/arch-ve-virtex6-m450-8/config.h deleted file mode 100644 index 9b38f35..0000000 --- a/mali/arch-ve-virtex6-m450-8/config.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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. - * - * 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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -/* Configuration for the Versatile Express platform */ - -#define MALI_BASE_ADDRESS 0xFC040000 - -static _mali_osk_resource_t arch_configuration [] = -{ - /* GP cluster */ - { - .type = MALI400L2, - .base = MALI_BASE_ADDRESS + 0x10000, - .description = "Mali-450 L2 cache for GP" - }, - { - .type = MALI400GP, - .description = "Mali-450 GP", - .base = MALI_BASE_ADDRESS, - .irq = -1, - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x3000, - .irq = 70, - .description = "Mali-450 MMU for GP", - }, - - /* PP0-3 cluster */ - { - .type = MALI400L2, - .base = MALI_BASE_ADDRESS + 0x1000, - .description = "Mali-450 L2 cache for PP0-3" - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0x8000, - .irq = 70, - .description = "Mali-450 PP0", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x4000, - .irq = 70, - .description = "Mali-450 MMU for PP0", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0xA000, - .irq = 70, - .description = "Mali-450 PP1", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x5000, - .irq = 70, - .description = "Mali-450 MMU for PP1", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0xC000, - .irq = 70, - .description = "Mali-450 PP2", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x6000, - .irq = 70, - .description = "Mali-450 MMU for PP2", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0xE000, - .irq = 70, - .description = "Mali-450 PP3", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x7000, - .irq = 70, - .description = "Mali-450 MMU for PP3", - }, - - /* PP4-7 cluster */ - { - .type = MALI400L2, - .base = MALI_BASE_ADDRESS + 0x11000, - .description = "Mali-450 L2 cache for PP4-7" - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0x28000, - .irq = 70, - .description = "Mali-450 PP4", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x1C000, - .irq = 70, - .description = "Mali-450 MMU for PP4", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0x2A000, - .irq = 70, - .description = "Mali-450 PP5", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x1D000, - .irq = 70, - .description = "Mali-450 MMU for PP5", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0x2C000, - .irq = 70, - .description = "Mali-450 PP6", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x1E000, - .irq = 70, - .description = "Mali-450 MMU for PP6", - }, - { - .type = MALI400PP, - .base = MALI_BASE_ADDRESS + 0x2E000, - .irq = 70, - .description = "Mali-450 PP7", - }, - { - .type = MMU, - .base = MALI_BASE_ADDRESS + 0x1F000, - .irq = 70, - .description = "Mali-450 MMU for PP7", - }, - - /* Memory */ - { - .type = OS_MEMORY, - .description = "Mali OS memory", - .cpu_usage_adjust = 0, - .alloc_order = 0, /* Highest preference for this memory */ - .base = 0x0, - .size = 256 * 1024 * 1024, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_READABLE | _MALI_PP_WRITEABLE |_MALI_GP_READABLE | _MALI_GP_WRITEABLE - }, - { - .type = MEM_VALIDATION, - .description = "Framebuffer", - .base = 0xe0000000, - .size = 0x01000000, - .flags = _MALI_CPU_WRITEABLE | _MALI_CPU_READABLE | _MALI_PP_WRITEABLE | _MALI_PP_READABLE - }, -}; - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/mali/common/mali_block_allocator.c b/mali/common/mali_block_allocator.c index 0a467c0..7a0b099 100644 --- a/mali/common/mali_block_allocator.c +++ b/mali/common/mali_block_allocator.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" #include "mali_kernel_memory_engine.h" diff --git a/mali/common/mali_block_allocator.h b/mali/common/mali_block_allocator.h index 141719b..d3f0f9b 100644 --- a/mali/common/mali_block_allocator.h +++ b/mali/common/mali_block_allocator.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ #ifndef __MALI_BLOCK_ALLOCATOR_H__ diff --git a/mali/common/mali_broadcast.c b/mali/common/mali_broadcast.c index e9338ee..b24c2c2 100644 --- a/mali/common/mali_broadcast.c +++ b/mali/common/mali_broadcast.c @@ -1,24 +1,20 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. - */ - -/* - * Interface for the broadcast unit on Mali-450 - * - * - Represents up to 8 × (MMU + PP) pairs - * - Supports dynamically changing which (MMU + PP) pairs that it broadcasts to - * by setting a mask. + * Copyright (C) 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. + * + * 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. */ +#include "mali_broadcast.h" #include "mali_kernel_common.h" #include "mali_osk.h" -#include "mali_broadcast.h" + +static const int bcast_unit_reg_size = 0x1000; +static const int bcast_unit_addr_broadcast_mask = 0x0; +static const int bcast_unit_addr_irq_override_mask = 0x4; struct mali_bcast_unit { @@ -26,14 +22,20 @@ struct mali_bcast_unit u32 current_mask; }; -struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t * resource) +struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t *resource) { - struct mali_bcast_unit* bcast_unit = NULL; + struct mali_bcast_unit *bcast_unit = NULL; + MALI_DEBUG_ASSERT_POINTER(resource); MALI_DEBUG_PRINT(2, ("Mali Broadcast unit: Creating Mali Broadcast unit: %s\n", resource->description)); bcast_unit = _mali_osk_malloc(sizeof(struct mali_bcast_unit)); - if (_MALI_OSK_ERR_OK == mali_hw_core_create(&bcast_unit->hw_core, resource, 0x1000)) + if (NULL == bcast_unit) + { + return NULL; + } + + if (_MALI_OSK_ERR_OK == mali_hw_core_create(&bcast_unit->hw_core, resource, bcast_unit_reg_size)) { bcast_unit->current_mask = 0; mali_bcast_reset(bcast_unit); @@ -56,22 +58,21 @@ void mali_bcast_unit_delete(struct mali_bcast_unit *bcast_unit) _mali_osk_free(bcast_unit); } -/* Add a group to the list of (PP + MMU) pairs broadcasts go out to */ void mali_bcast_add_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group) { u32 core_id; u32 broadcast_mask; - MALI_DEBUG_ASSERT_POINTER( bcast_unit ); - MALI_DEBUG_ASSERT_POINTER( group ); + MALI_DEBUG_ASSERT_POINTER(bcast_unit); + MALI_DEBUG_ASSERT_POINTER(group); core_id = mali_pp_core_get_id(mali_group_get_pp_core(group)); broadcast_mask = bcast_unit->current_mask; - /* Set the bit corresponding to the group's core's id to 1 */ + /* set the bit corresponding to the group's core's id to 1 */ core_id = 1 << core_id; - broadcast_mask |= (core_id); /* Add PP core to broadcast */ - broadcast_mask |= (core_id << 16); /* Add MMU to broadcast */ + broadcast_mask |= (core_id); /* add PP core to broadcast */ + broadcast_mask |= (core_id << 16); /* add MMU to broadcast */ /* store mask so we can restore on reset */ bcast_unit->current_mask = broadcast_mask; @@ -79,14 +80,13 @@ void mali_bcast_add_group(struct mali_bcast_unit *bcast_unit, struct mali_group mali_bcast_reset(bcast_unit); } -/* Remove a group to the list of (PP + MMU) pairs broadcasts go out to */ void mali_bcast_remove_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group) { u32 core_id; u32 broadcast_mask; - MALI_DEBUG_ASSERT_POINTER( bcast_unit ); - MALI_DEBUG_ASSERT_POINTER( group ); + MALI_DEBUG_ASSERT_POINTER(bcast_unit); + MALI_DEBUG_ASSERT_POINTER(group); core_id = mali_pp_core_get_id(mali_group_get_pp_core(group)); broadcast_mask = bcast_unit->current_mask; @@ -101,16 +101,17 @@ void mali_bcast_remove_group(struct mali_bcast_unit *bcast_unit, struct mali_gro mali_bcast_reset(bcast_unit); } -/* Re-set cached mask. This needs to be called after having been suspended */ void mali_bcast_reset(struct mali_bcast_unit *bcast_unit) { MALI_DEBUG_ASSERT_POINTER(bcast_unit); - mali_hw_core_register_write(&bcast_unit->hw_core, 0, bcast_unit->current_mask); /* Set broadcast mask */ - mali_hw_core_register_write(&bcast_unit->hw_core, 0x4, bcast_unit->current_mask & 0xFF); /* Set IRQ override mask */ -} + /* set broadcast mask */ + mali_hw_core_register_write(&bcast_unit->hw_core, + bcast_unit_addr_broadcast_mask, + bcast_unit->current_mask); -void mali_bcast_print(struct mali_bcast_unit *bcast_unit) -{ - MALI_DEBUG_PRINT(2,("Broadcast mask 0x%02x\n", bcast_unit->current_mask & 0xFF)); + /* set IRQ override mask */ + mali_hw_core_register_write(&bcast_unit->hw_core, + bcast_unit_addr_irq_override_mask, + bcast_unit->current_mask & 0xFF); } diff --git a/mali/common/mali_broadcast.h b/mali/common/mali_broadcast.h index 0ac3544..f292b27 100644 --- a/mali/common/mali_broadcast.h +++ b/mali/common/mali_broadcast.h @@ -1,11 +1,19 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. + */ + +/* + * Interface for the broadcast unit on Mali-450. + * + * - Represents up to 8 × (MMU + PP) pairs. + * - Supports dynamically changing which (MMU + PP) pairs receive the broadcast by + * setting a mask. */ #include "mali_hw_core.h" @@ -13,12 +21,14 @@ struct mali_bcast_unit; -struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t * resource); +struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t *resource); void mali_bcast_unit_delete(struct mali_bcast_unit *bcast_unit); +/* Add a group to the list of (MMU + PP) pairs broadcasts go out to. */ void mali_bcast_add_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group); + +/* Remove a group to the list of (MMU + PP) pairs broadcasts go out to. */ void mali_bcast_remove_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group); +/* Re-set cached mask. This needs to be called after having been suspended. */ void mali_bcast_reset(struct mali_bcast_unit *bcast_unit); - -void mali_bcast_print(struct mali_bcast_unit *bcast_unit); diff --git a/mali/common/mali_cluster.c b/mali/common/mali_cluster.c deleted file mode 100644 index f0fb2b6..0000000 --- a/mali/common/mali_cluster.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 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. - * - * 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. - */ - -#include "mali_kernel_common.h" -#include "mali_cluster.h" -#include "mali_osk.h" -#include "mali_group.h" -#include "mali_l2_cache.h" -#include "mali_scheduler.h" - -static struct mali_cluster *mali_global_clusters[MALI_MAX_NUMBER_OF_CLUSTERS] = { NULL, NULL, NULL }; -static u32 mali_global_num_clusters = 0; - -/** - * The structure represents a render cluster - * A render cluster is defined by all the cores that share the same Mali L2 cache - */ -struct mali_cluster -{ - struct mali_l2_cache_core *l2; - u32 number_of_groups; - struct mali_group* groups[MALI_MAX_NUMBER_OF_GROUPS_PER_CLUSTER]; - u32 last_invalidated_id; - mali_bool power_is_enabled; -}; - -struct mali_cluster *mali_cluster_create(struct mali_l2_cache_core *l2_cache) -{ - struct mali_cluster *cluster = NULL; - - if (mali_global_num_clusters >= MALI_MAX_NUMBER_OF_CLUSTERS) - { - MALI_PRINT_ERROR(("Mali cluster: Too many cluster objects created\n")); - return NULL; - } - - cluster = _mali_osk_malloc(sizeof(struct mali_cluster)); - if (NULL != cluster) - { - _mali_osk_memset(cluster, 0, sizeof(struct mali_cluster)); - cluster->l2 = l2_cache; /* This cluster now owns this L2 cache object */ - cluster->last_invalidated_id = 0; - cluster->power_is_enabled = MALI_TRUE; - - mali_global_clusters[mali_global_num_clusters] = cluster; - mali_global_num_clusters++; - - return cluster; - } - - return NULL; -} - -void mali_cluster_power_is_enabled_set(struct mali_cluster * cluster, mali_bool power_is_enabled) -{ - cluster->power_is_enabled = power_is_enabled; -} - -mali_bool mali_cluster_power_is_enabled_get(struct mali_cluster * cluster) -{ - return cluster->power_is_enabled; -} - - -void mali_cluster_add_group(struct mali_cluster *cluster, struct mali_group *group) -{ - MALI_DEBUG_ASSERT_POINTER(cluster); - - if (cluster->number_of_groups < MALI_MAX_NUMBER_OF_GROUPS_PER_CLUSTER) - { - /* This cluster now owns the group object */ - cluster->groups[cluster->number_of_groups] = group; - cluster->number_of_groups++; - } -} - -void mali_cluster_delete(struct mali_cluster *cluster) -{ - u32 i; - - MALI_DEBUG_ASSERT_POINTER(cluster); - - /* Free all the resources we own */ - for (i = 0; i < cluster->number_of_groups; i++) - { - mali_group_delete(cluster->groups[i]); - } - - if (NULL != cluster->l2) - { - mali_l2_cache_delete(cluster->l2); - } - - for (i = 0; i < mali_global_num_clusters; i++) - { - if (mali_global_clusters[i] == cluster) - { - mali_global_clusters[i] = NULL; - mali_global_num_clusters--; - break; - } - } - - _mali_osk_free(cluster); -} - -void mali_cluster_reset(struct mali_cluster *cluster) -{ - u32 i; - - MALI_DEBUG_ASSERT_POINTER(cluster); - - /* Free all the resources we own */ - for (i = 0; i < cluster->number_of_groups; i++) - { - struct mali_group *group = cluster->groups[i]; - - mali_group_reset(group); - } - - if (NULL != cluster->l2) - { - mali_l2_cache_reset(cluster->l2); - } -} - -struct mali_l2_cache_core* mali_cluster_get_l2_cache_core(struct mali_cluster *cluster) -{ - MALI_DEBUG_ASSERT_POINTER(cluster); - return cluster->l2; -} - -struct mali_group *mali_cluster_get_group(struct mali_cluster *cluster, u32 index) -{ - MALI_DEBUG_ASSERT_POINTER(cluster); - - if (index < cluster->number_of_groups) - { - return cluster->groups[index]; - } - - return NULL; -} - -struct mali_cluster *mali_cluster_get_global_cluster(u32 index) -{ - if (MALI_MAX_NUMBER_OF_CLUSTERS > index) - { - return mali_global_clusters[index]; - } - - return NULL; -} - -u32 mali_cluster_get_glob_num_clusters(void) -{ - return mali_global_num_clusters; -} - -mali_bool mali_cluster_l2_cache_invalidate_all(struct mali_cluster *cluster, u32 id) -{ - MALI_DEBUG_ASSERT_POINTER(cluster); - - if (NULL != cluster->l2) - { - /* If the last cache invalidation was done by a job with a higher id we - * don't have to flush. Since user space will store jobs w/ their - * corresponding memory in sequence (first job #0, then job #1, ...), - * we don't have to flush for job n-1 if job n has already invalidated - * the cache since we know for sure that job n-1's memory was already - * written when job n was started. */ - if (((s32)id) <= ((s32)cluster->last_invalidated_id)) - { - return MALI_FALSE; - } - else - { - cluster->last_invalidated_id = mali_scheduler_get_new_id(); - } - - mali_l2_cache_invalidate_all(cluster->l2); - } - return MALI_TRUE; -} - -void mali_cluster_l2_cache_invalidate_all_force(struct mali_cluster *cluster) -{ - MALI_DEBUG_ASSERT_POINTER(cluster); - - if (NULL != cluster->l2) - { - cluster->last_invalidated_id = mali_scheduler_get_new_id(); - mali_l2_cache_invalidate_all(cluster->l2); - } -} - -void mali_cluster_invalidate_pages(u32 *pages, u32 num_pages) -{ - u32 i; - - for (i = 0; i < mali_global_num_clusters; i++) - { - /*additional check for cluster*/ - if (MALI_TRUE == mali_l2_cache_lock_power_state(mali_global_clusters[i]->l2)) - { - mali_l2_cache_invalidate_pages(mali_global_clusters[i]->l2, pages, num_pages); - } - mali_l2_cache_unlock_power_state(mali_global_clusters[i]->l2); - /*check for failed power locking???*/ - } -} diff --git a/mali/common/mali_cluster.h b/mali/common/mali_cluster.h deleted file mode 100644 index 33debdb..0000000 --- a/mali/common/mali_cluster.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - * - * 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. - */ - -#ifndef __MALI_CLUSTER_H__ -#define __MALI_CLUSTER_H__ - -#include "mali_osk.h" -#include "mali_l2_cache.h" - -/* Maximum 1 GP and 4 PP for a cluster (Mali-400 Quad-core) */ -#define MALI_MAX_NUMBER_OF_GROUPS_PER_CLUSTER 5 -#define MALI_MAX_NUMBER_OF_CLUSTERS 3 - -struct mali_cluster; -struct mali_group; - -struct mali_cluster *mali_cluster_create(struct mali_l2_cache_core *l2_cache); -void mali_cluster_add_group(struct mali_cluster *cluster, struct mali_group *group); -void mali_cluster_delete(struct mali_cluster *cluster); - -void mali_cluster_power_is_enabled_set(struct mali_cluster * cluster, mali_bool power_is_enabled); -mali_bool mali_cluster_power_is_enabled_get(struct mali_cluster * cluster); - -void mali_cluster_reset(struct mali_cluster *cluster); - -struct mali_l2_cache_core* mali_cluster_get_l2_cache_core(struct mali_cluster *cluster); -struct mali_group *mali_cluster_get_group(struct mali_cluster *cluster, u32 index); - -struct mali_cluster *mali_cluster_get_global_cluster(u32 index); -u32 mali_cluster_get_glob_num_clusters(void); - -/* Returns MALI_TRUE if it did the flush */ -mali_bool mali_cluster_l2_cache_invalidate_all(struct mali_cluster *cluster, u32 id); -void mali_cluster_l2_cache_invalidate_all_force(struct mali_cluster *cluster); -void mali_cluster_invalidate_pages(u32 *pages, u32 num_pages); - -#endif /* __MALI_CLUSTER_H__ */ diff --git a/mali/common/mali_device_pause_resume.c b/mali/common/mali_device_pause_resume.c index f8368eb..bb90380 100644 --- a/mali/common/mali_device_pause_resume.c +++ b/mali/common/mali_device_pause_resume.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_device_pause_resume.h b/mali/common/mali_device_pause_resume.h index a5df14b..6be75b0 100644 --- a/mali/common/mali_device_pause_resume.h +++ b/mali/common/mali_device_pause_resume.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_DEVICE_PAUSE_RESUME_H__ diff --git a/mali/common/mali_dlbu.c b/mali/common/mali_dlbu.c index 7dfb565..cdb20db 100644 --- a/mali/common/mali_dlbu.c +++ b/mali/common/mali_dlbu.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_dlbu.h" @@ -176,12 +176,12 @@ void mali_dlbu_add_group(struct mali_dlbu_core *dlbu, struct mali_group *group) core_id = mali_pp_core_get_id(pp_core); dlbu->pp_cores_mask |= (0x1 << core_id); - MALI_DEBUG_PRINT(3, ("Mali DLB: Adding core[%d] New mask= 0x%02x\n",core_id , dlbu->pp_cores_mask)); + MALI_DEBUG_PRINT(3, ("Mali DLBU: Adding core[%d] New mask= 0x%02x\n",core_id , dlbu->pp_cores_mask)); mali_hw_core_register_write(&dlbu->hw_core, MALI_DLBU_REGISTER_PP_ENABLE_MASK, dlbu->pp_cores_mask); } -/* Remove a group to the list of (PP + MMU) pairs dlb go out to */ +/* Remove a group from the DLBU */ void mali_dlbu_remove_group(struct mali_dlbu_core *dlbu, struct mali_group *group) { struct mali_pp_core *pp_core; @@ -194,11 +194,12 @@ void mali_dlbu_remove_group(struct mali_dlbu_core *dlbu, struct mali_group *grou core_id = mali_pp_core_get_id(pp_core); dlbu->pp_cores_mask &= ~(0x1 << core_id); - MALI_DEBUG_PRINT(3, ("Mali DLB: Removing core[%d] New mask= 0x%02x\n", core_id, dlbu->pp_cores_mask)); + MALI_DEBUG_PRINT(3, ("Mali DLBU: Removing core[%d] New mask= 0x%02x\n", core_id, dlbu->pp_cores_mask)); mali_hw_core_register_write(&dlbu->hw_core, MALI_DLBU_REGISTER_PP_ENABLE_MASK, dlbu->pp_cores_mask); } +/* Configure the DLBU for \a job. This needs to be done before the job is started on the groups in the DLBU. */ void mali_dlbu_config_job(struct mali_dlbu_core *dlbu, struct mali_pp_job *job) { u32 *registers; diff --git a/mali/common/mali_dlbu.h b/mali/common/mali_dlbu.h index 111b156..5f8df47 100644 --- a/mali/common/mali_dlbu.h +++ b/mali/common/mali_dlbu.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_DLBU_H__ diff --git a/mali/common/mali_gp.c b/mali/common/mali_gp.c index 4ef4e62..79fb3e9 100644 --- a/mali/common/mali_gp.c +++ b/mali/common/mali_gp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_gp.h" diff --git a/mali/common/mali_gp.h b/mali/common/mali_gp.h index f3f6e3d..2750c75 100644 --- a/mali/common/mali_gp.h +++ b/mali/common/mali_gp.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_GP_H__ diff --git a/mali/common/mali_gp_job.c b/mali/common/mali_gp_job.c index 54b0a06..dae68b1 100644 --- a/mali/common/mali_gp_job.c +++ b/mali/common/mali_gp_job.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_gp_job.h" @@ -48,29 +48,13 @@ struct mali_gp_job *mali_gp_job_create(struct mali_session_data *session, _mali_ } perf_counter_flag = mali_gp_job_get_perf_counter_flag(job); - /* set counters got from user space only if no counters were set through debugfs / DS-5 */ - if (MALI_HW_CORE_NO_COUNTER == mali_gp_job_get_gp_counter_src0()) - { - if (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE) - { - mali_gp_job_set_gp_counter_src0(job->uargs.perf_counter_src0); - mali_gp_job_set_perf_counter_src0(job, mali_gp_job_get_gp_counter_src0()); - } - } - else + + /* case when no counters came from user space + * so pass the debugfs / DS-5 provided global ones to the job object */ + if (!((perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE) || + (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC1_ENABLE))) { mali_gp_job_set_perf_counter_src0(job, mali_gp_job_get_gp_counter_src0()); - } - if (MALI_HW_CORE_NO_COUNTER == mali_gp_job_get_gp_counter_src1()) - { - if (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC1_ENABLE) - { - mali_gp_job_set_gp_counter_src1(job->uargs.perf_counter_src1); - mali_gp_job_set_perf_counter_src1(job, mali_gp_job_get_gp_counter_src1()); - } - } - else - { mali_gp_job_set_perf_counter_src1(job, mali_gp_job_get_gp_counter_src1()); } diff --git a/mali/common/mali_gp_job.h b/mali/common/mali_gp_job.h index cf74e79..e021b9b 100644 --- a/mali/common/mali_gp_job.h +++ b/mali/common/mali_gp_job.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_GP_JOB_H__ diff --git a/mali/common/mali_gp_scheduler.c b/mali/common/mali_gp_scheduler.c index c159faf..ec0f88e 100644 --- a/mali/common/mali_gp_scheduler.c +++ b/mali/common/mali_gp_scheduler.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_gp_scheduler.h" @@ -56,7 +56,7 @@ _mali_osk_errcode_t mali_gp_scheduler_initialize(void) _MALI_OSK_INIT_LIST_HEAD(&job_queue); - gp_scheduler_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ |_MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, 0, _MALI_OSK_LOCK_ORDER_SCHEDULER); + gp_scheduler_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, 0, _MALI_OSK_LOCK_ORDER_SCHEDULER); if (NULL == gp_scheduler_lock) { return _MALI_OSK_ERR_NOMEM; @@ -136,9 +136,9 @@ static void mali_gp_scheduler_schedule(void) if (0 < pause_count || MALI_GP_SLOT_STATE_IDLE != slot.state || _mali_osk_list_empty(&job_queue)) { - mali_gp_scheduler_unlock(); MALI_DEBUG_PRINT(4, ("Mali GP scheduler: Nothing to schedule (paused=%u, idle slots=%u)\n", pause_count, MALI_GP_SLOT_STATE_IDLE == slot.state ? 1 : 0)); + mali_gp_scheduler_unlock(); return; /* Nothing to do, so early out */ } @@ -169,7 +169,8 @@ static void mali_gp_scheduler_schedule_on_group(struct mali_group *group) { struct mali_gp_job *job; - mali_gp_scheduler_lock(); + MALI_DEBUG_ASSERT_LOCK_HELD(group->lock); + MALI_DEBUG_ASSERT_LOCK_HELD(gp_scheduler_lock); if (0 < pause_count || MALI_GP_SLOT_STATE_IDLE != slot.state || _mali_osk_list_empty(&job_queue)) { @@ -199,28 +200,24 @@ static void mali_gp_scheduler_schedule_on_group(struct mali_group *group) static void mali_gp_scheduler_return_job_to_user(struct mali_gp_job *job, mali_bool success) { - /*_mali_osk_notification_t *notobj = _mali_osk_notification_create(_MALI_NOTIFICATION_GP_FINISHED, sizeof(_mali_uk_gp_job_finished_s));*/ - /*if (NULL != notobj)*/ + _mali_uk_gp_job_finished_s *jobres = job->finished_notification->result_buffer; + _mali_osk_memset(jobres, 0, sizeof(_mali_uk_gp_job_finished_s)); /* @@@@ can be removed once we initialize all members in this struct */ + jobres->user_job_ptr = mali_gp_job_get_user_id(job); + if (MALI_TRUE == success) { - _mali_uk_gp_job_finished_s *jobres = job->finished_notification->result_buffer; - _mali_osk_memset(jobres, 0, sizeof(_mali_uk_gp_job_finished_s)); /* @@@@ can be removed once we initialize all members in this struct */ - jobres->user_job_ptr = mali_gp_job_get_user_id(job); - if (MALI_TRUE == success) - { - jobres->status = _MALI_UK_JOB_STATUS_END_SUCCESS; - } - else - { - jobres->status = _MALI_UK_JOB_STATUS_END_UNKNOWN_ERR; - } + jobres->status = _MALI_UK_JOB_STATUS_END_SUCCESS; + } + else + { + jobres->status = _MALI_UK_JOB_STATUS_END_UNKNOWN_ERR; + } - jobres->heap_current_addr = mali_gp_job_get_current_heap_addr(job); - jobres->perf_counter0 = mali_gp_job_get_perf_counter_value0(job); - jobres->perf_counter1 = mali_gp_job_get_perf_counter_value1(job); + jobres->heap_current_addr = mali_gp_job_get_current_heap_addr(job); + jobres->perf_counter0 = mali_gp_job_get_perf_counter_value0(job); + jobres->perf_counter1 = mali_gp_job_get_perf_counter_value1(job); - mali_session_send_notification(mali_gp_job_get_session(job), job->finished_notification); - job->finished_notification = NULL; - } + mali_session_send_notification(mali_gp_job_get_session(job), job->finished_notification); + job->finished_notification = NULL; mali_gp_job_delete(job); } @@ -229,6 +226,8 @@ void mali_gp_scheduler_job_done(struct mali_group *group, struct mali_gp_job *jo { MALI_DEBUG_PRINT(3, ("Mali GP scheduler: Job %u (0x%08X) completed (%s)\n", mali_gp_job_get_id(job), job, success ? "success" : "failure")); + mali_gp_scheduler_return_job_to_user(job, success); + mali_gp_scheduler_lock(); /* Mark slot as idle again */ @@ -240,10 +239,6 @@ void mali_gp_scheduler_job_done(struct mali_group *group, struct mali_gp_job *jo _mali_osk_wait_queue_wake_up(gp_scheduler_working_wait_queue); } - mali_gp_scheduler_unlock(); - - mali_gp_scheduler_return_job_to_user(job, success); - mali_gp_scheduler_schedule_on_group(group); /* It is ok to do this after schedule, since START/STOP is simply ++ and -- anyways */ @@ -382,18 +377,6 @@ _mali_osk_errcode_t _mali_ukk_gp_suspend_response(_mali_uk_gp_suspend_response_s } } - mali_gp_scheduler_lock(); - - /* Make sure that the cookie returned by user space is the same as we provided in the first place */ - if (args->cookie != slot.returned_cookie) - { - MALI_DEBUG_PRINT(2, ("Mali GP scheduler: Got an illegal cookie from user space, expected %u but got %u (job id)\n", slot.returned_cookie, args->cookie)) ; - mali_gp_scheduler_unlock(); - return _MALI_OSK_ERR_FAULT; - } - - mali_gp_scheduler_unlock(); - mali_group_lock(slot.group); if (_MALIGP_JOB_RESUME_WITH_NEW_HEAP == args->code) diff --git a/mali/common/mali_gp_scheduler.h b/mali/common/mali_gp_scheduler.h index e32ad1f..9f30bd8 100644 --- a/mali/common/mali_gp_scheduler.h +++ b/mali/common/mali_gp_scheduler.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_GP_SCHEDULER_H__ diff --git a/mali/common/mali_group.c b/mali/common/mali_group.c index ae6e8f3..12896fd 100644 --- a/mali/common/mali_group.c +++ b/mali/common/mali_group.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ //#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6 @@ -29,8 +29,6 @@ #include "mali_kernel_core.h" #include "mali_osk_profiling.h" -#define CONFIG_MALI400_UPPER_HALF_SCHEDULING - static void mali_group_bottom_half_mmu(void *data); static void mali_group_bottom_half_gp(void *data); static void mali_group_bottom_half_pp(void *data); @@ -38,6 +36,10 @@ static void mali_group_bottom_half_pp(void *data); static void mali_group_timeout(void *data); static void mali_group_reset_pp(struct mali_group *group); +#if defined(CONFIG_MALI400_PROFILING) +static void mali_group_report_l2_cache_counters_per_core(struct mali_group *group, u32 core_num); +#endif /* #if defined(CONFIG_MALI400_PROFILING) */ + /* * The group object is the most important object in the device driver, * and acts as the center of many HW operations. @@ -67,8 +69,8 @@ static void mali_group_remove_session_if_unused(struct mali_group *group, struct static void mali_group_recovery_reset(struct mali_group *group); static void mali_group_mmu_page_fault(struct mali_group *group); -void mali_group_post_process_job_pp(struct mali_group *group); -void mali_group_post_process_job_gp(struct mali_group *group, mali_bool suspend); +static void mali_group_post_process_job_pp(struct mali_group *group); +static void mali_group_post_process_job_gp(struct mali_group *group, mali_bool suspend); void mali_group_lock(struct mali_group *group) { @@ -97,6 +99,13 @@ void mali_group_assert_locked(struct mali_group *group) struct mali_group *mali_group_create(struct mali_l2_cache_core *core, struct mali_dlbu_core *dlbu, struct mali_bcast_unit *bcast) { struct mali_group *group = NULL; + _mali_osk_lock_flags_t lock_flags; + +#if defined(MALI_UPPER_HALF_SCHEDULING) + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#else + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#endif if (mali_global_num_groups >= MALI_MAX_NUMBER_OF_GROUPS) { @@ -114,7 +123,7 @@ struct mali_group *mali_group_create(struct mali_l2_cache_core *core, struct mal _mali_osk_lock_order_t order; _mali_osk_timer_setcallback(group->timeout_timer, mali_group_timeout, (void *)group); - if (mali_group_is_virtual(group)) + if (NULL != dlbu) { order = _MALI_OSK_LOCK_ORDER_GROUP_VIRTUAL; } @@ -123,10 +132,7 @@ struct mali_group *mali_group_create(struct mali_l2_cache_core *core, struct mal order = _MALI_OSK_LOCK_ORDER_GROUP; } - group->lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | - _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | - _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, - 0, order); + group->lock = _mali_osk_lock_init(lock_flags, 0, order); if (NULL != group->lock) { group->l2_cache_core[0] = core; @@ -147,6 +153,7 @@ struct mali_group *mali_group_create(struct mali_l2_cache_core *core, struct mal return group; } + _mali_osk_timer_term(group->timeout_timer); } _mali_osk_free(group); } @@ -255,16 +262,13 @@ void mali_group_delete(struct mali_group *group) child->parent_group = NULL; mali_group_delete(child); } - } - if (NULL != group->dlbu_core) - { mali_dlbu_delete(group->dlbu_core); - } - if (NULL != group->bcast_core) - { - mali_bcast_unit_delete(group->bcast_core); + if (NULL != group->bcast_core) + { + mali_bcast_unit_delete(group->bcast_core); + } } for (i = 0; i < MALI_MAX_NUMBER_OF_GROUPS; i++) @@ -410,6 +414,7 @@ void mali_group_add_group(struct mali_group *parent, struct mali_group *child) mali_bool activate_success = mali_mmu_activate_page_directory(child->mmu, mali_session_get_page_directory(parent->session)); MALI_DEBUG_ASSERT(activate_success); + MALI_IGNORE(activate_success); } } child->session = NULL; @@ -569,9 +574,18 @@ _mali_osk_errcode_t mali_group_start_gp_job(struct mali_group *group, struct mal } mali_gp_job_start(group->gp_core, job); - _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE | MALI_PROFILING_MAKE_EVENT_CHANNEL_GP(0) | MALI_PROFILING_EVENT_REASON_SINGLE_HW_FLUSH, - mali_gp_job_get_frame_builder_id(job), mali_gp_job_get_flush_id(job), 0, 0, 0); - _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_START|MALI_PROFILING_MAKE_EVENT_CHANNEL_GP(0), mali_gp_job_get_pid(job), mali_gp_job_get_tid(job), 0, 0, 0); + _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE | + MALI_PROFILING_MAKE_EVENT_CHANNEL_GP(0) | + MALI_PROFILING_EVENT_REASON_SINGLE_HW_FLUSH, + mali_gp_job_get_frame_builder_id(job), mali_gp_job_get_flush_id(job), 0, 0, 0); + _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_START | + MALI_PROFILING_MAKE_EVENT_CHANNEL_GP(0), + mali_gp_job_get_pid(job), mali_gp_job_get_tid(job), 0, 0, 0); +#if defined(CONFIG_MALI400_PROFILING) + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + mali_group_report_l2_cache_counters_per_core(group, 0); +#endif /* #if defined(CONFIG_MALI400_PROFILING) */ group->gp_running_job = job; group->state = MALI_GROUP_STATE_WORKING; @@ -640,6 +654,7 @@ _mali_osk_errcode_t mali_group_start_pp_job(struct mali_group *group, struct mal { struct mali_group *child; struct mali_group *temp; + _MALI_OSK_LIST_FOREACHENTRY(child, temp, &group->group_list, struct mali_group, group_list) { _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_SINGLE| @@ -651,8 +666,25 @@ _mali_osk_errcode_t mali_group_start_pp_job(struct mali_group *group, struct mal MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(mali_pp_core_get_id(child->pp_core))| MALI_PROFILING_EVENT_REASON_START_STOP_HW_VIRTUAL, mali_pp_job_get_pid(job), mali_pp_job_get_tid(job), 0, 0, 0); - } +#if defined(CONFIG_MALI400_PROFILING) + if (0 != group->l2_cache_core_ref_count[0]) + { + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[0])); + } + } + if (0 != group->l2_cache_core_ref_count[1]) + { + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[1])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[1]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[1])); + } + } +#endif /* #if defined(CONFIG_MALI400_PROFILING) */ } else /* group is physical - call profiling events for physical cores */ { @@ -665,7 +697,13 @@ _mali_osk_errcode_t mali_group_start_pp_job(struct mali_group *group, struct mal MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(mali_pp_core_get_id(group->pp_core))| MALI_PROFILING_EVENT_REASON_START_STOP_HW_PHYSICAL, mali_pp_job_get_pid(job), mali_pp_job_get_tid(job), 0, 0, 0); - +#if defined(CONFIG_MALI400_PROFILING) + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[0])); + } +#endif /* #if defined(CONFIG_MALI400_PROFILING) */ } group->pp_running_job = job; group->pp_running_sub_job = sub_job; @@ -715,7 +753,7 @@ static void mali_group_reset_pp(struct mali_group *group) mali_pp_reset_async(group->pp_core); - if (!mali_group_is_virtual(group) || group->pp_running_job) + if (!mali_group_is_virtual(group) || NULL == group->pp_running_job) { /* This is a physical group or an idle virtual group -- simply wait for * the reset to complete. */ @@ -756,6 +794,7 @@ static void mali_group_complete_pp(struct mali_group *group, mali_bool success) if (_MALI_OSK_ERR_OK != mali_pp_reset_wait(group->pp_core)) { MALI_DEBUG_PRINT(3, ("Mali group: Failed to reset PP, need to reset entire group\n")); + mali_group_recovery_reset(group); } @@ -783,6 +822,7 @@ static void mali_group_complete_gp(struct mali_group *group, mali_bool success) if (_MALI_OSK_ERR_OK != mali_gp_reset_wait(group->gp_core)) { MALI_DEBUG_PRINT(3, ("Mali group: Failed to reset GP, need to reset entire group\n")); + mali_group_recovery_reset(group); } @@ -796,7 +836,6 @@ void mali_group_abort_gp_job(struct mali_group *group, u32 job_id) if (group->state == MALI_GROUP_STATE_IDLE || mali_gp_job_get_id(group->gp_running_job) != job_id) { - mali_group_unlock(group); return; /* No need to cancel or job has already been aborted or completed */ } @@ -810,7 +849,6 @@ static void mali_group_abort_pp_job(struct mali_group *group, u32 job_id) if (group->state == MALI_GROUP_STATE_IDLE || mali_pp_job_get_id(group->pp_running_job) != job_id) { - mali_group_unlock(group); return; /* No need to cancel or job has already been aborted or completed */ } @@ -838,7 +876,7 @@ void mali_group_abort_session(struct mali_group *group, struct mali_session_data gp_job = group->gp_running_job; pp_job = group->pp_running_job; - if (gp_job && mali_gp_job_get_session(gp_job) == session) + if ((NULL != gp_job) && (mali_gp_job_get_session(gp_job) == session)) { MALI_DEBUG_PRINT(4, ("Aborting GP job 0x%08x from session 0x%08x\n", gp_job, session)); @@ -846,7 +884,7 @@ void mali_group_abort_session(struct mali_group *group, struct mali_session_data abort_gp = MALI_TRUE; } - if (pp_job && mali_pp_job_get_session(pp_job) == session) + if ((NULL != pp_job) && (mali_pp_job_get_session(pp_job) == session)) { MALI_DEBUG_PRINT(4, ("Mali group: Aborting PP job 0x%08x from session 0x%08x\n", pp_job, session)); @@ -854,11 +892,11 @@ void mali_group_abort_session(struct mali_group *group, struct mali_session_data abort_pp = MALI_TRUE; } - if (0 != abort_gp) + if (abort_gp) { mali_group_abort_gp_job(group, gp_job_id); } - if (0 != abort_pp) + if (abort_pp) { mali_group_abort_pp_job(group, pp_job_id); } @@ -1229,6 +1267,7 @@ static void mali_group_bottom_half_mmu(void * data) (status >> 6) & 0x1F, (status & 32) ? "write" : "read", mmu->hw_core.description)); + MALI_IGNORE(fault_address); mali_group_mmu_page_fault(group); } @@ -1294,12 +1333,12 @@ static void mali_group_bottom_half_gp(void *data) { MALI_DEBUG_PRINT(4, ("Mali group: GP job completed, calling group handler\n")); group->core_timed_out = MALI_FALSE; - mali_group_complete_gp(group, MALI_TRUE); - mali_group_unlock(group); _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, 0, _mali_osk_get_tid(), 0, 0, 0); + mali_group_complete_gp(group, MALI_TRUE); + mali_group_unlock(group); return; } } @@ -1313,9 +1352,12 @@ static void mali_group_bottom_half_gp(void *data) { MALI_PRINT_ERROR(("Mali group: Unknown interrupt 0x%08X from core %s, aborting job\n", irq_readout, mali_gp_get_hw_core_desc(group->gp_core))); group->core_timed_out = MALI_FALSE; + _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | + MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | + MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, + 0, _mali_osk_get_tid(), 0, 0, 0); mali_group_complete_gp(group, MALI_FALSE); mali_group_unlock(group); - _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP|MALI_PROFILING_EVENT_CHANNEL_SOFTWARE|MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, 0, _mali_osk_get_tid(), 0, 0, 0); return; } else if (group->core_timed_out) /* SW timeout */ @@ -1324,7 +1366,7 @@ static void mali_group_bottom_half_gp(void *data) if (!_mali_osk_timer_pending(group->timeout_timer) && NULL != group->gp_running_job) { MALI_PRINT(("Mali group: Job %d timed out\n", mali_gp_job_get_id(group->gp_running_job))); - mali_group_complete_gp(group, MALI_FALSE); /* Will release group lock */ + mali_group_complete_gp(group, MALI_FALSE); mali_group_unlock(group); return; } @@ -1352,13 +1394,10 @@ static void mali_group_bottom_half_gp(void *data) _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP|MALI_PROFILING_EVENT_CHANNEL_SOFTWARE|MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, 0, _mali_osk_get_tid(), 0, 0, 0); } -void mali_group_post_process_job_gp(struct mali_group *group, mali_bool suspend) +static void mali_group_post_process_job_gp(struct mali_group *group, mali_bool suspend) { - if (NULL == group->pp_running_job) - { - /* There is no running jobs, stop the timer. */ - _mali_osk_timer_del_async(group->timeout_timer); - } + /* Stop the timeout timer. */ + _mali_osk_timer_del_async(group->timeout_timer); if (NULL == group->gp_running_job) { @@ -1385,6 +1424,10 @@ void mali_group_post_process_job_gp(struct mali_group *group, mali_bool suspend) mali_gp_job_get_perf_counter_value1(group->gp_running_job), mali_gp_job_get_perf_counter_src0(group->gp_running_job) | (mali_gp_job_get_perf_counter_src1(group->gp_running_job) << 8), 0, 0); + + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + mali_group_report_l2_cache_counters_per_core(group, 0); } #endif @@ -1412,7 +1455,7 @@ _mali_osk_errcode_t mali_group_upper_half_pp(void *data) * processing on the wrong group object (this should only happen on the * parent group) */ -#if !defined(CONFIG_MALI400_UPPER_HALF_SCHEDULING) +#if !defined(MALI_UPPER_HALF_SCHEDULING) if (mali_group_is_in_virtual(group)) { /* @@ -1442,7 +1485,7 @@ _mali_osk_errcode_t mali_group_upper_half_pp(void *data) } #endif -#if defined(CONFIG_MALI400_UPPER_HALF_SCHEDULING) +#if defined(MALI_UPPER_HALF_SCHEDULING) if (irq_readout & MALI200_REG_VAL_IRQ_END_OF_FRAME) { _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_START | @@ -1476,16 +1519,16 @@ _mali_osk_errcode_t mali_group_upper_half_pp(void *data) return _MALI_OSK_ERR_FAULT; } - mali_group_complete_pp(group, MALI_TRUE); - /* No need to enable interrupts again, since the core will be reset while completing the job */ - - mali_group_unlock(group); - _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | MALI_PROFILING_EVENT_REASON_START_STOP_SW_UPPER_HALF, 0, 0, MALI_PROFILING_MAKE_EVENT_DATA_CORE_PP(core->core_id), 0, 0); + mali_group_complete_pp(group, MALI_TRUE); + /* No need to enable interrupts again, since the core will be reset while completing the job */ + + mali_group_unlock(group); + return _MALI_OSK_ERR_OK; } #endif @@ -1559,12 +1602,12 @@ static void mali_group_bottom_half_pp(void *data) { MALI_DEBUG_PRINT(3, ("Mali PP: Job completed, calling group handler\n")); group->core_timed_out = MALI_FALSE; - mali_group_complete_pp(group, MALI_TRUE); - mali_group_unlock(group); _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, 0, _mali_osk_get_tid(), 0, 0, 0); + mali_group_complete_pp(group, MALI_TRUE); + mali_group_unlock(group); return; } @@ -1586,17 +1629,21 @@ static void mali_group_bottom_half_pp(void *data) MALI_PRINT_ERROR(("Mali PP: Unknown interrupt 0x%08X from core %s, aborting job\n", irq_readout, mali_pp_get_hw_core_desc(group->pp_core))); group->core_timed_out = MALI_FALSE; - mali_group_complete_pp(group, MALI_FALSE); - mali_group_unlock(group); _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, 0, _mali_osk_get_tid(), 0, 0, 0); + mali_group_complete_pp(group, MALI_FALSE); + mali_group_unlock(group); return; } else if (group->core_timed_out) /* SW timeout */ { group->core_timed_out = MALI_FALSE; + _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | + MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | + MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, + 0, _mali_osk_get_tid(), 0, 0, 0); if (!_mali_osk_timer_pending(group->timeout_timer) && NULL != group->pp_running_job) { MALI_PRINT(("Mali PP: Job %d timed out on core %s\n", @@ -1608,10 +1655,6 @@ static void mali_group_bottom_half_pp(void *data) { mali_group_unlock(group); } - _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP | - MALI_PROFILING_EVENT_CHANNEL_SOFTWARE | - MALI_PROFILING_EVENT_REASON_START_STOP_SW_BOTTOM_HALF, - 0, _mali_osk_get_tid(), 0, 0, 0); return; } @@ -1637,15 +1680,12 @@ static void mali_group_bottom_half_pp(void *data) 0, _mali_osk_get_tid(), 0, 0, 0); } -void mali_group_post_process_job_pp(struct mali_group *group) +static void mali_group_post_process_job_pp(struct mali_group *group) { MALI_ASSERT_GROUP_LOCKED(group); - if (NULL == group->gp_running_job) - { - /* There are no running jobs, stop the timer. */ - _mali_osk_timer_del_async(group->timeout_timer); - } + /* Stop the timeout timer. */ + _mali_osk_timer_del_async(group->timeout_timer); /*todo add stop SW counters profiling*/ @@ -1674,6 +1714,23 @@ void mali_group_post_process_job_pp(struct mali_group *group) mali_pp_job_get_perf_counter_src0(group->pp_running_job) | (mali_pp_job_get_perf_counter_src1(group->pp_running_job) << 8), 0, 0); } + if (0 != group->l2_cache_core_ref_count[0]) + { + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[0])); + } + } + if (0 != group->l2_cache_core_ref_count[1]) + { + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[1])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[1]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[1])); + } + } + #endif } else @@ -1681,6 +1738,7 @@ void mali_group_post_process_job_pp(struct mali_group *group) /* update performance counters for a physical group's pp core */ mali_pp_update_performance_counters(group->pp_core, group->pp_running_job, group->pp_running_sub_job); +#if defined(CONFIG_MALI400_PROFILING) _mali_osk_profiling_add_event(MALI_PROFILING_EVENT_TYPE_STOP| MALI_PROFILING_MAKE_EVENT_CHANNEL_PP(mali_pp_core_get_id(group->pp_core))| MALI_PROFILING_EVENT_REASON_START_STOP_HW_PHYSICAL, @@ -1688,6 +1746,12 @@ void mali_group_post_process_job_pp(struct mali_group *group) mali_pp_job_get_perf_counter_value1(group->pp_running_job, group->pp_running_sub_job), mali_pp_job_get_perf_counter_src0(group->pp_running_job) | (mali_pp_job_get_perf_counter_src1(group->pp_running_job) << 8), 0, 0); + if ((MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src0(group->l2_cache_core[0])) && + (MALI_HW_CORE_NO_COUNTER != mali_l2_cache_core_get_counter_src1(group->l2_cache_core[0]))) + { + mali_group_report_l2_cache_counters_per_core(group, mali_l2_cache_get_id(group->l2_cache_core[0])); + } +#endif } } } @@ -1700,19 +1764,17 @@ static void mali_group_timeout(void *data) if (NULL != group->gp_core) { - /* TODO lower debug level */ - MALI_DEBUG_PRINT(1, ("Mali group: TIMEOUT on %s\n", mali_gp_get_hw_core_desc(group->gp_core))); + MALI_DEBUG_PRINT(2, ("Mali group: TIMEOUT on %s\n", mali_gp_get_hw_core_desc(group->gp_core))); _mali_osk_wq_schedule_work(group->bottom_half_work_gp); } else { - /* TODO lower debug level */ - MALI_DEBUG_PRINT(1, ("Mali group: TIMEOUT on %s\n", mali_pp_get_hw_core_desc(group->pp_core))); + MALI_DEBUG_PRINT(2, ("Mali group: TIMEOUT on %s\n", mali_pp_get_hw_core_desc(group->pp_core))); _mali_osk_wq_schedule_work(group->bottom_half_work_pp); } } -void mali_group_zap_session(struct mali_group* group, struct mali_session_data *session) +void mali_group_zap_session(struct mali_group *group, struct mali_session_data *session) { MALI_DEBUG_ASSERT_POINTER(group); MALI_DEBUG_ASSERT_POINTER(session); @@ -1737,3 +1799,63 @@ void mali_group_zap_session(struct mali_group* group, struct mali_session_data * mali_group_unlock(group); } + +#if defined(CONFIG_MALI400_PROFILING) +static void mali_group_report_l2_cache_counters_per_core(struct mali_group *group, u32 core_num) +{ + u32 source0 = 0; + u32 value0 = 0; + u32 source1 = 0; + u32 value1 = 0; + u32 profiling_channel = 0; + + switch(core_num) + { + case 0: profiling_channel = MALI_PROFILING_EVENT_TYPE_SINGLE | + MALI_PROFILING_EVENT_CHANNEL_GPU | + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L20_COUNTERS; + break; + case 1: profiling_channel = MALI_PROFILING_EVENT_TYPE_SINGLE | + MALI_PROFILING_EVENT_CHANNEL_GPU | + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L21_COUNTERS; + break; + case 2: profiling_channel = MALI_PROFILING_EVENT_TYPE_SINGLE | + MALI_PROFILING_EVENT_CHANNEL_GPU | + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L22_COUNTERS; + break; + default: profiling_channel = MALI_PROFILING_EVENT_TYPE_SINGLE | + MALI_PROFILING_EVENT_CHANNEL_GPU | + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L20_COUNTERS; + break; + } + + if (0 == core_num) + { + mali_l2_cache_core_get_counter_values(group->l2_cache_core[0], &source0, &value0, &source1, &value1); + } + if (1 == core_num) + { + if (1 == mali_l2_cache_get_id(group->l2_cache_core[0])) + { + mali_l2_cache_core_get_counter_values(group->l2_cache_core[0], &source0, &value0, &source1, &value1); + } + else if (1 == mali_l2_cache_get_id(group->l2_cache_core[1])) + { + mali_l2_cache_core_get_counter_values(group->l2_cache_core[1], &source0, &value0, &source1, &value1); + } + } + if (2 == core_num) + { + if (2 == mali_l2_cache_get_id(group->l2_cache_core[0])) + { + mali_l2_cache_core_get_counter_values(group->l2_cache_core[0], &source0, &value0, &source1, &value1); + } + else if (2 == mali_l2_cache_get_id(group->l2_cache_core[1])) + { + mali_l2_cache_core_get_counter_values(group->l2_cache_core[1], &source0, &value0, &source1, &value1); + } + } + + _mali_osk_profiling_add_event(profiling_channel, source1 << 8 | source0, value0, value1, 0, 0); +} +#endif /* #if defined(CONFIG_MALI400_PROFILING) */ diff --git a/mali/common/mali_group.h b/mali/common/mali_group.h index 130133c..31af794 100644 --- a/mali/common/mali_group.h +++ b/mali/common/mali_group.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_GROUP_H__ diff --git a/mali/common/mali_hw_core.c b/mali/common/mali_hw_core.c index 2c3f05e..c3a9c8b 100644 --- a/mali/common/mali_hw_core.c +++ b/mali/common/mali_hw_core.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_hw_core.h" diff --git a/mali/common/mali_hw_core.h b/mali/common/mali_hw_core.h index 25d049a..e687f60 100644 --- a/mali/common/mali_hw_core.h +++ b/mali/common/mali_hw_core.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_HW_CORE_H__ @@ -26,10 +26,6 @@ struct mali_hw_core const char* description; /**< Name of unit (as specified in device configuration) */ }; -/*todo moved to mali_osk.h*/ -/*#define MALI_HW_CORE_NO_COUNTER ((u32)-1)*/ -#define MALI_HW_CORE_INVALID_VALUE ((u32)-1) - #define MALI_REG_POLL_COUNT_FAST 1000 #define MALI_REG_POLL_COUNT_SLOW 1000000 diff --git a/mali/common/mali_kernel_common.h b/mali/common/mali_kernel_common.h index 4ad1a53..c86518c 100644 --- a/mali/common/mali_kernel_common.h +++ b/mali/common/mali_kernel_common.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_COMMON_H__ diff --git a/mali/common/mali_kernel_core.c b/mali/common/mali_kernel_core.c index b45126d..dec272b 100644 --- a/mali/common/mali_kernel_core.c +++ b/mali/common/mali_kernel_core.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" @@ -50,6 +50,13 @@ int mali_fb_size = 0; /** Start profiling from module load? */ int mali_boot_profiling = 0; +/** Limits for the number of PP cores behind each L2 cache. */ +int mali_max_pp_cores_group_1 = 0xFF; +int mali_max_pp_cores_group_2 = 0xFF; + +int mali_inited_pp_cores_group_1 = 0; +int mali_inited_pp_cores_group_2 = 0; + static _mali_product_id_t global_product_id = _MALI_PRODUCT_ID_UNKNOWN; static u32 global_gpu_base_address = 0; static u32 global_gpu_major_version = 0; @@ -438,6 +445,7 @@ static _mali_osk_errcode_t mali_parse_config_groups(void) { if (_MALI_PRODUCT_ID_MALI200 == global_product_id) { + _mali_osk_errcode_t err; _mali_osk_resource_t resource_gp; _mali_osk_resource_t resource_pp; _mali_osk_resource_t resource_mmu; @@ -452,7 +460,15 @@ static _mali_osk_errcode_t mali_parse_config_groups(void) return _MALI_OSK_ERR_FAULT; } - return mali_create_group(mali_l2_cache_core_get_glob_l2_core(0), &resource_mmu, &resource_gp, &resource_pp); + err = mali_create_group(mali_l2_cache_core_get_glob_l2_core(0), &resource_mmu, &resource_gp, &resource_pp); + if (err == _MALI_OSK_ERR_OK) + { + mali_inited_pp_cores_group_1++; + mali_max_pp_cores_group_1 = mali_inited_pp_cores_group_1; /* always 1 */ + mali_max_pp_cores_group_2 = mali_inited_pp_cores_group_2; /* always zero */ + } + + return err; } else if (_MALI_PRODUCT_ID_MALI300 == global_product_id || _MALI_PRODUCT_ID_MALI400 == global_product_id || @@ -466,16 +482,16 @@ static _mali_osk_errcode_t mali_parse_config_groups(void) _mali_osk_resource_t resource_gp; _mali_osk_resource_t resource_gp_mmu; - _mali_osk_resource_t resource_pp[MALI_MAX_NUMBER_OF_PP_CORES]; - _mali_osk_resource_t resource_pp_mmu[MALI_MAX_NUMBER_OF_PP_CORES]; + _mali_osk_resource_t resource_pp[8]; + _mali_osk_resource_t resource_pp_mmu[8]; _mali_osk_resource_t resource_pp_mmu_bcast; _mali_osk_resource_t resource_pp_bcast; _mali_osk_resource_t resource_dlbu; _mali_osk_resource_t resource_bcast; _mali_osk_errcode_t resource_gp_found; _mali_osk_errcode_t resource_gp_mmu_found; - _mali_osk_errcode_t resource_pp_found[MALI_MAX_NUMBER_OF_PP_CORES]; - _mali_osk_errcode_t resource_pp_mmu_found[MALI_MAX_NUMBER_OF_PP_CORES]; + _mali_osk_errcode_t resource_pp_found[8]; + _mali_osk_errcode_t resource_pp_mmu_found[8]; _mali_osk_errcode_t resource_pp_mmu_bcast_found; _mali_osk_errcode_t resource_pp_bcast_found; _mali_osk_errcode_t resource_dlbu_found; @@ -551,29 +567,39 @@ static _mali_osk_errcode_t mali_parse_config_groups(void) return err; } + mali_inited_pp_cores_group_1++; + /* Create groups for rest of the cores in the first PP core group */ for (i = 1; i < 4; i++) /* First half of the PP cores belong to first core group */ { - if (_MALI_OSK_ERR_OK == resource_pp_found[i] && _MALI_OSK_ERR_OK == resource_pp_mmu_found[i]) + if (mali_inited_pp_cores_group_1 < mali_max_pp_cores_group_1) { - err = mali_create_group(mali_l2_cache_core_get_glob_l2_core(cluster_id_pp_grp0), &resource_pp_mmu[i], NULL, &resource_pp[i]); - if (err != _MALI_OSK_ERR_OK) + if (_MALI_OSK_ERR_OK == resource_pp_found[i] && _MALI_OSK_ERR_OK == resource_pp_mmu_found[i]) { - return err; + err = mali_create_group(mali_l2_cache_core_get_glob_l2_core(cluster_id_pp_grp0), &resource_pp_mmu[i], NULL, &resource_pp[i]); + if (err != _MALI_OSK_ERR_OK) + { + return err; + } + mali_inited_pp_cores_group_1++; } } } /* Create groups for cores in the second PP core group */ - for (i = 4; i < MALI_MAX_NUMBER_OF_PP_CORES; i++) /* Second half of the PP cores belong to second core group */ + for (i = 4; i < 8; i++) /* Second half of the PP cores belong to second core group */ { - if (_MALI_OSK_ERR_OK == resource_pp_found[i] && _MALI_OSK_ERR_OK == resource_pp_mmu_found[i]) + if (mali_inited_pp_cores_group_2 < mali_max_pp_cores_group_2) { - MALI_DEBUG_ASSERT(mali_l2_cache_core_get_glob_num_l2_cores() >= 2); /* Only Mali-450 have a second core group */ - err = mali_create_group(mali_l2_cache_core_get_glob_l2_core(cluster_id_pp_grp1), &resource_pp_mmu[i], NULL, &resource_pp[i]); - if (err != _MALI_OSK_ERR_OK) + if (_MALI_OSK_ERR_OK == resource_pp_found[i] && _MALI_OSK_ERR_OK == resource_pp_mmu_found[i]) { - return err; + MALI_DEBUG_ASSERT(mali_l2_cache_core_get_glob_num_l2_cores() >= 2); /* Only Mali-450 have a second core group */ + err = mali_create_group(mali_l2_cache_core_get_glob_l2_core(cluster_id_pp_grp1), &resource_pp_mmu[i], NULL, &resource_pp[i]); + if (err != _MALI_OSK_ERR_OK) + { + return err; + } + mali_inited_pp_cores_group_2++; } } } @@ -587,9 +613,15 @@ static _mali_osk_errcode_t mali_parse_config_groups(void) } } + mali_max_pp_cores_group_1 = mali_inited_pp_cores_group_1; + mali_max_pp_cores_group_2 = mali_inited_pp_cores_group_2; + MALI_DEBUG_PRINT(2, ("%d+%d PP cores initialized\n", mali_inited_pp_cores_group_1, mali_inited_pp_cores_group_2)); + + return _MALI_OSK_ERR_OK; } - return _MALI_OSK_ERR_OK; + /* No known HW core */ + return _MALI_OSK_ERR_FAULT; } static _mali_osk_errcode_t mali_parse_config_pmu(void) @@ -979,7 +1011,7 @@ _mali_osk_errcode_t _mali_ukk_open(void **context) if (_MALI_OSK_ERR_OK != mali_mmu_pagedir_map(session->page_directory, MALI_DLBU_VIRT_ADDR, _MALI_OSK_MALI_PAGE_SIZE)) { - MALI_PRINT_ERROR(("Failed to map DLB page into session\n")); + MALI_PRINT_ERROR(("Failed to map DLBU page into session\n")); _mali_osk_notification_queue_term(session->ioctl_queue); _mali_osk_free(session); MALI_ERROR(_MALI_OSK_ERR_NOMEM); diff --git a/mali/common/mali_kernel_core.h b/mali/common/mali_kernel_core.h index 5dec472..22406b2 100644 --- a/mali/common/mali_kernel_core.h +++ b/mali/common/mali_kernel_core.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_CORE_H__ diff --git a/mali/common/mali_kernel_descriptor_mapping.c b/mali/common/mali_kernel_descriptor_mapping.c index 18dd132..b9f05ca 100644 --- a/mali/common/mali_kernel_descriptor_mapping.c +++ b/mali/common/mali_kernel_descriptor_mapping.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_kernel_descriptor_mapping.h b/mali/common/mali_kernel_descriptor_mapping.h index 7364f26..82ed94d 100644 --- a/mali/common/mali_kernel_descriptor_mapping.h +++ b/mali/common/mali_kernel_descriptor_mapping.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_kernel_mem_os.c b/mali/common/mali_kernel_mem_os.c index 0b823f7..d7e8802 100644 --- a/mali/common/mali_kernel_mem_os.c +++ b/mali/common/mali_kernel_mem_os.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_kernel_mem_os.h b/mali/common/mali_kernel_mem_os.h index 4118668..0946169 100644 --- a/mali/common/mali_kernel_mem_os.h +++ b/mali/common/mali_kernel_mem_os.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ #ifndef __MALI_KERNEL_MEM_OS_H__ diff --git a/mali/common/mali_kernel_memory_engine.c b/mali/common/mali_kernel_memory_engine.c index bc0ab98..00257ec 100644 --- a/mali/common/mali_kernel_memory_engine.c +++ b/mali/common/mali_kernel_memory_engine.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_kernel_memory_engine.h b/mali/common/mali_kernel_memory_engine.h index 0835c64..3b41cee 100644 --- a/mali/common/mali_kernel_memory_engine.h +++ b/mali/common/mali_kernel_memory_engine.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_MEMORY_ENGINE_H__ diff --git a/mali/common/mali_kernel_utilization.c b/mali/common/mali_kernel_utilization.c index 9ad0b61..8dd1b09 100644 --- a/mali/common/mali_kernel_utilization.c +++ b/mali/common/mali_kernel_utilization.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_utilization.h" diff --git a/mali/common/mali_kernel_utilization.h b/mali/common/mali_kernel_utilization.h index fbf6774..ebd0670 100644 --- a/mali/common/mali_kernel_utilization.h +++ b/mali/common/mali_kernel_utilization.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_UTILIZATION_H__ diff --git a/mali/common/mali_kernel_vsync.c b/mali/common/mali_kernel_vsync.c index 0b9a660..a1fdf00 100644 --- a/mali/common/mali_kernel_vsync.c +++ b/mali/common/mali_kernel_vsync.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_l2_cache.c b/mali/common/mali_l2_cache.c index db3db93..0fcf4fb 100644 --- a/mali/common/mali_l2_cache.c +++ b/mali/common/mali_l2_cache.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" #include "mali_osk.h" @@ -97,6 +97,13 @@ static _mali_osk_errcode_t mali_l2_cache_send_command(struct mali_l2_cache_core struct mali_l2_cache_core *mali_l2_cache_create(_mali_osk_resource_t *resource) { struct mali_l2_cache_core *cache = NULL; + _mali_osk_lock_flags_t lock_flags; + +#if defined(MALI_UPPER_HALF_SCHEDULING) + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#else + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#endif MALI_DEBUG_PRINT(2, ("Mali L2 cache: Creating Mali L2 cache: %s\n", resource->description)); @@ -114,12 +121,10 @@ struct mali_l2_cache_core *mali_l2_cache_create(_mali_osk_resource_t *resource) cache->counter_src1 = MALI_HW_CORE_NO_COUNTER; if (_MALI_OSK_ERR_OK == mali_hw_core_create(&cache->hw_core, resource, MALI400_L2_CACHE_REGISTERS_SIZE)) { - cache->command_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, - 0, _MALI_OSK_LOCK_ORDER_L2_COMMAND); + cache->command_lock = _mali_osk_lock_init(lock_flags, 0, _MALI_OSK_LOCK_ORDER_L2_COMMAND); if (NULL != cache->command_lock) { - cache->counter_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, - 0, _MALI_OSK_LOCK_ORDER_L2_COUNTER); + cache->counter_lock = _mali_osk_lock_init(lock_flags, 0, _MALI_OSK_LOCK_ORDER_L2_COUNTER); if (NULL != cache->counter_lock) { mali_l2_cache_reset(cache); @@ -285,7 +290,7 @@ void mali_l2_cache_core_get_counter_values(struct mali_l2_cache_core *cache, u32 *value0 = mali_hw_core_register_read(&cache->hw_core, MALI400_L2_CACHE_REGISTER_PERFCNT_VAL0); } - if (cache->counter_src0 != MALI_HW_CORE_NO_COUNTER) + if (cache->counter_src1 != MALI_HW_CORE_NO_COUNTER) { *value1 = mali_hw_core_register_read(&cache->hw_core, MALI400_L2_CACHE_REGISTER_PERFCNT_VAL1); } diff --git a/mali/common/mali_l2_cache.h b/mali/common/mali_l2_cache.h index a21589a..ebc67ae 100644 --- a/mali/common/mali_l2_cache.h +++ b/mali/common/mali_l2_cache.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_L2_CACHE_H__ diff --git a/mali/common/mali_mem_validation.c b/mali/common/mali_mem_validation.c index d5224de..a86912a 100644 --- a/mali/common/mali_mem_validation.c +++ b/mali/common/mali_mem_validation.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_mem_validation.h" diff --git a/mali/common/mali_mem_validation.h b/mali/common/mali_mem_validation.h index 051a979..1eeab38 100644 --- a/mali/common/mali_mem_validation.h +++ b/mali/common/mali_mem_validation.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_MEM_VALIDATION_H__ diff --git a/mali/common/mali_memory.c b/mali/common/mali_memory.c index ee0a7f6..129cdb0 100644 --- a/mali/common/mali_memory.c +++ b/mali/common/mali_memory.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_memory.h b/mali/common/mali_memory.h index d504fcf..537c346 100644 --- a/mali/common/mali_memory.h +++ b/mali/common/mali_memory.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_MEMORY_H__ diff --git a/mali/common/mali_mmu.c b/mali/common/mali_mmu.c index da0ccab..eea3727 100644 --- a/mali/common/mali_mmu.c +++ b/mali/common/mali_mmu.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_mmu.h b/mali/common/mali_mmu.h index eb1c49a..66102fb 100644 --- a/mali/common/mali_mmu.h +++ b/mali/common/mali_mmu.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_MMU_H__ @@ -20,7 +20,6 @@ #include #include #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6 -#include "mali_platform.h" #include "meson_platform/mali_fix.h" #endif @@ -141,17 +140,4 @@ MALI_STATIC_INLINE u32 mali_mmu_get_page_fault_addr(struct mali_mmu_core *mmu) return mali_hw_core_register_read(&mmu->hw_core, MALI_MMU_REGISTER_PAGE_FAULT_ADDR); } -/* -needed? -MALI_STATIC_INLINE void mali_mmu_unmask_all_interrupts(struct mali_mmu_core *mmu) -{ - mali_hw_core_register_write(&mmu->hw_core, MALI_MMU_REGISTER_INT_MASK, MALI_MMU_REGISTER_INT_MASK, MALI_MMU_INTERRUPT_PAGE_FAULT | MALI_MMU_INTERRUPT_READ_BUS_ERROR); -} -needed? -MALI_STATIC_INLINE void mali_mmu_clear_interrupt(struct mali_mmu_core *mmu, u32 interrupt) -{ - mali_hw_core_register_write(&mmu->hw_core, MALI_MMU_REGISTER_INT_CLEAR, interrupt); -} -*/ - #endif /* __MALI_MMU_H__ */ diff --git a/mali/common/mali_mmu_page_directory.c b/mali/common/mali_mmu_page_directory.c index 36ecde8..d9dbc1e 100644 --- a/mali/common/mali_mmu_page_directory.c +++ b/mali/common/mali_mmu_page_directory.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_mmu_page_directory.h b/mali/common/mali_mmu_page_directory.h index e6ffb26..628833a 100644 --- a/mali/common/mali_mmu_page_directory.h +++ b/mali/common/mali_mmu_page_directory.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_MMU_PAGE_DIRECTORY_H__ diff --git a/mali/common/mali_osk.h b/mali/common/mali_osk.h index 1d984f0..f699052 100644 --- a/mali/common/mali_osk.h +++ b/mali/common/mali_osk.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -63,7 +63,6 @@ extern "C" #define MALI_FALSE ((mali_bool)0) #endif -/*todo moved from mali_hw_core.h*/ #define MALI_HW_CORE_NO_COUNTER ((u32)-1) /** @@ -208,6 +207,7 @@ typedef enum _MALI_OSK_LOCK_ORDER_PROFILING, _MALI_OSK_LOCK_ORDER_L2_COMMAND, _MALI_OSK_LOCK_ORDER_PM_CORE_STATE, + _MALI_OSK_LOCK_ORDER_SCHEDULER_DEFERRED, _MALI_OSK_LOCK_ORDER_SCHEDULER, _MALI_OSK_LOCK_ORDER_GROUP, _MALI_OSK_LOCK_ORDER_GROUP_VIRTUAL, @@ -315,6 +315,8 @@ typedef struct _mali_osk_lock_t_struct _mali_osk_lock_t; /** @brief returns a lock's owner (thread id) if debugging is enabled */ u32 _mali_osk_lock_get_owner( _mali_osk_lock_t *lock ); +#else +#define MALI_DEBUG_ASSERT_LOCK_HELD(l) do {} while(0) #endif /** @} */ /* end group _mali_osk_lock */ @@ -1499,14 +1501,14 @@ void _mali_osk_timer_del( _mali_osk_timer_t *tim ); */ void _mali_osk_timer_del_async( _mali_osk_timer_t *tim ); -/** @brief Check if timer is pemding. +/** @brief Check if timer is pending. * * Check if timer is active. * * @param tim the timer to check * @return MALI_TRUE if time is active, MALI_FALSE if it is not active */ -mali_bool _mali_osk_timer_pending( _mali_osk_timer_t *tim ); +mali_bool _mali_osk_timer_pending( _mali_osk_timer_t *tim); /** @brief Set a timer's callback parameters. * diff --git a/mali/common/mali_osk_bitops.h b/mali/common/mali_osk_bitops.h index 10484ba..f262f7d 100644 --- a/mali/common/mali_osk_bitops.h +++ b/mali/common/mali_osk_bitops.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ /** diff --git a/mali/common/mali_osk_list.h b/mali/common/mali_osk_list.h index edee5ea..49f01b6 100644 --- a/mali/common/mali_osk_list.h +++ b/mali/common/mali_osk_list.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -16,6 +16,8 @@ #ifndef __MALI_OSK_LIST_H__ #define __MALI_OSK_LIST_H__ +#include "mali_kernel_common.h" + #ifdef __cplusplus extern "C" { @@ -150,30 +152,27 @@ MALI_STATIC_INLINE void _mali_osk_list_move( _mali_osk_list_t *move_entry, _mali _mali_osk_list_add(move_entry, list); } -/** @brief Join two lists +/** @brief Move an entire list * * The list element must be initialized. * - * Allows you to join a list into another list at a specific location + * Allows you to move a list from one list head to another list head * - * @param list the new list to add - * @param at the location in a list to add the new list into + * @param old_list The existing list head + * @param new_list The new list head (must be an empty list) */ -MALI_STATIC_INLINE void _mali_osk_list_splice( _mali_osk_list_t *list, _mali_osk_list_t *at ) +MALI_STATIC_INLINE void _mali_osk_list_move_list( _mali_osk_list_t *old_list, _mali_osk_list_t *new_list ) { - if (!_mali_osk_list_empty(list)) - { - /* insert all items from 'list' after 'at' */ - _mali_osk_list_t *first = list->next; - _mali_osk_list_t *last = list->prev; - _mali_osk_list_t *split = at->next; - - first->prev = at; - at->next = first; - - last->next = split; - split->prev = last; - } + MALI_DEBUG_ASSERT(_mali_osk_list_empty(new_list)); + if (!_mali_osk_list_empty(old_list)) + { + new_list->next = old_list->next; + new_list->prev = old_list->prev; + new_list->next->prev = new_list; + new_list->prev->next = new_list; + old_list->next = old_list; + old_list->prev = old_list; + } } /** @} */ /* end group _mali_osk_list */ diff --git a/mali/common/mali_osk_mali.h b/mali/common/mali_osk_mali.h index 1439d18..4ac8ef6 100644 --- a/mali/common/mali_osk_mali.h +++ b/mali/common/mali_osk_mali.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_osk_profiling.h b/mali/common/mali_osk_profiling.h index 200325e..c87aace 100644 --- a/mali/common/mali_osk_profiling.h +++ b/mali/common/mali_osk_profiling.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_OSK_PROFILING_H__ diff --git a/mali/common/mali_pm.c b/mali/common/mali_pm.c index a6ac3de..c09da99 100644 --- a/mali/common/mali_pm.c +++ b/mali/common/mali_pm.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_pm.h" diff --git a/mali/common/mali_pm.h b/mali/common/mali_pm.h index 70b3533..97fbc06 100644 --- a/mali/common/mali_pm.h +++ b/mali/common/mali_pm.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_PM_H__ diff --git a/mali/common/mali_pmu.c b/mali/common/mali_pmu.c index a06df8f..3c26cb1 100644 --- a/mali/common/mali_pmu.c +++ b/mali/common/mali_pmu.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2009-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_pmu.h b/mali/common/mali_pmu.h index 82b8574..fd10c08 100644 --- a/mali/common/mali_pmu.h +++ b/mali/common/mali_pmu.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2009-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_pp.c b/mali/common/mali_pp.c index 78eddd6..c655e20 100644 --- a/mali/common/mali_pp.c +++ b/mali/common/mali_pp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_pp_job.h" diff --git a/mali/common/mali_pp.h b/mali/common/mali_pp.h index c1b989d..7906950 100644 --- a/mali/common/mali_pp.h +++ b/mali/common/mali_pp.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_PP_H__ diff --git a/mali/common/mali_pp_job.c b/mali/common/mali_pp_job.c index feab75f..1135e86 100644 --- a/mali/common/mali_pp_job.c +++ b/mali/common/mali_pp_job.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_pp_job.h" @@ -27,16 +27,8 @@ struct mali_pp_job *mali_pp_job_create(struct mali_session_data *session, _mali_ { u32 i; - job->finished_notification = _mali_osk_notification_create(_MALI_NOTIFICATION_PP_FINISHED, sizeof(_mali_uk_pp_job_finished_s)); - if (NULL == job->finished_notification) - { - _mali_osk_free(job); - return NULL; - } - if (0 != _mali_osk_copy_from_user(&job->uargs, uargs, sizeof(_mali_uk_pp_start_job_s))) { - _mali_osk_notification_delete(job->finished_notification); _mali_osk_free(job); return NULL; } @@ -44,36 +36,32 @@ struct mali_pp_job *mali_pp_job_create(struct mali_session_data *session, _mali_ if (job->uargs.num_cores > _MALI_PP_MAX_SUB_JOBS) { MALI_PRINT_ERROR(("Mali PP job: Too many sub jobs specified in job object\n")); - _mali_osk_notification_delete(job->finished_notification); _mali_osk_free(job); return NULL; } - perf_counter_flag = mali_pp_job_get_perf_counter_flag(job); - /* set counters got from user space only if no counters were set through debugfs / DS-5 */ - if (MALI_HW_CORE_NO_COUNTER == mali_pp_job_get_pp_counter_src0()) + if (!mali_pp_job_use_no_notification(job)) { - if (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE) + job->finished_notification = _mali_osk_notification_create(_MALI_NOTIFICATION_PP_FINISHED, sizeof(_mali_uk_pp_job_finished_s)); + if (NULL == job->finished_notification) { - mali_pp_job_set_pp_counter_src0(job->uargs.perf_counter_src0); - mali_pp_job_set_perf_counter_src0(job, mali_pp_job_get_pp_counter_src0()); + _mali_osk_free(job); + return NULL; } } else { - mali_pp_job_set_perf_counter_src0(job, mali_pp_job_get_pp_counter_src0()); + job->finished_notification = NULL; } - if (MALI_HW_CORE_NO_COUNTER == mali_pp_job_get_pp_counter_src1()) - { - if (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC1_ENABLE) - { - mali_pp_job_set_pp_counter_src1(job->uargs.perf_counter_src1); - mali_pp_job_set_perf_counter_src1(job, mali_pp_job_get_pp_counter_src1()); - } - } - else + perf_counter_flag = mali_pp_job_get_perf_counter_flag(job); + + /* case when no counters came from user space + * so pass the debugfs / DS-5 provided global ones to the job object */ + if (!((perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE) || + (perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_SRC1_ENABLE))) { + mali_pp_job_set_perf_counter_src0(job, mali_pp_job_get_pp_counter_src0()); mali_pp_job_set_perf_counter_src1(job, mali_pp_job_get_pp_counter_src1()); } diff --git a/mali/common/mali_pp_job.h b/mali/common/mali_pp_job.h index 8057c56..208e73f 100644 --- a/mali/common/mali_pp_job.h +++ b/mali/common/mali_pp_job.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_PP_JOB_H__ diff --git a/mali/common/mali_pp_scheduler.c b/mali/common/mali_pp_scheduler.c index 7af05ea..bb66d83 100644 --- a/mali/common/mali_pp_scheduler.c +++ b/mali/common/mali_pp_scheduler.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_pp_scheduler.h" @@ -19,11 +19,18 @@ #include "mali_group.h" #include "mali_pm.h" +#if defined(CONFIG_SYNC) +#define MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE 1 +#endif /* Maximum of 8 PP cores (a group can only have maximum of 1 PP core) */ #define MALI_MAX_NUMBER_OF_PP_GROUPS 9 static mali_bool mali_pp_scheduler_is_suspended(void); +static void mali_pp_scheduler_do_schedule(void *arg); +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) +static void mali_pp_scheduler_do_job_delete(void *arg); +#endif static u32 pp_version = 0; @@ -54,22 +61,35 @@ static _mali_osk_lock_t *pp_scheduler_lock = NULL; /* Contains tid of thread that locked the scheduler or 0, if not locked */ MALI_DEBUG_CODE(static u32 pp_scheduler_lock_owner = 0); -_mali_osk_wq_work_t *pp_scheduler_wq = NULL; +static _mali_osk_wq_work_t *pp_scheduler_wq_schedule = NULL; + +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) +static _mali_osk_wq_work_t *pp_scheduler_wq_job_delete = NULL; +static _mali_osk_lock_t *pp_scheduler_job_delete_lock = NULL; +static _MALI_OSK_LIST_HEAD_STATIC_INIT(pp_scheduler_job_deletion_queue); +#endif _mali_osk_errcode_t mali_pp_scheduler_initialize(void) { struct mali_group *group; struct mali_pp_core *pp_core; + _mali_osk_lock_flags_t lock_flags; u32 num_groups; u32 i; +#if defined(MALI_UPPER_HALF_SCHEDULING) + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#else + lock_flags = _MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE; +#endif + _MALI_OSK_INIT_LIST_HEAD(&job_queue); _MALI_OSK_INIT_LIST_HEAD(&group_list_working); _MALI_OSK_INIT_LIST_HEAD(&group_list_idle); _MALI_OSK_INIT_LIST_HEAD(&virtual_job_queue); - pp_scheduler_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ |_MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, 0, _MALI_OSK_LOCK_ORDER_SCHEDULER); + pp_scheduler_lock = _mali_osk_lock_init(lock_flags, 0, _MALI_OSK_LOCK_ORDER_SCHEDULER); if (NULL == pp_scheduler_lock) { return _MALI_OSK_ERR_NOMEM; @@ -82,13 +102,34 @@ _mali_osk_errcode_t mali_pp_scheduler_initialize(void) return _MALI_OSK_ERR_NOMEM; } - pp_scheduler_wq = _mali_osk_wq_create_work(mali_pp_scheduler_do_schedule, NULL); - if (NULL == pp_scheduler_wq) + pp_scheduler_wq_schedule = _mali_osk_wq_create_work(mali_pp_scheduler_do_schedule, NULL); + if (NULL == pp_scheduler_wq_schedule) + { + _mali_osk_wait_queue_term(pp_scheduler_working_wait_queue); + _mali_osk_lock_term(pp_scheduler_lock); + return _MALI_OSK_ERR_NOMEM; + } + +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) + pp_scheduler_wq_job_delete = _mali_osk_wq_create_work(mali_pp_scheduler_do_job_delete, NULL); + if (NULL == pp_scheduler_wq_job_delete) { + _mali_osk_wq_delete_work(pp_scheduler_wq_schedule); + _mali_osk_wait_queue_term(pp_scheduler_working_wait_queue); _mali_osk_lock_term(pp_scheduler_lock); + return _MALI_OSK_ERR_NOMEM; + } + + pp_scheduler_job_delete_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK_IRQ |_MALI_OSK_LOCKFLAG_NONINTERRUPTABLE, 0, _MALI_OSK_LOCK_ORDER_SCHEDULER_DEFERRED); + if (NULL == pp_scheduler_job_delete_lock) + { + _mali_osk_wq_delete_work(pp_scheduler_wq_job_delete); + _mali_osk_wq_delete_work(pp_scheduler_wq_schedule); _mali_osk_wait_queue_term(pp_scheduler_working_wait_queue); + _mali_osk_lock_term(pp_scheduler_lock); return _MALI_OSK_ERR_NOMEM; } +#endif num_groups = mali_group_get_glob_num_groups(); @@ -156,6 +197,12 @@ void mali_pp_scheduler_terminate(void) mali_group_delete(group); } +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) + _mali_osk_lock_term(pp_scheduler_job_delete_lock); + _mali_osk_wq_delete_work(pp_scheduler_wq_job_delete); +#endif + + _mali_osk_wq_delete_work(pp_scheduler_wq_schedule); _mali_osk_wait_queue_term(pp_scheduler_working_wait_queue); _mali_osk_lock_term(pp_scheduler_lock); } @@ -222,7 +269,7 @@ MALI_STATIC_INLINE void mali_pp_scheduler_dequeue_physical_job(struct mali_pp_jo if (!mali_pp_job_has_unstarted_sub_jobs(job)) { /* All sub jobs have been started: remove job from queue */ - _mali_osk_list_del(&job->list); + _mali_osk_list_delinit(&job->list); } --job_queue_depth; @@ -258,7 +305,7 @@ MALI_STATIC_INLINE void mali_pp_scheduler_dequeue_virtual_job(struct mali_pp_job MALI_DEBUG_ASSERT(virtual_job_queue_depth > 0); /* Remove job from queue */ - _mali_osk_list_del(&job->list); + _mali_osk_list_delinit(&job->list); --virtual_job_queue_depth; } @@ -481,7 +528,7 @@ static void mali_pp_scheduler_schedule(void) } } -static void mali_pp_scheduler_return_job_to_user(struct mali_pp_job *job) +static void mali_pp_scheduler_return_job_to_user(struct mali_pp_job *job, mali_bool deferred) { if (MALI_FALSE == mali_pp_job_use_no_notification(job)) { @@ -511,20 +558,61 @@ static void mali_pp_scheduler_return_job_to_user(struct mali_pp_job *job) job->finished_notification = NULL; } +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) + if (MALI_TRUE == deferred) + { + /* The deletion of the job object (releasing sync refs etc) must be done in a different context */ + _mali_osk_lock_wait(pp_scheduler_job_delete_lock, _MALI_OSK_LOCKMODE_RW); + + MALI_DEBUG_ASSERT(_mali_osk_list_empty(&job->list)); /* This job object should not be on any list */ + _mali_osk_list_addtail(&job->list, &pp_scheduler_job_deletion_queue); + + _mali_osk_lock_signal(pp_scheduler_job_delete_lock, _MALI_OSK_LOCKMODE_RW); + + _mali_osk_wq_schedule_work(pp_scheduler_wq_job_delete); + } + else + { + mali_pp_job_delete(job); + } +#else + MALI_DEBUG_ASSERT(MALI_FALSE == deferred); /* no use cases need this in this configuration */ mali_pp_job_delete(job); +#endif } -void mali_pp_scheduler_do_schedule(void *arg) +static void mali_pp_scheduler_do_schedule(void *arg) { MALI_IGNORE(arg); mali_pp_scheduler_schedule(); } -void mali_pp_scheduler_schedule_async(void) +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) +static void mali_pp_scheduler_do_job_delete(void *arg) { - _mali_osk_wq_schedule_work(pp_scheduler_wq); + _MALI_OSK_LIST_HEAD_STATIC_INIT(list); + struct mali_pp_job *job; + struct mali_pp_job *tmp; + + MALI_IGNORE(arg); + + _mali_osk_lock_wait(pp_scheduler_job_delete_lock, _MALI_OSK_LOCKMODE_RW); + + /* + * Quickly "unhook" the jobs pending to be deleted, so we can release the lock before + * we start deleting the job objects (without any locks held + */ + _mali_osk_list_move_list(&pp_scheduler_job_deletion_queue, &list); + + _mali_osk_lock_signal(pp_scheduler_job_delete_lock, _MALI_OSK_LOCKMODE_RW); + + _MALI_OSK_LIST_FOREACHENTRY(job, tmp, &list, struct mali_pp_job, list) + { + mali_pp_job_delete(job); /* delete the job object itself */ + } } +#endif void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *job, u32 sub_job, mali_bool success) { @@ -537,6 +625,7 @@ void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *jo job, sub_job + 1, mali_pp_job_get_sub_job_count(job), success ? "success" : "failure")); + MALI_ASSERT_GROUP_LOCKED(group); mali_pp_scheduler_lock(); mali_pp_job_mark_sub_job_completed(job, success); @@ -558,16 +647,24 @@ void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *jo mali_pp_job_is_virtual(job) ? "virtual" : "physical", mali_pp_job_get_id(job), job)); #if defined(CONFIG_SYNC) - /* TODO propagate error */ if (job->sync_point) { - MALI_DEBUG_PRINT(2, ("Sync: Signal point for job %d\n", mali_pp_job_get_id(job))); - mali_sync_signal_pt(job->sync_point); + int error; + if (success) error = 0; + else error = -EFAULT; + MALI_DEBUG_PRINT(4, ("Sync: Signal %spoint for job %d\n", + success ? "" : "failed ", + mali_pp_job_get_id(job))); + mali_sync_signal_pt(job->sync_point, error); } #endif - mali_pp_scheduler_return_job_to_user(job); - /* TODO: Should we do PM here? */ +#if defined(MALI_PP_SCHEDULER_USE_DEFERRED_JOB_DELETE) + mali_pp_scheduler_return_job_to_user(job, MALI_TRUE); +#else + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); +#endif + mali_pm_core_event(MALI_CORE_EVENT_PP_STOP); /* Resolve any barriers */ @@ -597,7 +694,7 @@ void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *jo if (barrier_enforced) { /* A barrier was resolved, so schedule previously blocked jobs */ - mali_pp_scheduler_schedule_async(); + _mali_osk_wq_schedule_work(pp_scheduler_wq_schedule); /* TODO: Subjob optimisation */ } @@ -834,6 +931,7 @@ static void sync_callback_work(void *arg) { struct mali_pp_job *job = (struct mali_pp_job *)arg; struct mali_session_data *session; + int err; MALI_DEBUG_ASSERT_POINTER(job); @@ -841,24 +939,27 @@ static void sync_callback_work(void *arg) /* Remove job from session pending job list */ _mali_osk_lock_wait(session->pending_jobs_lock, _MALI_OSK_LOCKMODE_RW); - _mali_osk_list_del(&job->list); + _mali_osk_list_delinit(&job->list); _mali_osk_lock_signal(session->pending_jobs_lock, _MALI_OSK_LOCKMODE_RW); - if (likely(0 == sync_fence_wait(job->pre_fence, 0))) + err = sync_fence_wait(job->pre_fence, 0); + if (likely(0 == err)) { MALI_DEBUG_PRINT(3, ("Mali sync: Job %d ready to run\n", mali_pp_job_get_id(job))); mali_pp_scheduler_queue_job(job, session); - if (0 == _mali_osk_list_empty(&group_list_idle)) mali_pp_scheduler_schedule(); + mali_pp_scheduler_schedule(); } else { /* Fence signaled error */ MALI_DEBUG_PRINT(3, ("Mali sync: Job %d abort due to sync error\n", mali_pp_job_get_id(job))); + if (job->sync_point) mali_sync_signal_pt(job->sync_point, err); + mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ } } #endif @@ -887,13 +988,13 @@ _mali_osk_errcode_t _mali_ukk_pp_start_job(void *ctx, _mali_uk_pp_start_job_s *u { /* Not a valid job, return to user immediately */ mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } #if PROFILING_SKIP_PP_JOBS || PROFILING_SKIP_PP_AND_GP_JOBS #warning PP jobs will not be executed - mali_pp_scheduler_return_job_to_user(job); + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); return _MALI_OSK_ERR_OK; #endif @@ -907,7 +1008,7 @@ _mali_osk_errcode_t _mali_ukk_pp_start_job(void *ctx, _mali_uk_pp_start_job_s *u /* Fence creation failed. */ MALI_DEBUG_PRINT(2, ("Failed to create sync point for job %d\n", mali_pp_job_get_id(job))); mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } @@ -919,7 +1020,7 @@ _mali_osk_errcode_t _mali_ukk_pp_start_job(void *ctx, _mali_uk_pp_start_job_s *u /* mali_stream_create_fence already freed the sync_point */ MALI_DEBUG_PRINT(2, ("Failed to create fence for job %d\n", mali_pp_job_get_id(job))); mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } @@ -943,16 +1044,18 @@ _mali_osk_errcode_t _mali_ukk_pp_start_job(void *ctx, _mali_uk_pp_start_job_s *u if (NULL == job->pre_fence) { MALI_DEBUG_PRINT(2, ("Failed to import fence %d\n", pre_fence_fd)); + if (job->sync_point) mali_sync_signal_pt(job->sync_point, -EINVAL); mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } job->sync_work = _mali_osk_wq_create_work(sync_callback_work, (void*)job); if (NULL == job->sync_work) { + if (job->sync_point) mali_sync_signal_pt(job->sync_point, -ENOMEM); mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } @@ -982,8 +1085,9 @@ _mali_osk_errcode_t _mali_ukk_pp_start_job(void *ctx, _mali_uk_pp_start_job_s *u else if (0 > err) { /* Sync fail */ + if (job->sync_point) mali_sync_signal_pt(job->sync_point, err); mali_pp_job_mark_sub_job_completed(job, MALI_FALSE); /* Flagging the job as failed. */ - mali_pp_scheduler_return_job_to_user(job); /* This will also delete the job object */ + mali_pp_scheduler_return_job_to_user(job, MALI_FALSE); /* This will also delete the job object */ return _MALI_OSK_ERR_OK; /* User is notified via a notification, so this call is ok */ } @@ -1068,7 +1172,7 @@ void mali_pp_scheduler_abort_session(struct mali_session_data *session) _MALI_OSK_LIST_FOREACHENTRY(job, tmp_job, &session->job_list, struct mali_pp_job, session_list) { /* Remove job from queue (if it's not queued, list_del has no effect) */ - _mali_osk_list_del(&job->list); + _mali_osk_list_delinit(&job->list); if (mali_pp_job_is_virtual(job)) { @@ -1107,6 +1211,11 @@ void mali_pp_scheduler_abort_session(struct mali_session_data *session) groups[i++] = group; } + _MALI_OSK_LIST_FOREACHENTRY(group, tmp_group, &group_list_idle, struct mali_group, pp_scheduler_list) + { + groups[i++] = group; + } + mali_pp_scheduler_unlock(); /* Abort running jobs from this session */ diff --git a/mali/common/mali_pp_scheduler.h b/mali/common/mali_pp_scheduler.h index afa540a..d0695c6 100644 --- a/mali/common/mali_pp_scheduler.h +++ b/mali/common/mali_pp_scheduler.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_PP_SCHEDULER_H__ @@ -18,7 +18,6 @@ _mali_osk_errcode_t mali_pp_scheduler_initialize(void); void mali_pp_scheduler_terminate(void); -void mali_pp_scheduler_do_schedule(void *arg); void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *job, u32 sub_job, mali_bool success); void mali_pp_scheduler_suspend(void); diff --git a/mali/common/mali_scheduler.c b/mali/common/mali_scheduler.c index ea6ad29..f360209 100644 --- a/mali/common/mali_scheduler.c +++ b/mali/common/mali_scheduler.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/common/mali_scheduler.h b/mali/common/mali_scheduler.h index 3b5a173..63e5be8 100644 --- a/mali/common/mali_scheduler.h +++ b/mali/common/mali_scheduler.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_SCHEDULER_H__ diff --git a/mali/common/mali_session.c b/mali/common/mali_session.c index 04d1ae8..2394bb9 100644 --- a/mali/common/mali_session.c +++ b/mali/common/mali_session.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_osk.h" diff --git a/mali/common/mali_session.h b/mali/common/mali_session.h index 2df5e72..5c34dde 100644 --- a/mali/common/mali_session.h +++ b/mali/common/mali_session.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_SESSION_H__ diff --git a/mali/common/mali_ukk.h b/mali/common/mali_ukk.h index 4c74f65..833251e 100644 --- a/mali/common/mali_ukk.h +++ b/mali/common/mali_ukk.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/common/mali_user_settings_db.c b/mali/common/mali_user_settings_db.c index 9eb8e4e..d3f1e50 100644 --- a/mali/common/mali_user_settings_db.c +++ b/mali/common/mali_user_settings_db.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include "mali_osk.h" diff --git a/mali/common/mali_user_settings_db.h b/mali/common/mali_user_settings_db.h index 2a40ce3..fbb9415 100644 --- a/mali/common/mali_user_settings_db.h +++ b/mali/common/mali_user_settings_db.h @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_USER_SETTINGS_DB_H__ diff --git a/mali/include/linux/mali/mali_utgard.h b/mali/include/linux/mali/mali_utgard.h index d2f87ab..097d1de 100644 --- a/mali/include/linux/mali/mali_utgard.h +++ b/mali/include/linux/mali/mali_utgard.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ /** diff --git a/mali/include/linux/mali/mali_utgard_counters.h b/mali/include/linux/mali/mali_utgard_counters.h index 6b8e0a8..3ef9a28 100644 --- a/mali/include/linux/mali/mali_utgard_counters.h +++ b/mali/include/linux/mali/mali_utgard_counters.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef _MALI_UTGARD_COUNTERS_H_ diff --git a/mali/include/linux/mali/mali_utgard_ioctl.h b/mali/include/linux/mali/mali_utgard_ioctl.h index f9eed54..8881366 100644 --- a/mali/include/linux/mali/mali_utgard_ioctl.h +++ b/mali/include/linux/mali/mali_utgard_ioctl.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_UTGARD_IOCTL_H__ diff --git a/mali/include/linux/mali/mali_utgard_profiling_events.h b/mali/include/linux/mali/mali_utgard_profiling_events.h index 5e0e545..6c0ebaf 100644 --- a/mali/include/linux/mali/mali_utgard_profiling_events.h +++ b/mali/include/linux/mali/mali_utgard_profiling_events.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef _MALI_UTGARD_PROFILING_EVENTS_H_ @@ -137,6 +137,9 @@ typedef enum { MALI_PROFILING_EVENT_REASON_SINGLE_GPU_NONE = 0, MALI_PROFILING_EVENT_REASON_SINGLE_GPU_FREQ_VOLT_CHANGE = 1, + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L20_COUNTERS = 2, + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L21_COUNTERS = 3, + MALI_PROFILING_EVENT_REASON_SINGLE_GPU_L22_COUNTERS = 4, } cinstr_profiling_event_reason_single_gpu_t; /** diff --git a/mali/include/linux/mali/mali_utgard_uk_types.h b/mali/include/linux/mali/mali_utgard_uk_types.h index 430a0d8..4c0c57d 100644 --- a/mali/include/linux/mali/mali_utgard_uk_types.h +++ b/mali/include/linux/mali/mali_utgard_uk_types.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -708,7 +708,7 @@ 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 18 +#define _MALI_API_VERSION 19 #define _MALI_UK_API_VERSION _MAKE_VERSION_ID(_MALI_API_VERSION) /** diff --git a/mali/linux/license/gpl/mali_kernel_license.h b/mali/linux/license/gpl/mali_kernel_license.h index 52bb5e0..e9e5e55 100644 --- a/mali/linux/license/gpl/mali_kernel_license.h +++ b/mali/linux/license/gpl/mali_kernel_license.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/mali/linux/mali_dma_buf.c b/mali/linux/mali_dma_buf.c index f9ca0e7..01eef95 100644 --- a/mali/linux/mali_dma_buf.c +++ b/mali/linux/mali_dma_buf.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include /* file system operations */ diff --git a/mali/linux/mali_dma_buf.h b/mali/linux/mali_dma_buf.h index 0970b19..ee9a0ed 100644 --- a/mali/linux/mali_dma_buf.h +++ b/mali/linux/mali_dma_buf.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_DMA_BUF_H__ diff --git a/mali/linux/mali_kernel_linux.c b/mali/linux/mali_kernel_linux.c index 6aa441d..8362ed1 100644 --- a/mali/linux/mali_kernel_linux.c +++ b/mali/linux/mali_kernel_linux.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -80,6 +80,14 @@ module_param(mali_boot_profiling, int, S_IRUSR | S_IRGRP | S_IROTH); MODULE_PARM_DESC(mali_boot_profiling, "Start profiling as a part of Mali driver initialization"); #endif +extern int mali_max_pp_cores_group_1; +module_param(mali_max_pp_cores_group_1, int, S_IRUSR | S_IRGRP | S_IROTH); +MODULE_PARM_DESC(mali_max_pp_cores_group_1, "Limit the number of PP cores to use from first PP group."); + +extern int mali_max_pp_cores_group_2; +module_param(mali_max_pp_cores_group_2, int, S_IRUSR | S_IRGRP | S_IROTH); +MODULE_PARM_DESC(mali_max_pp_cores_group_2, "Limit the number of PP cores to use from second PP group (Mali-450 only)."); + /* Export symbols from common code: mali_user_settings.c */ #include "mali_user_settings_db.h" EXPORT_SYMBOL(mali_set_user_setting); diff --git a/mali/linux/mali_kernel_linux.h b/mali/linux/mali_kernel_linux.h index 468d408..8bc4c39 100644 --- a/mali/linux/mali_kernel_linux.h +++ b/mali/linux/mali_kernel_linux.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_LINUX_H__ diff --git a/mali/linux/mali_kernel_pm.c b/mali/linux/mali_kernel_pm.c deleted file mode 100644 index ba88315..0000000 --- a/mali/linux/mali_kernel_pm.c +++ /dev/null @@ -1,265 +0,0 @@ -/** - * 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. - * - * 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_kernel_pm.c - * Linux Power Management integration - */ - -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_PM_RUNTIME -#include -#endif -#include "mali_osk.h" -#include "mali_uk_types.h" -#include "mali_kernel_common.h" -#include "mali_kernel_license.h" -#include "mali_linux_pm.h" -#include "mali_pm.h" -#include "mali_platform.h" - -#if ! MALI_LICENSE_IS_GPL -#undef CONFIG_PM_RUNTIME -#endif - -static int mali_probe(struct platform_device *pdev); -static int mali_remove(struct platform_device *pdev); - -#ifdef CONFIG_PM_RUNTIME -static int mali_runtime_suspend(struct device *dev); -static int mali_runtime_resume(struct device *dev); -#endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -static int mali_os_suspend(struct platform_device *pdev, pm_message_t state); -static int mali_os_resume(struct platform_device *pdev); -#else -static int mali_os_suspend(struct device *dev); -static int mali_os_resume(struct device *dev); -#endif - - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) -static const struct dev_pm_ops mali_dev_pm_ops = -{ -#ifdef CONFIG_PM_RUNTIME - .runtime_suspend = mali_runtime_suspend, - .runtime_resume = mali_runtime_resume, - .runtime_idle = NULL, -#else - .suspend = mali_os_suspend, - .resume = mali_os_resume, -#endif - .freeze = mali_os_suspend, - .poweroff = mali_os_suspend, - .thaw = mali_os_resume, - .restore = mali_os_resume, -}; -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -struct pm_ext_ops mali_ext_pm_operations = -{ - .base = - { - .freeze = mali_os_suspend, - .thaw = mali_os_resume, - .poweroff = mali_os_suspend, - .restore = mali_os_resume, - }, -}; -#endif - - -static struct platform_driver mali_plat_driver = -{ - .probe = mali_probe, - .remove = mali_remove, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) - .suspend = mali_os_suspend, - .resume = mali_os_resume, - .pm = &mali_ext_pm_operations, -#endif - - .driver = - { - .name = "mali_dev", - .owner = THIS_MODULE, -#if MALI_LICENSE_IS_GPL - .bus = &platform_bus_type, -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .pm = &mali_dev_pm_ops, -#endif - }, -}; - -#ifdef CONFIG_PM_RUNTIME -static int mali_pwr_suspend_notifier(struct notifier_block *nb,unsigned long event,void* dummy); - -static struct notifier_block mali_pwr_notif_block = -{ - .notifier_call = mali_pwr_suspend_notifier -}; -#endif - -/** This function is called when platform device is unregistered. This function - * is necessary when the platform device is unregistered. - */ -static void _mali_release_pm(struct device *device) -{ -} -struct platform_device mali_gpu_device = -{ - .name = "mali_dev", - .id = 0, - .dev.release = _mali_release_pm -}; - -/** This function is called when the device is probed */ -static int mali_probe(struct platform_device *pdev) -{ - return 0; -} - -static int mali_remove(struct platform_device *pdev) -{ -#ifdef CONFIG_PM_RUNTIME - pm_runtime_disable(&pdev->dev); -#endif - return 0; -} - -#ifdef CONFIG_PM_RUNTIME -static int mali_pwr_suspend_notifier(struct notifier_block *nb,unsigned long event,void* dummy) -{ - switch (event) - { - case PM_SUSPEND_PREPARE: - MALI_DEBUG_PRINT(2, ("mali_pwr_suspend_notifier(PM_SUSPEND_PREPARE) called\n")); - mali_pm_os_suspend(); - break; - case PM_POST_SUSPEND: - MALI_DEBUG_PRINT(2, ("mali_pwr_suspend_notifier(PM_SUSPEND_PREPARE) called\n")); - mali_pm_os_resume(); - break; - default: - break; - } - return 0; -} -#endif - - -#ifdef CONFIG_PM_RUNTIME - -static int mali_runtime_suspend(struct device *dev) -{ - MALI_DEBUG_PRINT(3, ("mali_runtime_suspend() called\n")); - mali_pm_runtime_suspend(); - return 0; /* all ok */ -} - -static int mali_runtime_resume(struct device *dev) -{ - MALI_DEBUG_PRINT(3, ("mali_runtime_resume() called\n")); - mali_pm_runtime_resume(); - return 0; /* all ok */ -} - -#endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) - -static int mali_os_suspend(struct platform_device *pdev, pm_message_t state) -{ - MALI_DEBUG_PRINT(3, ("mali_os_suspend(old) called\n")); - mali_pm_os_suspend(); - return 0; /* all ok */ -} - -static int mali_os_resume(struct platform_device *pdev) -{ - MALI_DEBUG_PRINT(3, ("mali_os_resume(old) called\n")); - mali_pm_os_resume(); - return 0; /* all ok */ -} - -#else - -static int mali_os_suspend(struct device *dev) -{ - MALI_DEBUG_PRINT(3, ("mali_os_suspend(new) called\n")); - mali_pm_os_suspend(); - return 0; /* all ok */ -} - -static int mali_os_resume(struct device *dev) -{ - MALI_DEBUG_PRINT(3, ("mali_os_resume(new) called\n")); - mali_pm_os_resume(); - return 0; /* all ok */ -} - -#endif - -/** This function is called when Mali GPU device is initialized - */ -int _mali_dev_platform_register(void) -{ - int err; - -#ifdef CONFIG_PM_RUNTIME - set_mali_parent_power_domain((void *)&mali_gpu_device); -#endif - -#ifdef CONFIG_PM_RUNTIME - err = register_pm_notifier(&mali_pwr_notif_block); - if (err) - { - return err; - } -#endif - -#if MALI_LICENSE_IS_GPL - err = platform_device_register(&mali_gpu_device); - if (!err) - { - err = platform_driver_register(&mali_plat_driver); - if (err) - { -#ifdef CONFIG_PM_RUNTIME - unregister_pm_notifier(&mali_pwr_notif_block); -#endif - platform_device_unregister(&mali_gpu_device); - } - } -#endif - - return err; -} - -/** This function is called when Mali GPU device is unloaded - */ -void _mali_dev_platform_unregister(void) -{ -#ifdef CONFIG_PM_RUNTIME - unregister_pm_notifier(&mali_pwr_notif_block); -#endif - -#if MALI_LICENSE_IS_GPL - platform_driver_unregister(&mali_plat_driver); - platform_device_unregister(&mali_gpu_device); -#endif -} - diff --git a/mali/linux/mali_kernel_pm.h b/mali/linux/mali_kernel_pm.h deleted file mode 100644 index 6ef7270..0000000 --- a/mali/linux/mali_kernel_pm.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - * - * 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. - */ - -#ifndef __MALI_KERNEL_PM_H__ -#define __MALI_KERNEL_PM_H__ - -int _mali_dev_platform_register(void); -void _mali_dev_platform_unregister(void); - -#endif /* __MALI_KERNEL_PM_H__ */ diff --git a/mali/linux/mali_kernel_sysfs.c b/mali/linux/mali_kernel_sysfs.c index 110664a..b909d39 100644 --- a/mali/linux/mali_kernel_sysfs.c +++ b/mali/linux/mali_kernel_sysfs.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ diff --git a/mali/linux/mali_kernel_sysfs.h b/mali/linux/mali_kernel_sysfs.h index 2b243a6..f970f0f 100644 --- a/mali/linux/mali_kernel_sysfs.h +++ b/mali/linux/mali_kernel_sysfs.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_KERNEL_SYSFS_H__ diff --git a/mali/linux/mali_linux_pm.h b/mali/linux/mali_linux_pm.h deleted file mode 100644 index 10f633e..0000000 --- a/mali/linux/mali_linux_pm.h +++ /dev/null @@ -1,50 +0,0 @@ - -/* - * 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. - * - * 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. - */ - -#ifndef __MALI_LINUX_PM_H__ -#define __MALI_LINUX_PM_H__ - -#ifdef CONFIG_PM -/* Number of power states supported for making power up and down */ -typedef enum -{ - _MALI_DEVICE_SUSPEND, /* Suspend */ - _MALI_DEVICE_RESUME, /* Resume */ - _MALI_DEVICE_MAX_POWER_STATES, /* Maximum power states */ -} _mali_device_power_states; - -/* Number of DVFS events */ -typedef enum -{ - _MALI_DVFS_PAUSE_EVENT = _MALI_DEVICE_MAX_POWER_STATES, /* DVFS Pause event */ - _MALI_DVFS_RESUME_EVENT, /* DVFS Resume event */ - _MALI_MAX_DEBUG_OPERATIONS, -} _mali_device_dvfs_events; - -extern _mali_device_power_states mali_device_state; -extern _mali_device_power_states mali_dvfs_device_state; -extern _mali_osk_lock_t *lock; -extern short is_wake_up_needed; -extern int timeout_fired; -extern struct platform_device mali_gpu_device; - -/* dvfs pm thread */ -extern struct task_struct *dvfs_pm_thread; - -/* Power management thread */ -extern struct task_struct *pm_thread; - -int mali_device_suspend(u32 event_id, struct task_struct **pwr_mgmt_thread); -int mali_device_resume(u32 event_id, struct task_struct **pwr_mgmt_thread); -int mali_get_ospmm_thread_state(void); - -#endif /* CONFIG_PM */ -#endif /* __MALI_LINUX_PM_H___ */ diff --git a/mali/linux/mali_linux_pm_testsuite.h b/mali/linux/mali_linux_pm_testsuite.h index ccbf363..7d811bd 100644 --- a/mali/linux/mali_linux_pm_testsuite.h +++ b/mali/linux/mali_linux_pm_testsuite.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef __MALI_LINUX_PM_TESTSUITE_H__ #define __MALI_LINUX_PM_TESTSUITE_H__ diff --git a/mali/linux/mali_linux_trace.h b/mali/linux/mali_linux_trace.h index c503179..5329ba3 100644 --- a/mali/linux/mali_linux_trace.h +++ b/mali/linux/mali_linux_trace.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #if !defined (MALI_LINUX_TRACE_H) || defined (TRACE_HEADER_MULTI_READ) diff --git a/mali/linux/mali_osk_atomics.c b/mali/linux/mali_osk_atomics.c index 16be304..05831c5 100644 --- a/mali/linux/mali_osk_atomics.c +++ b/mali/linux/mali_osk_atomics.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ /** diff --git a/mali/linux/mali_osk_irq.c b/mali/linux/mali_osk_irq.c index 39d92e9..40a428e 100644 --- a/mali/linux/mali_osk_irq.c +++ b/mali/linux/mali_osk_irq.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_locks.c b/mali/linux/mali_osk_locks.c index fa124ff..d007d93 100644 --- a/mali/linux/mali_osk_locks.c +++ b/mali/linux/mali_osk_locks.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_low_level_mem.c b/mali/linux/mali_osk_low_level_mem.c index 5949403..1fa8eff 100644 --- a/mali/linux/mali_osk_low_level_mem.c +++ b/mali/linux/mali_osk_low_level_mem.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -262,7 +262,6 @@ static void _allocation_list_item_release(AllocationList * item) _mali_osk_free( item ); } - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) static int mali_kernel_memory_cpu_page_fault_handler(struct vm_area_struct *vma, struct vm_fault *vmf) #else @@ -334,7 +333,6 @@ static void mali_kernel_memory_vma_close(struct vm_area_struct * vma) * In the case of the memory engine, it is called as the release function that has been registered with the engine*/ } - void _mali_osk_mem_barrier( void ) { mb(); diff --git a/mali/linux/mali_osk_mali.c b/mali/linux/mali_osk_mali.c index eb096aa..1c00c49 100644 --- a/mali/linux/mali_osk_mali.c +++ b/mali/linux/mali_osk_mali.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_math.c b/mali/linux/mali_osk_math.c index e909da2..3e62e51 100644 --- a/mali/linux/mali_osk_math.c +++ b/mali/linux/mali_osk_math.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ /** diff --git a/mali/linux/mali_osk_memory.c b/mali/linux/mali_osk_memory.c index fde5e11..7bb470f 100644 --- a/mali/linux/mali_osk_memory.c +++ b/mali/linux/mali_osk_memory.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. */ /** diff --git a/mali/linux/mali_osk_misc.c b/mali/linux/mali_osk_misc.c index 66885bf..ad486db 100644 --- a/mali/linux/mali_osk_misc.c +++ b/mali/linux/mali_osk_misc.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_notification.c b/mali/linux/mali_osk_notification.c index e8428ba..c04b0a7 100644 --- a/mali/linux/mali_osk_notification.c +++ b/mali/linux/mali_osk_notification.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -107,7 +107,9 @@ void _mali_osk_notification_queue_term( _mali_osk_notification_queue_t *queue ) void _mali_osk_notification_queue_send( _mali_osk_notification_queue_t *queue, _mali_osk_notification_t *object ) { +#if defined(MALI_UPPER_HALF_SCHEDULING) unsigned long irq_flags; +#endif _mali_osk_notification_wrapper_t *notification; MALI_DEBUG_ASSERT_POINTER( queue ); @@ -115,9 +117,19 @@ void _mali_osk_notification_queue_send( _mali_osk_notification_queue_t *queue, _ notification = container_of( object, _mali_osk_notification_wrapper_t, data ); +#if defined(MALI_UPPER_HALF_SCHEDULING) spin_lock_irqsave(&queue->mutex, irq_flags); +#else + spin_lock(&queue->mutex); +#endif + list_add_tail(¬ification->list, &queue->head); + +#if defined(MALI_UPPER_HALF_SCHEDULING) spin_unlock_irqrestore(&queue->mutex, irq_flags); +#else + spin_unlock(&queue->mutex); +#endif /* and wake up one possible exclusive waiter */ wake_up(&queue->receive_queue); @@ -125,12 +137,18 @@ void _mali_osk_notification_queue_send( _mali_osk_notification_queue_t *queue, _ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue( _mali_osk_notification_queue_t *queue, _mali_osk_notification_t **result ) { +#if defined(MALI_UPPER_HALF_SCHEDULING) unsigned long irq_flags; +#endif _mali_osk_errcode_t ret = _MALI_OSK_ERR_ITEM_NOT_FOUND; _mali_osk_notification_wrapper_t *wrapper_object; +#if defined(MALI_UPPER_HALF_SCHEDULING) spin_lock_irqsave(&queue->mutex, irq_flags); +#else + spin_lock(&queue->mutex); +#endif if (!list_empty(&queue->head)) { @@ -140,7 +158,11 @@ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue( _mali_osk_notification ret = _MALI_OSK_ERR_OK; } +#if defined(MALI_UPPER_HALF_SCHEDULING) spin_unlock_irqrestore(&queue->mutex, irq_flags); +#else + spin_unlock(&queue->mutex); +#endif return ret; } diff --git a/mali/linux/mali_osk_pm.c b/mali/linux/mali_osk_pm.c index db87bce..72ec61c 100644 --- a/mali/linux/mali_osk_pm.c +++ b/mali/linux/mali_osk_pm.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_profiling.c b/mali/linux/mali_osk_profiling.c index 023f64b..f50c99b 100644 --- a/mali/linux/mali_osk_profiling.c +++ b/mali/linux/mali_osk_profiling.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #include @@ -143,14 +143,9 @@ int _mali_profiling_set_event(u32 counter_id, s32 event_id) { u32 core_id = (counter_id - COUNTER_FP0_C0) >> 1; struct mali_pp_core* pp_core = mali_pp_get_global_pp_core(core_id); + if (NULL != pp_core) { - /*todo: this is a hack!!! - * we account only for the counters set for the first PP core - * others are just silently ignored or, - * if the first core coutners are not set, we take the second etc. - * - need further discussion!!!*/ - if ((COUNTER_FP0_C0 == counter_id) || (COUNTER_FP0_C1 == counter_id)) { u32 counter_src = (counter_id - COUNTER_FP0_C0) & 1; @@ -165,7 +160,7 @@ int _mali_profiling_set_event(u32 counter_id, s32 event_id) { if (MALI_TRUE == mali_pp_job_set_pp_counter_src1(event_id)) { - MALI_DEBUG_PRINT(2, ("MALI PROFILING SET EVENT core 0 counter_id = %d\n",counter_id)); + MALI_DEBUG_PRINT(5, ("MALI PROFILING SET EVENT core 0 counter_id = %d\n",counter_id)); return 1; } } @@ -176,11 +171,13 @@ int _mali_profiling_set_event(u32 counter_id, s32 event_id) { u32 core_id = (counter_id - COUNTER_L2_C0) >> 1; struct mali_l2_cache_core* l2_cache_core = mali_l2_cache_core_get_glob_l2_core(core_id); + if (NULL != l2_cache_core) { u32 counter_src = (counter_id - COUNTER_L2_C0) & 1; if (0 == counter_src) { + MALI_DEBUG_PRINT(5, ("SET EVENT L2 0 COUNTER\n")); if (MALI_TRUE == mali_l2_cache_core_set_counter_src0(l2_cache_core, event_id)) { return 1; @@ -188,6 +185,7 @@ int _mali_profiling_set_event(u32 counter_id, s32 event_id) } else { + MALI_DEBUG_PRINT(5, ("SET EVENT L2 1 COUNTER\n")); if (MALI_TRUE == mali_l2_cache_core_set_counter_src1(l2_cache_core, event_id)) { return 1; diff --git a/mali/linux/mali_osk_specific.h b/mali/linux/mali_osk_specific.h index 74095bb..f3d3ecc 100644 --- a/mali/linux/mali_osk_specific.h +++ b/mali/linux/mali_osk_specific.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** @@ -27,16 +27,6 @@ #ifdef CONFIG_SYNC typedef struct sync_timeline mali_sync_tl; typedef struct sync_pt mali_sync_pt; - -MALI_STATIC_INLINE mali_sync_pt *_mali_osk_sync_pt_create(mali_sync_tl *parent) -{ - return (mali_sync_pt*)mali_sync_pt_alloc(parent); -} - -MALI_STATIC_INLINE void _mali_osk_sync_pt_signal(mali_sync_pt *pt) -{ - mali_sync_signal_pt(pt); -} #endif /* CONFIG_SYNC */ MALI_STATIC_INLINE u32 _mali_osk_copy_from_user(void *to, void *from, u32 n) diff --git a/mali/linux/mali_osk_time.c b/mali/linux/mali_osk_time.c index f7ddb65..da9b865 100644 --- a/mali/linux/mali_osk_time.c +++ b/mali/linux/mali_osk_time.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 2010 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. */ /** diff --git a/mali/linux/mali_osk_timers.c b/mali/linux/mali_osk_timers.c index dc6e453..0e28b32 100644 --- a/mali/linux/mali_osk_timers.c +++ b/mali/linux/mali_osk_timers.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_wait_queue.c b/mali/linux/mali_osk_wait_queue.c index dd3c8d7..ce0561d 100644 --- a/mali/linux/mali_osk_wait_queue.c +++ b/mali/linux/mali_osk_wait_queue.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ /** diff --git a/mali/linux/mali_osk_wq.c b/mali/linux/mali_osk_wq.c index 6515f05..6afacf9 100644 --- a/mali/linux/mali_osk_wq.c +++ b/mali/linux/mali_osk_wq.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_pmu_power_up_down.c b/mali/linux/mali_pmu_power_up_down.c index 2df34bb..f3b0a2c 100644 --- a/mali/linux/mali_pmu_power_up_down.c +++ b/mali/linux/mali_pmu_power_up_down.c @@ -1,11 +1,11 @@ /** - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/linux/mali_profiling_events.h b/mali/linux/mali_profiling_events.h index 0164e81..2639a40 100644 --- a/mali/linux/mali_profiling_events.h +++ b/mali/linux/mali_profiling_events.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_PROFILING_EVENTS_H__ diff --git a/mali/linux/mali_profiling_internal.c b/mali/linux/mali_profiling_internal.c index 0c73566..e40a800 100644 --- a/mali/linux/mali_profiling_internal.c +++ b/mali/linux/mali_profiling_internal.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include "mali_kernel_common.h" diff --git a/mali/linux/mali_profiling_internal.h b/mali/linux/mali_profiling_internal.h index b6c3410..092b9b0 100644 --- a/mali/linux/mali_profiling_internal.h +++ b/mali/linux/mali_profiling_internal.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_PROFILING_INTERNAL_H__ diff --git a/mali/linux/mali_sync.c b/mali/linux/mali_sync.c index 7f6cc4d..db9d686 100644 --- a/mali/linux/mali_sync.c +++ b/mali/linux/mali_sync.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ /** @@ -30,6 +30,7 @@ struct mali_sync_pt { struct sync_pt pt; u32 order; + s32 error; }; static inline struct mali_sync_timeline *to_mali_sync_timeline(struct sync_timeline *timeline) @@ -64,8 +65,14 @@ static int timeline_has_signaled(struct sync_pt *pt) { struct mali_sync_pt *mpt = to_mali_sync_pt(pt); struct mali_sync_timeline *mtl = to_mali_sync_timeline(pt->parent); + long diff; + + if (0 != mpt->error) + { + return mpt->error; + } - long diff = atomic_read(&mtl->signalled) - mpt->order; + diff = atomic_read(&mtl->signalled) - mpt->order; return diff >= 0; } @@ -153,17 +160,24 @@ struct sync_pt *mali_sync_pt_alloc(struct sync_timeline *parent) mpt = to_mali_sync_pt(pt); mpt->order = atomic_inc_return(&mtl->counter); + mpt->error = 0; return pt; } -void mali_sync_signal_pt(struct sync_pt *pt) +void mali_sync_signal_pt(struct sync_pt *pt, int error) { struct mali_sync_pt *mpt = to_mali_sync_pt(pt); struct mali_sync_timeline *mtl = to_mali_sync_timeline(pt->parent); int signalled; long diff; + if (0 != error) + { + MALI_DEBUG_ASSERT(0 > error); + mpt->error = error; + } + do { signalled = atomic_read(&mtl->signalled); diff --git a/mali/linux/mali_sync.h b/mali/linux/mali_sync.h index 0dfa13a..a22672c 100644 --- a/mali/linux/mali_sync.h +++ b/mali/linux/mali_sync.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ /** @@ -71,7 +71,7 @@ struct sync_pt *mali_sync_pt_alloc(struct sync_timeline *parent); * If they are signalled in the wrong order then a message will be printed in debug * builds and otherwise attempts to signal order sync_pts will be ignored. */ -void mali_sync_signal_pt(struct sync_pt *pt); +void mali_sync_signal_pt(struct sync_pt *pt, int error); #endif /* CONFIG_SYNC */ #endif /* _MALI_SYNC_H_ */ diff --git a/mali/linux/mali_sync_user.c b/mali/linux/mali_sync_user.c index 28d7d5c..d9bde4e 100644 --- a/mali/linux/mali_sync_user.c +++ b/mali/linux/mali_sync_user.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ /** diff --git a/mali/linux/mali_uk_types.h b/mali/linux/mali_uk_types.h index fac43ae..fbe902a 100644 --- a/mali/linux/mali_uk_types.h +++ b/mali/linux/mali_uk_types.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * Copyright (C) 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. + * + * 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. */ #ifndef __MALI_UK_TYPES_H__ diff --git a/mali/linux/mali_ukk_core.c b/mali/linux/mali_ukk_core.c index 5802957..e3d358b 100644 --- a/mali/linux/mali_ukk_core.c +++ b/mali/linux/mali_ukk_core.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* memort allocation functions */ @@ -95,6 +95,7 @@ int get_user_settings_wrapper(struct mali_session_data *session_data, _mali_uk_g err = _mali_ukk_get_user_settings(&kargs); if (_MALI_OSK_ERR_OK != err) { + printk("fuckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk..\n"); return map_errcode(err); } diff --git a/mali/linux/mali_ukk_gp.c b/mali/linux/mali_ukk_gp.c index 9890743..4ee4a81 100644 --- a/mali/linux/mali_ukk_gp.c +++ b/mali/linux/mali_ukk_gp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* user space access */ diff --git a/mali/linux/mali_ukk_mem.c b/mali/linux/mali_ukk_mem.c index f6ca748..0afe956 100644 --- a/mali/linux/mali_ukk_mem.c +++ b/mali/linux/mali_ukk_mem.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* user space access */ diff --git a/mali/linux/mali_ukk_pp.c b/mali/linux/mali_ukk_pp.c index a4db987..37f75c5 100644 --- a/mali/linux/mali_ukk_pp.c +++ b/mali/linux/mali_ukk_pp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* user space access */ diff --git a/mali/linux/mali_ukk_profiling.c b/mali/linux/mali_ukk_profiling.c index 755facc..f4e31c9 100644 --- a/mali/linux/mali_ukk_profiling.c +++ b/mali/linux/mali_ukk_profiling.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* user space access */ diff --git a/mali/linux/mali_ukk_vsync.c b/mali/linux/mali_ukk_vsync.c index b76007b..f9b5a3e 100644 --- a/mali/linux/mali_ukk_vsync.c +++ b/mali/linux/mali_ukk_vsync.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2011-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #include /* file system operations */ #include /* user space access */ diff --git a/mali/linux/mali_ukk_wrappers.h b/mali/linux/mali_ukk_wrappers.h index 66783ed..628998d 100644 --- a/mali/linux/mali_ukk_wrappers.h +++ b/mali/linux/mali_ukk_wrappers.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2008-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ /** diff --git a/mali/platform/default/mali_platform.c b/mali/platform/default/mali_platform.c deleted file mode 100644 index d966f25..0000000 --- a/mali/platform/default/mali_platform.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - * - * 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_platform.c - * Platform specific Mali driver functions for a default platform - */ -#include "mali_kernel_common.h" -#include "mali_osk.h" -#include "mali_platform.h" - - -_mali_osk_errcode_t mali_platform_init(void) -{ - MALI_SUCCESS; -} - -_mali_osk_errcode_t mali_platform_deinit(void) -{ - MALI_SUCCESS; -} - -_mali_osk_errcode_t mali_platform_power_mode_change(mali_power_mode power_mode) -{ - MALI_SUCCESS; -} - -void mali_gpu_utilization_handler(u32 utilization) -{ -} - -void set_mali_parent_power_domain(void* dev) -{ -} - - diff --git a/mali/platform/mali_platform.h b/mali/platform/mali_platform.h deleted file mode 100644 index 8c51a97..0000000 --- a/mali/platform/mali_platform.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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. - * - * 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_platform.h - * Platform specific Mali driver functions - */ - -#ifndef __MALI_PLATFORM_H__ -#define __MALI_PLATFORM_H__ - -#include "mali_osk.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** @brief description of power change reasons - */ -typedef enum mali_power_mode_tag -{ - MALI_POWER_MODE_ON, /**< Power Mali on */ - MALI_POWER_MODE_LIGHT_SLEEP, /**< Mali has been idle for a short time, or runtime PM suspend */ - MALI_POWER_MODE_DEEP_SLEEP, /**< Mali has been idle for a long time, or OS suspend */ -} mali_power_mode; - -/** @brief Platform specific setup and initialisation of MALI - * - * This is called from the entrypoint of the driver to initialize the platform - * - * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error. - */ -_mali_osk_errcode_t mali_platform_init(void); - -/** @brief Platform specific deinitialisation of MALI - * - * This is called on the exit of the driver to terminate the platform - * - * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error. - */ -_mali_osk_errcode_t mali_platform_deinit(void); - -/** @brief Platform specific powerdown sequence of MALI - * - * Notification from the Mali device driver stating the new desired power mode. - * MALI_POWER_MODE_ON must be obeyed, while the other modes are optional. - * @param power_mode defines the power modes - * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error. - */ -_mali_osk_errcode_t mali_platform_power_mode_change(mali_power_mode power_mode); - - -/** @brief Platform specific handling of GPU utilization data - * - * When GPU utilization data is enabled, this function will be - * periodically called. - * - * @param utilization The workload utilization of the Mali GPU. 0 = no utilization, 256 = full utilization. - */ -void mali_gpu_utilization_handler(u32 utilization); - -/** @brief Setting the power domain of MALI - * - * This function sets the power domain of MALI if Linux run time power management is enabled - * - * @param dev Reference to struct platform_device (defined in linux) used by MALI GPU - */ -void set_mali_parent_power_domain(void* dev); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/mali/platform/mali_platform_pmu_testing/mali_platform.c b/mali/platform/mali_platform_pmu_testing/mali_platform.c deleted file mode 100644 index cb95dc6..0000000 --- a/mali/platform/mali_platform_pmu_testing/mali_platform.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - * - * 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_platform.c - * Platform specific Mali driver functions for a default platform - */ -#include "mali_kernel_common.h" -#include "mali_osk.h" -#include "mali_platform.h" -#include "mali_pmu.h" -#include "linux/mali/mali_utgard.h" - -static u32 bPowerOff = 1; - -_mali_osk_errcode_t mali_platform_init(void) -{ - MALI_SUCCESS; -} - -_mali_osk_errcode_t mali_platform_deinit(void) -{ - MALI_SUCCESS; -} - -_mali_osk_errcode_t mali_platform_power_mode_change(mali_power_mode power_mode) -{ - switch (power_mode) - { - case MALI_POWER_MODE_ON: - if (bPowerOff == 1) - { - mali_pmu_powerup(); - bPowerOff = 0; - } - break; - case MALI_POWER_MODE_LIGHT_SLEEP: - case MALI_POWER_MODE_DEEP_SLEEP: - - if (bPowerOff == 0) - { - mali_pmu_powerdown(); - bPowerOff = 1; - } - - break; - } - MALI_SUCCESS; -} - -void mali_gpu_utilization_handler(u32 utilization) -{ -} - -void set_mali_parent_power_domain(void* dev) -{ -} - - diff --git a/mali/regs/mali_200_regs.h b/mali/regs/mali_200_regs.h index e42023a..dd75149 100644 --- a/mali/regs/mali_200_regs.h +++ b/mali/regs/mali_200_regs.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef _MALI200_REGS_H_ diff --git a/mali/regs/mali_gp_regs.h b/mali/regs/mali_gp_regs.h index f4f017a..c204901 100644 --- a/mali/regs/mali_gp_regs.h +++ b/mali/regs/mali_gp_regs.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2007-2010, 2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. + * + * 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. */ #ifndef _MALIGP2_CONROL_REGS_H_ diff --git a/mali/timestamp-arm11-cc/mali_timestamp.c b/mali/timestamp-arm11-cc/mali_timestamp.c index 562ae2b..a6b1d76 100644 --- a/mali/timestamp-arm11-cc/mali_timestamp.c +++ b/mali/timestamp-arm11-cc/mali_timestamp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. */ #include "mali_timestamp.h" diff --git a/mali/timestamp-arm11-cc/mali_timestamp.h b/mali/timestamp-arm11-cc/mali_timestamp.h index c47b61d..3279dae 100644 --- a/mali/timestamp-arm11-cc/mali_timestamp.h +++ b/mali/timestamp-arm11-cc/mali_timestamp.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. */ #ifndef __MALI_TIMESTAMP_H__ diff --git a/mali/timestamp-default/mali_timestamp.c b/mali/timestamp-default/mali_timestamp.c index 562ae2b..a6b1d76 100644 --- a/mali/timestamp-default/mali_timestamp.c +++ b/mali/timestamp-default/mali_timestamp.c @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. */ #include "mali_timestamp.h" diff --git a/mali/timestamp-default/mali_timestamp.h b/mali/timestamp-default/mali_timestamp.h index 598fd0e..94b842a 100644 --- a/mali/timestamp-default/mali_timestamp.h +++ b/mali/timestamp-default/mali_timestamp.h @@ -1,11 +1,11 @@ /* - * This confidential and proprietary software may be used only as - * authorised by a licensing agreement from ARM Limited - * (C) COPYRIGHT 2010-2012 ARM Limited - * ALL RIGHTS RESERVED - * The entire notice above must be reproduced on all authorised - * copies and copies may only be made to the extent permitted - * by a licensing agreement from ARM Limited. + * 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. */ #ifndef __MALI_TIMESTAMP_H__ diff --git a/ump/Kbuild b/ump/Kbuild index 9ca27e1..4c041fd 100644 --- a/ump/Kbuild +++ b/ump/Kbuild @@ -11,7 +11,6 @@ # Set default configuration to use, if Makefile didn't provide one. # Change this to use a different config.h CONFIG ?= aml-meson-m400-1 -TARGET_PLATFORM ?= aml-meson ifneq ($(KBUILD_SRC),) ifneq ($(wildcard $(KBUILD_SRC)/$(src)),) @@ -52,18 +51,6 @@ else ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/linux/license/gpl endif - -$(obj)/__mali_osk_atomics.c : $(src)/$(UDD_FILE_PREFIX)linux/mali_osk_atomics.c - @cp -f $< $@ -$(obj)/__mali_osk_locks.c : $(src)/$(UDD_FILE_PREFIX)linux/mali_osk_locks.c - @cp -f $< $@ -$(obj)/__mali_osk_memory.c : $(src)/$(UDD_FILE_PREFIX)linux/mali_osk_memory.c - @cp -f $< $@ -$(obj)/__mali_osk_math.c : $(src)/$(UDD_FILE_PREFIX)linux/mali_osk_math.c - @cp -f $< $@ -$(obj)/__mali_osk_misc.c : $(src)/$(UDD_FILE_PREFIX)linux/mali_osk_misc.c - @cp -f $< $@ - ump-y = common/ump_kernel_common.o \ common/ump_kernel_descriptor_mapping.o \ common/ump_kernel_api.o \ @@ -77,23 +64,11 @@ ump-y = common/ump_kernel_common.o \ linux/ump_osk_atomics.o \ linux/ump_osk_low_level_mem.o \ linux/ump_osk_misc.o \ - __mali_osk_locks.o \ - __mali_osk_memory.o \ - __mali_osk_atomics.o \ - __mali_osk_math.o \ - __mali_osk_misc.o - - - - -# $(UDD_FILE_PREFIX)linux/mali_osk_atomics.o \ -# $(UDD_FILE_PREFIX)linux/mali_osk_locks.o \ -# $(UDD_FILE_PREFIX)linux/mali_osk_memory.o \ -# $(UDD_FILE_PREFIX)linux/mali_osk_math.o \ -# $(UDD_FILE_PREFIX)linux/mali_osk_misc.o - - -clean-files := __mali_osk*.c + $(UDD_FILE_PREFIX)linux/mali_osk_atomics.o \ + $(UDD_FILE_PREFIX)linux/mali_osk_locks.o \ + $(UDD_FILE_PREFIX)linux/mali_osk_memory.o \ + $(UDD_FILE_PREFIX)linux/mali_osk_math.o \ + $(UDD_FILE_PREFIX)linux/mali_osk_misc.o obj-$(CONFIG_UMP) := ump.o diff --git a/ump/Makefile.common b/ump/Makefile.common index 9681e12..c6aa633 100644 --- a/ump/Makefile.common +++ b/ump/Makefile.common @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2012 ARM Limited. All rights reserved. +# 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. diff --git a/ump/arch-pb-virtex5/config.h b/ump/arch-pb-virtex5/config.h deleted file mode 100644 index 532fc94..0000000 --- a/ump/arch-pb-virtex5/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - * - * 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. - */ - -#ifndef __ARCH_CONFIG_H__ -#define __ARCH_CONFIG_H__ - -#define ARCH_UMP_BACKEND_DEFAULT 0 -#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0xCE000000 -#define ARCH_UMP_MEMORY_SIZE_DEFAULT 32UL * 1024UL * 1024UL - -#endif /* __ARCH_CONFIG_H__ */ diff --git a/ump/include/ump/ump_kernel_interface.h b/ump/include/ump/ump_kernel_interface.h index 042c8b1..ba81a07 100644 --- a/ump/include/ump/ump_kernel_interface.h +++ b/ump/include/ump/ump_kernel_interface.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/include/ump/ump_kernel_interface_ref_drv.h b/ump/include/ump/ump_kernel_interface_ref_drv.h index c993746..eb57fd8 100644 --- a/ump/include/ump/ump_kernel_interface_ref_drv.h +++ b/ump/include/ump/ump_kernel_interface_ref_drv.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/include/ump/ump_kernel_platform.h b/ump/include/ump/ump_kernel_platform.h index 4349605..1b5af40 100644 --- a/ump/include/ump/ump_kernel_platform.h +++ b/ump/include/ump/ump_kernel_platform.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/license/gpl/ump_kernel_license.h b/ump/linux/license/gpl/ump_kernel_license.h index 187e33b..17b930d 100644 --- a/ump/linux/license/gpl/ump_kernel_license.h +++ b/ump/linux/license/gpl/ump_kernel_license.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_kernel_memory_backend_dedicated.c b/ump/linux/ump_kernel_memory_backend_dedicated.c index 463e609..cdcf19b 100644 --- a/ump/linux/ump_kernel_memory_backend_dedicated.c +++ b/ump/linux/ump_kernel_memory_backend_dedicated.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 ARM Limited. All rights reserved. + * 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. diff --git a/ump/linux/ump_kernel_memory_backend_dedicated.h b/ump/linux/ump_kernel_memory_backend_dedicated.h index ca8faae..fa4bdcc 100644 --- a/ump/linux/ump_kernel_memory_backend_dedicated.h +++ b/ump/linux/ump_kernel_memory_backend_dedicated.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_kernel_memory_backend_os.c b/ump/linux/ump_kernel_memory_backend_os.c index fc3afa8..cb557cf 100644 --- a/ump/linux/ump_kernel_memory_backend_os.c +++ b/ump/linux/ump_kernel_memory_backend_os.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 ARM Limited. All rights reserved. + * 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. diff --git a/ump/linux/ump_kernel_memory_backend_os.h b/ump/linux/ump_kernel_memory_backend_os.h index 6f7e610..f924705 100644 --- a/ump/linux/ump_kernel_memory_backend_os.h +++ b/ump/linux/ump_kernel_memory_backend_os.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_memory_backend.c b/ump/linux/ump_memory_backend.c index 23357f4..37a0fcc 100644 --- a/ump/linux/ump_memory_backend.c +++ b/ump/linux/ump_memory_backend.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_osk_atomics.c b/ump/linux/ump_osk_atomics.c index b117d99..ef1902e 100644 --- a/ump/linux/ump_osk_atomics.c +++ b/ump/linux/ump_osk_atomics.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_osk_misc.c b/ump/linux/ump_osk_misc.c index 3be6fed..12066eb 100644 --- a/ump/linux/ump_osk_misc.c +++ b/ump/linux/ump_osk_misc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_ukk_ref_wrappers.c b/ump/linux/ump_ukk_ref_wrappers.c index 6a2791e..e701f1b 100644 --- a/ump/linux/ump_ukk_ref_wrappers.c +++ b/ump/linux/ump_ukk_ref_wrappers.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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/ump/linux/ump_ukk_ref_wrappers.h b/ump/linux/ump_ukk_ref_wrappers.h index a3e3cb0..9ebc355 100644 --- a/ump/linux/ump_ukk_ref_wrappers.h +++ b/ump/linux/ump_ukk_ref_wrappers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 ARM Limited. All rights reserved. + * Copyright (C) 2010 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. -- 2.20.1