Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Christian König
Am 23.04.24 um 05:13 schrieb Li, Yunxiang (Teddy): [Public] We can't do this technically as there are cases where we skip full device reset (even then amdgpu_in_reset will return true). The better thing to do is to move amdgpu_device_stop_pending_resets() later in gpu_recover()- if a device

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Christian König
Am 22.04.24 um 21:45 schrieb Yunxiang Li: Reset request from KFD is missing a check for if a reset is already in progress, this causes a second reset to be triggered right after the previous one finishes. Add the check to align with the other reset sources. NAK, that isn't how this should be

[PATCH 2/2] drm/amdgpu: fix uninitialized variable warning

2024-04-22 Thread Bob Zhou
Because the val isn't initialized, a random variable is set by amdgpu_i2c_put_byte. So fix the uninitialized issue. Signed-off-by: Bob Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c

[PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings

2024-04-22 Thread Bob Zhou
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings. Signed-off-by: Bob Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 + 1 file changed, 1

[PATCH 1/2] drm/amdgpu: fix double free err_addr pointer warnings

2024-04-22 Thread Bob Zhou
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings. Signed-off-by: Bob Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 + 1 file changed, 1

[PATCH v1 4/4] drm/ci: add tests on vkms

2024-04-22 Thread Vignesh Raman
Add job that runs igt on top of vkms. Acked-by: Maíra Canal Acked-by: Helen Koike Signed-off-by: Vignesh Raman Acked-by: Jessica Zhang Tested-by: Jessica Zhang Acked-by: Maxime Ripard Signed-off-by: Helen Koike --- MAINTAINERS | 1 +

[PATCH v1 2/4] drm/ci: build virtual GPU driver as module

2024-04-22 Thread Vignesh Raman
With latest IGT, the tests tries to load the module and it fails. So build the virtual GPU driver for virtio as module. Signed-off-by: Vignesh Raman --- drivers/gpu/drm/ci/build.sh | 1 - drivers/gpu/drm/ci/igt_runner.sh | 6 +++---

[PATCH v1 1/4] drm/ci: uprev mesa version

2024-04-22 Thread Vignesh Raman
zlib.net is not allowing tarball download anymore and results in below error in kernel+rootfs_arm32 container build, urllib.error.HTTPError: HTTP Error 403: Forbidden urllib.error.HTTPError: HTTP Error 415: Unsupported Media Type Uprev mesa to latest version which includes a fix for this issue.

[PATCH v1 0/4] Uprev mesa and IGT

2024-04-22 Thread Vignesh Raman
Uprev mesa and IGT to the latest version. Stop vendoring the testlist into the kernel. Instead, use the testlist from the IGT build to ensure we do not miss renamed or newly added tests. Update the xfails with the latest testlist run. Also build virtual GPU driver for virtio as module. This

RE: [PATCH] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

2024-04-22 Thread Zhang, Hawking
[AMD Official Use Only - General] Shall we move the check to the aca helper function? Regards, Hawking -Original Message- From: Chai, Thomas Sent: Tuesday, April 23, 2024 11:14 To: amd-gfx@lists.freedesktop.org Cc: Chai, Thomas ; Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Wang,

Re: [PATCH] drm/amd/display: Address kdoc for 'Enable CRTC' in optc401_enable_crtc

2024-04-22 Thread Chung, ChiaHsuan (Tom)
Reviewed-by: Tom Chung On 4/23/2024 9:59 AM, Srinivasan Shanmugam wrote: This commit fixes the kdoc for 'Enable CRTC' in `optc401_enable_crtc` function. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn401/dcn401_optc.c:177: warning: This comment starts with

[PATCH] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

2024-04-22 Thread YiPeng Chai
Fix ras mode2 reset failure in ras aca mode for sdma v4_4_2 and gfx v9_4_3. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 4 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

RE: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Li, Yunxiang (Teddy)
[Public] > We can't do this technically as there are cases where we skip full device > reset (even then amdgpu_in_reset will return true). The better thing to do is > to move amdgpu_device_stop_pending_resets() later in > gpu_recover()- if a device has undergone full reset, then cancel all

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Lazar, Lijo
On 4/23/2024 1:15 AM, Yunxiang Li wrote: > Reset request from KFD is missing a check for if a reset is already in > progress, this causes a second reset to be triggered right after the > previous one finishes. Add the check to align with the other reset sources. > > Signed-off-by: Yunxiang Li

Re: [PATCH 3/3] drm/amdgpu: Fix Uninitialized scalar variable warning

2024-04-22 Thread Ma, Jun
On 4/22/2024 7:25 PM, Christian König wrote: > Am 22.04.24 um 11:49 schrieb Ma Jun: >> Initialize the variables which were not initialized >> to fix the coverity issue "Uninitialized scalar variable" > > Feel free to add my Acked-by to the first two patches, but this here > clearly doesn't

[PATCH WIP] drm/amdgpu: Fix kfd_locked locking issue

2024-04-22 Thread Yunxiang Li
During SRIOV reset, if a step fails and we retry, it locks kfd_locked again but later only unlocks it once. This means all future attempts at opening /dev/kfd will fail. Fix the locking error and rework the SRIOV path to use the same reset loop from the caller. Hopefully this makes the code

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Felix Kuehling
On 2024-04-22 16:14, Alex Deucher wrote: On Mon, Apr 22, 2024 at 3:52 PM Yunxiang Li wrote: Reset request from KFD is missing a check for if a reset is already in progress, this causes a second reset to be triggered right after the previous one finishes. Add the check to align with the other

[PATCH] drm/amd/display: Address kdoc for 'Enable CRTC' in optc401_enable_crtc

2024-04-22 Thread Srinivasan Shanmugam
This commit fixes the kdoc for 'Enable CRTC' in `optc401_enable_crtc` function. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn401/dcn401_optc.c:177: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer

[PATCH] drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

2024-04-22 Thread Srinivasan Shanmugam
The buffer size is determined by the declaration char fw_name[30]; This means fw_name can hold up to 30 characters, including the null character that marks the end of the string. The string to be written is "amdgpu/%s_mec.bin" or "amdgpu/%s_rlc.bin", where %s will be replaced by the value of

[PATCH] drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

2024-04-22 Thread Srinivasan Shanmugam
The buffer size is determined by the declaration char fw_name[30]; This means fw_name can hold up to 30 characters, including the null character that marks the end of the string. The string to be written is "amdgpu/%s_mec.bin" or "amdgpu/%s_rlc.bin", where %s will be replaced by the value of

[PATCH AUTOSEL 6.1 14/19] drm/amdgpu: Refine IB schedule error logging

2024-04-22 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit 4b18a91faf1752f9bd69a4ed3aed2c8f6e5b0528 ] Downgrade to debug information when IBs are skipped. Also, use dev_* to identify the device. Signed-off-by: Lijo Lazar Reviewed-by: Christian König Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher

