drm/i915/bxt: Sanitize CDCLK to fix breakage during S4 resume
authorImre Deak <imre.deak@intel.com>
Tue, 24 May 2016 12:38:33 +0000 (15:38 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 25 May 2016 12:32:30 +0000 (15:32 +0300)
commitd66a21947e2147a0e313825ee461e954e8fe39cb
treeabc83b2cdd1b76a0a11cfa740970d991937ed3cb
parent1c3f7700b2830cbcc25fda675ad5e997e1454703
drm/i915/bxt: Sanitize CDCLK to fix breakage during S4 resume

I noticed that during S4 resume BIOS incorrectly sets bits 18, 19 which
are reserved/MBZ and sets the decimal frequency fields to all 0xff in
the CDCLK register. The result is a hard lockup as display register
accesses are attempted later. Work around this by sanitizing the CDCLK
PLL/dividers the same way it's done on SKL.

While this is clearly a BIOS bug which should be fixed separately, it
doesn't hurt to check/sanitize this regardless.

v2:
- Use the same condition for VCO and CDCLK in broxton_init_cdclk as is
  used in skl_init_cdclk for the same purpose.

CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464093513-16258-2-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_display.c