From: mark.yao@rock-chips.com (Mark yao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 03/13] drm/rockchip: return a true clock rate to adjusted_mode
Date: Fri, 20 Nov 2015 16:57:04 +0800 [thread overview]
Message-ID: <564EE060.5040404@rock-chips.com> (raw)
In-Reply-To: <1448007339-10966-4-git-send-email-zyw@rock-chips.com>
On 2015?11?20? 16:15, Chris Zhong wrote:
> 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@rock-chips.com>
>
> ---
>
> Changes in v4:
> use clk_round_rate to check the clock rate in vop_crtc_mode_fixup
>
> Changes in v3: None
> Changes in v2: 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 5d8ae5e..eff545b 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1136,9 +1136,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;
> }
>
Looks good for me, so
Acked-by: Mark Yao <mark.yao@rock-chips.com>
--
?ark Yao
next prev parent reply other threads:[~2015-11-20 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 8:15 [PATCH v4 0/13] Add mipi dsi support for rk3288 Chris Zhong
2015-11-20 8:15 ` [PATCH v4 02/13] clk: rockchip: add mipidsi clocks on rk3288 Chris Zhong
2015-11-20 8:15 ` [PATCH v4 03/13] drm/rockchip: return a true clock rate to adjusted_mode Chris Zhong
2015-11-20 8:57 ` Mark yao [this message]
2015-11-20 8:15 ` [PATCH v4 07/13] drm: rockchip: Support Synopsys DesignWare MIPI DSI host controller Chris Zhong
2015-11-20 8:15 ` [PATCH v4 08/13] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong
2015-11-20 8:15 ` [PATCH v4 09/13] ARM: dts: rockchip: add rk3288 mipi_dsi nodes Chris Zhong
2015-11-20 8:15 ` [PATCH v4 13/13] ARM: dts: rockchip: add support mipi panel tv080wum-nl0 for rk3288-evb Chris Zhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564EE060.5040404@rock-chips.com \
--to=mark.yao@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).