[PATCH 01/10] drm: Add rotation value to plane state

Matt Roper matthew.d.roper at intel.com
Wed Jan 21 16:35:40 PST 2015


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 at lists.freedesktop.org
Suggested-by: Daniel Vetter <daniel at ffwll.ch>
Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
---
 drivers/gpu/drm/drm_atomic.c | 2 ++
 include/drm/drm_crtc.h       | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index af3f3df..4c5c9c3 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -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);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 65da9fb..c6f3d81d 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -760,6 +760,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;
 };
 
-- 
1.8.5.1



More information about the dri-devel mailing list