Permalink
Browse files

make a new mali_cm and use new mali driver from cm kernel. also rever…

…t mali_r3p0_lsi and related files back to original state.
  • Loading branch information...
1 parent cd9c5dd commit 3857d9a883cbe7f6cace901b6f43c79fb99a0ae8 @gokhanmoral committed Mar 30, 2013
Showing with 29,219 additions and 759 deletions.
  1. +1 −1 drivers/media/video/samsung/Kconfig
  2. +1 −1 drivers/media/video/samsung/Makefile
  3. +295 −0 drivers/media/video/samsung/mali_cm/Kbuild_module
  4. +12 −0 drivers/media/video/samsung/mali_cm/Kconfig
  5. +30 −0 drivers/media/video/samsung/mali_cm/Kconfig_module
  6. +337 −0 drivers/media/video/samsung/mali_cm/Makefile
  7. +97 −0 drivers/media/video/samsung/mali_cm/Makefile_module
  8. +1 −0 drivers/media/video/samsung/mali_cm/arch
  9. +1 −0 drivers/media/video/samsung/mali_cm/arch-debug
  10. +154 −0 drivers/media/video/samsung/mali_cm/arch-orion-m400/config.h
  11. +85 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m300/config.h
  12. +92 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-1-direct/config.h
  13. +85 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-1-pmu/config.h
  14. +77 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-1/config.h
  15. +91 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-2/config.h
  16. +105 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-3/config.h
  17. +119 −0 drivers/media/video/samsung/mali_cm/arch-pb-virtex5-m400-4/config.h
  18. +154 −0 drivers/media/video/samsung/mali_cm/arch-pegasus-m400/config.h
  19. +1 −0 drivers/media/video/samsung/mali_cm/arch-release
  20. +174 −0 drivers/media/video/samsung/mali_cm/arch-ve-virtex6-m450-8/config.h
  21. +391 −0 drivers/media/video/samsung/mali_cm/common/mali_block_allocator.c
  22. +18 −0 drivers/media/video/samsung/mali_cm/common/mali_block_allocator.h
  23. +218 −0 drivers/media/video/samsung/mali_cm/common/mali_cluster.c
  24. +44 −0 drivers/media/video/samsung/mali_cm/common/mali_cluster.h
  25. +46 −0 drivers/media/video/samsung/mali_cm/common/mali_device_pause_resume.c
  26. +31 −0 drivers/media/video/samsung/mali_cm/common/mali_device_pause_resume.h
  27. +285 −0 drivers/media/video/samsung/mali_cm/common/mali_dlbu.c
  28. +45 −0 drivers/media/video/samsung/mali_cm/common/mali_dlbu.h
  29. +746 −0 drivers/media/video/samsung/mali_cm/common/mali_gp.c
  30. +46 −0 drivers/media/video/samsung/mali_cm/common/mali_gp.h
  31. +49 −0 drivers/media/video/samsung/mali_cm/common/mali_gp_job.c
  32. +131 −0 drivers/media/video/samsung/mali_cm/common/mali_gp_job.h
  33. +443 −0 drivers/media/video/samsung/mali_cm/common/mali_gp_scheduler.c
  34. +30 −0 drivers/media/video/samsung/mali_cm/common/mali_gp_scheduler.h
  35. +841 −0 drivers/media/video/samsung/mali_cm/common/mali_group.c
  36. +146 −0 drivers/media/video/samsung/mali_cm/common/mali_group.h
  37. +46 −0 drivers/media/video/samsung/mali_cm/common/mali_hw_core.c
  38. +71 −0 drivers/media/video/samsung/mali_cm/common/mali_hw_core.h
  39. +183 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_common.h
  40. +980 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_core.c
  41. +39 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_core.h
  42. +184 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_descriptor_mapping.c
  43. +101 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_descriptor_mapping.h
  44. +350 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_mem_os.c
  45. +37 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_mem_os.h
  46. +376 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_memory_engine.c
  47. +152 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_memory_engine.h
  48. +218 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_utilization.c
  49. +44 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_utilization.h
  50. +51 −0 drivers/media/video/samsung/mali_cm/common/mali_kernel_vsync.c
  51. +414 −0 drivers/media/video/samsung/mali_cm/common/mali_l2_cache.c
  52. +43 −0 drivers/media/video/samsung/mali_cm/common/mali_l2_cache.h
  53. +71 −0 drivers/media/video/samsung/mali_cm/common/mali_mem_validation.c
  54. +19 −0 drivers/media/video/samsung/mali_cm/common/mali_mem_validation.h
  55. +1,319 −0 drivers/media/video/samsung/mali_cm/common/mali_memory.c
  56. +82 −0 drivers/media/video/samsung/mali_cm/common/mali_memory.h
  57. +619 −0 drivers/media/video/samsung/mali_cm/common/mali_mmu.c
  58. +55 −0 drivers/media/video/samsung/mali_cm/common/mali_mmu.h
  59. +475 −0 drivers/media/video/samsung/mali_cm/common/mali_mmu_page_directory.c
  60. +100 −0 drivers/media/video/samsung/mali_cm/common/mali_mmu_page_directory.h
  61. +1,979 −0 drivers/media/video/samsung/mali_cm/common/mali_osk.h
  62. +166 −0 drivers/media/video/samsung/mali_cm/common/mali_osk_bitops.h
  63. +184 −0 drivers/media/video/samsung/mali_cm/common/mali_osk_list.h
  64. +222 −0 drivers/media/video/samsung/mali_cm/common/mali_osk_mali.h
  65. +147 −0 drivers/media/video/samsung/mali_cm/common/mali_osk_profiling.h
  66. +552 −0 drivers/media/video/samsung/mali_cm/common/mali_pm.c
  67. +56 −0 drivers/media/video/samsung/mali_cm/common/mali_pm.h
  68. +199 −0 drivers/media/video/samsung/mali_cm/common/mali_pmu.c
  69. +70 −0 drivers/media/video/samsung/mali_cm/common/mali_pmu.h
  70. +710 −0 drivers/media/video/samsung/mali_cm/common/mali_pp.c
  71. +47 −0 drivers/media/video/samsung/mali_cm/common/mali_pp.h
  72. +95 −0 drivers/media/video/samsung/mali_cm/common/mali_pp_job.c
  73. +273 −0 drivers/media/video/samsung/mali_cm/common/mali_pp_job.h
  74. +594 −0 drivers/media/video/samsung/mali_cm/common/mali_pp_scheduler.c
  75. +38 −0 drivers/media/video/samsung/mali_cm/common/mali_pp_scheduler.h
  76. +37 −0 drivers/media/video/samsung/mali_cm/common/mali_scheduler.c
  77. +21 −0 drivers/media/video/samsung/mali_cm/common/mali_scheduler.h
  78. +47 −0 drivers/media/video/samsung/mali_cm/common/mali_session.c
  79. +65 −0 drivers/media/video/samsung/mali_cm/common/mali_session.h
  80. +612 −0 drivers/media/video/samsung/mali_cm/common/mali_ukk.h
  81. +88 −0 drivers/media/video/samsung/mali_cm/common/mali_user_settings_db.c
  82. +40 −0 drivers/media/video/samsung/mali_cm/common/mali_user_settings_db.h
  83. +28 −0 drivers/media/video/samsung/mali_cm/include/linux/mali/mali_utgard.h
  84. +264 −0 drivers/media/video/samsung/mali_cm/include/linux/mali/mali_utgard_counters.h
  85. +86 −0 drivers/media/video/samsung/mali_cm/include/linux/mali/mali_utgard_ioctl.h
  86. +127 −0 drivers/media/video/samsung/mali_cm/include/linux/mali/mali_utgard_profiling_events.h
  87. +1,095 −0 drivers/media/video/samsung/mali_cm/include/linux/mali/mali_utgard_uk_types.h
  88. +31 −0 drivers/media/video/samsung/mali_cm/linux/license/gpl/mali_kernel_license.h
  89. +392 −0 drivers/media/video/samsung/mali_cm/linux/mali_dma_buf.c
  90. +29 −0 drivers/media/video/samsung/mali_cm/linux/mali_dma_buf.h
  91. +670 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_linux.c
  92. +43 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_linux.h
  93. +268 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_pm.c
  94. +17 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_pm.h
  95. +1,280 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_sysfs.c
  96. +35 −0 drivers/media/video/samsung/mali_cm/linux/mali_kernel_sysfs.h
  97. +50 −0 drivers/media/video/samsung/mali_cm/linux/mali_linux_pm.h
  98. +32 −0 drivers/media/video/samsung/mali_cm/linux/mali_linux_pm_testsuite.h
  99. +126 −0 drivers/media/video/samsung/mali_cm/linux/mali_linux_trace.h
  100. +55 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_atomics.c
  101. +266 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_irq.c
  102. +340 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_locks.c
  103. +660 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_low_level_mem.c
  104. +34 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_mali.c
  105. +22 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_math.c
  106. +61 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_memory.c
  107. +64 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_misc.c
  108. +189 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_notification.c
  109. +83 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_pm.c
  110. +261 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_profiling_gator.c
  111. +324 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_profiling_internal.c
  112. +130 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_specific.h
  113. +51 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_time.c
  114. +65 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_timers.c
  115. +73 −0 drivers/media/video/samsung/mali_cm/linux/mali_osk_wait_queue.c
  116. +65 −0 drivers/media/video/samsung/mali_cm/linux/mali_pmu_power_up_down.c
  117. +17 −0 drivers/media/video/samsung/mali_cm/linux/mali_profiling_events.h
  118. +18 −0 drivers/media/video/samsung/mali_cm/linux/mali_uk_types.h
  119. +104 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_core.c
  120. +113 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_gp.c
  121. +259 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_mem.c
  122. +88 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_pp.c
  123. +183 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_profiling.c
  124. +41 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_vsync.c
  125. +68 −0 drivers/media/video/samsung/mali_cm/linux/mali_ukk_wrappers.h
  126. +43 −0 drivers/media/video/samsung/mali_cm/platform/default/mali_platform.c
  127. +153 −0 drivers/media/video/samsung/mali_cm/platform/mali_platform.h
  128. +66 −0 drivers/media/video/samsung/mali_cm/platform/mali_platform_pmu_testing/mali_platform.c
  129. +656 −0 drivers/media/video/samsung/mali_cm/platform/orion-m400/mali_platform.c
  130. +1 −0 drivers/media/video/samsung/mali_cm/platform/orion-m400/mali_platform_dvfs.c
  131. +809 −0 drivers/media/video/samsung/mali_cm/platform/pegasus-m400/mali_platform.c
  132. +799 −0 drivers/media/video/samsung/mali_cm/platform/pegasus-m400/mali_platform_dvfs.c
  133. +172 −0 drivers/media/video/samsung/mali_cm/regs/mali_200_regs.h
  134. +214 −0 drivers/media/video/samsung/mali_cm/regs/mali_gp_regs.h
  135. +13 −0 drivers/media/video/samsung/mali_cm/timestamp-arm11-cc/mali_timestamp.c
  136. +48 −0 drivers/media/video/samsung/mali_cm/timestamp-arm11-cc/mali_timestamp.h
  137. +13 −0 drivers/media/video/samsung/mali_cm/timestamp-default/mali_timestamp.c
  138. +26 −0 drivers/media/video/samsung/mali_cm/timestamp-default/mali_timestamp.h
  139. +53 −2 drivers/media/video/samsung/mali_r3p0_lsi/Kconfig
  140. +1 −1 drivers/media/video/samsung/mali_r3p0_lsi/Makefile
  141. +1 −1 drivers/media/video/samsung/mali_r3p0_lsi/common/mali_kernel_core.c
  142. +3 −3 drivers/media/video/samsung/mali_r3p0_lsi/common/mali_kernel_utilization.c
  143. +1 −1 drivers/media/video/samsung/mali_r3p0_lsi/common/mali_l2_cache.c
  144. +0 −181 drivers/media/video/samsung/mali_r3p0_lsi/common/mali_osk.h
  145. +2 −38 drivers/media/video/samsung/mali_r3p0_lsi/linux/mali_kernel_linux.c
  146. +11 −13 drivers/media/video/samsung/mali_r3p0_lsi/platform/mali_platform.h
  147. +101 −281 drivers/media/video/samsung/mali_r3p0_lsi/platform/orion-m400/mali_platform.c
  148. +1 −1 drivers/media/video/samsung/mali_r3p0_lsi/platform/orion-m400/mali_platform_dvfs.c
  149. +8 −17 drivers/media/video/samsung/mali_r3p0_lsi/platform/pegasus-m400/mali_platform.c
  150. +91 −51 drivers/media/video/samsung/mali_r3p0_lsi/platform/pegasus-m400/mali_platform_dvfs.c
  151. +0 −2 drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c
  152. +4 −2 drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c
  153. +13 −3 drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c
  154. +8 −8 drivers/media/video/samsung/ump_r3p0_lsi/Makefile
  155. +3 −3 drivers/media/video/samsung/ump_r3p0_lsi/Makefile_module
  156. +0 −34 drivers/media/video/samsung/ump_r3p0_lsi/common/ump_kernel_api.c
  157. +0 −1 drivers/media/video/samsung/ump_r3p0_lsi/common/ump_osk.h
  158. +4 −11 drivers/media/video/samsung/ump_r3p0_lsi/linux/ump_kernel_linux.c
  159. +0 −102 drivers/media/video/samsung/ump_r3p0_lsi/linux/ump_osk_low_level_mem.c
  160. +1 −1 kernel/sysctl.c
