Avoid magic numbers and use the introduced defines.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
                if (!state->bpp[i])
                        return -EINVAL;
 
-               switch (state->base.rotation & 0xf) {
+               switch (state->base.rotation & DRM_ROTATE_MASK) {
                case BIT(DRM_ROTATE_90):
                        offset = ((y_offset + state->src_y + patched_src_w - 1) /
                                  ydiv) * fb->pitches[i];
 
 {
        if (rotation & ~supported_rotations) {
                rotation ^= BIT(DRM_REFLECT_X) | BIT(DRM_REFLECT_Y);
-               rotation = (rotation & ~0xf) | BIT((ffs(rotation & 0xf) + 1) % 4);
+               rotation = (rotation & DRM_REFLECT_MASK) |
+                          BIT((ffs(rotation & DRM_ROTATE_MASK) + 1) % 4);
        }
 
        return rotation;
 
                }
        }
 
-       switch (rotation & 0xf) {
+       switch (rotation & DRM_ROTATE_MASK) {
        case BIT(DRM_ROTATE_0):
                break;
        case BIT(DRM_ROTATE_90):
 {
        struct drm_rect tmp;
 
-       switch (rotation & 0xf) {
+       switch (rotation & DRM_ROTATE_MASK) {
        case BIT(DRM_ROTATE_0):
                break;
        case BIT(DRM_ROTATE_90):
 
                uint32_t w = win->src_w;
                uint32_t h = win->src_h;
 
-               switch (win->rotation & 0xf) {
+               switch (win->rotation & DRM_ROTATE_MASK) {
                default:
                        dev_err(fb->dev->dev, "invalid rotation: %02x",
                                        (uint32_t)win->rotation);
                info->rotation_type = OMAP_DSS_ROT_TILER;
                info->screen_width  = omap_gem_tiled_stride(plane->bo, orient);
        } else {
-               switch (win->rotation & 0xf) {
+               switch (win->rotation & DRM_ROTATE_MASK) {
                case 0:
                case BIT(DRM_ROTATE_0):
                        /* OK */
 
        win.src_x = state->src_x >> 16;
        win.src_y = state->src_y >> 16;
 
-       switch (state->rotation & 0xf) {
+       switch (state->rotation & DRM_ROTATE_MASK) {
        case BIT(DRM_ROTATE_90):
        case BIT(DRM_ROTATE_270):
                win.src_w = state->src_h >> 16;