1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_PANEL_H__
7 #define __INTEL_PANEL_H__
8 
9 #include <linux/types.h>
10 
11 enum drm_connector_status;
12 enum drrs_type;
13 struct drm_connector;
14 struct drm_connector_state;
15 struct drm_display_mode;
16 struct drm_i915_private;
17 struct intel_connector;
18 struct intel_crtc_state;
19 struct intel_encoder;
20 
21 int intel_panel_init(struct intel_connector *connector);
22 void intel_panel_fini(struct intel_connector *connector);
23 enum drm_connector_status
24 intel_panel_detect(struct drm_connector *connector, bool force);
25 bool intel_panel_use_ssc(struct drm_i915_private *i915);
26 const struct drm_display_mode *
27 intel_panel_preferred_fixed_mode(struct intel_connector *connector);
28 const struct drm_display_mode *
29 intel_panel_fixed_mode(struct intel_connector *connector,
30 		       const struct drm_display_mode *mode);
31 const struct drm_display_mode *
32 intel_panel_downclock_mode(struct intel_connector *connector,
33 			   const struct drm_display_mode *adjusted_mode);
34 const struct drm_display_mode *
35 intel_panel_highest_mode(struct intel_connector *connector,
36 			 const struct drm_display_mode *adjusted_mode);
37 int intel_panel_get_modes(struct intel_connector *connector);
38 enum drrs_type intel_panel_drrs_type(struct intel_connector *connector);
39 enum drm_mode_status
40 intel_panel_mode_valid(struct intel_connector *connector,
41 		       const struct drm_display_mode *mode);
42 int intel_panel_fitting(struct intel_crtc_state *crtc_state,
43 			const struct drm_connector_state *conn_state);
44 int intel_panel_compute_config(struct intel_connector *connector,
45 			       struct drm_display_mode *adjusted_mode);
46 void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
47 				      bool use_alt_fixed_modes);
48 void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector);
49 void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector);
50 void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
51 					struct intel_encoder *encoder);
52 
53 #endif /* __INTEL_PANEL_H__ */
54