提交 210126bd 编写于 作者: R Rodrigo Vivi

drm/i915: digital_port_connected sort platforms newer-to-older

Just sorting this "if" block from newer to older platform.

The main difference here is the addition of a
missing case with return false that should never occur.
And if it occurs it is better than to raise a warn
than use the icl one.

The gen >= 11 was already present in the previous logic,
although hidden.

So, in summary no real functional change.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181022171526.15641-3-rodrigo.vivi@intel.com
上级 36c1f028
...@@ -5035,20 +5035,23 @@ bool intel_digital_port_connected(struct intel_encoder *encoder) ...@@ -5035,20 +5035,23 @@ bool intel_digital_port_connected(struct intel_encoder *encoder)
return g4x_digital_port_connected(encoder); return g4x_digital_port_connected(encoder);
} }
if (IS_GEN5(dev_priv)) if (INTEL_GEN(dev_priv) >= 11)
return ilk_digital_port_connected(encoder); return icl_digital_port_connected(encoder);
else if (IS_GEN6(dev_priv)) else if (IS_GEN10(dev_priv) || IS_GEN9_BC(dev_priv))
return snb_digital_port_connected(encoder); return spt_digital_port_connected(encoder);
else if (IS_GEN7(dev_priv))
return ivb_digital_port_connected(encoder);
else if (IS_GEN8(dev_priv))
return bdw_digital_port_connected(encoder);
else if (IS_GEN9_LP(dev_priv)) else if (IS_GEN9_LP(dev_priv))
return bxt_digital_port_connected(encoder); return bxt_digital_port_connected(encoder);
else if (IS_GEN9_BC(dev_priv) || IS_GEN10(dev_priv)) else if (IS_GEN8(dev_priv))
return spt_digital_port_connected(encoder); return bdw_digital_port_connected(encoder);
else else if (IS_GEN7(dev_priv))
return icl_digital_port_connected(encoder); return ivb_digital_port_connected(encoder);
else if (IS_GEN6(dev_priv))
return snb_digital_port_connected(encoder);
else if (IS_GEN5(dev_priv))
return ilk_digital_port_connected(encoder);
MISSING_CASE(INTEL_GEN(dev_priv));
return false;
} }
static struct edid * static struct edid *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册