PD#77556: Add 4 / 2 pp core switch.
authorKasin Lee <kasin.li@amlogic.com>
Mon, 5 Aug 2013 02:40:19 +0000 (10:40 +0800)
committerKasin Lee <kasin.li@amlogic.com>
Mon, 5 Aug 2013 02:40:19 +0000 (10:40 +0800)
mali/Kconfig
mali/platform/meson_platform/meson_main.c

index 67a51a6386653b80e474b70b5a98a985cd7063d5..5f879cdb2bf3f1fd21c508b5f7e3376b633ab93c 100644 (file)
@@ -51,6 +51,23 @@ config MALI400_UMP
        bool "Enable UMP support"
        depends on MALI400
        ---help---
-         This enables support for the UMP memory sharing API in the Mali driver.         
+         This enables support for the UMP memory sharing API in the Mali driver.
+         
+config MALI400_OS_MEMORY_SIZE
+       depends on MALI400
+       int "OS Memory Size(MB)"
+       range 64 2048
+       default 384
+       ---help---
+         The size of mali OS memory with unit of mega byte.
+         
+if ARCH_MESON6TV
+config MALI400_4_PP
+       bool "Mali 400 for M6TV With 4 pp core."
+       depends on MALI400
+       ---help---
+         M6TV Lite only have 4 mali pp cores.
+endif
+         
 endmenu
 
index 3db3f8acf49fa1a113325d7643d62589192738c6..62a191afba01c72f8fd70c652533be9758300f71 100755 (executable)
@@ -62,6 +62,7 @@ static int mali_runtime_idle(struct device *device);
 #define INT_MALI_PP3_MMU (61+32)
 #define INT_MALI_PP4_MMU (63+32)
 
+#ifndef CONFIG_MALI400_4_PP
 static struct resource meson_mali_resources[] =
 {
        MALI_GPU_RESOURCES_MALI400_MP2(0xd0060000, 
@@ -69,6 +70,18 @@ static struct resource meson_mali_resources[] =
                        INT_MALI_PP, INT_MALI_PP_MMU, 
                        INT_MALI_PP2, INT_MALI_PP2_MMU)
 };
+#else
+static struct resource meson_mali_resources[] =
+{
+       MALI_GPU_RESOURCES_MALI400_MP4(0xd0060000, 
+                       INT_MALI_GP, INT_MALI_GP_MMU, 
+                       INT_MALI_PP, INT_MALI_PP_MMU, 
+                       INT_MALI_PP2, INT_MALI_PP2_MMU,
+                       INT_MALI_PP3, INT_MALI_PP3_MMU,
+                       INT_MALI_PP4, INT_MALI_PP4_MMU
+                       )
+};
+#endif
 
 #elif MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6
 
@@ -139,7 +152,7 @@ static struct platform_device mali_gpu_device =
 
 static struct mali_gpu_device_data mali_gpu_data =
 {
-       .shared_mem_size =384 * 1024 * 1024, /* 256MB */
+       .shared_mem_size =CONFIG_MALI400_OS_MEMORY_SIZE * 1024 * 1024, /* 256MB */
        .fb_start = 0x84000000,
        .fb_size = 0x06000000,
 };