linux/drivers/gpu/drm/drm_crtc_internal.h
<<
>>
Prefs
   1/*
   2 * Copyright © 2006 Keith Packard
   3 * Copyright © 2007-2008 Dave Airlie
   4 * Copyright © 2007-2008 Intel Corporation
   5 *   Jesse Barnes <jesse.barnes@intel.com>
   6 * Copyright © 2014 Intel Corporation
   7 *   Daniel Vetter <daniel.vetter@ffwll.ch>
   8 *
   9 * Permission is hereby granted, free of charge, to any person obtaining a
  10 * copy of this software and associated documentation files (the "Software"),
  11 * to deal in the Software without restriction, including without limitation
  12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  13 * and/or sell copies of the Software, and to permit persons to whom the
  14 * Software is furnished to do so, subject to the following conditions:
  15 *
  16 * The above copyright notice and this permission notice shall be included in
  17 * all copies or substantial portions of the Software.
  18 *
  19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  22 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  25 * OTHER DEALINGS IN THE SOFTWARE.
  26 */
  27
  28/*
  29 * This header file contains mode setting related functions and definitions
  30 * which are only used within the drm module as internal implementation details
  31 * and are not exported to drivers.
  32 */
  33
  34
  35/* drm_crtc.c */
  36void drm_connector_ida_init(void);
  37void drm_connector_ida_destroy(void);
  38int drm_mode_object_get(struct drm_device *dev,
  39                        struct drm_mode_object *obj, uint32_t obj_type);
  40void drm_mode_object_unregister(struct drm_device *dev,
  41                                struct drm_mode_object *object);
  42bool drm_property_change_valid_get(struct drm_property *property,
  43                                   uint64_t value,
  44                                   struct drm_mode_object **ref);
  45void drm_property_change_valid_put(struct drm_property *property,
  46                                   struct drm_mode_object *ref);
  47
  48int drm_plane_check_pixel_format(const struct drm_plane *plane,
  49                                 u32 format);
  50int drm_crtc_check_viewport(const struct drm_crtc *crtc,
  51                            int x, int y,
  52                            const struct drm_display_mode *mode,
  53                            const struct drm_framebuffer *fb);
  54
  55void drm_fb_release(struct drm_file *file_priv);
  56void drm_property_destroy_user_blobs(struct drm_device *dev,
  57                                     struct drm_file *file_priv);
  58
  59/* dumb buffer support IOCTLs */
  60int drm_mode_create_dumb_ioctl(struct drm_device *dev,
  61                               void *data, struct drm_file *file_priv);
  62int drm_mode_mmap_dumb_ioctl(struct drm_device *dev,
  63                             void *data, struct drm_file *file_priv);
  64int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
  65                                void *data, struct drm_file *file_priv);
  66
  67/* framebuffer IOCTLs */
  68extern int drm_mode_addfb(struct drm_device *dev,
  69                          void *data, struct drm_file *file_priv);
  70extern int drm_mode_addfb2(struct drm_device *dev,
  71                           void *data, struct drm_file *file_priv);
  72int drm_mode_rmfb(struct drm_device *dev,
  73                         void *data, struct drm_file *file_priv);
  74int drm_mode_getfb(struct drm_device *dev,
  75                   void *data, struct drm_file *file_priv);
  76int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
  77                           void *data, struct drm_file *file_priv);
  78
  79/* IOCTLs */
  80int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
  81                                      struct drm_file *file_priv);
  82int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
  83                                    struct drm_file *file_priv);
  84
  85int drm_mode_getresources(struct drm_device *dev,
  86                          void *data, struct drm_file *file_priv);
  87int drm_mode_getplane_res(struct drm_device *dev, void *data,
  88                          struct drm_file *file_priv);
  89int drm_mode_getcrtc(struct drm_device *dev,
  90                     void *data, struct drm_file *file_priv);
  91int drm_mode_getconnector(struct drm_device *dev,
  92                          void *data, struct drm_file *file_priv);
  93int drm_mode_setcrtc(struct drm_device *dev,
  94                     void *data, struct drm_file *file_priv);
  95int drm_mode_getplane(struct drm_device *dev,
  96                      void *data, struct drm_file *file_priv);
  97int drm_mode_setplane(struct drm_device *dev,
  98                      void *data, struct drm_file *file_priv);
  99int drm_mode_cursor_ioctl(struct drm_device *dev,
 100                          void *data, struct drm_file *file_priv);
 101int drm_mode_cursor2_ioctl(struct drm_device *dev,
 102                           void *data, struct drm_file *file_priv);
 103int drm_mode_getproperty_ioctl(struct drm_device *dev,
 104                               void *data, struct drm_file *file_priv);
 105int drm_mode_getblob_ioctl(struct drm_device *dev,
 106                           void *data, struct drm_file *file_priv);
 107int drm_mode_createblob_ioctl(struct drm_device *dev,
 108                              void *data, struct drm_file *file_priv);
 109int drm_mode_destroyblob_ioctl(struct drm_device *dev,
 110                               void *data, struct drm_file *file_priv);
 111int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
 112                                          void *data, struct drm_file *file_priv);
 113int drm_mode_getencoder(struct drm_device *dev,
 114                        void *data, struct drm_file *file_priv);
 115int drm_mode_gamma_get_ioctl(struct drm_device *dev,
 116                             void *data, struct drm_file *file_priv);
 117int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 118                             void *data, struct drm_file *file_priv);
 119
 120int drm_mode_page_flip_ioctl(struct drm_device *dev,
 121                             void *data, struct drm_file *file_priv);
 122
 123/* drm_atomic.c */
 124int drm_atomic_get_property(struct drm_mode_object *obj,
 125                            struct drm_property *property, uint64_t *val);
 126int drm_mode_atomic_ioctl(struct drm_device *dev,
 127                          void *data, struct drm_file *file_priv);
 128
 129int drm_modeset_register_all(struct drm_device *dev);
 130void drm_modeset_unregister_all(struct drm_device *dev);
 131
 132/* drm_blend.c */
 133int drm_atomic_helper_normalize_zpos(struct drm_device *dev,
 134                                     struct drm_atomic_state *state);
 135