OSDN Git Service

drm/i915/audio: set minimum CD clock to twice the BCLK
authorAbhay Kumar <abhay.kumar@intel.com>
Wed, 18 Apr 2018 10:37:07 +0000 (13:37 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 19 Apr 2018 09:01:31 +0000 (12:01 +0300)
commit2a5b95b448485e143ec3e004eabe53b31db78eb3
tree5aa091561ead0d0865d275133a631e83d1faf56c
parentb7268c5eed0ab4f052d614b4b0e3fe8a51c9d5a1
drm/i915/audio: set minimum CD clock to twice the BCLK

In GLK when the device boots with only 1366x768 panel without audio, HDA
codec doesn't come up. In this case, the CDCLK is less than twice the
BCLK. Even though audio isn't being enabled, having a too low CDCLK
leads to audio probe failing altogether.

Require CDCLK to be at least twice the BLCK regardless of audio. This is
a minimal fix to improve things. Unfortunately, this a) leads to too
high CDCLK being used when audio is not used, and b) is still not enough
to fix audio probe when no outputs are connected at probe time.

The proper fix would be to increase CDCLK dynamically from the audio
component hooks.

v2:
    - Address comment (Jani)
    - New design approach
v3: - Typo fix on top of v1

v4 by Jani: rewrite commit message, add comment in code

Cc: stable@vger.kernel.org
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@gmail.com>
Cc: Wenkai Du <wenkai.du@intel.com>
Reviewed-by: Wenkai Du <wenkai.du@intel.com>
Tested-by: Wenkai Du <wenkai.du@intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102937
Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180418103707.14645-1-jani.nikula@intel.com
drivers/gpu/drm/i915/intel_cdclk.c