Patch "drm/radeon: Add a common function for DFS handling" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/radeon: Add a common function for DFS handling
to the 4.4-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-add-a-common-function-for-dfs-handling.patch
and it can be found in the queue-4.4 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
a64c9dab1c4d05c87ec8a1cb9b48915816462143Mon Sep 17 00:00:00 2001
From: Slava Grigorev <[email protected]>
Date: Tue, 26 Jan 2016 16:56:25 -0500
Subject: drm/radeon: Add a common function for DFS handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Slava Grigorev <[email protected]>
commit a64c9dab1c4d05c87ec8a1cb9b48915816462143 upstream.
Move encoding of DFS (digital frequency synthesizer) divider into a separate function and improve calculation precision.
--- drivers/gpu/drm/radeon/dce6_afmt.c | 12 ++---------- drivers/gpu/drm/radeon/radeon_audio.c | 12 ++++++++++++ drivers/gpu/drm/radeon/radeon_audio.h | 1 + 3 files changed, 15 insertions(+), 10 deletions(-)
drivers/gpu/drm/radeon/dce6_afmt.c +2 -10
@@ -304,18 +304,10 @@ void dce6_dp_audio_set_dto(struct radeonunsigned int div = (RREG32 (DENTIST_DISPCLK_CNTL ) &DENTIST_DPREFCLK_WDIVIDER_MASK ) >>DENTIST_DPREFCLK_WDIVIDER_SHIFT ; - -if (div <128 && div >=96 ) - div -=64 ; -else if (div >=64 ) - div = div /2 -16 ; -else if (div >=8 ) - div /=4 ; -else - div =0 ; + div =radeon_audio_decode_dfs_div (div);if (div) - clock /= div; + clock = clock *100 / div;WREG32 (DCE8_DCCG_AUDIO_DTO1_PHASE ,24000 );WREG32 (DCE8_DCCG_AUDIO_DTO1_MODULE , clock);
drivers/gpu/drm/radeon/radeon_audio.c +12 -0
@@ -775,3 +775,15 @@ void radeon_audio_dpms(struct drm_encodeif (radeon_encoder->audio && radeon_encoder->audio->dpms) radeon_encoder->audio->dpms (encoder, mode ==DRM_MODE_DPMS_ON ); } + +unsigned int radeon_audio_decode_dfs_div (unsigned int div) +{ +if (div >=8 && div <64 ) +return (div -8 ) *25 +200 ; +else if (div >=64 && div <96 ) +return (div -64 ) *50 +1600 ; +else if (div >=96 && div <128 ) +return (div -96 ) *100 +3200 ; +else +return 0 ; +}
drivers/gpu/drm/radeon/radeon_audio.h +1 -0
@@ -79,5 +79,6 @@ void radeon_audio_fini(struct radeon_devvoid radeon_audio_mode_set (struct drm_encoder *encoder,struct drm_display_mode *mode);void radeon_audio_dpms (struct drm_encoder *encoder,int mode); +unsigned int radeon_audio_decode_dfs_div (unsigned int div);#endif
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/drm-radeon-fix-dp-audio-support-for-apu-with-dce4.1-display-engine.patch queue-4.4/drm-radeon-cleaned-up-vco-output-settings-for-dp-audio.patch queue-4.4/drm-radeon-fix-slow-audio-over-dp-on-dce8.patch queue-4.4/drm-radeon-add-a-common-function-for-dfs-handling.patch