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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpoQFZjSbJ+nENH7Zcrg_0RZLTxxgdqFzoF7hb11ge_LOQ@mail.gmail.com>
Date:   Tue, 14 Nov 2023 18:10:00 +0200
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     Sui Jingfeng <sui.jingfeng@...ux.dev>
Cc:     Phong LE <ple@...libre.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Maxime Ripard <mripard@...nel.org>,
        Sui Jingfeng <suijingfeng@...ngson.cn>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Thomas Zimmermann <tzimmermann@...e.de>
Subject: Re: [PATCH 6/8] drm/bridge: it66121: Add a helper to initialize the
 DRM bridge structure

On Tue, 14 Nov 2023 at 17:09, Sui Jingfeng <sui.jingfeng@...ux.dev> wrote:
>
> From: Sui Jingfeng <suijingfeng@...ngson.cn>
>
> Helps the it66121_probe() function to reduce weight, no functional change.

This is not a proper commit message.

>
> Signed-off-by: Sui Jingfeng <suijingfeng@...ngson.cn>
> ---
>  drivers/gpu/drm/bridge/ite-it66121.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
> index f36d05331f25..2f7f00f1bedb 100644
> --- a/drivers/gpu/drm/bridge/ite-it66121.c
> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
> @@ -1004,6 +1004,21 @@ static const struct drm_bridge_funcs it66121_bridge_funcs = {
>         .hpd_disable = it66121_bridge_hpd_disable,
>  };
>
> +static void it66121_bridge_init_base(struct drm_bridge *bridge,
> +                                    struct device_node *of_node,
> +                                    bool hpd_support)

At this point there is no reason for the bridge to miss HPD support.

> +{
> +       bridge->funcs = &it66121_bridge_funcs;
> +       bridge->type = DRM_MODE_CONNECTOR_HDMIA;
> +       bridge->ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> +       if (hpd_support)
> +               bridge->ops |= DRM_BRIDGE_OP_HPD;
> +
> +       bridge->of_node = of_node;
> +
> +       drm_bridge_add(bridge);
> +}
> +
>  static irqreturn_t it66121_irq_threaded_handler(int irq, void *dev_id)
>  {
>         int ret;
> @@ -1637,11 +1652,6 @@ static int it66121_probe(struct i2c_client *client)
>             ctx->device_id != ctx->info->pid)
>                 return -ENODEV;
>
> -       ctx->bridge.funcs = &it66121_bridge_funcs;
> -       ctx->bridge.of_node = dev->of_node;
> -       ctx->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
> -       ctx->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_HPD;
> -
>         ret = devm_request_threaded_irq(dev, client->irq, NULL, it66121_irq_threaded_handler,
>                                         IRQF_ONESHOT, dev_name(dev), ctx);
>         if (ret < 0) {
> @@ -1649,9 +1659,9 @@ static int it66121_probe(struct i2c_client *client)
>                 return ret;
>         }
>
> -       it66121_audio_codec_init(ctx, dev);
> +       it66121_bridge_init_base(&ctx->bridge, dev->of_node, true);
>
> -       drm_bridge_add(&ctx->bridge);
> +       it66121_audio_codec_init(ctx, dev);
>
>         dev_info(dev, "IT66121 probed, chip id: 0x%x:0x%x, revision: %u\n",
>                  ctx->vender_id, ctx->device_id, ctx->revision);
> --
> 2.34.1
>


-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