Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754916AbbBGDdb (ORCPT ); Fri, 6 Feb 2015 22:33:31 -0500 Received: from regular1.263xmail.com ([211.150.99.131]:51945 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751286AbbBGDd3 (ORCPT ); Fri, 6 Feb 2015 22:33:29 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: linux-rockchip@lists.infradead.org X-SENDER-IP: 221.224.159.162 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <99680c2044124fd5db15316d82d07a6e> X-DNS-TYPE: 0 Message-ID: <54D5877D.1070500@rock-chips.com> Date: Sat, 07 Feb 2015 11:33:17 +0800 From: yakir User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Daniel Kurtz CC: David Airlie , Russell King , Philipp Zabel , Fabio Estevam , Shawn Guo , Rob Clark , Mark Yao , Daniel Vetter , dri-devel , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Sean Cross , Jyri Sarha , Ben Zhang , alsa-devel@alsa-project.org, Heiko Stuebner , "linux-arm-kernel@lists.infradead.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "open list:OPEN FIRMWARE AND..." , =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , Douglas Anderson , =?UTF-8?B?U3TDqXBoYW5lIE1hcmNoZXNpbg==?= , "open list:ARM/Rockchip SoC..." Subject: Re: [PATCH v3 05/15] drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n() and hdmi_regenerate_cts() References: <1422975418-13302-1-git-send-email-ykk@rock-chips.com> <1422976340-30118-1-git-send-email-ykk@rock-chips.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2542 Lines: 71 On 02/05/2015 11:54 PM, Daniel Kurtz wrote: > On Tue, Feb 3, 2015 at 11:12 PM, Yakir Yang wrote: >> Signed-off-by: Yakir Yang > Reviewed-by: Daniel Kurtz Okay, add in next verson4. Thanks. : ) > >> --- >> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/