};
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ /* global autoconfigured region for contiguous allocations */
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x14000000>;
+ linux,cma-default;
+ };
+ };
+
soc {
busfreq {
compatible = "fsl,imx_busfreq";
gpu@00130000 {
compatible = "fsl,imx6q-gpu";
reg = <0x00130000 0x4000>, <0x00134000 0x4000>,
- <0x02204000 0x4000>, <0x0 0x0>;
+ <0x02204000 0x4000>, <0x0 0x0>,
+ <0x0 0x8000000>;
reg-names = "iobase_3d", "iobase_2d",
- "iobase_vg", "phys_baseaddr";
+ "iobase_vg", "phys_baseaddr",
+ "contiguous_mem";
interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>,
<0 10 IRQ_TYPE_LEVEL_HIGH>,
<0 11 IRQ_TYPE_LEVEL_HIGH>;
module_param(registerMemSizeDEC300, ulong, 0644);
#endif
-#ifndef gcdDEFAULT_CONTIGUOUS_SIZE
-#define gcdDEFAULT_CONTIGUOUS_SIZE (4 << 20)
-#endif
-static ulong contiguousSize = gcdDEFAULT_CONTIGUOUS_SIZE;
+static ulong contiguousSize = 0;
module_param(contiguousSize, ulong, 0644);
static ulong contiguousBase = 0;
#define UNREG_THERMAL_NOTIFIER(a) unregister_thermal_notifier(a);
#endif
+#ifndef gcdDEFAULT_CONTIGUOUS_SIZE
+#define gcdDEFAULT_CONTIGUOUS_SIZE (4 << 20)
+#endif
+
static int initgpu3DMinClock = 1;
module_param(initgpu3DMinClock, int, 0644);
Args->registerMemSizeVG = res->end - res->start + 1;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "contiguous_mem");
+ if (res)
+ {
+ if( Args->contiguousBase == 0 )
+ Args->contiguousBase = res->start;
+ if( Args->contiguousSize == 0 )
+ Args->contiguousSize = res->end - res->start + 1;
+ }
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
Args->contiguousBase = 0;
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
prop = of_get_property(dn, "contiguousbase", NULL);
}
#endif
if (Args->contiguousSize == 0)
+ {
gckOS_Print("Warning: No contiguous memory is reserverd for gpu.!\n ");
+ gckOS_Print("Warning: Will use default value(%d) for the reserved memory!\n ",gcdDEFAULT_CONTIGUOUS_SIZE);
+ Args->contiguousSize = gcdDEFAULT_CONTIGUOUS_SIZE;
+ }
Args->gpu3DMinClock = initgpu3DMinClock;