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]
Date:   Wed, 8 Jun 2022 07:16:51 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Hsin-Yi Wang <hsinyi@...omium.org>
Cc:     Hans de Goede <hdegoede@...hat.com>,
        Sam Ravnborg <sam@...nborg.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Rob Clark <robdclark@...omium.org>,
        Rob Herring <robh+dt@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 8/8] drm: Config orientation property if panel provides it

Hi,

On Wed, Jun 8, 2022 at 2:48 AM Hsin-Yi Wang <hsinyi@...omium.org> wrote:
>
> @@ -269,6 +280,31 @@ void drm_panel_bridge_remove(struct drm_bridge *bridge)
>  }
>  EXPORT_SYMBOL(drm_panel_bridge_remove);
>
> +/**
> + * drm_panel_bridge_set_orientation - Set the connector's panel orientation
> + * if the bridge is a panel bridge.
> + *
> + * @connector: The connector to be set panel orientation.
> + * @bridge: The drm_bridge to be transformed to panel bridge.

Ideally you should have a kernel doc to describe what you're returning.


> + */
> +int drm_panel_bridge_set_orientation(struct drm_connector *connector,
> +                                    struct drm_bridge *bridge)
> +{
> +       struct panel_bridge *panel_bridge;
> +
> +       if (!bridge)
> +               return 0;
> +
> +       if (bridge->funcs != &panel_bridge_bridge_funcs)
> +               return 0;

nit: Why do you need to handle NULL bridge and the case that someone
calls you with something other than a panel-bridge? I'm not convinced
that's useful. In general kernel style doesn't do massive validation
of parameters unless there's a reason for it. ...if we do need to
handle them then it feels like they should be returning -EINVAL or
something, not 0.


> @@ -917,10 +917,13 @@ void drm_bridge_hpd_notify(struct drm_bridge *bridge,
>                            enum drm_connector_status status);
>
>  #ifdef CONFIG_DRM_PANEL_BRIDGE
> +bool drm_bridge_is_panel(const struct drm_bridge *bridge);
>  struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel);
>  struct drm_bridge *drm_panel_bridge_add_typed(struct drm_panel *panel,
>                                               u32 connector_type);
>  void drm_panel_bridge_remove(struct drm_bridge *bridge);
> +int drm_panel_bridge_set_orientation(struct drm_connector *connector,
> +                                     struct drm_bridge *bridge);

I suspect that you need some dummy versions of your new functions
defined if "CONFIG_DRM_PANEL_BRIDGE" is not defined. Otherwise we're
going to be yelled at by the kernel robot eventually.

-Doug

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