Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623568 > unrolled thread

[PATCH v2 0/2] drm: dw-hdmi: various improvements

Started byRomain Perier <romain.perier@collabora.com>
First post2017-04-14 10:40 +0200
Last post2017-04-24 08:50 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/2] drm: dw-hdmi: various improvements Romain Perier <romain.perier@collabora.com> - 2017-04-14 10:40 +0200
    [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks Romain Perier <romain.perier@collabora.com> - 2017-04-14 10:40 +0200
      Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S  enablement callbacks Neil Armstrong <narmstrong@baylibre.com> - 2017-04-14 11:10 +0200
      Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S  enablement callbacks Archit Taneja <architt@codeaurora.org> - 2017-04-19 07:00 +0200
        Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S  enablement callbacks Archit Taneja <architt@codeaurora.org> - 2017-04-20 11:40 +0200
          Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S  enablement callbacks Romain Perier <romain.perier@collabora.com> - 2017-04-24 09:00 +0200
        Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S  enablement callbacks Romain Perier <romain.perier@collabora.com> - 2017-04-24 08:50 +0200

#1623568 — [PATCH v2 0/2] drm: dw-hdmi: various improvements

FromRomain Perier <romain.perier@collabora.com>
Date2017-04-14 10:40 +0200
Subject[PATCH v2 0/2] drm: dw-hdmi: various improvements
Message-ID<tw4VQ-7gB-7@gated-at.bofh.it>
This set of patches split the stream handling functions in two parts. It
introduces new callbacks that are specific to each variant, one for I2S
and one for AHB.

Then, as requested by the datasheet for the I2S variant, it adds support
for gating the audio sampler clock when the audio stream is enabled and
disabled.

This patches series is the continuity of the following discussion:
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-March/493550.html

Changes in v2:
- Add NULL check in dw_hdmi_audio_enable/dw_hdmi_audio_disable
- Don't define dw_hdmi_i2s_audio_disable in PATCH 1/2
- Rebased onto drm-misc-next

Romain Perier (2):
  drm: dw-hdmi: add specific I2S and AHB functions for stream handling
  drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 46 +++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 8 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1623570 — [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromRomain Perier <romain.perier@collabora.com>
Date2017-04-14 10:40 +0200
Subject[PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<tw4VQ-7gB-15@gated-at.bofh.it>
In reply to#1623568
Currently, the audio sampler clock is enabled from dw_hdmi_setup() at
step E. and is kept enabled for later use. This clock should be enabled
and disabled along with the actual audio stream and not always on (that
is bad for PM). Futhermore, as described by the datasheet, the I2S
variant need to gate/ungate the clock when the stream is
enabled/disabled.

This commit adds a parameter to hdmi_audio_enable_clk() that controls
when the audio sample clock must be enabled or disabled. Then, it adds
the call to this function from dw_hdmi_i2s_audio_enable() and
dw_hdmi_i2s_audio_disable().

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 5b328c0..a6da634 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -544,6 +544,12 @@ void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate)
 }
 EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_rate);
 
+static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi, bool enable)
+{
+	hdmi_modb(hdmi, enable ? 0 : HDMI_MC_CLKDIS_AUDCLK_DISABLE,
+		  HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
+}
+
 void dw_hdmi_ahb_audio_enable(struct dw_hdmi *hdmi)
 {
 	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
@@ -557,6 +563,12 @@ void dw_hdmi_ahb_audio_disable(struct dw_hdmi *hdmi)
 void dw_hdmi_i2s_audio_enable(struct dw_hdmi *hdmi)
 {
 	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
+	hdmi_enable_audio_clk(hdmi, true);
+}
+
+void dw_hdmi_i2s_audio_disable(struct dw_hdmi *hdmi)
+{
+	hdmi_enable_audio_clk(hdmi, false);
 }
 
 void dw_hdmi_audio_enable(struct dw_hdmi *hdmi)
@@ -1592,11 +1604,6 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
 			    HDMI_MC_FLOWCTRL);
 }
 
