drm/i915/skl: If needed sanitize bios programmed cdclk
authorShobhit Kumar <shobhit.kumar@intel.com>
Tue, 20 Oct 2015 12:43:12 +0000 (18:13 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Oct 2015 06:25:31 +0000 (08:25 +0200)
commitc73666f394fca498978f71e66062eb3e3f2c7951
treedb6c83f314ef1db96747fddbe4fc05523fb338fe
parentfbcc1a0c3e36d6ddc19eb6a527518eaeef77645a
drm/i915/skl: If needed sanitize bios programmed cdclk

Especially in cases where pre-os does not enable display, cdclk might
not be in sane state. During sanitization initialize cdclk with maximum
value till we get dynamic cdclk support.

v2: Check if BIOS programmed correctly rather than always calling init
    - Do validation of programmed cdctl and what it is expected
    - Only do slk_init_cdclk if validation failed else reuse BIOS
      programmed value

v3: Move the validation logic in a separate sanitize function (Ville)

v4: No need to check LCPLL after sanitize and use max_cdclk_freq instead
    of hardcoded value (Ville)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445344992-14658-1-git-send-email-shobhit.kumar@intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h