Commit 62330164 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by José Roberto de Souza

drm/i915/icl: replace check for combo phy

These are the only places that assume ports A and B are the ones with
combo phy.  Let's use intel_port_is_combophy() there to make sure
it checks for combo phy ports the same way everywhere.

v2: define for_each_combo_port() helper to check the ports
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114011509.3667-1-lucas.demarchi@intel.com
parent 0a885381
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#include "intel_drv.h" #include "intel_drv.h"
#define for_each_combo_port(__dev_priv, __port) \
for ((__port) = PORT_A; (__port) < I915_MAX_PORTS; (__port)++) \
for_each_if(intel_port_is_combophy(__dev_priv, __port))
enum { enum {
PROCMON_0_85V_DOT_0, PROCMON_0_85V_DOT_0,
PROCMON_0_95V_DOT_0, PROCMON_0_95V_DOT_0,
...@@ -199,7 +203,7 @@ void icl_combo_phys_init(struct drm_i915_private *dev_priv) ...@@ -199,7 +203,7 @@ void icl_combo_phys_init(struct drm_i915_private *dev_priv)
{ {
enum port port; enum port port;
for (port = PORT_A; port <= PORT_B; port++) { for_each_combo_port(dev_priv, port) {
u32 val; u32 val;
if (icl_combo_phy_verify_state(dev_priv, port)) { if (icl_combo_phy_verify_state(dev_priv, port)) {
...@@ -228,7 +232,7 @@ void icl_combo_phys_uninit(struct drm_i915_private *dev_priv) ...@@ -228,7 +232,7 @@ void icl_combo_phys_uninit(struct drm_i915_private *dev_priv)
{ {
enum port port; enum port port;
for (port = PORT_A; port <= PORT_B; port++) { for_each_combo_port(dev_priv, port) {
u32 val; u32 val;
if (!icl_combo_phy_verify_state(dev_priv, port)) if (!icl_combo_phy_verify_state(dev_priv, port))
......
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