summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-04-05 18:36:57 +0300
committerImre Deak <imre.deak@intel.com>2019-04-08 15:15:48 +0300
commit99fa4bc26d74e49e3d7d70f29a106943f48924ea (patch)
treed374b59e213d479010277a849dc6361c4671f180
parent3a52fb7e7953f0b13df8c05d0d74b56a66888f30 (diff)
downloadlinux-99fa4bc26d74e49e3d7d70f29a106943f48924ea.tar.xz
drm/i915/icl: Simplify release of encoder power refs
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
-rw-r--r--drivers/gpu/drm/i915/icl_dsi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
index 462936dbeec5..6fc48479c97b 100644
--- a/drivers/gpu/drm/i915/icl_dsi.c
+++ b/drivers/gpu/drm/i915/icl_dsi.c
@@ -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 */