2019-07-02 15:49:18

by Olivier Moysan

[permalink] [raw]
Subject: [PATCH 0/3] drm/bridge: sii902x: fix audio mclk management

Fix audio master clock use for Silab sii902x HDMI transceiver.
Make audio master clock optional, as this clock is not mandatory.

Olivier Moysan (3):
drm/bridge: sii902x: fix missing reference to mclk clock
dt-bindings: display: sii902x: Change audio mclk binding
drm/bridge: sii902x: make audio mclk optional

.../devicetree/bindings/display/bridge/sii902x.txt | 5 ++-
drivers/gpu/drm/bridge/sii902x.c | 40 +++++++++++++---------
2 files changed, 26 insertions(+), 19 deletions(-)

--
2.7.4


2019-07-02 15:49:41

by Olivier Moysan

[permalink] [raw]
Subject: [PATCH 1/3] drm/bridge: sii902x: fix missing reference to mclk clock

Add devm_clk_get call to retrieve reference to master clock.

Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")

Signed-off-by: Olivier Moysan <[email protected]>
---
drivers/gpu/drm/bridge/sii902x.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index dd7aa466b280..36acc256e67e 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -750,6 +750,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] |
i2s_lane_id[lanes[i]] | SII902X_TPI_I2S_FIFO_ENABLE;

+ sii902x->audio.mclk = devm_clk_get(dev, "mclk");
if (IS_ERR(sii902x->audio.mclk)) {
dev_err(dev, "%s: No clock (audio mclk) found: %ld\n",
__func__, PTR_ERR(sii902x->audio.mclk));
--
2.7.4

2019-07-04 08:04:35

by Jyri Sarha

[permalink] [raw]
Subject: Re: [PATCH 1/3] drm/bridge: sii902x: fix missing reference to mclk clock

On 02/07/2019 18:47, Olivier Moysan wrote:
> Add devm_clk_get call to retrieve reference to master clock.
>
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
>
> Signed-off-by: Olivier Moysan <[email protected]>

Reviewed-by: Jyri Sarha <[email protected]>

I wonder how that line was dropped and how the code past my final test.
Any way, this fix is definitely needed.

Thanks,
Jyri

> ---
> drivers/gpu/drm/bridge/sii902x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index dd7aa466b280..36acc256e67e 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -750,6 +750,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] |
> i2s_lane_id[lanes[i]] | SII902X_TPI_I2S_FIFO_ENABLE;
>
> + sii902x->audio.mclk = devm_clk_get(dev, "mclk");
> if (IS_ERR(sii902x->audio.mclk)) {
> dev_err(dev, "%s: No clock (audio mclk) found: %ld\n",
> __func__, PTR_ERR(sii902x->audio.mclk));
>


--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

2019-07-05 13:16:44

by Philippe Cornu

[permalink] [raw]
Subject: Re: [PATCH 1/3] drm/bridge: sii902x: fix missing reference to mclk clock

Hi Olivier,
and many thanks for your patch.
I do not see how audio could work without your patch, so:
Reviewed-by: Philippe Cornu <[email protected]>
Philippe :-)

On 7/2/19 5:47 PM, Olivier Moysan wrote:
> Add devm_clk_get call to retrieve reference to master clock.
>
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
>
> Signed-off-by: Olivier Moysan <[email protected]>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index dd7aa466b280..36acc256e67e 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -750,6 +750,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] |
> i2s_lane_id[lanes[i]] | SII902X_TPI_I2S_FIFO_ENABLE;
>
> + sii902x->audio.mclk = devm_clk_get(dev, "mclk");
> if (IS_ERR(sii902x->audio.mclk)) {
> dev_err(dev, "%s: No clock (audio mclk) found: %ld\n",
> __func__, PTR_ERR(sii902x->audio.mclk));
>

2019-07-12 10:31:51

by Andrzej Hajda

[permalink] [raw]
Subject: Re: [PATCH 1/3] drm/bridge: sii902x: fix missing reference to mclk clock

On 02.07.2019 17:47, Olivier Moysan wrote:
> Add devm_clk_get call to retrieve reference to master clock.
>
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
>
> Signed-off-by: Olivier Moysan <[email protected]>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index dd7aa466b280..36acc256e67e 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -750,6 +750,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] |
> i2s_lane_id[lanes[i]] | SII902X_TPI_I2S_FIFO_ENABLE;
>
> + sii902x->audio.mclk = devm_clk_get(dev, "mclk");
> if (IS_ERR(sii902x->audio.mclk)) {
> dev_err(dev, "%s: No clock (audio mclk) found: %ld\n",
> __func__, PTR_ERR(sii902x->audio.mclk));

Acked-by: Andrzej Hajda <[email protected]>

 --
Regards
Andrzej