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 struct drm_connector;
13 struct drm_connector_state;
14 struct drm_display_mode;
15 struct drm_i915_private;
16 struct intel_connector;
17 struct intel_crtc_state;
18 struct intel_panel;
19 
20 int intel_panel_init(struct intel_panel *panel,
21 		     struct drm_display_mode *fixed_mode,
22 		     struct drm_display_mode *downclock_mode);
23 void intel_panel_fini(struct intel_panel *panel);
24 enum drm_connector_status
25 intel_panel_detect(struct drm_connector *connector, bool force);
26 bool intel_panel_use_ssc(struct drm_i915_private *i915);
27 void intel_panel_fixed_mode(const struct drm_display_mode *fixed_mode,
28 			    struct drm_display_mode *adjusted_mode);
29 enum drm_mode_status
30 intel_panel_mode_valid(struct intel_connector *connector,
31 		       const struct drm_display_mode *mode);
32 int intel_panel_fitting(struct intel_crtc_state *crtc_state,
33 			const struct drm_connector_state *conn_state);
34 int intel_panel_compute_config(struct intel_connector *connector,
35 			       struct drm_display_mode *adjusted_mode);
36 struct drm_display_mode *
37 intel_panel_edid_downclock_mode(struct intel_connector *connector,
38 				const struct drm_display_mode *fixed_mode);
39 struct drm_display_mode *
40 intel_panel_edid_fixed_mode(struct intel_connector *connector);
41 struct drm_display_mode *
42 intel_panel_vbt_fixed_mode(struct intel_connector *connector);
43 
44 #endif /* __INTEL_PANEL_H__ */
45