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 int intel_panel_get_modes(struct intel_connector *connector);
35 enum drrs_type intel_panel_drrs_type(struct intel_connector *connector);
36 enum drm_mode_status
37 intel_panel_mode_valid(struct intel_connector *connector,
38 		       const struct drm_display_mode *mode);
39 int intel_panel_fitting(struct intel_crtc_state *crtc_state,
40 			const struct drm_connector_state *conn_state);
41 int intel_panel_compute_config(struct intel_connector *connector,
42 			       struct drm_display_mode *adjusted_mode);
43 void intel_panel_add_edid_fixed_modes(struct intel_connector *connector, bool has_drrs);
44 void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector);
45 void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector);
46 void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
47 					struct intel_encoder *encoder);
48 
49 #endif /* __INTEL_PANEL_H__ */
50