FILE
intel_bios.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/i915/display/intel_bios.h
1/* 2 * Copyright © 2016-2019 Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the next 12 * paragraph) shall be included in all copies or substantial portions of the 13 * Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 * SOFTWARE. 22 */ 23 24/* 25 * Please use intel_vbt_defs.h for VBT private data, to hide and abstract away 26 * the VBT from the rest of the driver. Add the parsed, clean data to struct 27 * intel_vbt_data within struct intel_display. 28 */ 29 30#ifndef _INTEL_BIOS_H_ 31#define _INTEL_BIOS_H_ 32 33#include <linux/types.h> 34 35struct drm_edid; 36struct intel_bios_encoder_data; 37struct intel_crtc_state; 38struct intel_display; 39struct intel_encoder; 40struct intel_panel; 41enum aux_ch; 42enum port; 43 44enum intel_backlight_type { 45 INTEL_BACKLIGHT_PMIC, 46 INTEL_BACKLIGHT_LPSS, 47 INTEL_BACKLIGHT_DISPLAY_DDI, 48 INTEL_BACKLIGHT_DSI_DCS, 49 INTEL_BACKLIGHT_PANEL_DRIVER_INTERFACE, 50 INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE, 51}; 52 53void intel_bios_init(struct intel_display *display); 54void intel_bios_init_panel_early(struct intel_display *display, 55 struct intel_panel *panel, 56 const struct intel_bios_encoder_data *devdata); 57void intel_bios_init_panel_late(struct intel_display *display, 58 struct intel_panel *panel, 59 const struct intel_bios_encoder_data *devdata, 60 const struct drm_edid *drm_edid); 61void intel_bios_fini_panel(struct intel_panel *panel); 62void intel_bios_driver_remove(struct intel_display *display); 63bool intel_bios_is_valid_vbt(struct intel_display *display, 64 const void *buf, size_t size); 65bool intel_bios_is_tv_present(struct intel_display *display); 66bool intel_bios_is_lvds_present(struct intel_display *display, u8 *i2c_pin); 67bool intel_bios_is_port_present(struct intel_display *display, enum port port); 68bool intel_bios_is_dsi_present(struct intel_display *display, enum port *port); 69bool intel_bios_get_dsc_params(struct intel_encoder *encoder, 70 struct intel_crtc_state *crtc_state, 71 int dsc_max_bpc); 72 73const struct intel_bios_encoder_data * 74intel_bios_encoder_data_lookup(struct intel_display *display, enum port port); 75 76bool intel_bios_encoder_supports_dvi(const struct intel_bios_encoder_data *devdata); 77bool intel_bios_encoder_supports_hdmi(const struct intel_bios_encoder_data *devdata); 78bool intel_bios_encoder_supports_dp(const struct intel_bios_encoder_data *devdata); 79bool intel_bios_encoder_supports_edp(const struct intel_bios_encoder_data *devdata); 80bool intel_bios_encoder_supports_typec_usb(const struct intel_bios_encoder_data *devdata); 81bool intel_bios_encoder_supports_tbt(const struct intel_bios_encoder_data *devdata); 82bool intel_bios_encoder_supports_dsi(const struct intel_bios_encoder_data *devdata); 83bool intel_bios_encoder_supports_dp_dual_mode(const struct intel_bios_encoder_data *devdata); 84bool intel_bios_encoder_is_lspcon(const struct intel_bios_encoder_data *devdata); 85bool intel_bios_encoder_lane_reversal(const struct intel_bios_encoder_data *devdata); 86bool intel_bios_encoder_hpd_invert(const struct intel_bios_encoder_data *devdata); 87enum port intel_bios_encoder_port(const struct intel_bios_encoder_data *devdata); 88bool intel_bios_encoder_reject_edp_rate(const struct intel_bios_encoder_data *devdata, 89 int rate); 90enum aux_ch intel_bios_dp_aux_ch(const struct intel_bios_encoder_data *devdata); 91int intel_bios_dp_boost_level(const struct intel_bios_encoder_data *devdata); 92int intel_bios_dp_max_lane_count(const struct intel_bios_encoder_data *devdata); 93int intel_bios_dp_max_link_rate(const struct intel_bios_encoder_data *devdata); 94bool intel_bios_dp_has_shared_aux_ch(const struct intel_bios_encoder_data *devdata); 95int intel_bios_hdmi_boost_level(const struct intel_bios_encoder_data *devdata); 96int intel_bios_hdmi_ddc_pin(const struct intel_bios_encoder_data *devdata); 97int intel_bios_hdmi_level_shift(const struct intel_bios_encoder_data *devdata); 98int intel_bios_hdmi_max_tmds_clock(const struct intel_bios_encoder_data *devdata); 99 100void intel_bios_for_each_encoder(struct intel_display *display, 101 void (*func)(struct intel_display *display, 102 const struct intel_bios_encoder_data *devdata)); 103 104void intel_bios_debugfs_register(struct intel_display *display); 105 106#endif /* _INTEL_BIOS_H_ */
~/
Read-only file preview.