drm/i915/icl: Simplify release of encoder power refs
authorImre Deak <imre.deak@intel.com>
Fri, 5 Apr 2019 15:36:57 +0000 (18:36 +0300)
committerImre Deak <imre.deak@intel.com>
Mon, 8 Apr 2019 12:15:48 +0000 (15:15 +0300)
We can unconditionally release the power references during encoder
disabling. The references for each port used by the encoder are
guaranteed to be enabled at this point.

Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190405153657.20921-2-imre.deak@intel.com
drivers/gpu/drm/i915/icl_dsi.c

index 462936dbeec5cc7867e44ce6fe2bbbed3096a916..6fc48479c97b36f33d2547954235d071a406c854 100644 (file)
@@ -1146,13 +1146,11 @@ static void gen11_dsi_disable_io_power(struct intel_encoder *encoder)
                intel_wakeref_t wakeref;
 
                wakeref = fetch_and_zero(&intel_dsi->io_wakeref[port]);
-               if (wakeref) {
-                       intel_display_power_put(dev_priv,
-                                               port == PORT_A ?
-                                               POWER_DOMAIN_PORT_DDI_A_IO :
-                                               POWER_DOMAIN_PORT_DDI_B_IO,
-                                               wakeref);
-               }
+               intel_display_power_put(dev_priv,
+                                       port == PORT_A ?
+                                       POWER_DOMAIN_PORT_DDI_A_IO :
+                                       POWER_DOMAIN_PORT_DDI_B_IO,
+                                       wakeref);
        }
 
        /* set mode to DDI */