-static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi)
-{
-	hdmi_modb(hdmi, 0, HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
-}
-
 /* Workaround to clear the overflow condition */
 static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
 {
@@ -1710,7 +1717,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
 
 		/* HDMI Initialization Step E - Configure audio */
 		hdmi_clk_regenerator_update_pixel_clock(hdmi);
-		hdmi_enable_audio_clk(hdmi);
+		hdmi_enable_audio_clk(hdmi, true);
 	}
 
 	/* not for DVI mode */
@@ -2438,6 +2445,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
 		audio.write	= hdmi_writeb;
 		audio.read	= hdmi_readb;
 		hdmi->enable_audio = dw_hdmi_i2s_audio_enable;
+		hdmi->disable_audio = dw_hdmi_i2s_audio_disable;
 
 		pdevinfo.name = "dw-hdmi-i2s-audio";
 		pdevinfo.data = &audio;
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1623592 — Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromNeil Armstrong <narmstrong@baylibre.com>
Date2017-04-14 11:10 +0200
SubjectRe: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<tw5oS-7Fv-31@gated-at.bofh.it>
In reply to#1623570
On 04/14/2017 10:31 AM, Romain Perier wrote:
> Currently, the audio sampler clock is enabled from dw_hdmi_setup() at
> step E. and is kept enabled for later use. This clock should be enabled
> and disabled along with the actual audio stream and not always on (that
> is bad for PM). Futhermore, as described by the datasheet, the I2S
> variant need to gate/ungate the clock when the stream is
> enabled/disabled.
> 
> This commit adds a parameter to hdmi_audio_enable_clk() that controls
> when the audio sample clock must be enabled or disabled. Then, it adds
> the call to this function from dw_hdmi_i2s_audio_enable() and
> dw_hdmi_i2s_audio_disable().
> 
> Signed-off-by: Romain Perier <romain.perier@collabora.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 5b328c0..a6da634 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -544,6 +544,12 @@ void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate)
>  }
>  EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_rate);
>  
> +static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi, bool enable)
> +{
> +	hdmi_modb(hdmi, enable ? 0 : HDMI_MC_CLKDIS_AUDCLK_DISABLE,
> +		  HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
> +}
> +
>  void dw_hdmi_ahb_audio_enable(struct dw_hdmi *hdmi)
>  {
>  	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
> @@ -557,6 +563,12 @@ void dw_hdmi_ahb_audio_disable(struct dw_hdmi *hdmi)
>  void dw_hdmi_i2s_audio_enable(struct dw_hdmi *hdmi)
>  {
>  	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
> +	hdmi_enable_audio_clk(hdmi, true);
> +}
> +
> +void dw_hdmi_i2s_audio_disable(struct dw_hdmi *hdmi)
> +{
> +	hdmi_enable_audio_clk(hdmi, false);
>  }
>  
>  void dw_hdmi_audio_enable(struct dw_hdmi *hdmi)
> @@ -1592,11 +1604,6 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
>  			    HDMI_MC_FLOWCTRL);
>  }
>  
> -static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi)
> -{
> -	hdmi_modb(hdmi, 0, HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
> -}
> -
>  /* Workaround to clear the overflow condition */
>  static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
>  {
> @@ -1710,7 +1717,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
>  
>  		/* HDMI Initialization Step E - Configure audio */
>  		hdmi_clk_regenerator_update_pixel_clock(hdmi);
> -		hdmi_enable_audio_clk(hdmi);
> +		hdmi_enable_audio_clk(hdmi, true);
>  	}
>  
>  	/* not for DVI mode */
> @@ -2438,6 +2445,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  		audio.write	= hdmi_writeb;
>  		audio.read	= hdmi_readb;
>  		hdmi->enable_audio = dw_hdmi_i2s_audio_enable;
> +		hdmi->disable_audio = dw_hdmi_i2s_audio_disable;
>  
>  		pdevinfo.name = "dw-hdmi-i2s-audio";
>  		pdevinfo.data = &audio;
> 

Hi Romain,

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

[toc] | [prev] | [next] | [standalone]


#1625809 — Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromArchit Taneja <architt@codeaurora.org>
Date2017-04-19 07:00 +0200
SubjectRe: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<txPSF-7hL-1@gated-at.bofh.it>
In reply to#1623570

On 04/14/2017 02:01 PM, Romain Perier wrote:
> Currently, the audio sampler clock is enabled from dw_hdmi_setup() at
> step E. and is kept enabled for later use. This clock should be enabled
> and disabled along with the actual audio stream and not always on (that
> is bad for PM). Futhermore, as described by the datasheet, the I2S

s/Futhermore/Furthermore

> variant need to gate/ungate the clock when the stream is

s/need/needs

> enabled/disabled.
>
> This commit adds a parameter to hdmi_audio_enable_clk() that controls
> when the audio sample clock must be enabled or disabled. Then, it adds
> the call to this function from dw_hdmi_i2s_audio_enable() and
> dw_hdmi_i2s_audio_disable().
>
> Signed-off-by: Romain Perier <romain.perier@collabora.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 5b328c0..a6da634 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -544,6 +544,12 @@ void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate)
>  }
>  EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_rate);
>
> +static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi, bool enable)
> +{
> +	hdmi_modb(hdmi, enable ? 0 : HDMI_MC_CLKDIS_AUDCLK_DISABLE,
> +		  HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
> +}
> +
>  void dw_hdmi_ahb_audio_enable(struct dw_hdmi *hdmi)
>  {
>  	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
> @@ -557,6 +563,12 @@ void dw_hdmi_ahb_audio_disable(struct dw_hdmi *hdmi)
>  void dw_hdmi_i2s_audio_enable(struct dw_hdmi *hdmi)
>  {
>  	hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
> +	hdmi_enable_audio_clk(hdmi, true);
> +}
> +
> +void dw_hdmi_i2s_audio_disable(struct dw_hdmi *hdmi)
> +{
> +	hdmi_enable_audio_clk(hdmi, false);
>  }

This should be static too.

If you're okay with the suggestions, I can fix these myself and push. Let
me know if that's okay.

Thanks,
Archit

>
>  void dw_hdmi_audio_enable(struct dw_hdmi *hdmi)
> @@ -1592,11 +1604,6 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
>  			    HDMI_MC_FLOWCTRL);
>  }
>
> -static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi)
> -{
> -	hdmi_modb(hdmi, 0, HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
> -}
> -
>  /* Workaround to clear the overflow condition */
>  static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
>  {
> @@ -1710,7 +1717,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
>
>  		/* HDMI Initialization Step E - Configure audio */
>  		hdmi_clk_regenerator_update_pixel_clock(hdmi);
> -		hdmi_enable_audio_clk(hdmi);
> +		hdmi_enable_audio_clk(hdmi, true);
>  	}
>
>  	/* not for DVI mode */
> @@ -2438,6 +2445,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
>  		audio.write	= hdmi_writeb;
>  		audio.read	= hdmi_readb;
>  		hdmi->enable_audio = dw_hdmi_i2s_audio_enable;
> +		hdmi->disable_audio = dw_hdmi_i2s_audio_disable;
>
>  		pdevinfo.name = "dw-hdmi-i2s-audio";
>  		pdevinfo.data = &audio;
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1627240 — Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromArchit Taneja <architt@codeaurora.org>
Date2017-04-20 11:40 +0200
SubjectRe: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<tygJb-7df-7@gated-at.bofh.it>
In reply to#1625809

On 04/19/2017 10:21 AM, Archit Taneja wrote:
>
>
> On 04/14/2017 02:01 PM, Romain Perier wrote:
>> Currently, the audio sampler clock is enabled from dw_hdmi_setup() at
>> step E. and is kept enabled for later use. This clock should be enabled
>> and disabled along with the actual audio stream and not always on (that
>> is bad for PM). Futhermore, as described by the datasheet, the I2S
>
> s/Futhermore/Furthermore
>
>> variant need to gate/ungate the clock when the stream is
>
> s/need/needs
>
>> enabled/disabled.
>>
>> This commit adds a parameter to hdmi_audio_enable_clk() that controls
>> when the audio sample clock must be enabled or disabled. Then, it adds
>> the call to this function from dw_hdmi_i2s_audio_enable() and
>> dw_hdmi_i2s_audio_disable().
>>
>> Signed-off-by: Romain Perier <romain.perier@collabora.com>
>> ---
>>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 20 ++++++++++++++------
>>  1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> index 5b328c0..a6da634 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> @@ -544,6 +544,12 @@ void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate)
>>  }
>>  EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_rate);
>>
>> +static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi, bool enable)
>> +{
>> +    hdmi_modb(hdmi, enable ? 0 : HDMI_MC_CLKDIS_AUDCLK_DISABLE,
>> +          HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
>> +}
>> +
>>  void dw_hdmi_ahb_audio_enable(struct dw_hdmi *hdmi)
>>  {
>>      hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
>> @@ -557,6 +563,12 @@ void dw_hdmi_ahb_audio_disable(struct dw_hdmi *hdmi)
>>  void dw_hdmi_i2s_audio_enable(struct dw_hdmi *hdmi)
>>  {
>>      hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
>> +    hdmi_enable_audio_clk(hdmi, true);
>> +}
>> +
>> +void dw_hdmi_i2s_audio_disable(struct dw_hdmi *hdmi)
>> +{
>> +    hdmi_enable_audio_clk(hdmi, false);
>>  }
>
> This should be static too.
>
> If you're okay with the suggestions, I can fix these myself and push. Let
> me know if that's okay.

Took the liberty of going ahead with the fixes. Queued both patches to
drm-misc-next.

Thanks,
Archit

>
> Thanks,
> Archit
>
>>
>>  void dw_hdmi_audio_enable(struct dw_hdmi *hdmi)
>> @@ -1592,11 +1604,6 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
>>                  HDMI_MC_FLOWCTRL);
>>  }
>>
>> -static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi)
>> -{
>> -    hdmi_modb(hdmi, 0, HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
>> -}
>> -
>>  /* Workaround to clear the overflow condition */
>>  static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
>>  {
>> @@ -1710,7 +1717,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
>>
>>          /* HDMI Initialization Step E - Configure audio */
>>          hdmi_clk_regenerator_update_pixel_clock(hdmi);
>> -        hdmi_enable_audio_clk(hdmi);
>> +        hdmi_enable_audio_clk(hdmi, true);
>>      }
>>
>>      /* not for DVI mode */
>> @@ -2438,6 +2445,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
>>          audio.write    = hdmi_writeb;
>>          audio.read    = hdmi_readb;
>>          hdmi->enable_audio = dw_hdmi_i2s_audio_enable;
>> +        hdmi->disable_audio = dw_hdmi_i2s_audio_disable;
>>
>>          pdevinfo.name = "dw-hdmi-i2s-audio";
>>          pdevinfo.data = &audio;
>>
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1629248 — Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromRomain Perier <romain.perier@collabora.com>
Date2017-04-24 09:00 +0200
SubjectRe: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<tzG8y-3DA-15@gated-at.bofh.it>
In reply to#1627240
Hello,

> Took the liberty of going ahead with the fixes. Queued both patches to
> drm-misc-next.
>
> Thanks,
> Archit

You were right. Sorry for the delay, I am back from vacations :)

