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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Sep 2020 14:33:55 +0800
From:   Pi-Hsun Shih <pihsun@...omium.org>
To:     allen <allen.chen@....com.tw>
Cc:     Kenneth Hung <Kenneth.Hung@....com.tw>,
        Jau-Chih Tseng <Jau-Chih.Tseng@....com.tw>,
        Hermes Wu <Hermes.Wu@....com.tw>,
        Jitao Shi <jitao.shi@...iatek.com>,
        Yilun Lin <yllin@...gle.com>,
        kernel test robot <lkp@...el.com>,
        Andrzej Hajda <a.hajda@...sung.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Matthias Brugger <matthias.bgg@...il.com>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v3] drm/bridge: add it6505 driver

On Fri, Sep 4, 2020 at 10:17 AM allen <allen.chen@....com.tw> wrote:
>
> This adds support for the iTE IT6505.
> This device can convert DPI signal to DP output.
>
> From: Allen Chen <allen.chen@....com.tw>
> Signed-off-by: Jitao Shi <jitao.shi@...iatek.com>
> Signed-off-by: Pi-Hsun Shih <pihsun@...omium.org>
> Signed-off-by: Yilun Lin <yllin@...gle.com>
> Signed-off-by: Hermes Wu <hermes.wu@....com.tw>
> Signed-off-by: Allen Chen <allen.chen@....com.tw>
> Reported-by: kernel test robot <lkp@...el.com>
> ---
>  drivers/gpu/drm/bridge/Kconfig      |    7 +
>  drivers/gpu/drm/bridge/Makefile     |    1 +
>  drivers/gpu/drm/bridge/ite-it6505.c | 3338 +++++++++++++++++++++++++++
>  3 files changed, 3346 insertions(+)
>  create mode 100644 drivers/gpu/drm/bridge/ite-it6505.c
>
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> index 3e11af4e9f63e..f21dce3fabeb9 100644
> --- a/drivers/gpu/drm/bridge/Kconfig
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -61,6 +61,13 @@ config DRM_LONTIUM_LT9611
>           HDMI signals
>           Please say Y if you have such hardware.
>
> +config DRM_ITE_IT6505
> +       tristate "ITE IT6505 DisplayPort bridge"
> +       depends on OF
> +       select DRM_KMS_HELPER
> +       help
> +         ITE IT6505 DisplayPort bridge chip driver.
> +
>  config DRM_LVDS_CODEC
>         tristate "Transparent LVDS encoders and decoders support"
>         depends on OF
> diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
> index c589a6a7cbe1d..8a118fd901ad7 100644
> --- a/drivers/gpu/drm/bridge/Makefile
> +++ b/drivers/gpu/drm/bridge/Makefile
> @@ -3,6 +3,7 @@ obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o
>  obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o
>  obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o
>  obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o
> +obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o
>  obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o
>  obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o
>  obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> new file mode 100644
> index 0000000000000..0ed19673431ee
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> ...
> +
> +static void __maybe_unused it6505_delayed_audio(struct work_struct *work)
> +{
> +       struct it6505 *it6505 = container_of(work, struct it6505,
> +                                            delayed_audio.work);
> +
> +       DRM_DEV_DEBUG_DRIVER(&it6505->client->dev, "start");
> +
> +       if (!it6505->powered)
> +               return;
> +
> +       if (!it6505->enable_drv_hold)
> +               it6505_enable_audio(it6505);
> +}
> +
> +static int __maybe_unused it6505_audio_setup_hw_params(struct it6505 *it6505,
> +                                       struct hdmi_codec_params *params)
> +{
> +       struct device *dev = &it6505->client->dev;
> +       int i = 0;
> +
> +       DRM_DEV_DEBUG_DRIVER(dev, "%s %d Hz, %d bit, %d channels\n", __func__,
> +                            params->sample_rate, params->sample_width,
> +                            params->cea.channels);
> +
> +       if (!it6505->bridge.encoder)
> +               return -ENODEV;
> +
> +       if (params->cea.channels <= 1 || params->cea.channels > 8) {
> +               DRM_DEV_DEBUG_DRIVER(dev, "channel number: %d not support",
> +                                    it6505->audio.channel_count);
> +               return -EINVAL;
> +       }
> +
> +       it6505->audio.channel_count = params->cea.channels;
> +
> +       while (i < ARRAY_SIZE(audio_sample_rate_map) &&
> +              params->sample_rate !=
> +                      audio_sample_rate_map[i].sample_rate_value) {
> +               i++;
> +       }
> +       if (i == ARRAY_SIZE(audio_sample_rate_map)) {
> +               DRM_DEV_DEBUG_DRIVER(dev, "sample rate: %d Hz not support",
> +                                    params->sample_rate);
> +               return -EINVAL;
> +       }
> +       it6505->audio.sample_rate = audio_sample_rate_map[i].rate;
> +
> +       switch (params->sample_width) {
> +       case 16:
> +               it6505->audio.word_length = WORD_LENGTH_16BIT;
> +               break;
> +       case 18:
> +               it6505->audio.word_length = WORD_LENGTH_18BIT;
> +               break;
> +       case 20:
> +               it6505->audio.word_length = WORD_LENGTH_20BIT;
> +               break;
> +       case 24:
> +       case 32:
> +               it6505->audio.word_length = WORD_LENGTH_24BIT;
> +               break;
> +       default:
> +               DRM_DEV_DEBUG_DRIVER(dev, "wordlength: %d bit not support",
> +                                    params->sample_width);
> +               return -EINVAL;
> +       }
> +
> +       return 0;
> +}
> +
> +static void __maybe_unused it6505_audio_shutdown(struct device *dev, void *data)
> +{
> +       struct it6505 *it6505 = dev_get_drvdata(dev);
> +
> +       if (it6505->powered)
> +               it6505_disable_audio(it6505);
> +}
> +
> +static int __maybe_unused it6505_audio_hook_plugged_cb(struct device *dev,
> +                                                      void *data,
> +                                                      hdmi_codec_plugged_cb fn,
> +                                                      struct device *codec_dev)
> +{
> +       struct it6505 *it6505 = data;
> +
> +       it6505->plugged_cb = fn;
> +       it6505->codec_dev = codec_dev;
> +       it6505_plugged_status_to_codec(it6505);
> +
> +       return 0;
> +}

These four functions about audio seem to be unused. Move them (and
other audio related changes) into another patch.

> +
> ...
> 2.25.1
>

Powered by blists - more mailing lists