drm/i915: HDMI audio gets the TMDS clock by crtc_clock
Subsystems (2)
PATCH 1/1 drm/i915: HDMI audio gets the TMDS clock by crtc_clock
From: Libin Yang <[email protected]>
HDMI audio should use crtc_clock to get the TMDS clock.
Besides, this patch renames mode to adjusted_mode to unify the name.
--- drivers/gpu/drm/i915/intel_audio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +7 -7
@@ -146,7 +146,7 @@ static int audio_config_get_n(struct intel_crtc *crtc,if (intel_crtc_has_type (crtc->config,INTEL_OUTPUT_HDMI )) {for (i =0 ; i <ARRAY_SIZE (aud_ncts); i++) {if ((rate == aud_ncts[i].sample_rate) && - (adjusted_mode->clock == aud_ncts[i].clock)) { + (adjusted_mode->crtc_clock == aud_ncts[i].clock)) {return aud_ncts[i].n; } }
@@ -215,8 +215,8 @@ static uint32_t audio_config_setup_m_reg(struct intel_crtc *crtc,static bool audio_rate_need_prog (struct intel_crtc *crtc,const struct drm_display_mode *adjusted_mode) { -if (((adjusted_mode->clock ==TMDS_297M ) || - (adjusted_mode->clock ==TMDS_296M )) && +if (((adjusted_mode->crtc_clock ==TMDS_297M ) || + (adjusted_mode->crtc_clock ==TMDS_296M )) &&intel_crtc_has_type (crtc->config,INTEL_OUTPUT_HDMI ))return true; else if (((crtc->config->port_clock == LC_540M) ||
@@ -711,7 +711,7 @@ static int i915_audio_component_sync_audio_rate(struct device *dev,struct drm_i915_private *dev_priv =dev_to_i915 (dev);struct intel_encoder *intel_encoder;struct intel_crtc *crtc; -struct drm_display_mode *mode; +struct drm_display_mode *adjusted_mode;struct i915_audio_component *acomp = dev_priv->audio_component;enum pipe pipe =INVALID_PIPE ;u32 tmp, m;
@@ -747,20 +747,20 @@ static int i915_audio_component_sync_audio_rate(struct device *dev,DRM_DEBUG_KMS ("pipe %c connects port %c\n" ,pipe_name (pipe),port_name (port)); - mode = &crtc->config->base.adjusted_mode; + adjusted_mode = &crtc->config->base.adjusted_mode;/* port must be valid now, otherwise the pipe will be invalid */ acomp->aud_sample_rate[port] = rate;/* 2. check whether to set the N/CTS/M manually or not */ -if (!audio_rate_need_prog (crtc, mode)) { +if (!audio_rate_need_prog (crtc, adjusted_mode)) { tmp =I915_READ (HSW_AUD_CFG (pipe)); tmp &= ~AUD_CONFIG_N_PROG_ENABLE ;I915_WRITE (HSW_AUD_CFG (pipe), tmp); goto unlock; } - n =audio_config_get_n (crtc, mode, rate); + n =audio_config_get_n (crtc, adjusted_mode, rate);if (n ==0 ) {DRM_DEBUG_KMS ("Using automatic mode for N value on port %c\n" ,port_name (port));
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: failure for drm/i915: HDMI audio gets the TMDS clock by crtc_clock
== Series Details ==
== Series Details ==
Series: drm/i915: HDMI audio gets the TMDS clock by crtc_clock
URL : https://patchwork.freedesktop.org/series/10488/
State : failure
== Summary ==
Applying: drm/i915: HDMI audio gets the TMDS clock by crtc_clock Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/intel_audio.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_audio.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_audio.c
error: Failed to merge in the changes.
Patch failed at 0001 drm/i915: HDMI audio gets the TMDS clock by crtc_clock The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
This patch is based on drm/i915: set proper N/M in modeset
Regards,
Libin
Quoted 79 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, August 2, 2016 2:18 PM
To: [email protected]; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>; Libin Yang <[email protected]>
Subject: [PATCH] drm/i915: HDMI audio gets the TMDS clock bycrtc_clockFrom: Libin Yang <[email protected]>
HDMI audio should use
crtc_clockto get the TMDS clock.Besides, this patch renames mode to
adjusted_modeto unify the name.Signed-off-by Libin Yang <[email protected]>--- drivers/gpu/drm/i915/intel_audio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/intel_audio.c +3
-3@@ -146,7 +146,7 @@ static int audio_config_get_n(struct intel_crtc *crtc,if (intel_crtc_has_type (crtc->config,INTEL_OUTPUT_HDMI )) {for (i =0 ; i <ARRAY_SIZE (aud_ncts); i++) {if ((rate == aud_ncts[i].sample_rate) && - (adjusted_mode->clock == aud_ncts[i].clock)) { + (adjusted_mode->crtc_clock == aud_ncts[i].clock)) {return aud_ncts[i].n; } }@@ -215,8 +215,8 @@ static uint32_t audio_config_setup_m_reg(struct intel_crtc *crtc, static bool audio_rate_need_prog(struct intel_crtc *crtc, const struct drm_display_mode *adjusted_mode) { -if (((adjusted_mode->clock ==TMDS_297M ) || - (adjusted_mode->clock ==TMDS_296M )) && +if (((adjusted_mode->crtc_clock ==TMDS_297M ) || + (adjusted_mode->crtc_clock ==TMDS_296M )) &&intel_crtc_has_type (crtc->config,INTEL_OUTPUT_HDMI ))return true; else if (((crtc->config->port_clock == LC_540M) || @@ -711,7 +711,7@@ static int i915_audio_component_sync_audio_rate(struct device *dev,
drivers/gpu/drm/i915/intel_audio.c +4
-4struct drm_i915_private *dev_priv =dev_to_i915 (dev);struct intel_encoder *intel_encoder;struct intel_crtc *crtc; -struct drm_display_mode *mode; +struct drm_display_mode *adjusted_mode;struct i915_audio_component *acomp = dev_priv->audio_component;enum pipe pipe =INVALID_PIPE ;u32 tmp, m;@@ -747,20 +747,20 @@ static int i915_audio_component_sync_audio_rate(struct device *dev, DRM_DEBUG_KMS("pipe %c connects port %c\n", pipe_name(pipe), port_name(port)); - mode = &crtc->config->base.adjusted_mode; + adjusted_mode = &crtc->config->base.adjusted_mode;/* port must be valid now, otherwise the pipe will be invalid */ acomp->aud_sample_rate[port] = rate;/* 2. check whether to set the N/CTS/M manually or not */ -if (!audio_rate_need_prog (crtc, mode)) { +if (!audio_rate_need_prog (crtc, adjusted_mode)) { tmp =I915_READ (HSW_AUD_CFG (pipe)); tmp &= ~AUD_CONFIG_N_PROG_ENABLE ;I915_WRITE (HSW_AUD_CFG (pipe), tmp); goto unlock; } - n =audio_config_get_n (crtc, mode, rate); + n =audio_config_get_n (crtc, adjusted_mode, rate);if (n ==0 ) { DRM_DEBUG_KMS("Using automatic mode for N value on
Quoted 4 lines
port %c\n",
port_name(port));
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx