Commit 95bbede5 authored by Jani Nikula's avatar Jani Nikula

drm/i915/bios: move aux ch and ddc checks at a lower level

Unify the code paths at the higher level.
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/44559ef456015f65a863c3d89a9bea9157d13a05.1615998927.git.jani.nikula@intel.com
parent 894d1739
......@@ -1505,6 +1505,9 @@ static enum port get_port_by_ddc_pin(struct drm_i915_private *i915, u8 ddc_pin)
const struct ddi_vbt_port_info *info;
enum port port;
if (!ddc_pin)
return PORT_NONE;
for_each_port(port) {
info = &i915->vbt.ddi_port_info[port];
......@@ -1521,9 +1524,6 @@ static void sanitize_ddc_pin(struct drm_i915_private *i915,
struct ddi_vbt_port_info *info = &i915->vbt.ddi_port_info[port];
enum port p;
if (!info->alternate_ddc_pin)
return;
p = get_port_by_ddc_pin(i915, info->alternate_ddc_pin);
if (p == PORT_NONE)
return;
......@@ -1555,6 +1555,9 @@ static enum port get_port_by_aux_ch(struct drm_i915_private *i915, u8 aux_ch)
const struct ddi_vbt_port_info *info;
enum port port;
if (!aux_ch)
return PORT_NONE;
for_each_port(port) {
info = &i915->vbt.ddi_port_info[port];
......@@ -1571,9 +1574,6 @@ static void sanitize_aux_ch(struct drm_i915_private *i915,
struct ddi_vbt_port_info *info = &i915->vbt.ddi_port_info[port];
enum port p;
if (!info->alternate_aux_channel)
return;
p = get_port_by_aux_ch(i915, info->alternate_aux_channel);
if (p == PORT_NONE)
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment