xref: /linux/drivers/gpu/drm/drm_crtc_helper_internal.h (revision 95035d45de1c988b04d49f2a892e4e1952ac9766)
1e15c8f4bSDaniel Vetter /*
2e15c8f4bSDaniel Vetter  * Copyright © 2016 Intel Corporation
3e15c8f4bSDaniel Vetter  *
4e15c8f4bSDaniel Vetter  * Permission is hereby granted, free of charge, to any person obtaining a
5e15c8f4bSDaniel Vetter  * copy of this software and associated documentation files (the "Software"),
6e15c8f4bSDaniel Vetter  * to deal in the Software without restriction, including without limitation
7e15c8f4bSDaniel Vetter  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8e15c8f4bSDaniel Vetter  * and/or sell copies of the Software, and to permit persons to whom the
9e15c8f4bSDaniel Vetter  * Software is furnished to do so, subject to the following conditions:
10e15c8f4bSDaniel Vetter  *
11e15c8f4bSDaniel Vetter  * The above copyright notice and this permission notice shall be included in
12e15c8f4bSDaniel Vetter  * all copies or substantial portions of the Software.
13e15c8f4bSDaniel Vetter  *
14e15c8f4bSDaniel Vetter  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15e15c8f4bSDaniel Vetter  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16e15c8f4bSDaniel Vetter  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17e15c8f4bSDaniel Vetter  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18e15c8f4bSDaniel Vetter  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19e15c8f4bSDaniel Vetter  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20e15c8f4bSDaniel Vetter  * OTHER DEALINGS IN THE SOFTWARE.
21e15c8f4bSDaniel Vetter  */
22e15c8f4bSDaniel Vetter 
23e15c8f4bSDaniel Vetter /*
24e15c8f4bSDaniel Vetter  * This header file contains mode setting related functions and definitions
25e15c8f4bSDaniel Vetter  * which are only used within the drm kms helper module as internal
26e15c8f4bSDaniel Vetter  * implementation details and are not exported to drivers.
27e15c8f4bSDaniel Vetter  */
28e15c8f4bSDaniel Vetter 
29*95035d45SJani Nikula #ifndef __DRM_CRTC_HELPER_INTERNAL_H__
30*95035d45SJani Nikula #define __DRM_CRTC_HELPER_INTERNAL_H__
31*95035d45SJani Nikula 
32da251bf8SJose Abreu #include <drm/drm_connector.h>
33da251bf8SJose Abreu #include <drm/drm_crtc.h>
34da251bf8SJose Abreu #include <drm/drm_encoder.h>
35da251bf8SJose Abreu #include <drm/drm_modes.h>
36e15c8f4bSDaniel Vetter 
37da251bf8SJose Abreu /* drm_probe_helper.c */
38da251bf8SJose Abreu enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
39da251bf8SJose Abreu 					 const struct drm_display_mode *mode);
40da251bf8SJose Abreu enum drm_mode_status drm_encoder_mode_valid(struct drm_encoder *encoder,
41da251bf8SJose Abreu 					    const struct drm_display_mode *mode);
421c26b8e0SLyude Paul int
431c26b8e0SLyude Paul drm_connector_mode_valid(struct drm_connector *connector,
441c26b8e0SLyude Paul 			 struct drm_display_mode *mode,
451c26b8e0SLyude Paul 			 struct drm_modeset_acquire_ctx *ctx,
461c26b8e0SLyude Paul 			 enum drm_mode_status *status);
47a92462d6SJosé Roberto de Souza 
48a92462d6SJosé Roberto de Souza struct drm_encoder *
49a92462d6SJosé Roberto de Souza drm_connector_get_single_encoder(struct drm_connector *connector);
50*95035d45SJani Nikula 
51*95035d45SJani Nikula #endif /* __DRM_CRTC_HELPER_INTERNAL_H__ */
52