From 6dd2f7f7977f6e9ed48e2ec3aa913234e14d7209 Mon Sep 17 00:00:00 2001 From: Xianzhong Date: Wed, 21 Dec 2016 16:10:58 +0800 Subject: [PATCH] MGS-2486 [#imx-311] set physBase and physSize with device node phys_baseaddr in device node can be used to set physBase and physSize, still keep the old configuration when phys_baseaddr is not valid. Date: Dec 21, 2016 Signed-off-by: Xianzhong (cherry picked from commit 7b3cfa451f64409264c84c61561901279c503244) --- .../platform/freescale/gc_hal_kernel_platform_imx6.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c index bf4fa1057ede..a1e360b43ec5 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c @@ -427,7 +427,10 @@ gckPLATFORM_AdjustParam( res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phys_baseaddr"); if (res) + { Args->baseAddress = res->start; + Args->physSize = res->end - res->start + 1; + } res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "irq_3d"); if (res) @@ -511,12 +514,12 @@ gckPLATFORM_AdjustParam( Args->gpu3DMinClock = initgpu3DMinClock; + if(Args->physSize == 0) + { #if IMX8_PHYS_BASE - Args->baseAddress = IMX8_PHYS_BASE; + Args->baseAddress = IMX8_PHYS_BASE; #endif - if(Args->physSize == 0) - { #if IMX8_PHYS_SIZE Args->physSize = IMX8_PHYS_SIZE; #else -- 2.17.1