فهرست منبع

change gpu,heap add to 256M

kvvipa 4 سال پیش
والد
کامیت
a12033fa92
3فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 1 1
      linux/arch/arm/boot/dts/ark1668e.dtsi
  2. 3 0
      linux/arch/arm/boot/dts/ark1668e_c281.dts
  3. 7 0
      linux/drivers/gpu/arm/mali/platform/arm/arm.c

+ 1 - 1
linux/arch/arm/boot/dts/ark1668e.dtsi

@@ -961,7 +961,7 @@
 			status = "disabled";
 			status = "disabled";
 		};
 		};
 
 
-		gpu@e9000000 {
+		gpu:gpu@e9000000 {
 			compatible = "arm,mali-400", "arm,mali-utgard";
 			compatible = "arm,mali-400", "arm,mali-utgard";
 			reg = <0xe9000000 0x30000
 			reg = <0xe9000000 0x30000
 #ifdef DDR512
 #ifdef DDR512

+ 3 - 0
linux/arch/arm/boot/dts/ark1668e_c281.dts

@@ -232,6 +232,9 @@
 		//touchscreen-inverted-x;
 		//touchscreen-inverted-x;
 	};
 	};
 };
 };
+&gpu{
+shared-mem-size =<0x10000000>;
+};
 
 
 &can0{
 &can0{
 	status = "disabled";
 	status = "disabled";

+ 7 - 0
linux/drivers/gpu/arm/mali/platform/arm/arm.c

@@ -25,6 +25,7 @@
 #include "mali_kernel_common.h"
 #include "mali_kernel_common.h"
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
 #include <linux/moduleparam.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 
 
 #include "arm_core_scaling.h"
 #include "arm_core_scaling.h"
 #include "mali_pp_scheduler.h"
 #include "mali_pp_scheduler.h"
@@ -191,6 +192,7 @@ int mali_platform_device_init(struct platform_device *device)
 	u32 m400_gp_version;
 	u32 m400_gp_version;
 #endif
 #endif
 	struct resource *map = NULL;
 	struct resource *map = NULL;
+	u32 shared_mem_size = 0;
 
 
 	/* Detect present Mali GPU and connect the correct resources to the device */
 	/* Detect present Mali GPU and connect the correct resources to the device */
 #if defined(CONFIG_ARCH_VEXPRESS)
 #if defined(CONFIG_ARCH_VEXPRESS)
@@ -268,6 +270,11 @@ int mali_platform_device_init(struct platform_device *device)
 		mali_gpu_data.fb_start = map->start;
 		mali_gpu_data.fb_start = map->start;
 		mali_gpu_data.fb_size = resource_size(map);	
 		mali_gpu_data.fb_size = resource_size(map);	
 	}
 	}
+
+	if(!of_property_read_u32(device->dev.of_node, "shared-mem-size", &shared_mem_size)) {
+	    mali_gpu_data.shared_mem_size = shared_mem_size;
+	}
+
 	err = platform_device_add_data(device, &mali_gpu_data, sizeof(mali_gpu_data));
 	err = platform_device_add_data(device, &mali_gpu_data, sizeof(mali_gpu_data));
 
 
 	if (0 == err) {
 	if (0 == err) {