intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/i915/icl: replace check for combo phy
@ 2018-11-13  2:45 Lucas De Marchi
  2018-11-13  2:45 ` [PATCH v2 2/2] drm/i915/icl: reverse uninit order Lucas De Marchi
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Lucas De Marchi @ 2018-11-13  2:45 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

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>
---

v2 of https://patchwork.freedesktop.org/series/52269/

 drivers/gpu/drm/i915/intel_combo_phy.c | 8 ++++++--
 1 file 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))
-- 
2.19.1.1.g56c4683e68

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-11-14 17:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-13  2:45 [PATCH v2 1/2] drm/i915/icl: replace check for combo phy Lucas De Marchi
2018-11-13  2:45 ` [PATCH v2 2/2] drm/i915/icl: reverse uninit order Lucas De Marchi
2018-11-13 13:19   ` Imre Deak
2018-11-13 13:23     ` Imre Deak
2018-11-13 17:40       ` Lucas De Marchi
2018-11-13 18:56       ` [PATCH v2] " Lucas De Marchi
2018-11-13 20:31         ` Jani Nikula
2018-11-13 21:22           ` Lucas De Marchi
2018-11-13 21:57             ` Jani Nikula
2018-11-13  3:09 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915/icl: replace check for combo phy Patchwork
2018-11-13  3:35 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-13  5:05 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-13 13:44 ` [PATCH v2 1/2] " Imre Deak
2018-11-13 19:08 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915/icl: replace check for combo phy (rev2) Patchwork
2018-11-13 19:30 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-14 17:23 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).