Regards,
Romain

[toc] | [prev] | [next] | [standalone]


#1629242 — Re: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks

FromRomain Perier <romain.perier@collabora.com>
Date2017-04-24 08:50 +0200
SubjectRe: [PATCH v2 2/2] drm: dw-hdmi: gate audio clock from the I2S enablement callbacks
Message-ID<tzFYS-3Ac-9@gated-at.bofh.it>
In reply to#1625809
Hello,


Le 19/04/2017 à 06:51, Archit Taneja a écrit :
>
>
> On 04/14/2017 02:01 PM, Romain Perier wrote:
>> Currently, the audio sampler clock is enabled from dw_hdmi_setup() at
>> step E. and is kept enabled for later use. This clock should be enabled
>> and disabled along with the actual audio stream and not always on (that
>> is bad for PM). Futhermore, as described by the datasheet, the I2S
>
> s/Futhermore/Furthermore
>
>> variant need to gate/ungate the clock when the stream is
>
> s/need/needs
>
>> enabled/disabled.
>>
>> This commit adds a parameter to hdmi_audio_enable_clk() that controls
>> when the audio sample clock must be enabled or disabled. Then, it adds
>> the call to this function from dw_hdmi_i2s_audio_enable() and
>> dw_hdmi_i2s_audio_disable().
>>
>> Signed-off-by: Romain Perier <romain.perier@collabora.com>
>> ---
>>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 20 ++++++++++++++------
>>  1 file changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> index 5b328c0..a6da634 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
>> @@ -544,6 +544,12 @@ void dw_hdmi_set_sample_rate(struct dw_hdmi
>> *hdmi, unsigned int rate)
>>  }
>>  EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_rate);
>>
>> +static void hdmi_enable_audio_clk(struct dw_hdmi *hdmi, bool enable)
>> +{
>> +    hdmi_modb(hdmi, enable ? 0 : HDMI_MC_CLKDIS_AUDCLK_DISABLE,
>> +          HDMI_MC_CLKDIS_AUDCLK_DISABLE, HDMI_MC_CLKDIS);
>> +}
>> +
>>  void dw_hdmi_ahb_audio_enable(struct dw_hdmi *hdmi)
>>  {
>>      hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
>> @@ -557,6 +563,12 @@ void dw_hdmi_ahb_audio_disable(struct dw_hdmi
>> *hdmi)
>>  void dw_hdmi_i2s_audio_enable(struct dw_hdmi *hdmi)
>>  {
>>      hdmi_set_cts_n(hdmi, hdmi->audio_cts, hdmi->audio_n);
>> +    hdmi_enable_audio_clk(hdmi, true);
>> +}
>> +
>> +void dw_hdmi_i2s_audio_disable(struct dw_hdmi *hdmi)
>> +{
>> +    hdmi_enable_audio_clk(hdmi, false);
>>  }
>
> This should be static too.
>
> If you're okay with the suggestions, I can fix these myself and push. Let
> me know if that's okay.
>
> Thanks,
> Archit
>

Yes, I completely agree.
Thanks,
Romain

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web