[PATCH AUTOSEL 6.6 21/29] amd/amdkfd: sync all devices to wait all processes being evicted

2024-04-22 Thread Sasha Levin
From: Zhigang Luo [ Upstream commit d06af584be5a769d124b7302b32a033e9559761d ] If there are more than one device doing reset in parallel, the first device will call kfd_suspend_all_processes() to evict all processes on all devices, this call takes time to finish. other device will start reset

[PATCH AUTOSEL 6.6 20/29] drm/amdgpu: Fix VCN allocation in CPX partition

2024-04-22 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit f7e232de51bb1b45646e5b7dc4ebcf13510f2630 ] VCN need not be shared in CPX mode always for all GFX 9.4.3 SOC SKUs. In certain configs, VCN instance can be exclusively allocated to a partition even under CPX mode. Signed-off-by: Lijo Lazar Reviewed-by: James

[PATCH AUTOSEL 6.6 19/29] drm/amd/display: Skip on writeback when it's not applicable

2024-04-22 Thread Sasha Levin
From: Alex Hung [ Upstream commit ecedd99a9369fb5cde601ae9abd58bca2739f1ae ] [WHY] dynamic memory safety error detector (KASAN) catches and generates error messages "BUG: KASAN: slab-out-of-bounds" as writeback connector does not support certain features which are not initialized. [HOW] Skip

[PATCH AUTOSEL 6.6 18/29] drm/amdgpu: implement IRQ_STATE_ENABLE for SDMA v4.4.2

