drm/i915: add MISSING_CASE to a few port/aux power domain helpers
authorImre Deak <imre.deak@intel.com>
Wed, 18 Nov 2015 13:57:25 +0000 (15:57 +0200)
committerImre Deak <imre.deak@intel.com>
Wed, 18 Nov 2015 19:46:34 +0000 (21:46 +0200)
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@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447855045-7109-2-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_display.c

index 1bec8de9641225c0db13b63981b06f2e05c10ace..77a9d67a02d14b1dd6c024471be9d8b21020125f 100644 (file)
@@ -5177,7 +5177,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;
        }
 }
@@ -5197,7 +5197,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;
        }
 }
@@ -5258,7 +5258,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;
        }
 }