[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1464772752-9808-1-git-send-email-ykk@rock-chips.com>
Date: Wed, 1 Jun 2016 17:19:12 +0800
From: Yakir Yang <ykk@...k-chips.com>
To: Mark Yao <yzq@...k-chips.com>, Heiko Stuebner <heiko@...ech.de>,
tfiga@...omium.org
Cc: David Airlie <airlied@...ux.ie>, daniel.vetter@...ll.ch,
Thierry Reding <treding@...dia.com>, dianders@...omium.org,
Yakir Yang <ykk@...k-chips.com>, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-rockchip@...ts.infradead.org
Subject: [PATCH] drm/rockchip: vop: do axi reset in vop initial time
There is a bug in RK3399 VOP, when bootloader/kernel only enable
VOP Big or VOP Little to display, then VOP IOMMU would failed to
reset at the initial time and VOP register couldn't write rightly.
After do the pure reset of VOP module, then things back to right.
Signed-off-by: Yakir Yang <ykk@...k-chips.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 1c4d5b5..4150323 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1292,7 +1292,7 @@ static int vop_initial(struct vop *vop)
{
const struct vop_data *vop_data = vop->data;
const struct vop_reg_data *init_table = vop_data->init_table;
- struct reset_control *ahb_rst;
+ struct reset_control *ahb_rst, *axi_rst;
int i, ret;
vop->hclk = devm_clk_get(vop->dev, "hclk_vop");
@@ -1331,6 +1331,19 @@ static int vop_initial(struct vop *vop)
}
/*
+ * do aclk_reset, reset all vop registers.
+ */
+ axi_rst = devm_reset_control_get(vop->dev, "axi");
+ if (IS_ERR(axi_rst)) {
+ dev_err(vop->dev, "failed to get axi reset\n");
+ ret = PTR_ERR(axi_rst);
+ goto err_disable_aclk;
+ }
+ reset_control_assert(axi_rst);
+ usleep_range(10, 20);
+ reset_control_deassert(axi_rst);
+
+ /*
* do hclk_reset, reset all vop registers.
*/
ahb_rst = devm_reset_control_get(vop->dev, "ahb");
--
1.9.1
Powered by blists - more mailing lists