1379bc100SJani Nikula /* SPDX-License-Identifier: MIT */ 2379bc100SJani Nikula /* 3379bc100SJani Nikula * Copyright © 2019 Intel Corporation 4379bc100SJani Nikula */ 5379bc100SJani Nikula 6379bc100SJani Nikula #ifndef __INTEL_PANEL_H__ 7379bc100SJani Nikula #define __INTEL_PANEL_H__ 8379bc100SJani Nikula 9379bc100SJani Nikula #include <linux/types.h> 10379bc100SJani Nikula 116cc42fbeSJani Nikula enum drm_connector_status; 12f0a57798SVille Syrjälä enum drrs_type; 13379bc100SJani Nikula struct drm_connector; 14379bc100SJani Nikula struct drm_connector_state; 15379bc100SJani Nikula struct drm_display_mode; 16*15d045fdSJani Nikula struct drm_edid; 176cc42fbeSJani Nikula struct drm_i915_private; 18379bc100SJani Nikula struct intel_connector; 19379bc100SJani Nikula struct intel_crtc_state; 205248cc78SVille Syrjälä struct intel_encoder; 21379bc100SJani Nikula 22f70f8153SVille Syrjälä void intel_panel_init_alloc(struct intel_connector *connector); 23*15d045fdSJani Nikula int intel_panel_init(struct intel_connector *connector, 24*15d045fdSJani Nikula const struct drm_edid *fixed_edid); 255d2fd49dSVille Syrjälä void intel_panel_fini(struct intel_connector *connector); 26b81dddb9SVille Syrjälä enum drm_connector_status 27b81dddb9SVille Syrjälä intel_panel_detect(struct drm_connector *connector, bool force); 283c6a4a02SJani Nikula bool intel_panel_use_ssc(struct drm_i915_private *i915); 2909270678SVille Syrjälä const struct drm_display_mode * 3043af6743SVille Syrjälä intel_panel_preferred_fixed_mode(struct intel_connector *connector); 3143af6743SVille Syrjälä const struct drm_display_mode * 3209270678SVille Syrjälä intel_panel_fixed_mode(struct intel_connector *connector, 3309270678SVille Syrjälä const struct drm_display_mode *mode); 3409270678SVille Syrjälä const struct drm_display_mode * 3509270678SVille Syrjälä intel_panel_downclock_mode(struct intel_connector *connector, 3609270678SVille Syrjälä const struct drm_display_mode *adjusted_mode); 3774d6f31fSVille Syrjälä const struct drm_display_mode * 3874d6f31fSVille Syrjälä intel_panel_highest_mode(struct intel_connector *connector, 3974d6f31fSVille Syrjälä const struct drm_display_mode *adjusted_mode); 4053f64f3aSVille Syrjälä int intel_panel_get_modes(struct intel_connector *connector); 41f0a57798SVille Syrjälä enum drrs_type intel_panel_drrs_type(struct intel_connector *connector); 4208243606SVille Syrjälä enum drm_mode_status 4308243606SVille Syrjälä intel_panel_mode_valid(struct intel_connector *connector, 4408243606SVille Syrjälä const struct drm_display_mode *mode); 454b93f49dSJani Nikula int intel_panel_fitting(struct intel_crtc_state *crtc_state, 464cecc7c0SVille Syrjälä const struct drm_connector_state *conn_state); 47cff4c2c6SVille Syrjälä int intel_panel_compute_config(struct intel_connector *connector, 48cff4c2c6SVille Syrjälä struct drm_display_mode *adjusted_mode); 496e939738SVille Syrjälä void intel_panel_add_edid_fixed_modes(struct intel_connector *connector, 50eb89e83cSVille Syrjälä bool use_alt_fixed_modes); 51db10c14aSVille Syrjälä void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector); 52db10c14aSVille Syrjälä void intel_panel_add_vbt_sdvo_fixed_mode(struct intel_connector *connector); 53db10c14aSVille Syrjälä void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector, 545248cc78SVille Syrjälä struct intel_encoder *encoder); 55379bc100SJani Nikula 56379bc100SJani Nikula #endif /* __INTEL_PANEL_H__ */ 57