Commit a99076e8 authored by Maxime Ripard's avatar Maxime Ripard

drm/client: Change drm_client_panel_rotation name

The drm_client_panel_rotation function has been used so far to set the
default rotation based on the panel orientation.

However, we can have more sources of information to make that decision,
starting with the command line that we will introduce later in this series.

Change the name to remove the panel mention.
Reviewed-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8cb0f0d9569d41685bbf30a1538da6578cd2769b.1560783090.git-series.maxime.ripard@bootlin.com
parent 307696d3
...@@ -804,19 +804,19 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, ...@@ -804,19 +804,19 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
EXPORT_SYMBOL(drm_client_modeset_probe); EXPORT_SYMBOL(drm_client_modeset_probe);
/** /**
* drm_client_panel_rotation() - Check panel orientation * drm_client_rotation() - Check the initial rotation value
* @modeset: DRM modeset * @modeset: DRM modeset
* @rotation: Returned rotation value * @rotation: Returned rotation value
* *
* This function checks if the primary plane in @modeset can hw rotate to match * This function checks if the primary plane in @modeset can hw rotate
* the panel orientation on its connector. * to match the rotation needed on its connector.
* *
* Note: Currently only 0 and 180 degrees are supported. * Note: Currently only 0 and 180 degrees are supported.
* *
* Return: * Return:
* True if the plane can do the rotation, false otherwise. * True if the plane can do the rotation, false otherwise.
*/ */
bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation) bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
{ {
struct drm_connector *connector = modeset->connectors[0]; struct drm_connector *connector = modeset->connectors[0];
struct drm_plane *plane = modeset->crtc->primary; struct drm_plane *plane = modeset->crtc->primary;
...@@ -857,7 +857,7 @@ bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotat ...@@ -857,7 +857,7 @@ bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotat
return true; return true;
} }
EXPORT_SYMBOL(drm_client_panel_rotation); EXPORT_SYMBOL(drm_client_rotation);
static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active) static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool active)
{ {
...@@ -902,7 +902,7 @@ static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool ...@@ -902,7 +902,7 @@ static int drm_client_modeset_commit_atomic(struct drm_client_dev *client, bool
struct drm_plane *primary = mode_set->crtc->primary; struct drm_plane *primary = mode_set->crtc->primary;
unsigned int rotation; unsigned int rotation;
if (drm_client_panel_rotation(mode_set, &rotation)) { if (drm_client_rotation(mode_set, &rotation)) {
struct drm_plane_state *plane_state; struct drm_plane_state *plane_state;
/* Cannot fail as we've already gotten the plane state above */ /* Cannot fail as we've already gotten the plane state above */
......
...@@ -1722,7 +1722,7 @@ static void drm_setup_crtcs_fb(struct drm_fb_helper *fb_helper) ...@@ -1722,7 +1722,7 @@ static void drm_setup_crtcs_fb(struct drm_fb_helper *fb_helper)
modeset->fb = fb_helper->fb; modeset->fb = fb_helper->fb;
if (drm_client_panel_rotation(modeset, &rotation)) if (drm_client_rotation(modeset, &rotation))
/* Rotating in hardware, fbcon should not rotate */ /* Rotating in hardware, fbcon should not rotate */
sw_rotations |= DRM_MODE_ROTATE_0; sw_rotations |= DRM_MODE_ROTATE_0;
else else
......
...@@ -153,7 +153,7 @@ void drm_client_framebuffer_delete(struct drm_client_buffer *buffer); ...@@ -153,7 +153,7 @@ void drm_client_framebuffer_delete(struct drm_client_buffer *buffer);
int drm_client_modeset_create(struct drm_client_dev *client); int drm_client_modeset_create(struct drm_client_dev *client);
void drm_client_modeset_free(struct drm_client_dev *client); void drm_client_modeset_free(struct drm_client_dev *client);
int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height); int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, unsigned int height);
bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation); bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation);
int drm_client_modeset_commit_force(struct drm_client_dev *client); int drm_client_modeset_commit_force(struct drm_client_dev *client);
int drm_client_modeset_commit(struct drm_client_dev *client); int drm_client_modeset_commit(struct drm_client_dev *client);
int drm_client_modeset_dpms(struct drm_client_dev *client, int mode); int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment