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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Jun 2022 11:46:24 +0800
From:   Hsin-Yi Wang <hsinyi@...omium.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Ravnborg <sam@...nborg.org>,
        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>,
        Matthias Brugger <matthias.bgg@...il.com>,
        dri-devel@...ts.freedesktop.org,
        linux-mediatek@...ts.infradead.org,
        Rob Clark <robdclark@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Rob Herring <robh+dt@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 8/8] drm/mediatek: Config orientation property if panel
 provides it

On Tue, Jun 7, 2022 at 3:16 AM Stephen Boyd <swboyd@...omium.org> wrote:
>
> Quoting Hsin-Yi Wang (2022-06-06 08:24:31)
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > index d9f10a33e6fa..c56282412bfa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > @@ -822,6 +823,12 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)
> >                 ret = PTR_ERR(dsi->connector);
> >                 goto err_cleanup_encoder;
> >         }
> > +
> > +       /* Read panel orientation */
> > +       if (dsi->panel)
> > +               drm_connector_set_panel_orientation(dsi->connector,
> > +                               drm_panel_get_orientation(dsi->panel));
> > +
>
> It could be simplified like so?
>
>         drm_connector_set_orientation_from_panel(dsi->connector, dsi->panel);
>
> Then the API could get the orientation if the panel pointer is valid.
> Does any code need to use/modify the orientation value besides
> drm_connector_set_panel_orientation()?
>

We can add another function to call
drm_connector_set_orientation_from_panel(), which will be like

void drm_connector_set_orientation_from_panel(connector, panel)
{
     if (panel)
          drm_connector_set_panel_orientation(connector,drm_panel_get_orientation(panel));
}

Though it's very should but I can add this if this can make the caller
more convenient.

> >         drm_connector_attach_encoder(dsi->connector, &dsi->encoder);
> >
> >         return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