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 
27*30c63715SThomas Zimmermann #include <linux/types.h>
287daf8d54SMatt Roper 
29*30c63715SThomas Zimmermann struct drm_crtc;
30*30c63715SThomas Zimmermann struct drm_framebuffer;
31*30c63715SThomas Zimmermann struct drm_modeset_acquire_ctx;
32*30c63715SThomas Zimmermann struct drm_plane;
33*30c63715SThomas Zimmermann 
34*30c63715SThomas Zimmermann int drm_plane_helper_update_primary(struct drm_plane *plane, struct drm_crtc *crtc,
35*30c63715SThomas Zimmermann 				    struct drm_framebuffer *fb,
36*30c63715SThomas Zimmermann 				    int crtc_x, int crtc_y,
37*30c63715SThomas Zimmermann 				    unsigned int crtc_w, unsigned int crtc_h,
38*30c63715SThomas Zimmermann 				    uint32_t src_x, uint32_t src_y,
39*30c63715SThomas Zimmermann 				    uint32_t src_w, uint32_t src_h,
40*30c63715SThomas Zimmermann 				    struct drm_modeset_acquire_ctx *ctx);
41*30c63715SThomas Zimmermann int drm_plane_helper_disable_primary(struct drm_plane *plane,
42*30c63715SThomas Zimmermann 				     struct drm_modeset_acquire_ctx *ctx);
43*30c63715SThomas Zimmermann void drm_plane_helper_destroy(struct drm_plane *plane);
44c103d1cfSMatt Roper 
45c103d1cfSMatt Roper #endif
46