[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGS+omC_vWBdoWvzy96A5kFOKEeqaKRcPzNhNc20--+MoAPHyA@mail.gmail.com>
Date: Thu, 5 Feb 2015 23:54:49 +0800
From: Daniel Kurtz <djkurtz@...omium.org>
To: Yakir Yang <ykk@...k-chips.com>
Cc: David Airlie <airlied@...ux.ie>,
Russell King <rmk+kernel@....linux.org.uk>,
Philipp Zabel <p.zabel@...gutronix.de>,
Fabio Estevam <fabio.estevam@...escale.com>,
Shawn Guo <shawn.guo@...aro.org>,
Rob Clark <robdclark@...il.com>,
Mark Yao <mark.yao@...k-chips.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>, Sean Cross <xobs@...agi.com>,
Jyri Sarha <jsarha@...com>, Ben Zhang <benzh@...omium.org>,
alsa-devel@...a-project.org, Heiko Stuebner <heiko@...ech.de>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
"open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>,
Heiko Stübner <mmind00@...glemail.com>,
Douglas Anderson <dianders@...omium.org>,
Stéphane Marchesin <marcheu@...omium.org>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH v3 05/15] drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n()
and hdmi_regenerate_cts()
On Tue, Feb 3, 2015 at 11:12 PM, Yakir Yang <ykk@...k-chips.com> wrote:
> Signed-off-by: Yakir Yang <ykk@...k-chips.com>
Reviewed-by: Daniel Kurtz <djkurtz@...omium.org>
> ---
> Changes in v3:
> - Combine hdmi_set_clock_regenerator_n() and hdmi_regenerate_cts()
>
> Changes in v2: None
>
> drivers/gpu/drm/bridge/dw_hdmi.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
> index 7b5b664..262163f 100644
> --- a/drivers/gpu/drm/bridge/dw_hdmi.c
> +++ b/drivers/gpu/drm/bridge/dw_hdmi.c
> @@ -196,19 +196,16 @@ static void hdmi_mask_writeb(struct dw_hdmi *hdmi, u8 data, unsigned int reg,
> hdmi_modb(hdmi, data << shift, mask, reg);
> }
>
> -static void hdmi_set_clock_regenerator_n(struct dw_hdmi *hdmi,
> - unsigned int value)
> +static void hdmi_set_clock_regenerator(struct dw_hdmi *hdmi,
> + unsigned int n, unsigned int cts)
> {
> - hdmi_writeb(hdmi, value & 0xff, HDMI_AUD_N1);
> - hdmi_writeb(hdmi, (value >> 8) & 0xff, HDMI_AUD_N2);
> - hdmi_writeb(hdmi, (value >> 16) & 0x0f, HDMI_AUD_N3);
> + hdmi_writeb(hdmi, n & 0xff, HDMI_AUD_N1);
> + hdmi_writeb(hdmi, (n >> 8) & 0xff, HDMI_AUD_N2);
> + hdmi_writeb(hdmi, (n >> 16) & 0x0f, HDMI_AUD_N3);
>
> /* nshift factor = 0 */
> hdmi_modb(hdmi, 0, HDMI_AUD_CTS3_N_SHIFT_MASK, HDMI_AUD_CTS3);
> -}
>
> -static void hdmi_regenerate_cts(struct dw_hdmi *hdmi, unsigned int cts)
> -{
> /* Must be set/cleared first */
> hdmi_modb(hdmi, 0, HDMI_AUD_CTS3_CTS_MANUAL, HDMI_AUD_CTS3);
>
> @@ -374,8 +371,7 @@ static void hdmi_set_clk_regenerator(struct dw_hdmi *hdmi,
> __func__, hdmi->sample_rate, hdmi->ratio,
> pixel_clk, clk_n, clk_cts);
>
> - hdmi_set_clock_regenerator_n(hdmi, clk_n);
> - hdmi_regenerate_cts(hdmi, clk_cts);
> + hdmi_set_clock_regenerator(hdmi, clk_n, clk_cts);
> }
>
> static void hdmi_init_clk_regenerator(struct dw_hdmi *hdmi)
> --
> 2.1.2
>
>
--
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