drm/i915/audio: m/n value fixes
Subsystems (2)
Remaining patch from https://patchwork.freedesktop.org/series/12754/
plus a cleanup.
BR,
Jani.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 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.
--- drivers/gpu/drm/i915/intel_audio.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +9 -10
@@ -254,16 +254,15 @@ hsw_hdmi_audio_config_update(struct intel_crtc *intel_crtc, enum port port, tmp &= ~AUD_CONFIG_N_PROG_ENABLE ; 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); -if (n !=0 ) { - tmp &= ~AUD_CONFIG_N_MASK ; - tmp |=AUD_CONFIG_N (n); - tmp |=AUD_CONFIG_N_PROG_ENABLE ; - }else { -DRM_DEBUG_KMS ("no suitable N value is found\n" ); - } + n =audio_config_hdmi_get_n (adjusted_mode, rate); +if (n !=0 ) { +DRM_DEBUG_KMS ("using N %d\n" , n); + + tmp &= ~AUD_CONFIG_N_MASK ; + tmp |=AUD_CONFIG_N (n); + tmp |=AUD_CONFIG_N_PROG_ENABLE ; + }else { +DRM_DEBUG_KMS ("using automatic N\n" ); }I915_WRITE (HSW_AUD_CFG (pipe), tmp);
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/audio: set proper N/M in modeset
In reply to Jani NikulaFrom: Libin Yang <[email protected]>
When modeset occurs and the LS_CLK is set to some special values in DP mode, the N/M need to be set manually if audio is playing. Otherwise the first several seconds may be silent in audio playback.
The relationship of Maud and Naud is expressed in the following equation:
Maud/Naud = 512 * fs / f_LS_Clk
Please refer VESA DisplayPort Standard spec for details.
v2 by Jani:
- organize Maud/Naud table according to DP 1.4 spec
- add 64k and 128k audio rates
- update HSW_AUD_M_CTS_ENABLE register when Maud not found
- remove extra checks for port clock
- simplify Maud/Naud lookup
- reset patch author back to Libin
--- drivers/gpu/drm/i915/i915_reg.h | 7 +++ drivers/gpu/drm/i915/intel_audio.c | 93 +++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
@@ -7370,6 +7370,13 @@ enum {#define _HSW_AUD_MISC_CTRL_B 0x65110#define HSW_AUD_MISC_CTRL (pipe) _MMIO_PIPE(pipe, _HSW_AUD_MISC_CTRL_A, _HSW_AUD_MISC_CTRL_B) +#define _HSW_AUD_M_CTS_ENABLE_A 0x65028 +#define _HSW_AUD_M_CTS_ENABLE_B 0x65128 +#define HSW_AUD_M_CTS_ENABLE (pipe) _MMIO_PIPE(pipe, _HSW_AUD_M_CTS_ENABLE_A, _HSW_AUD_M_CTS_ENABLE_B) +#define AUD_M_CTS_M_VALUE_INDEX (1 << 21) +#define AUD_M_CTS_M_PROG_ENABLE (1 << 20) +#define AUD_CONFIG_M_MASK 0xfffff +#define _HSW_AUD_DIP_ELD_CTRL_ST_A 0x650b4#define _HSW_AUD_DIP_ELD_CTRL_ST_B 0x651b4#define HSW_AUD_DIP_ELD_CTRL (pipe) _MMIO_PIPE(pipe, _HSW_AUD_DIP_ELD_CTRL_ST_A, _HSW_AUD_DIP_ELD_CTRL_ST_B)
drivers/gpu/drm/i915/intel_audio.c +92 -1
127 lines not on this page · raw message
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
Reviewed-byQuoted 2 lines · Jani Nikula
Remaining patch from https://patchwork.freedesktop.org/series/12754/
plus a cleanup.
I'm not feeling like checking bspec for the nuts and bolts details on the registers again, but at least the code looks sane to me and the M/N values what my test application generates (if I double the values for HBR2). Based on that
for both patches.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Ville Syrjälä
Quoted 2 lines · Jani Nikula
Remaining patch from https://patchwork.freedesktop.org/series/12754/
plus a cleanup.
Quoted 8 lines
I'm not feeling like checking bspec for the nuts and bolts details on the registers again, but at least the code looks sane to me and the M/N values what my test application generates (if I double the values for HBR2). Based on that
Reviewed-by Ville Syrjälä <[email protected]>for both patches.
And both pushed, thanks for the review.
Libin, Mengdong, please (have someone) do final testing on drm-intel-nightly to ensure we've got everything covered now.
Thanks,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915/audio: drop extra crtc clock check from HDMI audio N lookup
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915/audio: drop extra crtc clock check from HDMI audio N lookup
URL : https://patchwork.freedesktop.org/series/14342/
State : warning
== Summary ==
Series 14342v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/14342/revisions/1/mbox/
Test drv_module_reload_basic:
dmesg-warn -> PASS (fi-skl-6770hq)
pass -> DMESG-WARN (fi-skl-6700hq)
Test gem_exec_suspend:
Subgroup basic-s3:
dmesg-warn -> PASS (fi-skl-6770hq)
dmesg-warn -> PASS (fi-skl-6700hq)
Test kms_frontbuffer_tracking:
Subgroup basic:
fail -> PASS (fi-skl-6770hq)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-skl-6700hq)
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-skl-6700hq)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (fi-skl-6700hq)fi-bdw-5557u total:246 pass:231 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:246 pass:204 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:246 pass:216 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31 fi-byt-n2820 total:246 pass:211 dwarn:0 dfail:0 fail:0 skip:35 fi-hsw-4770 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:246 pass:223 dwarn:0 dfail:0 fail:0 skip:23 fi-ilk-650 total:246 pass:185 dwarn:0 dfail:0 fail:0 skip:61 fi-ivb-3520m total:246 pass:220 dwarn:0 dfail:0 fail:0 skip:26 fi-ivb-3770 total:246 pass:220 dwarn:0 dfail:0 fail:0 skip:26 fi-kbl-7200u total:246 pass:222 dwarn:0 dfail:0 fail:0 skip:24 fi-skl-6260u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:246 pass:222 dwarn:1 dfail:0 fail:0 skip:23 fi-skl-6700k total:246 pass:222 dwarn:1 dfail:0 fail:0 skip:23 fi-skl-6770hq total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:246 pass:209 dwarn:0 dfail:0 fail:0 skip:37 fi-snb-2600 total:246 pass:208 dwarn:0 dfail:0 fail:0 skip:38
3ce99d02d8f2b7d1414d20d5972f8e277b33693e drm-intel-nightly: 2016y-10m-25d-13h-55m-46s UTC integration manifest 8ee7f93 drm/i915/audio: set proper N/M in modeset
76ec280 drm/i915/audio: drop extra crtc clock check from HDMI audio N lookup
Full results at https://intel-gfx-ci.01.org/CI/Patchwork_2812/
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2812/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx