summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_ddi.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2019-12-18 02:05:28 +0300
committerLucas De Marchi <lucas.demarchi@intel.com>2019-12-19 04:53:16 +0300
commit41ba19fca303895434961084bcd0a8ad8504e970 (patch)
tree5f6b91d9595b83b2b51c256404a4d23c72e2543a /drivers/gpu/drm/i915/display/intel_ddi.c
parent5956f44028f5a0b15f6930256af3d5dbdf1f1f57 (diff)
downloadlinux-41ba19fca303895434961084bcd0a8ad8504e970.tar.xz
drm/i915/display: use clk_off name to avoid double negation
Instead of "ungated" use the same name for the variable as the bitfield, making it clearer what's the intent of the checks. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Clinton Taylor <Clinton.A.Taylor@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191217230529.25092-2-lucas.demarchi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_ddi.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_ddi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 6e419b1f2737..9d2b7244f7ca 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3008,12 +3008,10 @@ static void icl_sanitize_port_clk_off(struct drm_i915_private *dev_priv,
val = I915_READ(ICL_DPCLKA_CFGCR0);
for_each_port_masked(port, port_mask) {
enum phy phy = intel_port_to_phy(dev_priv, port);
+ bool ddi_clk_off = val & icl_dpclka_cfgcr0_clk_off(dev_priv,
+ phy);
- bool ddi_clk_ungated = !(val &
- icl_dpclka_cfgcr0_clk_off(dev_priv,
- phy));
-
- if (ddi_clk_needed == ddi_clk_ungated)
+ if (ddi_clk_needed == !ddi_clk_off)
continue;
/*