rk29: vivante: fix computation of resource size for 1G memory

This commit is contained in:
黄涛
2011-06-27 13:14:38 +08:00
parent 69b558b528
commit 8a39b8c8ad

View File

@@ -1057,8 +1057,7 @@ static int __devinit gpu_probe(struct platform_device *pdev)
goto gpu_probe_fail;
}
registerMemBase = res->start;
// dkm: <20><><EFBFBD><EFBFBD>+1
registerMemSize = res->end - res->start;
registerMemSize = res->end - res->start + ((res->end & 1) ? 1 : 0);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gpu_mem");
if (!res) {
@@ -1066,8 +1065,7 @@ static int __devinit gpu_probe(struct platform_device *pdev)
goto gpu_probe_fail;
}
contiguousBase = res->start;
// dkm: <20><><EFBFBD><EFBFBD>+1
contiguousSize = res->end - res->start;
contiguousSize = res->end - res->start + ((res->end & 1) ? 1 : 0);
res = platform_get_resource_byname(pdev, IORESOURCE_IO, "gpu_clk");
if (!res) {