RE: [PATCH] drm/amdgpu: Drop redundant unsigned >=0 comparision 'amdgpu_gfx_rlc_init_microcode()'

2023-12-21 Thread Zhou1, Tao
[AMD Official Use Only - General] Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of Srinivasan > Shanmugam > Sent: Wednesday, December 20, 2023 10:40 PM > To: Deucher, Alexander ; Koenig, Christian > > Cc: SHANMUGAM, SRINIVASAN ; amd- > g...@lists.freedesktop.org

RE: [PATCH Review V3 1/1] drm/amdgpu: Fix ecc irq enable/disable unpaired

2023-12-21 Thread Zhou1, Tao
[AMD Official Use Only - General] Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of > Stanley.Yang > Sent: Thursday, December 21, 2023 2:05 PM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > Cc: Yang, Stanley > Subject: [PATCH Review V3 1/1] drm/amdgpu: Fix

RE: [PATCH Review V3 1/1] drm/amdgpu: Fix ecc irq enable/disable unpaired

2023-12-21 Thread Zhang, Hawking
[AMD Official Use Only - General] Feel free to drop the check as below since amdgpu_xxx_ras_late_init applies the check for interrupt enablement. + amdgpu_ras_is_supported(tmp_adev, AMDGPU_RAS_BLOCK__SDMA) + amdgpu_ras_is_supported(tmp_

[PATCH v2 0/1] Implementation of resource_query_layout

2023-12-21 Thread Julia Zhang
Hi all, Sorry to late reply. This is v2 of the implementation of resource_query_layout. This adds a new ioctl to let guest query information of host resource, which is originally from Daniel Stone. We add some changes to support query the correct stride of host resource before it's created, which

[PATCH 1/1] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl

2023-12-21 Thread Julia Zhang
From: Daniel Stone Add a new ioctl to allow the guest VM to discover how the guest actually allocated the underlying buffer, which allows buffers to be used for GL<->Vulkan interop and through standard window systems. It's also a step towards properly supporting modifiers in the guest. Signed-of

[PATCH v2] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2

2023-12-21 Thread Jack Xiao
It's required to take the gfx mutex before access to CP_VMID_RESET, for there is a race condition with CP firmware to write the register. v2: add extra code to ensure the mutex releasing is successful. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 48

Re: [PATCH v3 1/2] drm/buddy: Implement tracking clear page feature

2023-12-21 Thread Arunpravin Paneer Selvam
Hi Matthew, On 12/21/2023 12:51 AM, Matthew Auld wrote: Hi, On 14/12/2023 13:42, Arunpravin Paneer Selvam wrote: - Add tracking clear page feature. - Driver should enable the DRM_BUDDY_CLEARED flag if it    successfully clears the blocks in the free path. On the otherhand,    DRM buddy marks

[PATCH] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

2023-12-21 Thread Srinivasan Shanmugam
In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw'

Re: [PATCH] drm/amdkfd: Use logical AND operator (&&) instead of bitwise AND (&) with a bool operand

2023-12-21 Thread Lazar, Lijo
On 12/21/2023 8:12 AM, Srinivasan Shanmugam wrote: Doing a bitwise AND between a bool and an int is generally not a good idea. The bool will be promoted to an int with value 0 or 1, the int is generally regarded as true with a non-zero value, thus ANDing them using bitwise has the potential to y

Re: [PATCH] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

2023-12-21 Thread SRINIVASAN SHANMUGAM
Sorry, there seems to be a problem in the logic, will resend v2 onto this. On 12/21/2023 6:15 PM, Srinivasan Shanmugam wrote: In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release ade

RE: [PATCH v2] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2

2023-12-21 Thread Zhang, Hawking
[AMD Official Use Only - General] Better to use dev_err or DRM_ERROR. Apart from that, the patch is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Xiao, Jack Sent: Thursday, December 21, 2023 18:29 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, H

[PATCH v2] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

2023-12-21 Thread Srinivasan Shanmugam
In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw'

[PATCH v2] drm/amd/display: Address function parameter 'context' not described in 'dc_state_rem_all_planes_for_stream' & 'populate_subvp_cmd_drr_info'

2023-12-21 Thread Srinivasan Shanmugam
Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Function parameter or member 'state' not described in 'dc_state_rem_all_planes_for_stream' drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Excess function parameter 'c

Re: [PATCH v2] drm/amd/display: Address function parameter 'context' not described in 'dc_state_rem_all_planes_for_stream' & 'populate_subvp_cmd_drr_info'

2023-12-21 Thread Rodrigo Siqueira Jordao
On 12/21/23 09:28, Srinivasan Shanmugam wrote: Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Function parameter or member 'state' not described in 'dc_state_rem_all_planes_for_stream' drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc

Re: [PATCH] drm/amd/display: Adjust kdoc for 'dcn35_hw_block_power_down' & 'dcn35_hw_block_power_up'

2023-12-21 Thread Rodrigo Siqueira Jordao
On 12/19/23 00:37, Srinivasan Shanmugam wrote: Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn35/dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Charlene Liu C

Re: [PATCH v2] drm/amd/display: Address function parameter 'context' not described in 'dc_state_rem_all_planes_for_stream' & 'populate_subvp_cmd_drr_info'

2023-12-21 Thread Aurabindo Pillai
On 2023-12-21 11:28, Srinivasan Shanmugam wrote: Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Function parameter or member 'state' not described in 'dc_state_rem_all_planes_for_stream' drivers/gpu/drm/amd/amdgpu/../display/dc/core/

[PATCH v2] drm/amd/display: Adjust kdoc for 'dcn35_hw_block_power_down' & 'dcn35_hw_block_power_up'

2023-12-21 Thread Srinivasan Shanmugam
Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn35/dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Charlene Liu Cc: Muhammad Ahmed Cc: Hamza Mahfooz Cc: Rodrigo Si

Re: [PATCH v2] drm/amd/display: Adjust kdoc for 'dcn35_hw_block_power_down' & 'dcn35_hw_block_power_up'

2023-12-21 Thread Rodrigo Siqueira Jordao
On 12/21/23 10:13, Srinivasan Shanmugam wrote: Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn35/dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Charlene Liu C

[PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'

2023-12-21 Thread Srinivasan Shanmugam
dbg_flags looks to be defined with incorrect data type; to process multiple debug flag options, and hence defined dbg_flags as u32. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 pm_map_process_aldebaran() warn: maybe use && instead of & Suggested-by: Lijo Laz

Re: [PATCH] drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'

2023-12-21 Thread Felix Kuehling
On 2023-12-21 12:39, Srinivasan Shanmugam wrote: dbg_flags looks to be defined with incorrect data type; to process multiple debug flag options, and hence defined dbg_flags as u32. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 pm_map_process_aldebaran() warn

[PATCH 1/2] drm/amd/display: add nv12 bounding box

2023-12-21 Thread Alex Deucher
This was included in gpu_info firmware, move it into the driver for consistency with other nv1x parts. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Signed-off-by: Alex Deucher --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 110 +- 1 file changed, 109 insertions

[PATCH 2/2] drm/amdgpu: skip gpu_info fw loading on navi12

2023-12-21 Thread Alex Deucher
It's no longer required. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu

Re: [PATCH] drm/amdkfd: Drop redundant NULL pointer check in kfd_topology.c

2023-12-21 Thread Felix Kuehling
On 2023-12-20 21:00, Srinivasan Shanmugam wrote: The list has the head node, the NULL pointer check is therefore superfluous, Hence removed it. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gp

[PATCH] drm/amdkfd: Fix lock dependency warning

2023-12-21 Thread Felix Kuehling
== WARNING: possible circular locking dependency detected 6.5.0-kfd-fkuehlin #276 Not tainted -- kworker/8:2/2676 is trying to acquire lock: 9435aae95c88 ((work_completion)(&svm_bo->eviction_

[PATCH 2/2] drm/amd/display: Move fixpt_from_s3132 to amdgpu_dm

2023-12-21 Thread Harry Wentland
Other environments don't like the unary minus operator on an unsigned value. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c| 18 +++--- .../gpu/drm/amd/display/include/fixed31_32.h | 12 2 files changed, 15 insertions(+), 15 deletions

[PATCH 1/2] drm/amd/display: Fix recent checkpatch errors in amdgpu_dm

2023-12-21 Thread Harry Wentland
- Use tabs, not spaces. - Brace and parentheses placement Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 ++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 5 ++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +- 3 fil

RE: [PATCH] drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET

2023-12-21 Thread Xiao, Jack
[AMD Official Use Only - General] I can see the soft reset can be called from amdgpu_device_gpu_recover and pci error handler, they have called amdgpu_device_lock_reset_domain to acquire a reset lock before soft reset. Regards, Jack -Original Message- From: Christian König Sent: Wedne

[PATCH] drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c

2023-12-21 Thread Srinivasan Shanmugam
Before using list_first_entry, make sure to check that list is not empty. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1428 kfd_add_peer_prop() warn

[PATCH Review 1/1] drm/amdgpu: Fix ineffective ras_mask settings

2023-12-21 Thread Stanley . Yang
For the special asic with mem ecc enabled but sram ecc not enabled, even if the ras block is not supported on .ras_enabled, if the asic supports poison mode and the ras block has ras configuration, it can be considered that the ras block supports ras function only with sram ecc is not enabled, othe