From 0aed3bdede66ae5febfb4d8ab52990e370ce6567 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 17 Jan 2020 16:29:22 +0200 Subject: drm/i915/bios: add intel_bios_hdmi_level_shift() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't access i915->vbt.ddi_port_info[] directly. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/da8ca144020fe165af33992661568d0586a2fdeb.1579270868.git.jani.nikula@intel.com --- drivers/gpu/drm/i915/display/intel_bios.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/drm/i915/display/intel_bios.c') diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index b231fafc03ca..50bff4e7d5c2 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -2569,3 +2569,12 @@ int intel_bios_max_tmds_clock(struct intel_encoder *encoder) return i915->vbt.ddi_port_info[encoder->port].max_tmds_clock; } + +int intel_bios_hdmi_level_shift(struct intel_encoder *encoder) +{ + struct drm_i915_private *i915 = to_i915(encoder->base.dev); + const struct ddi_vbt_port_info *info = + &i915->vbt.ddi_port_info[encoder->port]; + + return info->hdmi_level_shift_set ? info->hdmi_level_shift : -1; +} -- cgit v1.2.3