2024-04-22 Thread Sasha Levin
From: Tao Zhou [ Upstream commit f886b49feaae30acd599e37d4284836024b0f3ed ] SDMA_CNTL is not set in some cases, driver configures it by itself. v2: simplify code Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.6 17/29] drm/amdgpu: Refine IB schedule error logging

2024-04-22 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit 4b18a91faf1752f9bd69a4ed3aed2c8f6e5b0528 ] Downgrade to debug information when IBs are skipped. Also, use dev_* to identify the device. Signed-off-by: Lijo Lazar Reviewed-by: Christian König Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher

[PATCH AUTOSEL 6.8 32/43] drm/amdgpu: Fix VCN allocation in CPX partition

2024-04-22 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit f7e232de51bb1b45646e5b7dc4ebcf13510f2630 ] VCN need not be shared in CPX mode always for all GFX 9.4.3 SOC SKUs. In certain configs, VCN instance can be exclusively allocated to a partition even under CPX mode. Signed-off-by: Lijo Lazar Reviewed-by: James

[PATCH AUTOSEL 6.8 33/43] amd/amdkfd: sync all devices to wait all processes being evicted

2024-04-22 Thread Sasha Levin
From: Zhigang Luo [ Upstream commit d06af584be5a769d124b7302b32a033e9559761d ] If there are more than one device doing reset in parallel, the first device will call kfd_suspend_all_processes() to evict all processes on all devices, this call takes time to finish. other device will start reset

[PATCH AUTOSEL 6.8 31/43] drm/amd/pm: fix the high voltage issue after unload

2024-04-22 Thread Sasha Levin
From: Kenneth Feng [ Upstream commit 3818708e9c9712e2ba4006bc23502ee7b031bd3f ] fix the high voltage issue after unload on smu 13.0.10 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.8 30/43] drm/amd/display: Skip on writeback when it's not applicable

2024-04-22 Thread Sasha Levin
From: Alex Hung [ Upstream commit ecedd99a9369fb5cde601ae9abd58bca2739f1ae ] [WHY] dynamic memory safety error detector (KASAN) catches and generates error messages "BUG: KASAN: slab-out-of-bounds" as writeback connector does not support certain features which are not initialized. [HOW] Skip

[PATCH AUTOSEL 6.8 29/43] drm/amdgpu: implement IRQ_STATE_ENABLE for SDMA v4.4.2

2024-04-22 Thread Sasha Levin
From: Tao Zhou [ Upstream commit f886b49feaae30acd599e37d4284836024b0f3ed ] SDMA_CNTL is not set in some cases, driver configures it by itself. v2: simplify code Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 6.8 28/43] drm/amdgpu: add smu 14.0.1 discovery support

2024-04-22 Thread Sasha Levin
From: Yifan Zhang [ Upstream commit 533eefb9be76c3b23d220ee18edfda8eb56cefff ] This patch to add smu 14.0.1 support Reviewed-by: Alex Deucher Signed-off-by: Yifan Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file

[PATCH AUTOSEL 6.8 26/43] drm/amdgpu: Refine IB schedule error logging

2024-04-22 Thread Sasha Levin
From: Lijo Lazar [ Upstream commit 4b18a91faf1752f9bd69a4ed3aed2c8f6e5b0528 ] Downgrade to debug information when IBs are skipped. Also, use dev_* to identify the device. Signed-off-by: Lijo Lazar Reviewed-by: Christian König Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher

[PATCH AUTOSEL 6.8 27/43] drm/amd/display: add DCN 351 version for microcode load

2024-04-22 Thread Sasha Levin
From: Li Ma [ Upstream commit d4396924c3d44f34d0643f650e70892e07f3677f ] There is a new DCN veriosn 3.5.1 need to load Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH v2] drm/amdgpu: Add reset_context flag for host FLR

2024-04-22 Thread Yunxiang Li
Using the job pointer to check if the FLR comes from the host is wrong, there are other reset triggers that pass NULL for job. So add a flag explicitly for host triggered reset. Signed-off-by: Yunxiang Li --- v2: fix typo drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Alex Deucher
On Mon, Apr 22, 2024 at 3:52 PM Yunxiang Li wrote: > > Reset request from KFD is missing a check for if a reset is already in > progress, this causes a second reset to be triggered right after the > previous one finishes. Add the check to align with the other reset sources. Acked-by: Alex

[PATCH v2] drm/amdgpu: IB test encode test package change for VCN5

2024-04-22 Thread Sonny Jiang
From: Sonny Jiang VCN5 session info package interface changed Signed-off-by: Sonny Jiang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

[PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-22 Thread Yunxiang Li
Reset request from KFD is missing a check for if a reset is already in progress, this causes a second reset to be triggered right after the previous one finishes. Add the check to align with the other reset sources. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2

[PATCH] drm/amdgpu: Add reset_context flag for host FLR

2024-04-22 Thread Yunxiang Li
Using the job pointer to check if the FLR comes from the host is wrong, there are other reset triggers that pass NULL for job. So add a flag explicitly for host triggered reset. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-

[linux-next:master] BUILD REGRESSION f529a6d274b3b8c75899e949649d231298f30a32

2024-04-22 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: f529a6d274b3b8c75899e949649d231298f30a32 Add linux-next specific files for 20240422 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202404221830.cjqlhldl-...@intel.com Error

RE: [PATCH 1/2] drm/amdgpu: add a spinlock to wb allocation

2024-04-22 Thread Liu, Shaoyun
[AMD Official Use Only - General] These two patches Looks good to me . Reviewed by Shaoyun.liu -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Monday, April 22, 2024 10:38 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 1/2] drm/amdgpu:

RE: [PATCH 00/37] DC Patches April 22, 2024

2024-04-22 Thread Wheeler, Daniel
[Public] Hi all, This week this patchset was tested on the following systems: * Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U * MSI Gaming X Trio RX 6800 * Gigabyte Gaming OC RX 7900 XTX These systems were tested on the following display/connection types: *

Re: [PATCH v3 6/7] drm/amdgpu: Skip dma map resource for null RDMA device

2024-04-22 Thread Philip Yang
On 2024-04-22 10:56, Christian König wrote: Am 22.04.24 um 15:57 schrieb Philip Yang: To test RDMA using dummy driver on the system without NIC/RDMA device, the get/put dma pages pass in null device pointer, skip

Re: [PATCH v3 2/7] drm/amdgpu: Handle sg size limit for contiguous allocation

2024-04-22 Thread Philip Yang
On 2024-04-22 10:40, Christian König wrote: Am 22.04.24 um 15:57 schrieb Philip Yang: Define macro MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so

[PATCH 37/37] drm/amd/display: 3.2.282

2024-04-22 Thread Aurabindo Pillai
From: Aric Cyr Summary: * Changes across DSC, MST, DMCUB, Panel Replay and misc fixes. * Fixes to cursor programming sequence * Add some missing register defs * Formatting/Sytle fixes Acked-by: Aurabindo Pillai Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler ---

[PATCH 36/37] drm/amd/display: [FW Promotion] Release 0.0.214.0

2024-04-22 Thread Aurabindo Pillai
From: Anthony Koo - Adjust the dmub_fw_boot_options reserved bits to be correct Acked-by: Aurabindo Pillai Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 35/37] drm/amd/display: Replace uint8_t with u8 for dp_hdmi_dongle_signature_str

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira The string dp_hdmi_dongle_signature_str already uses u8 but the string dp_hdmi_dongle_signature_str does not. Just replace uint8_t with u8 for dp_hdmi_dongle_signature_str. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by:

[PATCH 33/37] drm/amd/display: Keep VBios pixel rate div setting util next mode set

2024-04-22 Thread Aurabindo Pillai
From: yi-lchen [why] VBios & Driver may have differnet pixel rate div policy. If the policy is not same and fast boot is enabled, it would cause the pixel rate is too high after driver only performs stream blank & unblank. [how] We would keep pixel rate div setting by VBios until next mode set.

[PATCH 34/37] drm/amd/display: Update dcn351 debug flags and function pointers

2024-04-22 Thread Aurabindo Pillai
From: Sung Joon Kim [why & how] There are potential issues with Z8 and IPS that need to be addressed and need to add in missing function pointers. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler ---

[PATCH 32/37] drm/amd/display: Disable error correction if it's not supported

2024-04-22 Thread Aurabindo Pillai
From: Cruise [Why] Error correction was enabled in a monitor which doesn't support. [How] Disable error correction if it's not supported Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Cruise Tested-by: Daniel Wheeler --- .../display/dc/link/protocols/link_dp_phy.c |

