MLK-17083 soc: imx: limit VPU/CPU bandwidth for lcdif on i.MX8MQ
Config NOC to limit bandwidth to 4GB for both VPU and CPU to avoid lcdif flickering only when lcdif is enabled. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Bai Ping <ping.bai@nxp.com> (cherry picked from commit 8ab89ebeb94a423792bf588bdf2354c5960d8f13)pull/10/head
parent
2b3f5aa4e8
commit
5fcf6c83c3
|
@ -257,6 +257,33 @@ static ssize_t imx8_get_soc_uid(struct device *dev,
|
|||
static struct device_attribute imx8_uid =
|
||||
__ATTR(soc_uid, S_IRUGO, imx8_get_soc_uid, NULL);
|
||||
|
||||
static void __init imx8mq_noc_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
const char *status;
|
||||
int statlen;
|
||||
struct arm_smccc_res res;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-lcdif");
|
||||
if (!np)
|
||||
return;
|
||||
|
||||
status = of_get_property(np, "status", &statlen);
|
||||
if (status == NULL)
|
||||
return;
|
||||
|
||||
if (statlen > 0) {
|
||||
if (!strcmp(status, "disabled"))
|
||||
return;
|
||||
}
|
||||
|
||||
pr_info("Config NOC for VPU and CPU\n");
|
||||
arm_smccc_smc(FSL_SIP_NOC, FSL_SIP_NOC_LCDIF, 0,
|
||||
0, 0, 0, 0, 0, &res);
|
||||
if (res.a0)
|
||||
pr_err("Config NOC for VPU and CPU fail!\n");
|
||||
}
|
||||
|
||||
static int __init imx8_soc_init(void)
|
||||
{
|
||||
struct soc_device_attribute *soc_dev_attr;
|
||||
|
@ -287,6 +314,9 @@ static int __init imx8_soc_init(void)
|
|||
|
||||
device_create_file(soc_device_to_device(soc_dev), &imx8_uid);
|
||||
|
||||
if (of_machine_is_compatible("fsl,imx8mq"))
|
||||
imx8mq_noc_init();
|
||||
|
||||
return 0;
|
||||
|
||||
free_rev:
|
||||
|
|
|
@ -57,4 +57,7 @@
|
|||
|
||||
#define FSL_SIP_GET_SOC_INFO 0xc2000006
|
||||
|
||||
#define FSL_SIP_NOC 0xc2000008
|
||||
#define FSL_SIP_NOC_LCDIF 0x0
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue