[Intel-gfx] [PATCH 1/8] drm/i915/cdclk: s/-1/~0/ when dealing with unsigned values
Gustavo Sousa
gustavo.sousa at intel.com
Fri Dec 1 19:54:35 UTC 2023
Quoting Ville Syrjala (2023-11-28 08:51:31-03:00)
>From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>cdclk_pll_is_unknown() used ~0 when checking for the "VCO is
>unknown" value, but the assignment uses -1. They are the same
>in the end, but let's use the same ~0 form on both sides for
>consistency.
>
>Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>
>---
> drivers/gpu/drm/i915/display/intel_cdclk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
>index b93d1ad7936d..0dca29ec799b 100644
>--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
>+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
>@@ -1180,7 +1180,7 @@ static void skl_sanitize_cdclk(struct drm_i915_private *dev_priv)
> /* force cdclk programming */
> dev_priv->display.cdclk.hw.cdclk = 0;
> /* force full PLL disable + enable */
>- dev_priv->display.cdclk.hw.vco = -1;
>+ dev_priv->display.cdclk.hw.vco = ~0;
> }
>
> static void skl_cdclk_init_hw(struct drm_i915_private *dev_priv)
>@@ -2075,7 +2075,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv)
> dev_priv->display.cdclk.hw.cdclk = 0;
>
> /* force full PLL disable + enable */
>- dev_priv->display.cdclk.hw.vco = -1;
>+ dev_priv->display.cdclk.hw.vco = ~0;
> }
>
> static void bxt_cdclk_init_hw(struct drm_i915_private *dev_priv)
>--
>2.41.0
>
More information about the Intel-gfx
mailing list