[PATCH 31/37] drm/amd/display: Fix recout calculation for stereo side-by-side

2024-04-22 Thread Aurabindo Pillai
From: Sung Joon Kim [why & how] The recout x offset was incorrect which led to wrong viewport calculation. For stereo side-by-side case, the slice index should be 0 for both split pipes. Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel

[PATCH 30/37] drm/amd/display: Set cursor attributes before position

2024-04-22 Thread Aurabindo Pillai
From: Harry Wentland HWSS set_cursor_attributes copies the stream's cursor attributes to the hubp cursor attributes. set_cursor_position might attempt to program the cursor attributes but will program them wrong if they're not set correctly. We need to call HWSS set_cursor_attributes first to

[PATCH 29/37] drm/amd/display: Separate setting and programming of cursor

2024-04-22 Thread Aurabindo Pillai
From: Harry Wentland We're seeing issues when user-space tries to do an atomic update of the primary surface, as well as the cursor. These two updates are separate calls into DC and don't currently act as an atomic update. This might lead to cursor updates being locked out and cursors

[PATCH 28/37] Revert "drm/amd/display: Fix incorrect pointer assignment"

2024-04-22 Thread Aurabindo Pillai
From: Joshua Aberback This reverts commit 44739205e867 [Why] The change being reverted incorrectly assumes that a pointer type was intended, however copying to a new structure is correct. As well, there is no compiler error, it was instead an error in the testing framework being used.

[PATCH 27/37] drm/amd/display: Add condition for dp_set_dsc_config call

2024-04-22 Thread Aurabindo Pillai
From: Ilya Bakoulin Not every ASIC implements dp_set_dsc_config. Add condition to prevent calls to unimplemented function. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 16

[PATCH 26/37] drm/amd/display: Allocate zero bw after bw alloc enable

2024-04-22 Thread Aurabindo Pillai
From: Meenakshikumar Somasundaram [Why] During DP tunnel creation, CM preallocates BW and reduces estimated BW of other DPIA. CM release preallocation only when allocation is complete. Display mode validation logic validates timings based on bw available per host router. In multi display setup,

[PATCH 25/37] drm/amd/display: Fix incorrect DSC instance for MST

2024-04-22 Thread Aurabindo Pillai
From: Hersen Wu [Why] DSC debugfs, such as dp_dsc_clock_en_read, use aconnector->dc_link to find pipe_ctx for display. Displays connected to MST hub share the same dc_link. DSC instance is from pipe_ctx. This causes incorrect DSC instance for display connected to MST hub. [How] Add

[PATCH 24/37] drm/amd/display: Force flush after write to IPS driver signals

2024-04-22 Thread Aurabindo Pillai
From: Nicholas Kazlauskas [Why] It's possible that the write hasn't fully completed by the time we send (and flush) a command to DMCUB to notify idle to request IPS2 exit. [How] Perform a readback of the volatile structure into dc_dmub_srv state. Reviewed-by: Charlene Liu Acked-by: Aurabindo

[PATCH 23/37] drm/amd/display: Block FPO According to Luminance Delta

2024-04-22 Thread Aurabindo Pillai
From: Ethan Bitnun [Description] - Block FPO if the max stretch refresh rate is low enough to cause a flicker by storing the maximum safe refresh decrease from nominal in stream. - Brought over various Freesync Luminance functions to dc. Use these new functions to block fpo if we will

[PATCH 22/37] drm/amd/display: Skip SST ACT polling when sink_count is 0

2024-04-22 Thread Aurabindo Pillai
From: George Shen [Why] Upon disconnecting a UHBR SST display, the disconnection and the SetTimings to disable the display can occur such that link_set_dpms_off occurs after the disconnection has already processed (link->type is dc_connection_none). Thus, the AUX related operations should be

[PATCH 21/37] drm/amd/display: Atom Integrated System Info v2_2 for DCN35

2024-04-22 Thread Aurabindo Pillai
From: Gabe Teeger New request from KMD/VBIOS in order to support new UMA carveout model. This fixes a null dereference from accessing Ctx->dc_bios->integrated_info while it was NULL. DAL parses through the BIOS and extracts the necessary integrated_info but was missing a case for the new BIOS

