drm_crtc_internal.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. * This header file contains mode setting related functions and definitions
  29. * which are only used within the drm module as internal implementation details
  30. * and are not exported to drivers.
  31. */
  32. /* drm_crtc.c */
  33. void drm_connector_ida_init(void);
  34. void drm_connector_ida_destroy(void);
  35. int drm_mode_object_get(struct drm_device *dev,
  36. struct drm_mode_object *obj, uint32_t obj_type);
  37. void drm_mode_object_unregister(struct drm_device *dev,
  38. struct drm_mode_object *object);
  39. bool drm_property_change_valid_get(struct drm_property *property,
  40. uint64_t value,
  41. struct drm_mode_object **ref);
  42. void drm_property_change_valid_put(struct drm_property *property,
  43. struct drm_mode_object *ref);
  44. int drm_plane_check_pixel_format(const struct drm_plane *plane,
  45. u32 format);
  46. int drm_crtc_check_viewport(const struct drm_crtc *crtc,
  47. int x, int y,
  48. const struct drm_display_mode *mode,
  49. const struct drm_framebuffer *fb);
  50. void drm_fb_release(struct drm_file *file_priv);
  51. void drm_property_destroy_user_blobs(struct drm_device *dev,
  52. struct drm_file *file_priv);
  53. /* dumb buffer support IOCTLs */
  54. int drm_mode_create_dumb_ioctl(struct drm_device *dev,
  55. void *data, struct drm_file *file_priv);
  56. int drm_mode_mmap_dumb_ioctl(struct drm_device *dev,
  57. void *data, struct drm_file *file_priv);
  58. int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
  59. void *data, struct drm_file *file_priv);
  60. /* framebuffer IOCTLs */
  61. extern int drm_mode_addfb(struct drm_device *dev,
  62. void *data, struct drm_file *file_priv);
  63. extern int drm_mode_addfb2(struct drm_device *dev,
  64. void *data, struct drm_file *file_priv);
  65. int drm_mode_rmfb(struct drm_device *dev,
  66. void *data, struct drm_file *file_priv);
  67. int drm_mode_getfb(struct drm_device *dev,
  68. void *data, struct drm_file *file_priv);
  69. int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
  70. void *data, struct drm_file *file_priv);
  71. /* IOCTLs */
  72. int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
  73. struct drm_file *file_priv);
  74. int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data,
  75. struct drm_file *file_priv);
  76. int drm_mode_getresources(struct drm_device *dev,
  77. void *data, struct drm_file *file_priv);
  78. int drm_mode_getplane_res(struct drm_device *dev, void *data,
  79. struct drm_file *file_priv);
  80. int drm_mode_getcrtc(struct drm_device *dev,
  81. void *data, struct drm_file *file_priv);
  82. int drm_mode_getconnector(struct drm_device *dev,
  83. void *data, struct drm_file *file_priv);
  84. int drm_mode_setcrtc(struct drm_device *dev,
  85. void *data, struct drm_file *file_priv);
  86. int drm_mode_getplane(struct drm_device *dev,
  87. void *data, struct drm_file *file_priv);
  88. int drm_mode_setplane(struct drm_device *dev,
  89. void *data, struct drm_file *file_priv);
  90. int drm_mode_cursor_ioctl(struct drm_device *dev,
  91. void *data, struct drm_file *file_priv);
  92. int drm_mode_cursor2_ioctl(struct drm_device *dev,
  93. void *data, struct drm_file *file_priv);
  94. int drm_mode_getproperty_ioctl(struct drm_device *dev,
  95. void *data, struct drm_file *file_priv);
  96. int drm_mode_getblob_ioctl(struct drm_device *dev,
  97. void *data, struct drm_file *file_priv);
  98. int drm_mode_createblob_ioctl(struct drm_device *dev,
  99. void *data, struct drm_file *file_priv);
  100. int drm_mode_destroyblob_ioctl(struct drm_device *dev,
  101. void *data, struct drm_file *file_priv);
  102. int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
  103. void *data, struct drm_file *file_priv);
  104. int drm_mode_getencoder(struct drm_device *dev,
  105. void *data, struct drm_file *file_priv);
  106. int drm_mode_gamma_get_ioctl(struct drm_device *dev,
  107. void *data, struct drm_file *file_priv);
  108. int drm_mode_gamma_set_ioctl(struct drm_device *dev,
  109. void *data, struct drm_file *file_priv);
  110. int drm_mode_page_flip_ioctl(struct drm_device *dev,
  111. void *data, struct drm_file *file_priv);
  112. /* drm_atomic.c */
  113. int drm_atomic_get_property(struct drm_mode_object *obj,
  114. struct drm_property *property, uint64_t *val);
  115. int drm_mode_atomic_ioctl(struct drm_device *dev,
  116. void *data, struct drm_file *file_priv);
  117. int drm_modeset_register_all(struct drm_device *dev);
  118. void drm_modeset_unregister_all(struct drm_device *dev);