Skip to content
Snippets Groups Projects
Commit f749e880 authored by yuan.tian's avatar yuan.tian Committed by Gianfranco Mariotti
Browse files

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: default avatarXianzhong <xianzhong.li@nxp.com>
parent b73d19e5
No related branches found
No related tags found
1 merge request!156Draft: [i.MX] mxc: gpu-viv: apply patches
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment