From 20f486a7eabbc1fc7ca4367d1e95bf91a1e2dbc1 Mon Sep 17 00:00:00 2001 From: ningyu Date: Mon, 17 Jun 2024 17:42:34 +0800 Subject: [PATCH 133/219] refactor:add vo qos config Changelogs: Add VO Qos configuration, set to 9, in order to resolve hdmi display tear Signed-off-by: ningyu --- drivers/gpu/drm/eswin/es_dc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/eswin/es_dc.c b/drivers/gpu/drm/eswin/es_dc.c index 2eddebbd2ddb..ac43c604a2dc 100644 --- a/drivers/gpu/drm/eswin/es_dc.c +++ b/drivers/gpu/drm/eswin/es_dc.c @@ -977,6 +977,23 @@ const struct component_ops dc_component_ops = { .unbind = dc_unbind, }; +static void vo_qos_cfg(void) +{ + void __iomem *qos; + + #define VO_QOS_CSR 0x50281050UL + qos = ioremap(VO_QOS_CSR, 8); + if (!qos) { + printk("qos ioremap fail---------------\n"); + return; + } + writel(0x9, qos); + writel(0x9, (char *)qos + 4); + + iounmap(qos); + return; +} + static const struct of_device_id dc_driver_dt_match[] = { { .compatible = "eswin,dc", @@ -1093,7 +1110,7 @@ static int dc_probe(struct platform_device *pdev) } dev_set_drvdata(dev, dc); - + vo_qos_cfg(); return component_add(dev, &dc_component_ops); } -- 2.47.0