drm/amd/display: Fix DP audio DTO1 clock source on DCE 6.On DCE 6, DP audio was not working. However, it worked when anHDMI monitor was also plugged in.Looking at dce_aud_wall_dto_setup it seems
drm/amd/display: Fix DP audio DTO1 clock source on DCE 6.On DCE 6, DP audio was not working. However, it worked when anHDMI monitor was also plugged in.Looking at dce_aud_wall_dto_setup it seems that the maindifference is that we use DTO1 when only DP is plugged in.When programming DTO1, it uses audio_dto_source_clock_in_khzwhich is set from get_dp_ref_freq_khzThe dce60_get_dp_ref_freq_khz implementation looks incorrect,because DENTIST_DISPCLK_CNTL seems to be always zero on DCE 6,so it isn't usable.I compared dce60_get_dp_ref_freq_khz to the legacy display code,specifically dce_v6_0_audio_set_dto, and it turns out that incase of DCE 6, it needs to use the display clock. With that,DP audio started working on Pitcairn, Oland and Cape Verde.However, it still didn't work on Tahiti. Despite having thesame DCE version, Tahiti seems to have a different audio device.After some trial and error I realized that it works with thedefault display clock as reported by the VBIOS, not the currentdisplay clock.The patch was tested on all four SI GPUs:* Pitcairn (DCE 6.0)* Oland (DCE 6.4)* Cape Verde (DCE 6.0)* Tahiti (DCE 6.0 but different)The testing was done on Samsung Odyssey G7 LS28BG700EPXEN oneach of the above GPUs, at the following settings:* 4K 60 Hz* 1080p 60 Hz* 1080p 144 HzAcked-by: Alex Deucher <alexander.deucher@amd.com>Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>(cherry picked from commit 645cc7863da5de700547d236697dffd6760cf051)Cc: stable@vger.kernel.org
show more ...
drm/amd/display: Fill display clock and vblank time in dce110_fill_display_configsAlso needed by DCE 6.This way the code that gathers this info can be shared betweendifferent DCE versions and doe
drm/amd/display: Fill display clock and vblank time in dce110_fill_display_configsAlso needed by DCE 6.This way the code that gathers this info can be shared betweendifferent DCE versions and doesn't have to be repeated.Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>Acked-by: Alex Deucher <alexander.deucher@amd.com>Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>Reviewed-by: Alex Hung <alex.hung@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>(cherry picked from commit 8107432dff37db26fcb641b6cebeae8981cd73a0)Cc: stable@vger.kernel.org
drm/amd/display: Don't overclock DCE 6 by 15%The extra 15% clock was added as a workaround for a Polaris issuewhich uses DCE 11, and should not have been used on DCE 6 whichis already hardcoded t
drm/amd/display: Don't overclock DCE 6 by 15%The extra 15% clock was added as a workaround for a Polaris issuewhich uses DCE 11, and should not have been used on DCE 6 whichis already hardcoded to the highest possible display clock.Unfortunately, the extra 15% was mistakenly copied and kepteven on code paths which don't affect Polaris.This commit fixes that and also adds a check to make surenot to exceed the maximum DCE 6 display clock.Fixes: 8cd61c313d8b ("drm/amd/display: Raise dispclk value for Polaris")Fixes: dc88b4a684d2 ("drm/amd/display: make clk mgr soc specific")Fixes: 3ecb3b794e2c ("drm/amd/display: dc/clk_mgr: add support for SI parts (v2)")Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>Acked-by: Alex Deucher <alexander.deucher@amd.com>Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>Reviewed-by: Alex Hung <alex.hung@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>(cherry picked from commit 427980c1cbd22bb256b9385f5ce73c0937562408)Cc: stable@vger.kernel.org
drm/amd/display: dc/clk_mgr: make function static[Why]linux-next kernel test robot reported the following problem:warning: no previous prototype for 'dce60_get_dp_ref_freq_khz' [-Wmissing-prototy
drm/amd/display: dc/clk_mgr: make function static[Why]linux-next kernel test robot reported the following problem:warning: no previous prototype for 'dce60_get_dp_ref_freq_khz' [-Wmissing-prototypes][How]mark dce60_get_dp_ref_freq_khz() as staticFixes: 3ecb3b794e2c "drm/amd/display: dc/clk_mgr: add support for SI parts (v2)"Reported-by: kernel test robot <lkp@intel.com>Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: dc/clk_mgr: add support for SI parts (v2)(v1) Changelog[Why]After commit c69dd2d "drm/amd/display: Refactor clk_mgr functions"dc/clk_mgr requires these changes to add SI parts
drm/amd/display: dc/clk_mgr: add support for SI parts (v2)(v1) Changelog[Why]After commit c69dd2d "drm/amd/display: Refactor clk_mgr functions"dc/clk_mgr requires these changes to add SI parts supportNecessary to avoid hitting default: ASSERT(0); /* Unknown Asic */that would cause kernel freeze[How]Add case statement for FAMILY_SI chipsets(v2) Changelog[Why]DCE6 has no DPREFCLK_CNTL register[How]Add DCE6 specific macros definitions for CLK registers and masksAdd DCE6 specific dce60/dce60_clk_mgr.c for DCE6 customizationCode style: reuse all the public functions in dce100/dce_clk_mgr.h headerCode style: use dce60_* static functions as per other DCE implementationsAdd dce60_get_dp_ref_freq_khz() w/o using DPREFCLK_CNTL registerUse dce60_get_dp_ref_freq_khz() function in dce60_funcsAdd DCE6 specific dce60_clk_mgr_constructdc/clk_mgr/dce_clk_mgr.c: use dce60_clk_mgr_construct for FAMILY_SI chipsetsAdd Makefile rules for dce60_clk_mgr.o target conditional to CONFIG_DRM_AMD_DC_SIReviewed-by: Alex Deucher <alexander.deucher@amd.com>Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>