[PATCH 2/2] drm/i915: add MISSING_CASE to a few port/aux power domain helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MISSING_CASE() would have been useful to track down a recent problem in
intel_display_port_aux_power_domain(), so add it there and a few related
helpers. This was also suggested by Ville in his review of the latest
DMC/DC changes, we forgot to address that.

Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index cdc1761..b3d0557 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5166,7 +5166,7 @@ static enum intel_display_power_domain port_to_power_domain(enum port port)
 	case PORT_E:
 		return POWER_DOMAIN_PORT_DDI_E_LANES;
 	default:
-		WARN_ON_ONCE(1);
+		MISSING_CASE(port);
 		return POWER_DOMAIN_PORT_OTHER;
 	}
 }
@@ -5186,7 +5186,7 @@ static enum intel_display_power_domain port_to_aux_power_domain(enum port port)
 		/* FIXME: Check VBT for actual wiring of PORT E */
 		return POWER_DOMAIN_AUX_D;
 	default:
-		WARN_ON_ONCE(1);
+		MISSING_CASE(port);
 		return POWER_DOMAIN_AUX_A;
 	}
 }
@@ -5247,7 +5247,7 @@ intel_display_port_aux_power_domain(struct intel_encoder *intel_encoder)
 		intel_dig_port = enc_to_mst(&intel_encoder->base)->primary;
 		return port_to_aux_power_domain(intel_dig_port->port);
 	default:
-		WARN_ON_ONCE(1);
+		MISSING_CASE(intel_encoder->type);
 		return POWER_DOMAIN_AUX_A;
 	}
 }
-- 
2.5.0

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux