[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452053038-32098-2-git-send-email-zyw@rock-chips.com>
Date: Wed, 6 Jan 2016 12:03:53 +0800
From: Chris Zhong <zyw@...k-chips.com>
To: heiko@...ech.de, linux-rockchip@...ts.infradead.org,
mark.yao@...k-chips.com, treding@...dia.com
Cc: Chris Zhong <zyw@...k-chips.com>, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v7 1/5] drm/rockchip: return a true clock rate to adjusted_mode
Since the mipi dsi driver need to use the clock of vop to make the
calculation of Blanking. But sometimes the clock driver can not set a
accurate clock_rate for vop, get it by clk_round_rate before mode_set,
so we can get the true value.
Signed-off-by: Chris Zhong <zyw@...k-chips.com>
Acked-by: Mark Yao <mark.yao@...k-chips.com>
---
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4:
- use clk_round_rate to check the clock rate in vop_crtc_mode_fixup
Changes in v3: None
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index f5b3da2..056cac3 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -878,9 +878,14 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
+ struct vop *vop = to_vop(crtc);
+
if (adjusted_mode->htotal == 0 || adjusted_mode->vtotal == 0)
return false;
+ adjusted_mode->clock =
+ clk_round_rate(vop->dclk, mode->clock * 1000) / 1000;
+
return true;
}
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists