Skip to content

Commit

Permalink
drm/i915/cnp+: update to the new RAWCLK_FREQ recommendations
Browse files Browse the repository at this point in the history
BSpec was updated and now there's no more "subtract 1" to the
Microsecond Counter Divider field.

It seems this should help fixing some GMBUS issues. I'm not aware of
any specific open bug that could be solved by this patch.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181112232313.26373-1-paulo.r.zanoni@intel.com
  • Loading branch information
Paulo Zanoni committed Nov 14, 2018
1 parent c1cd5b2 commit af4de6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/intel_cdclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2660,7 +2660,7 @@ static int cnp_rawclk(struct drm_i915_private *dev_priv)
fraction = 200;
}

rawclk = CNP_RAWCLK_DIV((divider / 1000) - 1);
rawclk = CNP_RAWCLK_DIV(divider / 1000);
if (fraction)
rawclk |= CNP_RAWCLK_FRAC(DIV_ROUND_CLOSEST(1000,
fraction) - 1);
Expand All @@ -2676,12 +2676,12 @@ static int icp_rawclk(struct drm_i915_private *dev_priv)

if (I915_READ(SFUSE_STRAP) & SFUSE_STRAP_RAW_FREQUENCY) {
frequency = 24000;
divider = 23;
divider = 24;
numerator = 0;
denominator = 0;
} else {
frequency = 19200;
divider = 18;
divider = 19;
numerator = 1;
denominator = 4;
}
Expand Down

0 comments on commit af4de6a

Please sign in to comment.