diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-11-14 04:15:07 +0300 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2018-11-16 03:36:57 +0300 |
commit | 6233016484c0217cb1dbf323f1e439e519a59906 (patch) | |
tree | f8bc0c0934e899459bb3a73852c88224d2ae609d /drivers/gpu/drm/i915/intel_combo_phy.c | |
parent | 0a8853811dd6c2ab7f65b3afad927ac7a9332e63 (diff) | |
download | linux-6233016484c0217cb1dbf323f1e439e519a59906.tar.xz |
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: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114011509.3667-1-lucas.demarchi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_combo_phy.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_combo_phy.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_combo_phy.c b/drivers/gpu/drm/i915/intel_combo_phy.c index f7c16f6724f0..49f3a533860d 100644 --- a/drivers/gpu/drm/i915/intel_combo_phy.c +++ b/drivers/gpu/drm/i915/intel_combo_phy.c @@ -5,6 +5,10 @@ #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 { PROCMON_0_85V_DOT_0, PROCMON_0_95V_DOT_0, @@ -199,7 +203,7 @@ void icl_combo_phys_init(struct drm_i915_private *dev_priv) { enum port port; - for (port = PORT_A; port <= PORT_B; port++) { + for_each_combo_port(dev_priv, port) { u32 val; if (icl_combo_phy_verify_state(dev_priv, port)) { @@ -228,7 +232,7 @@ void icl_combo_phys_uninit(struct drm_i915_private *dev_priv) { enum port port; - for (port = PORT_A; port <= PORT_B; port++) { + for_each_combo_port(dev_priv, port) { u32 val; if (!icl_combo_phy_verify_state(dev_priv, port)) |