Home | History | Annotate | Line # | Download | only in drm
      1 /*	$NetBSD: drm_atomic_state_helper.h,v 1.2 2021/12/18 23:45:45 riastradh Exp $	*/
      2 
      3 /*
      4  * Copyright (C) 2018 Intel Corp.
      5  *
      6  * Permission is hereby granted, free of charge, to any person obtaining a
      7  * copy of this software and associated documentation files (the "Software"),
      8  * to deal in the Software without restriction, including without limitation
      9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     10  * and/or sell copies of the Software, and to permit persons to whom the
     11  * Software is furnished to do so, subject to the following conditions:
     12  *
     13  * The above copyright notice and this permission notice shall be included in
     14  * all copies or substantial portions of the Software.
     15  *
     16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     19  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     20  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     22  * OTHER DEALINGS IN THE SOFTWARE.
     23  *
     24  * Authors:
     25  * Rob Clark <robdclark (at) gmail.com>
     26  * Daniel Vetter <daniel.vetter (at) ffwll.ch>
     27  */
     28 
     29 #include <linux/types.h>
     30 
     31 struct drm_crtc;
     32 struct drm_crtc_state;
     33 struct drm_plane;
     34 struct drm_plane_state;
     35 struct drm_connector;
     36 struct drm_connector_state;
     37 struct drm_private_obj;
     38 struct drm_private_state;
     39 struct drm_modeset_acquire_ctx;
     40 struct drm_device;
     41 
     42 void __drm_atomic_helper_crtc_state_reset(struct drm_crtc_state *state,
     43 					  struct drm_crtc *crtc);
     44 void __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
     45 				    struct drm_crtc_state *state);
     46 void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
     47 void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
     48 					      struct drm_crtc_state *state);
     49 struct drm_crtc_state *
     50 drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc);
     51 void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state);
     52 void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
     53 					  struct drm_crtc_state *state);
     54 
     55 void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *state,
     56 					   struct drm_plane *plane);
     57 void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
     58 				     struct drm_plane_state *state);
     59 void drm_atomic_helper_plane_reset(struct drm_plane *plane);
     60 void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
     61 					       struct drm_plane_state *state);
     62 struct drm_plane_state *
     63 drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane);
     64 void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state);
     65 void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane,
     66 					  struct drm_plane_state *state);
     67 
     68 void __drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_state,
     69 					       struct drm_connector *connector);
     70 void __drm_atomic_helper_connector_reset(struct drm_connector *connector,
     71 					 struct drm_connector_state *conn_state);
     72 void drm_atomic_helper_connector_reset(struct drm_connector *connector);
     73 void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector);
     74 void
     75 __drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector,
     76 					   struct drm_connector_state *state);
     77 struct drm_connector_state *
     78 drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector);
     79 void
     80 __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state);
     81 void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector,
     82 					  struct drm_connector_state *state);
     83 void __drm_atomic_helper_private_obj_duplicate_state(struct drm_private_obj *obj,
     84 						     struct drm_private_state *state);
     85