[PATCH 20/37] drm/amd/display: Add delay to improve LTTPR UHBR interop

2024-04-22 Thread Aurabindo Pillai
From: Michael Strauss [WHY] Avoid race condition which puts LTTPR into bad state during UHBR LT. [HOW] Delay 30ms between starting UHBR TPS1 PHY output and sending TPS1 via DPCD. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler

[PATCH 19/37] drm/amd/display: Handle HPD_IRQ for internal link

2024-04-22 Thread Aurabindo Pillai
From: Sung-huai Wang [Why] TCON data is corrupted after electro static discharge test. Once the TCON data get corrupted, they will get themselves reset and send HPD_IRQ to source side. [How] Support HPD_IRQ for internal link, and restore the PSR/Replay setup. Reviewed-by: Robin Chen Acked-by:

[PATCH 18/37] drm/amd/display: Reuse the modified power sequence

2024-04-22 Thread Aurabindo Pillai
From: Sung Joon Kim [why & how] Need to update the function pointers that perform the power up and down sequence to reuse the modified sequence as a requirement. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler ---

[PATCH 17/37] drm/amd/display: Add dtbclk access to dcn315

2024-04-22 Thread Aurabindo Pillai
From: Swapnil Patel [Why & How] Currently DCN315 clk manager is missing code to enable/disable dtbclk. Because of this, "optimized_required" flag is constantly set and this prevents FreeSync from engaging for certain high bandwidth display Modes which require DTBCLK. Reviewed-by: Dmytro

[PATCH 16/37] drm/amd/display: Add null check in resource_log_pipe_topology_update

2024-04-22 Thread Aurabindo Pillai
From: Natanel Roizenman [WHY] When switching from "Extend" to "Second Display Only" we sometimes call resource_get_otg_master_for_stream on a stream for the eDP, which is disconnected. This leads to a null pointer dereference. [HOW] Added a null check in

[PATCH 15/37] drm/amd/display: Fix Replay Desync Error Test

2024-04-22 Thread Aurabindo Pillai
From: Dennis Chan When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine. Reviewed-by: ChunTao Tso Acked-by: Aurabindo Pillai Signed-off-by: Dennis Chan Tested-by:

[PATCH 14/37] drm/amd/display: Drop unnecessary semicolon

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira Drop unnecessary semicolon that can create a problem of double semicolon in some compilers. Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_opp.h | 3 +--

[PATCH 13/37] drm/amd/display: Add missing IRQ types

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit add some DPCX IRQ types. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/irq_types.h | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 11/37] drm/amd/display: Update comments in DC

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit adds, updates, and removes some of the comments used in the DC code. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- .../gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.h| 2 +-

[PATCH 12/37] drm/amd/display: Ensure that dmcub support flag is set for DCN20

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira In the DCN20 resource initialization, ensure that DMCUB support starts configured as true. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c | 1 + 1 file changed, 1

[PATCH 10/37] drm/amd/display: Add some HDCP registers DCN35 list

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira Add some missing HDCP registers to be used in DCN35. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- .../amd/display/dc/dcn35/dcn35_dio_link_encoder.h| 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff

[PATCH 09/37] drm/amd/display: Code style adjustments

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit address some small code style issues in DC. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- .../gpu/drm/amd/display/dc/dcn321/dcn321_dio_link_encoder.c| 3 +-- drivers/gpu/drm/amd/display/dc/dm_helpers.h

[PATCH 08/37] drm/amd/display: Adjust registers sequence in the DIO list

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit reorganizes the order in which some control registers are presented to make it easier to identify the operations based on the hardware doc. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler ---

[PATCH 06/37] drm/amd/display: Handle Y carry-over in VCP X.Y calculation

2024-04-22 Thread Aurabindo Pillai
From: George Shen Theoretically rare corner case where ceil(Y) results in rounding up to an integer. If this happens, the 1 should be carried over to the X value. CC: sta...@vger.kernel.org Reviewed-by: Rodrigo Siqueira Signed-off-by: George Shen Tested-by: Daniel Wheeler ---

[PATCH 07/37] drm/amd/display: Clean up code in DC

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit removes some unnecessary code and makes the required adjustments to replace other parts of the code with a short option. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler ---

