drm/amd/display: Remove vupdate_int_entry definitionRemove the vupdate_int_entry definition and utilization to avoid thefollowing warning by Clang:drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dc
drm/amd/display: Remove vupdate_int_entry definitionRemove the vupdate_int_entry definition and utilization to avoid thefollowing warning by Clang:drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(0), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:404:2:note: previous initialization is here vupdate_int_entry(0), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:411:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(1), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:405:2:note: previous initialization is here vupdate_int_entry(1), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:412:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(2), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:406:2:note: previous initialization is here vupdate_int_entry(2), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:413:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(3), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:407:2:note: previous initialization is here vupdate_int_entry(3), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:414:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(4), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:408:2:note: previous initialization is here vupdate_int_entry(4), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:415:2:warning: initializer overrides prior initialization of this subobject[-Winitializer-overrides] vupdate_no_lock_int_entry(5), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39:note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:409:2:note: previous initialization is here vupdate_int_entry(5), ^~~~~~~~~~~~~~~~~~~~drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39:note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~6 warnings generated.Fixes: 688f97ed3f5e ("drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1")Signed-off-by: Maíra Canal <maira.canal@usp.br>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21The WA from commit 2a50edbf10c8 ("drm/amd/display: Apply w/a for hard hangon HPD") and commit 1bd3bc745e7f ("drm/amd/display: Extend w/a fo
drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21The WA from commit 2a50edbf10c8 ("drm/amd/display: Apply w/a for hard hangon HPD") and commit 1bd3bc745e7f ("drm/amd/display: Extend w/a for hardhang on HPD to dcn20") causes a regression in s0ix where the system willfail to resume properly on many laptops. Pull the workarounds out toavoid that s0ix regression in the common case. This HPD hang happens withan external device in special circumstances and a new W/A will need to bedeveloped for this in the future.Cc: stable@vger.kernel.orgCc: Qingqing Zhuo <qingqing.zhuo@amd.com>Reported-by: Scott Bruce <smbruce@gmail.com>Reported-by: Chris Hixon <linux-kernel-bugs@hixontech.com>Reported-by: spasswolf@web.deLink: https://bugzilla.kernel.org/show_bug.cgi?id=215436Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1821Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1852Fixes: 2a50edbf10c8 ("drm/amd/display: Apply w/a for hard hang on HPD")Fixes: 1bd3bc745e7f ("drm/amd/display: Extend w/a for hard hang on HPD to dcn20")Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: fix function scopesThis turns previously global functions into static, thus removingcompile-time warnings such as: warning: no previous prototype for 'get_highest_allowed_voltag
drm/amd/display: fix function scopesThis turns previously global functions into static, thus removingcompile-time warnings such as: warning: no previous prototype for 'get_highest_allowed_voltage_level' [-Wmissing-prototypes] 742 | unsigned int get_highest_allowed_voltage_level(uint32_t chip_family, uint32_t hw_internal_rev, uint32_t pci_revision_id) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning: no previous prototype for 'rv1_vbios_smu_send_msg_with_param' [-Wmissing-prototypes] 102 | int rv1_vbios_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, unsigned int msg_id, unsigned int param) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Changes since v1:- As suggested by Rodrigo Siqueira: 1. Rewrite function signatures to make them more readable. 2. Get rid of unused functions in order to remove 'defined but not used' warnings.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Isabella Basso <isabbasso@riseup.net>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Replace referral of dal with dc[Why]DC should be used in place of DAL inupstream.[How]Replace dal with dc in function names.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@a
drm/amd/display: Replace referral of dal with dc[Why]DC should be used in place of DAL inupstream.[How]Replace dal with dc in function names.Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Acked-by: Anson Jacob <Anson.Jacob@amd.com>Signed-off-by: Qingqing Zhuo <Qingqing.Zhuo@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Apply w/a for hard hang on HPD[Why]HPD disable and enable sequences are not mutually exclusiveon Linux. For HPDs that spans under 1s (i.e. HPD low = 1s),part of the disable sequ
drm/amd/display: Apply w/a for hard hang on HPD[Why]HPD disable and enable sequences are not mutually exclusiveon Linux. For HPDs that spans under 1s (i.e. HPD low = 1s),part of the disable sequence (specifically, a request to SMUto lower refclk) could come right before the call to PHYenablement, causing DMUB to access an irresponsive PHYand thus a hard hang on the system.[How]Disable 48mhz refclk off when there is any HPD status inconnected state.Reviewed-by: Hersen Wu <hersenwu@amd.com>Acked-by: Mikita Lipski <mikita.lipski@amd.com>Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Support for DMUB AUX[WHY]To process AUX transactions with DMUB using inbox1 and outbox1 mail boxes.[How]1) Added inbox1 command DMUB_CMD__DP_AUX_ACCESS to issue AUX commands
drm/amd/display: Support for DMUB AUX[WHY]To process AUX transactions with DMUB using inbox1 and outbox1 mail boxes.[How]1) Added inbox1 command DMUB_CMD__DP_AUX_ACCESS to issue AUX commands to DMUB in dc_process_dmub_aux_transfer_async(). DMUB processes AUX cmd with DCN and sends reply back in an outbox1 message triggering an outbox1 interrupt to driver.2) In existing driver implementation, AUX commands are processed synchronously by configuring DCN reg. But in DMUB AUX, driver sends an inbox1 message and waits for a conditional variable (CV) which will be signaled by outbox1 ISR.3) DM will retrieve Outbox1 message and send back reply to upper layer and complete the AUX commandSigned-off-by: Jude Shih <shenshih@amd.com>Reviewed-by: Hanghong Ma <Hanghong.Ma@amd.com>Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>Acked-by: Wayne Lin <Wayne.Lin@amd.com>Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Log DMCUB trace buffer events[Why]We want to log DMCUB trace buffer events as Linux kernel traces.[How]Register an IRQ handler for DMCUB outbox0 interrupt in amdgpu_dm,and log
drm/amd/display: Log DMCUB trace buffer events[Why]We want to log DMCUB trace buffer events as Linux kernel traces.[How]Register an IRQ handler for DMCUB outbox0 interrupt in amdgpu_dm,and log the messages in the DMCUB tracebuffer to a new DMCUBTRACE_EVENT as soon as we receive the outbox0 IRQ from DMCUB FW.Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>Acked-by: Solomon Chiu <solomon.chiu@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Support vertical interrupt 0 for all dcn ASIC[Why]When CONFIG_DRM_AMD_SECURE_DISPLAY is enabled, it will tryto register vertical interrupt 0 for specific task.Currently, only d
drm/amd/display: Support vertical interrupt 0 for all dcn ASIC[Why]When CONFIG_DRM_AMD_SECURE_DISPLAY is enabled, it will tryto register vertical interrupt 0 for specific task.Currently, only dcn10 have defined relevant info for vertical interrupt0. If we enable CONFIG_DRM_AMD_SECURE_DISPLAY for other dcn ASIC, willget DC_IRQ_SOURCE_INVALID while calling dc_interrupt_to_irq_source() andcause pointer errors.[How]Add support of vertical interrupt 0 for all dcn ASIC.v2: squash in build fix (Alex)Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>Acked-by: Solomon Chiu <solomon.chiu@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1When run igt@kms_vrr in a device that uses DCN2.1 architecture, wenoticed multiple failures. Furthermore, when we tested a VRR demo, weno
drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1When run igt@kms_vrr in a device that uses DCN2.1 architecture, wenoticed multiple failures. Furthermore, when we tested a VRR demo, wenoticed a system hang where the mouse pointer still works, but theentire system freezes; in this case, we don't see any dmesg warning orfailure messages kernel. This happens due to a lack of vupdate_no_lockinterrupt, making the userspace wait eternally to get the event back.For fixing this issue, we need to add the vupdate_no_lock interrupt inthe interrupt list.Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Acked-by: Bindu Ramamurthy <bindu.r@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>Cc: stable@vger.kernel.org
drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1When run igt@kms_vrr in a device that uses DCN2.1 architecture, wenoticed multiple failures. Furthermore, when we tested a VRR demo, wenoticed a system hang where the mouse pointer still works, but theentire system freezes; in this case, we don't see any dmesg warning orfailure messages kernel. This happens due to a lack of vupdate_no_lockinterrupt, making the userspace wait eternally to get the event back.For fixing this issue, we need to add the vupdate_no_lock interrupt inthe interrupt list.Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Acked-by: Bindu Ramamurthy <bindu.r@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: cleanup of construct and destruct funcs[Why]Too many construct functions which makes searchingdifficult, especially on some debuggers.[How]Append all construct and destruct fu
drm/amd/display: cleanup of construct and destruct funcs[Why]Too many construct functions which makes searchingdifficult, especially on some debuggers.[How]Append all construct and destruct functions with dcnnumber and object type to make each construct functionname uniqueSigned-off-by: Anthony Koo <Anthony.Koo@amd.com>Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drm/amd/display: Add Renoir irq_services (v2)Provides the interface to configure display interrrupts on renoir.v2: rebase fix (Alex)Acked-by: Harry Wentland <harry.wentland@amd.com>Signed-off-
drm/amd/display: Add Renoir irq_services (v2)Provides the interface to configure display interrrupts on renoir.v2: rebase fix (Alex)Acked-by: Harry Wentland <harry.wentland@amd.com>Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>Signed-off-by: Alex Deucher <alexander.deucher@amd.com>