/*1* Copyright (c) 2016 Intel Corporation2*3* Permission to use, copy, modify, distribute, and sell this software and its4* documentation for any purpose is hereby granted without fee, provided that5* the above copyright notice appear in all copies and that both that copyright6* notice and this permission notice appear in supporting documentation, and7* that the name of the copyright holders not be used in advertising or8* publicity pertaining to distribution of the software without specific,9* written prior permission. The copyright holders make no representations10* about the suitability of this software for any purpose. It is provided "as11* is" without express or implied warranty.12*13* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,14* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO15* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR16* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,17* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER18* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE19* OF THIS SOFTWARE.20*/2122#ifndef __DRM_BLEND_H__23#define __DRM_BLEND_H__2425#include <linux/list.h>26#include <linux/ctype.h>27#include <drm/drm_mode.h>2829#define DRM_MODE_BLEND_PREMULTI 030#define DRM_MODE_BLEND_COVERAGE 131#define DRM_MODE_BLEND_PIXEL_NONE 23233struct drm_device;34struct drm_atomic_state;35struct drm_plane;3637static inline bool drm_rotation_90_or_270(unsigned int rotation)38{39return rotation & (DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270);40}4142#define DRM_BLEND_ALPHA_OPAQUE 0xffff4344int drm_plane_create_alpha_property(struct drm_plane *plane);45int drm_plane_create_rotation_property(struct drm_plane *plane,46unsigned int rotation,47unsigned int supported_rotations);48unsigned int drm_rotation_simplify(unsigned int rotation,49unsigned int supported_rotations);5051int drm_plane_create_zpos_property(struct drm_plane *plane,52unsigned int zpos,53unsigned int min, unsigned int max);54int drm_plane_create_zpos_immutable_property(struct drm_plane *plane,55unsigned int zpos);56int drm_atomic_normalize_zpos(struct drm_device *dev,57struct drm_atomic_state *state);58int drm_plane_create_blend_mode_property(struct drm_plane *plane,59unsigned int supported_modes);60#endif616263