1c103d1cfSMatt Roper /*
2c103d1cfSMatt Roper  * Copyright (C) 2011-2013 Intel Corporation
3c103d1cfSMatt Roper  *
4c103d1cfSMatt Roper  * Permission is hereby granted, free of charge, to any person obtaining a
5c103d1cfSMatt Roper  * copy of this software and associated documentation files (the "Software"),
6c103d1cfSMatt Roper  * to deal in the Software without restriction, including without limitation
7c103d1cfSMatt Roper  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8c103d1cfSMatt Roper  * and/or sell copies of the Software, and to permit persons to whom the
9c103d1cfSMatt Roper  * Software is furnished to do so, subject to the following conditions:
10c103d1cfSMatt Roper  *
11c103d1cfSMatt Roper  * The above copyright notice and this permission notice (including the next
12c103d1cfSMatt Roper  * paragraph) shall be included in all copies or substantial portions of the
13c103d1cfSMatt Roper  * Software.
14c103d1cfSMatt Roper  *
15c103d1cfSMatt Roper  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16c103d1cfSMatt Roper  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17c103d1cfSMatt Roper  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18c103d1cfSMatt Roper  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19c103d1cfSMatt Roper  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20c103d1cfSMatt Roper  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21c103d1cfSMatt Roper  * SOFTWARE.
22c103d1cfSMatt Roper  */
23c103d1cfSMatt Roper 
24c103d1cfSMatt Roper #ifndef DRM_PLANE_HELPER_H
25c103d1cfSMatt Roper #define DRM_PLANE_HELPER_H
26c103d1cfSMatt Roper 
27c103d1cfSMatt Roper /**
28c103d1cfSMatt Roper  * DOC: plane helpers
29c103d1cfSMatt Roper  *
30c103d1cfSMatt Roper  * Helper functions to assist with creation and handling of CRTC primary
31c103d1cfSMatt Roper  * planes.
32c103d1cfSMatt Roper  */
33c103d1cfSMatt Roper 
34c103d1cfSMatt Roper extern int drm_primary_helper_update(struct drm_plane *plane,
35c103d1cfSMatt Roper 				     struct drm_crtc *crtc,
36c103d1cfSMatt Roper 				     struct drm_framebuffer *fb,
37c103d1cfSMatt Roper 				     int crtc_x, int crtc_y,
38c103d1cfSMatt Roper 				     unsigned int crtc_w, unsigned int crtc_h,
39c103d1cfSMatt Roper 				     uint32_t src_x, uint32_t src_y,
40c103d1cfSMatt Roper 				     uint32_t src_w, uint32_t src_h);
41c103d1cfSMatt Roper extern int drm_primary_helper_disable(struct drm_plane *plane);
42c103d1cfSMatt Roper extern void drm_primary_helper_destroy(struct drm_plane *plane);
43c103d1cfSMatt Roper extern const struct drm_plane_funcs drm_primary_helper_funcs;
44c103d1cfSMatt Roper extern struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev,
45c103d1cfSMatt Roper 							 uint32_t *formats,
46c103d1cfSMatt Roper 							 int num_formats);
47c103d1cfSMatt Roper 
48c103d1cfSMatt Roper 
49c103d1cfSMatt Roper #endif
50