[PATCH 05/37] drm/amd/display: Increase SAT_UPDATE_PENDING timeout

2024-04-22 Thread Aurabindo Pillai
From: Dmytro Laktyushkin Headless dp 2.0 will take longer to update. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler --- .../gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 04/37] drm/amd/display: Add some missing HDMI registers for DCN3x

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit add some missing HDMI control registers to DCN3x. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dccg.h | 3 +++ drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h

[PATCH 03/37] drm/amd/display: Add TMDS DC balancer control

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira Add TMDS balancer control to the list of available encoder registers for DCN 30. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dio_link_encoder.h | 3 ++- 1 file changed, 2

[PATCH 02/37] drm/amd/display: Add missing dwb registers

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira DCN3.0 supports some specific DWB debug registers that are not exposed yet. This commit just adds the missing registers. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.h | 14

[PATCH 01/37] drm/amd/display: Add missing debug registers for DCN2/3/3.1

2024-04-22 Thread Aurabindo Pillai
From: Rodrigo Siqueira This commit add some missing debug registers for DPCS and RDPC debug. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler --- .../amd/display/dc/dcn20/dcn20_link_encoder.h | 5 +++- .../display/dc/dcn31/dcn31_dio_link_encoder.h | 2

[PATCH 00/37] DC Patches April 22, 2024

2024-04-22 Thread Aurabindo Pillai
Summary: * Changes across DSC, MST, DMCUB, Panel Replay and misc fixes. * Fixes to cursor programming sequence * Add some missing register defs * Formatting/Sytle fixes == Anthony Koo (1): drm/amd/display: [FW Promotion] Release 0.0.214.0 Aric Cyr (1):

Re: [PATCH] drm/amdgpu: once more fix the call oder in amdgpu_ttm_move()

2024-04-22 Thread Christian König
Am 18.04.24 um 18:10 schrieb Alex Deucher: On Thu, Mar 21, 2024 at 10:37 AM Christian König wrote: Am 21.03.24 um 15:12 schrieb Tvrtko Ursulin: On 21/03/2024 12:43, Christian König wrote: This reverts drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap. The basic problem

Re: [PATCH 3/3] drm/amdgpu: add the amdgpu buffer object move speed metrics

2024-04-22 Thread Christian König
Am 16.04.24 um 10:51 schrieb Prike Liang: Add the amdgpu buffer object move speed metrics. What should that be good for? It adds quite a bunch of complexity for a feature we actually want to deprecate. Regards, Christian. Signed-off-by: Prike Liang ---

Re: [PATCH v3 6/7] drm/amdgpu: Skip dma map resource for null RDMA device

2024-04-22 Thread Christian König
Am 22.04.24 um 15:57 schrieb Philip Yang: To test RDMA using dummy driver on the system without NIC/RDMA device, the get/put dma pages pass in null device pointer, skip the dma map/unmap resource and sg table to avoid null pointer access. Well that is completely illegal and would break IOMMU.

Re: [PATCH] drm/amdgpu: Fixup bad vram size on gmc v6 and v7

2024-04-22 Thread Christian König
Am 22.04.24 um 16:40 schrieb Alex Deucher: On Mon, Apr 22, 2024 at 9:00 AM Christian König wrote: Am 22.04.24 um 14:33 schrieb Qiang Ma: On Mon, 22 Apr 2024 11:40:26 +0200 Christian König wrote: Am 22.04.24 um 07:26 schrieb Qiang Ma: Some boards(like Oland PRO: 0x1002:0x6613) seem to have

Re: [PATCH v3 2/7] drm/amdgpu: Handle sg size limit for contiguous allocation

2024-04-22 Thread Christian König
Am 22.04.24 um 15:57 schrieb Philip Yang: Define macro MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy

Re: [PATCH] drm/amdgpu: Fixup bad vram size on gmc v6 and v7

2024-04-22 Thread Alex Deucher
On Mon, Apr 22, 2024 at 9:00 AM Christian König wrote: > > Am 22.04.24 um 14:33 schrieb Qiang Ma: > > On Mon, 22 Apr 2024 11:40:26 +0200 > > Christian König wrote: > > > >> Am 22.04.24 um 07:26 schrieb Qiang Ma: > >>> Some boards(like Oland PRO: 0x1002:0x6613) seem to have > >>> garbage in the

