Commit 9ca89c44 authored by Jani Nikula's avatar Jani Nikula

drm/i915/audio: drop extra crtc clock check from HDMI audio N lookup

The array contains the crtc clock, rely on that. While at it, debug log
the HDMI N value or automatic mode.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: "Lin, Mengdong" <mengdong.lin@intel.com>
Cc: Libin Yang <libin.yang@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477407258-30599-2-git-send-email-jani.nikula@intel.com
parent 1aab956c
...@@ -254,16 +254,15 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port, ...@@ -254,16 +254,15 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port,
tmp &= ~AUD_CONFIG_N_PROG_ENABLE; tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
tmp |= audio_config_hdmi_pixel_clock(adjusted_mode); tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
if (adjusted_mode->crtc_clock == TMDS_296M ||
adjusted_mode->crtc_clock == TMDS_297M) {
n = audio_config_hdmi_get_n(adjusted_mode, rate); n = audio_config_hdmi_get_n(adjusted_mode, rate);
if (n != 0) { if (n != 0) {
DRM_DEBUG_KMS("using N %d\n", n);
tmp &= ~AUD_CONFIG_N_MASK; tmp &= ~AUD_CONFIG_N_MASK;
tmp |= AUD_CONFIG_N(n); tmp |= AUD_CONFIG_N(n);
tmp |= AUD_CONFIG_N_PROG_ENABLE; tmp |= AUD_CONFIG_N_PROG_ENABLE;
} else { } else {
DRM_DEBUG_KMS("no suitable N value is found\n"); DRM_DEBUG_KMS("using automatic N\n");
}
} }
I915_WRITE(HSW_AUD_CFG(pipe), tmp); I915_WRITE(HSW_AUD_CFG(pipe), tmp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment