[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE-0n51CMu3LxSewwxN64LwbMoARq54TPdpODpz-Bp5uUi_QZg@mail.gmail.com>
Date: Wed, 8 Jun 2022 14:09:28 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Douglas Anderson <dianders@...omium.org>,
Hans de Goede <hdegoede@...hat.com>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Sam Ravnborg <sam@...nborg.org>
Cc: 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@...ts.freedesktop.org,
Rob Clark <robdclark@...omium.org>,
Rob Herring <robh+dt@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/8] drm/panel: Add an API to allow drm to set
orientation from panel
Quoting Hsin-Yi Wang (2022-06-08 02:48:09)
> index 1c48d162c77e..859165a1c8f1 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -2389,6 +2393,34 @@ int drm_connector_set_panel_orientation_with_quirk(
> }
> EXPORT_SYMBOL(drm_connector_set_panel_orientation_with_quirk);
>
> +/**
> + * drm_connector_set_orientation_from_panel -
> + * set the connector's panel_orientation from panel's callback.
> + * @connector: connector for which to init the panel-orientation property.
> + * @panel: panel that can provide orientation information.
> + *
> + * Drm drivers should call this function before drm_dev_register().
> + * Orientation is obtained from panel's .get_orientation() callback.
> + *
> + * Returns:
> + * Zero on success, negative errno on failure.
> + */
> +int drm_connector_set_orientation_from_panel(
> + struct drm_connector *connector,
> + struct drm_panel *panel)
> +{
> + enum drm_panel_orientation panel_orientation;
s/panel_orientation/orientation/
> +
> + if (panel && panel->funcs && panel->funcs->get_orientation)
> + panel_orientation = panel->funcs->get_orientation(panel);
> + else
> + panel_orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
> +
> + return drm_connector_set_panel_orientation(connector,
> + panel_orientation);
Then this fits on one line:
return drm_connector_set_panel_orientation(connector, orientation);
> +}
> +EXPORT_SYMBOL(drm_connector_set_orientation_from_panel);
> +
Otherwise
Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Powered by blists - more mailing lists