[PATCH 2/2] drm/amdgpu/mes11: Use a separate fence per transaction

2024-04-22 Thread Alex Deucher
We can't use a shared fence location because each transaction should be considered independently. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 12 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 4 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 21

[PATCH 1/2] drm/amdgpu: add a spinlock to wb allocation

2024-04-22 Thread Alex Deucher
As we use wb slots more dynamically, we need to lock access to avoid racing on allocation or free. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-)

Re: [PATCH] Revert "drm/amd/display: Add fallback configuration when set DRR"

2024-04-22 Thread Harry Wentland
On 2024-04-22 09:51, Rodrigo Siqueira wrote: > This reverts commit 5ea4581611d14a6a0e8df40965802ec7bee9c671. > > This change must be reverted since it caused soft hangs when changing > the refresh rate to 122 & 144Hz when using a 7000 series GPU. > > Reported-by: Mark Broadworth > Cc: Daniel

Re: [PATCH] drm/amdgpu: update jpeg max decode resolution

2024-04-22 Thread Alex Deucher
On Mon, Apr 22, 2024 at 10:12 AM Sathishkumar S wrote: > > jpeg ip version v2.1 and higher supports 16kx16k resolution decode > > Signed-off-by: Sathishkumar S Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/nv.c| 6 +++--- > drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++-- >

Re: [PATCH] Revert "drm/amd/display: Add fallback configuration when set DRR"

2024-04-22 Thread Alex Deucher
On Mon, Apr 22, 2024 at 10:02 AM Rodrigo Siqueira wrote: > > This reverts commit 5ea4581611d14a6a0e8df40965802ec7bee9c671. > > This change must be reverted since it caused soft hangs when changing > the refresh rate to 122 & 144Hz when using a 7000 series GPU. > > Reported-by: Mark Broadworth >

[PATCH v3 6/7] drm/amdgpu: Skip dma map resource for null RDMA device

2024-04-22 Thread Philip Yang
To test RDMA using dummy driver on the system without NIC/RDMA device, the get/put dma pages pass in null device pointer, skip the dma map/unmap resource and sg table to avoid null pointer access. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 33

[PATCH v3 0/7] Best effort contiguous VRAM allocation

2024-04-22 Thread Philip Yang
This patch series implement new KFD memory alloc flag for best effort contiguous VRAM allocation, to support peer direct access RDMA device with limited scatter-gather dma capability. v2: rebase on patch ("drm/amdgpu: Modify the contiguous flags behaviour") to avoid adding the new GEM flag

[PATCH v3 5/7] drm/amdkfd: Increase KFD bo restore wait time

2024-04-22 Thread Philip Yang
TTM allocate contiguous VRAM may takes more than 1 second to evict BOs for larger size RDMA buffer. Because KFD restore bo worker reserves all KFD BOs, then TTM cannot hold the remainning KFD BOs lock to evict them, this causes TTM failed to alloc contiguous VRAM. Increase the KFD restore BO wait

[PATCH v3 7/7] drm/amdkfd: Bump kfd version for contiguous VRAM allocation

2024-04-22 Thread Philip Yang
Bump the kfd ioctl minor version to delcare the contiguous VRAM allocation flag support. Signed-off-by: Philip Yang --- include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index

[PATCH v3 3/7] drm/amdgpu: Evict BOs from same process for contiguous allocation

2024-04-22 Thread Philip Yang
When TTM failed to alloc VRAM, TTM try evict BOs from VRAM to system memory then retry the allocation, this skips the KFD BOs from the same process because KFD require all BOs are resident for user queues. If TTM with TTM_PL_FLAG_CONTIGUOUS flag to alloc contiguous VRAM, allow TTM evict KFD BOs

[PATCH v3 2/7] drm/amdgpu: Handle sg size limit for contiguous allocation

2024-04-22 Thread Philip Yang
Define macro MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy block size in order to get contiguous VRAM

[PATCH v3 4/7] drm/amdkfd: Evict BO itself for contiguous allocation

2024-04-22 Thread Philip Yang
If the BO pages pinned for RDMA is not contiguous on VRAM, evict it to system memory first to free the VRAM space, then allocate contiguous VRAM space, and then move it from system memory back to VRAM. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 16

  1   2   >