summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authoryuan.tian <yuan.tian@nxp.com>2022-10-11 16:31:14 +0800
committeryuan.tian <yuan.tian@nxp.com>2022-10-11 17:47:19 +0800
commit8b2032c06e083a529d65d1cd7aac1e138e7e2876 (patch)
tree97649f92b390731e6f11ba02d02df4dd2e873d42 /drivers/mxc
parent687cecb511c5a5997007e7f230712471f963a2c7 (diff)
MGS-6813 [#imx-2968] Improve GPU subsystem driver for upstream compatibility
Upstream kernel support i.MX8MQ GPU with the unified device entry, Need improve GPU subsystem driver to support upstream gpu device. This can avoid maintenance for the duplicated GPU device entry. Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
index 71ea72205034..eabcccac1a9f 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
@@ -934,6 +934,7 @@ static const struct component_ops mxc_gpu_sub_ops =
static const struct of_device_id mxc_gpu_sub_match[] =
{
{ .compatible = "fsl,imx8-gpu"},
+ { .compatible = "vivante,gc"},
{ /* sentinel */ }
};
@@ -1070,13 +1071,19 @@ static inline int get_power_imx8_subsystem(struct device *pdev)
clk_axi = clk_get(&pdev_gpu->dev, "axi");
- if (IS_ERR(clk_axi))
- clk_axi = NULL;
+ if (IS_ERR(clk_axi)) {
+ clk_axi = clk_get(&pdev_gpu->dev, "bus");
+ if (IS_ERR(clk_axi))
+ clk_axi = NULL;
+ }
clk_ahb = clk_get(&pdev_gpu->dev, "ahb");
- if (IS_ERR(clk_ahb))
- clk_ahb = NULL;
+ if (IS_ERR(clk_ahb)) {
+ clk_ahb = clk_get(&pdev_gpu->dev, "reg");
+ if (IS_ERR(clk_ahb))
+ clk_ahb = NULL;
+ }
clk_shader = clk_get(&pdev_gpu->dev, "shader");
@@ -2008,11 +2015,6 @@ int gckPLATFORM_Init(struct platform_driver *pdrv,
#ifdef IMX_GPU_SUBSYSTEM
if (of_find_compatible_node(NULL, NULL, "fsl,imx8-gpu-ss")) {
use_imx_gpu_subsystem = 1;
-
- if (!of_find_compatible_node(NULL, NULL, "fsl,imx8-gpu")) {
- printk(KERN_ERR "Incorrect device-tree, please update dtb.");
- return -EINVAL;
- }
}
#endif