Patch "drm/radeon/audio: don't enable packets until the end" has been added to the 4.0-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/radeon/audio: don't enable packets until the end
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-audio-don-t-enable-packets-until-the-end.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
362ff251390f3d1f8fe94666f4fc4e5876381114Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Tue, 31 Mar 2015 11:43:12 -0400
Subject: drm/radeon/audio: don't enable packets until the end
From: Alex Deucher <[email protected]>
commit 362ff251390f3d1f8fe94666f4fc4e5876381114 upstream.
Don't enable the audio and avi infoframes and audio stream until all the state is set up.
--- drivers/gpu/drm/radeon/evergreen_hdmi.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
drivers/gpu/drm/radeon/evergreen_hdmi.c +17 -13
@@ -222,10 +222,6 @@ void evergreen_set_avi_packet(struct radWREG32_P (HDMI_INFOFRAME_CONTROL1 + offset,HDMI_AVI_INFO_LINE (2 ),/* anything other than 0 */ ~HDMI_AVI_INFO_LINE_MASK ); - -WREG32_OR (HDMI_INFOFRAME_CONTROL0 + offset, -HDMI_AVI_INFO_SEND |/* enable AVI info frames */ -HDMI_AVI_INFO_CONT );/* required for audio info values to be updated */ } void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
@@ -370,9 +366,13 @@ void dce4_set_audio_packet(struct drm_enWREG32 (AFMT_AUDIO_PACKET_CONTROL2 + offset,AFMT_AUDIO_CHANNEL_ENABLE (0xff )); +WREG32 (HDMI_AUDIO_PACKET_CONTROL + offset, +HDMI_AUDIO_DELAY_EN (1 ) |/* set the default audio delay */ +HDMI_AUDIO_PACKETS_PER_LINE (3 ));/* should be suffient for all audio modes and small enough for all hblanks */ +/* allow 60958 channel status and send audio packets fields to be updated */ -WREG32 (AFMT_AUDIO_PACKET_CONTROL + offset, -AFMT_AUDIO_SAMPLE_SEND |AFMT_RESET_FIFO_WHEN_AUDIO_DIS |AFMT_60958_CS_UPDATE ); +WREG32_OR (AFMT_AUDIO_PACKET_CONTROL + offset, +AFMT_RESET_FIFO_WHEN_AUDIO_DIS |AFMT_60958_CS_UPDATE ); }
@@ -398,17 +398,16 @@ void evergreen_hdmi_enable(struct drm_enreturn ;if (enable) { -WREG32 (HDMI_INFOFRAME_CONTROL1 + dig->afmt->offset, -HDMI_AUDIO_INFO_LINE (2 ));/* anything other than 0 */ - -WREG32 (HDMI_AUDIO_PACKET_CONTROL + dig->afmt->offset, -HDMI_AUDIO_DELAY_EN (1 ) |/* set the default audio delay */ -HDMI_AUDIO_PACKETS_PER_LINE (3 ));/* should be suffient for all audio modes and small enough for all hblanks */ -WREG32 (HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset, +HDMI_AVI_INFO_SEND |/* enable AVI info frames */ +HDMI_AVI_INFO_CONT |/* required for audio info values to be updated */ HDMI_AUDIO_INFO_SEND |/* enable audio info frames (frames won't be set until audio is enabled) */ HDMI_AUDIO_INFO_CONT );/* required for audio info values to be updated */ +WREG32_OR (AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset, +AFMT_AUDIO_SAMPLE_SEND ); }else { +WREG32_AND (AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset, + ~AFMT_AUDIO_SAMPLE_SEND );WREG32 (HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset,0 ); }
@@ -434,6 +433,9 @@ void evergreen_dp_enable(struct drm_encostruct radeon_connector_atom_dig *dig_connector;uint32_t val; +WREG32_OR (AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset, +AFMT_AUDIO_SAMPLE_SEND ); +WREG32 (EVERGREEN_DP_SEC_TIMESTAMP + dig->afmt->offset,EVERGREEN_DP_SEC_TIMESTAMP_MODE (1 ));
@@ -457,6 +459,8 @@ void evergreen_dp_enable(struct drm_enco EVERGREEN_DP_SEC_STREAM_ENABLE); /* Master enable for secondary stream engine */ }else {WREG32 (EVERGREEN_DP_SEC_CNTL + dig->afmt->offset,0 ); +WREG32_AND (AFMT_AUDIO_PACKET_CONTROL + dig->afmt->offset, + ~AFMT_AUDIO_SAMPLE_SEND ); } dig->afmt->enabled = enable;
Patches currently in stable-queue which might be from [email protected] are
queue-4.0/drm-radeon-fix-lockup-when-bos-aren-t-part-of-the-vm-on-release.patch queue-4.0/drm-radeon-reset-bos-address-after-clearing-it.patch queue-4.0/drm-radeon-adjust-pll-when-audio-is-not-enabled.patch queue-4.0/drm-radeon-add-si-dpm-quirk-for-sapphire-r9-270-dual-x-2g-gddr5.patch queue-4.0/drm-radeon-only-enable-audio-streams-if-the-monitor-supports-it.patch queue-4.0/drm-radeon-only-mark-audio-as-connected-if-the-monitor-supports-it-v3.patch queue-4.0/drm-radeon-drop-dce6_dp_enable.patch queue-4.0/drm-radeon-audio-don-t-enable-packets-until-the-end.patch queue-4.0/drm-radeon-check-new-address-before-removing-old-one.patch queue-4.0/drm-radeon-fix-ordering-of-avi-packet-setup.patch queue-4.0/drm-radeon-use-drm_calloc_ab-for-cs-relocs.patch