drm: BIT(DRM_ROTATE_?) -> DRM_ROTATE_?
Only property creation uses the rotation as an index, so convert the to figure the index when needed. v2: Use the new defines to build the _MASK defines (Sean) Cc: intel-gfx@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: malidp@foss.arm.com Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Liviu Dudau <Liviu.Dudau@arm.com> Cc: Sean Paul <seanpaul@chromium.org> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1469771405-17653-1-git-send-email-joonas.lahtinen@linux.intel.com
这个提交包含在:
@@ -109,8 +109,8 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
|
||||
win.src_y = state->src_y >> 16;
|
||||
|
||||
switch (state->rotation & DRM_ROTATE_MASK) {
|
||||
case BIT(DRM_ROTATE_90):
|
||||
case BIT(DRM_ROTATE_270):
|
||||
case DRM_ROTATE_90:
|
||||
case DRM_ROTATE_270:
|
||||
win.src_w = state->src_h >> 16;
|
||||
win.src_h = state->src_w >> 16;
|
||||
break;
|
||||
@@ -149,7 +149,7 @@ static void omap_plane_atomic_disable(struct drm_plane *plane,
|
||||
struct omap_plane_state *omap_state = to_omap_plane_state(plane->state);
|
||||
struct omap_plane *omap_plane = to_omap_plane(plane);
|
||||
|
||||
plane->state->rotation = BIT(DRM_ROTATE_0);
|
||||
plane->state->rotation = DRM_ROTATE_0;
|
||||
omap_state->zorder = plane->type == DRM_PLANE_TYPE_PRIMARY
|
||||
? 0 : omap_plane->id;
|
||||
|
||||
@@ -178,7 +178,7 @@ static int omap_plane_atomic_check(struct drm_plane *plane,
|
||||
return -EINVAL;
|
||||
|
||||
if (state->fb) {
|
||||
if (state->rotation != BIT(DRM_ROTATE_0) &&
|
||||
if (state->rotation != DRM_ROTATE_0 &&
|
||||
!omap_framebuffer_supports_rotation(state->fb))
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ static void omap_plane_reset(struct drm_plane *plane)
|
||||
*/
|
||||
omap_state->zorder = plane->type == DRM_PLANE_TYPE_PRIMARY
|
||||
? 0 : omap_plane->id;
|
||||
omap_state->base.rotation = BIT(DRM_ROTATE_0);
|
||||
omap_state->base.rotation = DRM_ROTATE_0;
|
||||
|
||||
plane->state = &omap_state->base;
|
||||
plane->state->plane = plane;
|
||||
|
在新工单中引用
屏蔽一个用户