lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+M3ks6ZRrLAa=xMPi5UfdLEzMCBCjeovUei2O9m8V4PW3bh-Q@mail.gmail.com>
Date:   Thu, 25 Jul 2019 12:06:10 +0200
From:   Benjamin Gaignard <benjamin.gaignard@...aro.org>
To:     Olivier Moysan <olivier.moysan@...com>
Cc:     Andrzej Hajda <a.hajda@...sung.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>, jernej.skrabec@...l.net,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Benjamin GAIGNARD <benjamin.gaignard@...com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-stm32@...md-mailman.stormreply.com,
        Jyri Sarha <jsarha@...com>, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 3/3] drm/bridge: sii902x: make audio mclk optional

Le lun. 22 juil. 2019 à 18:06, Olivier Moysan <olivier.moysan@...com> a écrit :
>
> The master clock on i2s bus is not mandatory,
> as sii902X internal PLL can be used instead.
> Make use of mclk optional.

Applied on drm-misc-next.
Thanks,
Benjamin

>
> Signed-off-by: Olivier Moysan <olivier.moysan@...com>
> Reviewed-by: Jyri Sarha <jsarha@...com>
> Acked-by: Andrzej Hajda <a.hajda@...sung.com>
> ---
>  drivers/gpu/drm/bridge/sii902x.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index 962931c20efe..a323815aa9b6 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -568,13 +568,14 @@ static int sii902x_audio_hw_params(struct device *dev, void *data,
>                 return ret;
>         }
>
> -       mclk_rate = clk_get_rate(sii902x->audio.mclk);
> -
> -       ret = sii902x_select_mclk_div(&i2s_config_reg, params->sample_rate,
> -                                     mclk_rate);
> -       if (mclk_rate != ret * params->sample_rate)
> -               dev_dbg(dev, "Inaccurate reference clock (%ld/%d != %u)\n",
> -                       mclk_rate, ret, params->sample_rate);
> +       if (sii902x->audio.mclk) {
> +               mclk_rate = clk_get_rate(sii902x->audio.mclk);
> +               ret = sii902x_select_mclk_div(&i2s_config_reg,
> +                                             params->sample_rate, mclk_rate);
> +               if (mclk_rate != ret * params->sample_rate)
> +                       dev_dbg(dev, "Inaccurate reference clock (%ld/%d != %u)\n",
> +                               mclk_rate, ret, params->sample_rate);
> +       }
>
>         mutex_lock(&sii902x->mutex);
>
> @@ -751,11 +752,11 @@ 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");
> +       sii902x->audio.mclk = devm_clk_get_optional(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));
> -               return 0;
> +               return PTR_ERR(sii902x->audio.mclk);
>         }
>
>         sii902x->audio.pdev = platform_device_register_data(
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