]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: Add rotation value to plane state
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 22 Jan 2015 00:35:40 +0000 (16:35 -0800)
committerDave Airlie <airlied@redhat.com>
Tue, 27 Jan 2015 08:48:53 +0000 (18:48 +1000)
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>
drivers/gpu/drm/drm_atomic.c
include/drm/drm_crtc.h

index af3f3dfdb49f2b0fe0811fa88d4f5daf6bf0d3d9..4c5c9c3899e04a4d9ea93cf9f4095a4760dc8aea 100644 (file)
@@ -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);
index ac55ab0dc88b0eaba336072de0059d142f130272..0ebd9286b332aa8139bb2a96e91be9d0ebc3d4da 100644 (file)
@@ -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;
 };