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@xxxxxxxxxxxx>