1 /* $NetBSD: drm_crtc_helper_internal.h,v 1.2 2021/12/18 23:44:57 riastradh Exp $ */ 2 3 /* 4 * Copyright 2016 Intel Corporation 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 25 /* 26 * This header file contains mode setting related functions and definitions 27 * which are only used within the drm kms helper module as internal 28 * implementation details and are not exported to drivers. 29 */ 30 31 #include <drm/drm_connector.h> 32 #include <drm/drm_crtc.h> 33 #include <drm/drm_dp_helper.h> 34 #include <drm/drm_encoder.h> 35 #include <drm/drm_modes.h> 36 37 /* drm_fb_helper.c */ 38 #ifdef CONFIG_DRM_FBDEV_EMULATION 39 int drm_fb_helper_modinit(void); 40 #else 41 static inline int drm_fb_helper_modinit(void) 42 { 43 return 0; 44 } 45 #endif 46 47 /* drm_dp_aux_dev.c */ 48 #ifdef CONFIG_DRM_DP_AUX_CHARDEV 49 int drm_dp_aux_dev_init(void); 50 void drm_dp_aux_dev_exit(void); 51 int drm_dp_aux_register_devnode(struct drm_dp_aux *aux); 52 void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux); 53 #else 54 static inline int drm_dp_aux_dev_init(void) 55 { 56 return 0; 57 } 58 59 static inline void drm_dp_aux_dev_exit(void) 60 { 61 } 62 63 static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux) 64 { 65 return 0; 66 } 67 68 static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux) 69 { 70 } 71 #endif 72 73 /* drm_probe_helper.c */ 74 enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc, 75 const struct drm_display_mode *mode); 76 enum drm_mode_status drm_encoder_mode_valid(struct drm_encoder *encoder, 77 const struct drm_display_mode *mode); 78 enum drm_mode_status drm_connector_mode_valid(struct drm_connector *connector, 79 struct drm_display_mode *mode); 80 81 struct drm_encoder * 82 drm_connector_get_single_encoder(struct drm_connector *connector); 83