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_edid;
17 struct drm_i915_private;
18 struct intel_connector;
19 struct intel_crtc_state;
20 struct intel_encoder;
21 
22 void intel_panel_init_alloc(struct intel_connector *connector);
23 int intel_panel_init(struct intel_connector *connector,
24 		     const struct drm_edid *fixed_edid);
25 void intel_panel_fini(struct intel_connector *connector);
26 enum drm_connector_status
27 intel_panel_detect(struct drm_connector *connector, bool force);
28 bool intel_panel_use_ssc(struct drm_i915_private *i915);
29 const struct drm_display_mode *
30 intel_panel_preferred_fixed_mode(struct intel_connector *connector);
31 const struct drm_display_mode *
32 intel_panel_fixed_mode(struct intel_connector *connector,
33 		       const struct drm_display_mode *mode);
34 const struct drm_display_mode *
35 intel_panel_downclock_mode(struct intel_connector *connector,
36 			   const struct drm_display_mode *adjusted_mode);
37 const struct drm_display_mode *
38 intel_panel_highest_mode(struct intel_connector *connector,
39 			 const struct drm_display_mode *adjusted_mode);
40 int intel_panel_get_modes(struct intel_connector *connector);
41 enum drrs_type intel_panel_drrs_type(struct intel_connector *connector);
42 enum drm_mode_status
43 intel_panel_mode_valid(struct intel_connector *connector,
44 		       const struct drm_display_mode *mode);
45 int intel_panel_fitting(struct intel_crtc_state *crtc_state,
46 			const struct drm_connector_state *conn_state);
47 int intel_panel_compute_config(struct intel_connector *connector,
48 			       struct drm_display_mode *adjusted_mode);
49 void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
50 				      bool use_alt_fixed_modes);
51 void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector);
52 void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector);
53 void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
54 					struct intel_encoder *encoder);
55 
56 #endif /* __INTEL_PANEL_H__ */
57