@@ -18,10 +18,10 @@ if CPU_EXYNOS4210 || CPU_EXYNOS4212 || CPU_EXYNOS4412
source "drivers/media/video/samsung/tvout/Kconfig"
source "drivers/media/video/samsung/mfc5x/Kconfig"
source "drivers/media/video/samsung/ump_r3p0_lsi/Kconfig"
- source "drivers/media/video/samsung/mali_r3p0_lsi/Kconfig"
endif
if (CPU_EXYNOS4210 || CPU_EXYNOS4212 || CPU_EXYNOS4412) && !SLP
source "drivers/media/video/samsung/mali/Kconfig"
+ source "drivers/media/video/samsung/mali_cm/Kconfig"
endif
if SLP
source "drivers/media/video/samsung/mali_r3p0/Kconfig"
@@ -36,7 +36,7 @@ else ifeq ($(CONFIG_MACH_SMDKV310), y)
obj-$(CONFIG_VIDEO_MALI400MP) += mali/
else
obj-$(CONFIG_VIDEO_MALI400MP) += mali/
-obj-$(CONFIG_MALI_R3P0_LSI) += mali_r3p0_lsi/
+obj-$(CONFIG_VIDEO_MALI400MP) += mali_cm/
endif
obj-$(CONFIG_VIDEO_MALI400MP_R2P3) += mali_r2p3/
@@ -0,0 +1,295 @@
+#
+# 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.
+
+OSKOS=linux
+
+# set up defaults if not defined by the user
+USING_UMP ?= 0
+USING_OS_MEMORY ?= 0
+USING_MALI_PMM_TESTSUITE ?= 0
+OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB ?= 16
+USING_PROFILING ?= 1
+USING_INTERNAL_PROFILING ?= 0
+DISABLE_PP0 ?= 0
+DISABLE_PP1 ?= 0
+DISABLE_PP2 ?= 0
+DISABLE_PP3 ?= 0
+PROFILING_SKIP_PP_JOBS ?= 0
+PROFILING_SKIP_PP_AND_GP_JOBS ?= 0
+PROFILING_PRINT_L2_HITRATE_ON_GP_FINISH ?= 0
+TIMESTAMP ?= default
+BUILD ?= debug
+TARGET_PLATFORM ?= default
+KERNEL_RUNTIME_PM_ENABLED ?= 0
+CONFIG ?= pb-virtex5-m200
+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
+
+DEFINES := $(EXTRA_DEFINES)
+
+# Get path to driver source from Linux build system
+DRIVER_DIR=$(src)
+
+# For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases:
+# The ARM proprietary product will only include the license/proprietary directory
+# The GPL product will only include the license/gpl directory
+
+ifeq ($(wildcard $(DRIVER_DIR)/linux/license/gpl/*),)
+ccflags-y += -I$(DRIVER_DIR)/linux/license/proprietary
+# Disable profiling for proprietary
+override USING_PROFILING := 0
+$(warning "USING_PROFILING not supported, disabling.")
+else
+ccflags-y += -I$(DRIVER_DIR)/linux/license/gpl
+endif
+
+
+ifeq ($(USING_PROFILING),1)
+ifeq ($(USING_INTERNAL_PROFILING),0)
+ifndef CONFIG_TRACEPOINTS
+# Should default to gator profiling, but we dont have the kernel feature required, so disable profiling
+override USING_PROFILING = 0
+$(warning "CONFIG_TRACEPOINTS required for USING_PROFILING")
+endif
+endif
+endif
+
+ifeq ($(USING_PROFILING),0)
+# make sure user hasnt selected incompatible flags
+override USING_INTERNAL_PROFILING = 0
+endif
+
+MALI_RELEASE_NAME=$(shell cat $(DRIVER_DIR)/.version 2> /dev/null)
+
+# Check if a Mali Core sub module should be enabled, true or false returned
+submodule_enabled = $(shell gcc $(DEFINES) -E $1/arch/config.h | grep type | grep -c $(2))
+
+OSKFILES = \
+ $(OSKOS)/mali_osk_atomics.c \
+ $(OSKOS)/mali_osk_irq.c \
+ $(OSKOS)/mali_osk_locks.c \
+ $(OSKOS)/mali_osk_wait_queue.c \
+ $(OSKOS)/mali_osk_low_level_mem.c \
+ $(OSKOS)/mali_osk_math.c \
+ $(OSKOS)/mali_osk_memory.c \
+ $(OSKOS)/mali_osk_misc.c \
+ $(OSKOS)/mali_osk_mali.c \
+ $(OSKOS)/mali_osk_notification.c \
+ $(OSKOS)/mali_osk_time.c \
+ $(OSKOS)/mali_osk_timers.c
+
+UKKFILES = \
+ $(OSKOS)/mali_ukk_mem.c \
+ $(OSKOS)/mali_ukk_gp.c \
+ $(OSKOS)/mali_ukk_pp.c \
+ $(OSKOS)/mali_ukk_core.c
+
+ifeq ($(USING_PROFILING),1)
+UKKFILES += \
+ $(OSKOS)/mali_ukk_profiling.c
+endif
+
+ifeq ($(MALI_PLATFORM_FILE),)
+MALI_PLATFORM_FILE = platform/default/mali_platform.c
+endif
+
+# Get subversion revision number, fall back to only ${MALI_RELEASE_NAME} if no svn info is available
+SVN_REV := $(shell (cd $(DRIVER_DIR); (svnversion | grep -E "^[0-9]+" && svnversion) || git svn info | grep '^Revision: '| sed -e 's/^Revision: //' ) 2>/dev/null )
+ifeq ($(SVN_REV),)
+SVN_REV := $(MALI_RELEASE_NAME)
+else
+SVN_REV := $(MALI_RELEASE_NAME)-r$(SVN_REV)
+endif
+
+# Validate selected config
+ifneq ($(shell [ -d $(DRIVER_DIR)/arch-$(CONFIG) ] && [ -f $(DRIVER_DIR)/arch-$(CONFIG)/config.h ] && echo "OK"), OK)
+$(warning Current directory is $(shell pwd))
+$(error No configuration found for config $(CONFIG). Check that arch-$(CONFIG)/config.h exists)
+else
+# Link arch to the selected arch-config directory
+$(shell [ -L $(DRIVER_DIR)/arch ] && rm $(DRIVER_DIR)/arch)
+$(shell ln -sf arch-$(CONFIG) $(DRIVER_DIR)/arch)
+$(shell touch $(DRIVER_DIR)/arch/config.h)
+endif
+
+# Set up our defines, which will be passed to gcc
+DEFINES += -DUSING_OS_MEMORY=$(USING_OS_MEMORY)
+DEFINES += -DUSING_MMU=1
+DEFINES += -DUSING_UMP=$(USING_UMP)
+DEFINES += -D_MALI_OSK_SPECIFIC_INDIRECT_MMAP
+DEFINES += -DMALI_INTERNAL_TIMELINE_PROFILING_ENABLED=$(USING_INTERNAL_PROFILING)
+DEFINES += -DDISABLE_PP0=$(DISABLE_PP0)
+DEFINES += -DDISABLE_PP1=$(DISABLE_PP1)
+DEFINES += -DDISABLE_PP2=$(DISABLE_PP2)
+DEFINES += -DDISABLE_PP3=$(DISABLE_PP3)
+DEFINES += -DPROFILING_SKIP_PP_JOBS=$(PROFILING_SKIP_PP_JOBS)
+DEFINES += -DPROFILING_SKIP_PP_AND_GP_JOBS=$(PROFILING_SKIP_PP_AND_GP_JOBS)
+DEFINES += -DPROFILING_PRINT_L2_HITRATE_ON_GP_FINISH=$(PROFILING_PRINT_L2_HITRATE_ON_GP_FINISH)
+
+DEFINES += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP)
+DEFINES += -DMALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED=$(MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED)
+DEFINES += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS)
+DEFINES += -DMALI_TIMELINE_PROFILING_ENABLED=$(USING_PROFILING)
+DEFINES += -DMALI_POWER_MGMT_TEST_SUITE=$(USING_MALI_PMM_TESTSUITE)
+ifeq ($(shell test $(SUBLEVEL) -gt 32 -a $(PATCHLEVEL) = 6 -a $(VERSION) = 2 -o $(VERSION) -gt 2 && echo "OK"),OK)
+# MALI_STATE_TRACKING is only supported on Linux kernels from version 2.6.32.
+DEFINES += -DMALI_STATE_TRACKING=1
+else
+DEFINES += -DMALI_STATE_TRACKING=0
+endif
+DEFINES += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB)
+
+MALI_PLATFORM_FILE = platform/$(TARGET_PLATFORM)/mali_platform.c
+
+
+ifdef CONFIG_PM
+ifdef CONFIG_PM_RUNTIME
+ KERNEL_RUNTIME_PM_ENABLED = 1
+endif
+endif
+
+DEFINES += -DMALI_PMM_RUNTIME_JOB_CONTROL_ON=$(KERNEL_RUNTIME_PM_ENABLED)
+
+ifeq ($(BUILD), debug)
+DEFINES += -DDEBUG
+endif
+DEFINES += -DSVN_REV=$(SVN_REV)
+DEFINES += -DSVN_REV_STRING=\"$(SVN_REV)\"
+
+# Linux has its own mmap cleanup handlers (see mali_kernel_memory.c)
+DEFINES += -DMALI_UKK_HAS_IMPLICIT_MMAP_CLEANUP
+
+ifeq ($(USING_UMP),1)
+ DEFINES += -DMALI_USE_UNIFIED_MEMORY_PROVIDER=1
+ ccflags-y += -I$(DRIVER_DIR)/../../ump/include/ump
+else
+ DEFINES += -DMALI_USE_UNIFIED_MEMORY_PROVIDER=0
+endif
+
+# Use our defines when compiling
+ccflags-y += $(DEFINES) -I$(DRIVER_DIR) -I$(DRIVER_DIR)/include -I$(DRIVER_DIR)/common -I$(DRIVER_DIR)/linux -I$(DRIVER_DIR)/platform
+
+# Source files which always are included in a build
+SRC = \
+ common/mali_kernel_core.c \
+ linux/mali_kernel_linux.c \
+ common/mali_kernel_descriptor_mapping.c \
+ common/mali_session.c \
+ common/mali_device_pause_resume.c \
+ common/mali_kernel_vsync.c \
+ linux/mali_ukk_vsync.c \
+ linux/mali_kernel_sysfs.c \
+ common/mali_mmu.c \
+ common/mali_mmu_page_directory.c \
+ common/mali_memory.c \
+ common/mali_kernel_memory_engine.c \
+ common/mali_block_allocator.c \
+ common/mali_kernel_mem_os.c \
+ common/mali_mem_validation.c \
+ common/mali_hw_core.c \
+ common/mali_gp.c \
+ common/mali_pp.c \
+ common/mali_pp_job.c \
+ common/mali_gp_job.c \
+ common/mali_scheduler.c \
+ common/mali_gp_scheduler.c \
+ common/mali_pp_scheduler.c \
+ common/mali_cluster.c \
+ common/mali_group.c \
+ common/mali_dlbu.c \
+ common/mali_pm.c \
+ common/mali_pmu.c \
+ common/mali_user_settings_db.c \
+ $(OSKOS)/mali_osk_pm.c \
+ linux/mali_kernel_pm.c \
+ linux/mali_pmu_power_up_down.c \
+ $(MALI_PLATFORM_FILE) \
+ $(OSKFILES) \
+ $(UKKFILES) \
+ __malidrv_build_info.c
+
+# Selecting files to compile by parsing the config file
+
+ifeq ($(USING_INTERNAL_PROFILING),1)
+PROFILING_BACKEND_SOURCES = \
+ linux/mali_osk_profiling_internal.c \
+ timestamp-$(TIMESTAMP)/mali_timestamp.c
+ccflags-y += -I$(DRIVER_DIR)/timestamp-$(TIMESTAMP)
+else
+ifeq ($(USING_PROFILING),1)
+PROFILING_BACKEND_SOURCES = \
+ linux/mali_osk_profiling_gator.c
+endif
+endif
+
+# Add the profiling sources
+SRC += $(PROFILING_BACKEND_SOURCES)
+
+ifeq ($(USING_MALI_PMM_TESTSUITE),1)
+ccflags-y += -I$(DRIVER_DIR)/platform/mali_pmu_testing
+endif
+
+mali-$(CONFIG_MALI400_GPU_UTILIZATION) += common/mali_kernel_utilization.o
+mali-$(CONFIG_DMA_SHARED_BUFFER) += linux/mali_dma_buf.o
+
+ifneq ($(call submodule_enabled, $(DRIVER_DIR), MALI400PP),0)
+ # Mali-400 PP in use
+ ccflags-y += -DUSING_MALI400
+endif
+
+ifneq ($(call submodule_enabled, $(DRIVER_DIR), MALI300PP),0)
+ # Mali-400 PP in use
+ ccflags-y += -DUSING_MALI400
+endif
+
+ifneq ($(call submodule_enabled, $(DRIVER_DIR), MALI200),0)
+ # Mali200 in use
+ ccflags-y += -DUSING_MALI200
+endif
+
+# Always build in support for Mali L2 cache
+SRC += common/mali_l2_cache.c
+
+# Tell the Linux build system to enable building of our .c files
+mali-y += $(SRC:.c=.o)
+# Tell the Linux build system from which .o file to create the kernel module
+obj-$(CONFIG_MALI400) := mali.o
+
+
+VERSION_STRINGS :=
+VERSION_STRINGS += CONFIG=$(CONFIG)
+VERSION_STRINGS += USING_OS_MEMORY=$(USING_OS_MEMORY)
+VERSION_STRINGS += API_VERSION=$(shell cd $(DRIVER_DIR); grep "\#define _MALI_API_VERSION" $(FILES_PREFIX)include/linux/mali/mali_utgard_uk_types.h | cut -d' ' -f 3 )
+VERSION_STRINGS += REPO_URL=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'URL: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^URL: ' | cut -d: -f2- | cut -b2-)
+VERSION_STRINGS += REVISION=$(SVN_REV)
+VERSION_STRINGS += CHANGED_REVISION=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'Last Changed Rev: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^Last Changed Rev: ' | cut -d: -f2- | cut -b2-)
+VERSION_STRINGS += CHANGE_DATE=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'Last Changed Date: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^Last Changed Date: ' | cut -d: -f2- | cut -b2-)
+VERSION_STRINGS += BUILD_DATE=$(shell date)
+
+VERSION_STRINGS += BUILD=$(shell echo $(BUILD) | tr a-z A-Z)
+VERSION_STRINGS += CPU=$(CPU)
+VERSION_STRINGS += USING_UMP=$(USING_UMP)
+VERSION_STRINGS += USING_MALI200=$(call submodule_enabled, $(DRIVER_DIR), MALI200)
+VERSION_STRINGS += USING_MALI400=$(call submodule_enabled, $(DRIVER_DIR), MALI400)
+VERSION_STRINGS += USING_MALI400_L2_CACHE=$(call submodule_enabled, $(DRIVER_DIR), MALI400L2)
+VERSION_STRINGS += USING_GP2=$(call submodule_enabled, $(DRIVER_DIR), MALIGP2)
+VERSION_STRINGS += KDIR=$(KDIR)
+VERSION_STRINGS += MALI_PLATFORM_FILE=$(MALI_PLATFORM_FILE)
+VERSION_STRINGS += OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB)
+VERSION_STRINGS += USING_PROFILING=$(USING_PROFILING)
+VERSION_STRINGS += USING_INTERNAL_PROFILING=$(USING_INTERNAL_PROFILING)
+VERSION_STRINGS += USING_GPU_UTILIZATION=$(CONFIG_MALI400_GPU_UTILIZATION)
+
+# Create file with Mali driver configuration
+$(DRIVER_DIR)/__malidrv_build_info.c:
+ @echo 'const char *__malidrv_build_info(void) { return "malidrv: $(VERSION_STRINGS)";}' > $(DRIVER_DIR)/__malidrv_build_info.c
@@ -0,0 +1,12 @@
+#
+## S3C Multimedia Mali configuration
+##
+#
+# For Mali
+config MALI_CM
+ bool "Enable MALI_CM integration"
+ depends on VIDEO_SAMSUNG
+ default y
+ ---help---
+ This enables MALI integration in the multimedia device driver
+
@@ -0,0 +1,30 @@
+config MALI400
+ tristate "Mali-300/400/450 support"
+ depends on ARM
+ select FB
+ ---help---
+ This enables support for the Mali-300, Mali-400, and Mali-450 GPUs.
+
+ To compile this driver as a module, choose M here: the module will be
+ called mali.
+
+config MALI400_DEBUG
+ bool "Enable debug in Mali driver"
+ depends on MALI400
+ ---help---
+ This enabled extra debug checks and messages in the Mali-300/400/450
+ driver.
+
+config MALI400_PROFILING
+ bool "Enable Mali profiling"
+ depends on MALI400 && TRACEPOINTS
+ ---help---
+ This enables gator profiling of Mali GPU events.
+
+config MALI400_GPU_UTILIZATION
+ bool "Enable Mali GPU utilization tracking"
+ depends on MALI400
+ ---help---
+ This enables gathering and processing of the utilization of Mali GPU.
+ This data can be used as a basis to change GPU operating frequency.
+
Oops, something went wrong.

0 comments on commit 3857d9a

Please sign in to comment.