Skip to content

Commit

Permalink
drm: Add rotation value to plane state
Browse files Browse the repository at this point in the history
The rotation property is shared by multiple drivers, so it makes sense
to store the rotation value (for atomic-converted drivers) in the common
plane state so that core code can eventually access it as well.

Cc: dri-devel@lists.freedesktop.org
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Matt Roper authored and Dave Airlie committed Jan 27, 2015
1 parent 9e26220 commit 1da3062
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,
state->src_w = val;
} else if (property == config->prop_src_h) {
state->src_h = val;
} else if (property == config->rotation_property) {
state->rotation = val;
} else if (plane->funcs->atomic_set_property) {
return plane->funcs->atomic_set_property(plane, state,
property, val);
Expand Down
3 changes: 3 additions & 0 deletions include/drm/drm_crtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ struct drm_plane_state {
uint32_t src_x, src_y;
uint32_t src_h, src_w;

/* Plane rotation */
unsigned int rotation;

struct drm_atomic_state *state;
};

Expand Down

0 comments on commit 1da3062

Please sign in to comment.