Re: [PATCH 2/2] drm/amdgpu: add shared fdinfo stats

2024-01-08 Thread Christian König
Am 07.12.23 um 19:02 schrieb Alex Deucher: Add shared stats. Useful for seeing shared memory. v2: take dma-buf into account as well Signed-off-by: Alex Deucher Cc: Rob Clark --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11

Re: [PATCH] drm/amdgpu: move kiq_reg_write_reg_wait() out of amdgpu_virt.c

2024-01-08 Thread Christian König
Am 08.01.24 um 22:38 schrieb Alex Deucher: It's used for more than just SR-IOV now, so move it to amdgpu_gmc.c and rename it to better match the functionality and update the comments in the code paths to better document when each path is used and why. No functional change. Signed-off-by: Alex

Re: 回复: Re: [PATCH libdrm 1/2] amdgpu: fix parameter of amdgpu_cs_ctx_create2

2024-01-08 Thread Christian König
Am 09.01.24 um 02:50 schrieb 李真能: When the priority value is passed to the kernel, the kernel compares it with the following values: #define AMDGPU_CTX_PRIORITY_VERY_LOW    -1023 #define AMDGPU_CTX_PRIORITY_LOW -512 #define AMDGPU_CTX_PRIORITY_NORMAL  0 #define

RE: [PATCH v2 2/2] drm/amdgpu: update ATHUB_MISC_CNTL offset for nbio v3.3

2024-01-08 Thread Huang, Tim
[Public] Series is Reviewed-by: Tim Huang Best Regards, Tim Huang -Original Message- From: Zhang, Yifan Sent: Tuesday, January 9, 2024 11:01 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Yu, Lang ; Ma, Li ; Huang, Tim ; Zhang, Yifan Subject: [PATCH v2 2/2]

[PATCH v2 2/2] drm/amdgpu: update ATHUB_MISC_CNTL offset for nbio v3.3

2024-01-08 Thread Yifan Zhang
This patch to update ATHUB_MISC_CNTL offset for nbio v3.3 v2: correct a type (Tim) Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/athub_v3_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/athub_v3_0.c

[PATCH v2 1/2] drm/amdgpu: update headers for nbio v7.11

2024-01-08 Thread Yifan Zhang
This patch is to update headers for nbio v7.11. Signed-off-by: Yifan Zhang --- .../drm/amd/include/asic_reg/nbio/nbio_7_11_0_offset.h| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_11_0_offset.h

RE: [PATCH 2/2] drm/amdgpu: update ATHUB_MISC_CNTL offset for nbio v3.3

2024-01-08 Thread Zhang, Yifan
[AMD Official Use Only - General] Hi Tim, Thanks for pointing this out. Will change it in V2. Best Regards, Yifan -Original Message- From: Huang, Tim Sent: Tuesday, January 9, 2024 10:58 AM To: Zhang, Yifan ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Yu,

RE: [PATCH 2/2] drm/amdgpu: update ATHUB_MISC_CNTL offset for nbio v3.3

2024-01-08 Thread Huang, Tim
[AMD Official Use Only - General] Hi Yifan, -Original Message- From: amd-gfx On Behalf Of Yifan Zhang Sent: Tuesday, January 9, 2024 10:06 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Yu, Lang ; Ma, Li Subject: [PATCH 2/2] drm/amdgpu: update

[PATCH 2/2] drm/amdgpu: update ATHUB_MISC_CNTL offset for nbio v3.3

2024-01-08 Thread Yifan Zhang
This patch to update ATHUB_MISC_CNTL offset for nbio v3.3 Signed-off-by: Yifan Zhang Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/athub_v3_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/athub_v3_0.c b/drivers/gpu/drm/amd/amdgpu/athub_v3_0.c

[PATCH 1/2] drm/amdgpu: update headers for nbio v7.11

2024-01-08 Thread Yifan Zhang
This patch is to update headers for nbio v7.11. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher --- .../drm/amd/include/asic_reg/nbio/nbio_7_11_0_offset.h| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

RE: [PATCH] drm/amdgpu: move kiq_reg_write_reg_wait() out of amdgpu_virt.c

2024-01-08 Thread Liu, Shaoyun
[AMD Official Use Only - General] Looks good to me . Reviewed by : Shaoyun.liu -Original Message- From: Deucher, Alexander Sent: Monday, January 8, 2024 4:38 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Liu, Shaoyun ; Koenig, Christian Subject: [PATCH] drm/amdgpu:

RE: [PATCH 4/4] drm/amdgpu: Do not program VM_L2_CNTL under SRIOV

2024-01-08 Thread Chander, Vignesh
[AMD Official Use Only - General] Reviewed-by: Vignesh Chander -Original Message- From: Victor Lu Sent: Tuesday, January 2, 2024 12:30 PM To: amd-gfx@lists.freedesktop.org Cc: Chander, Vignesh ; Lu, Victor Cheng Chi (Victor) Subject: [PATCH 4/4] drm/amdgpu: Do not program VM_L2_CNTL

Re: [PATCH] amd/amdkfd: Set correct svm range actual loc after spliting

2024-01-08 Thread Chen, Xiaogang
With a nitpick below, this patch is Reviewed-by:Xiaogang Chen On 1/8/2024 4:36 PM, Philip Yang wrote: After range spliting, set new range and old range actual_loc: new range actual_loc is 0 if new->vram_pages is 0. old range actual_loc is 0 if old->vram_pages - new->vram_pages == 0.

[PATCH] amd/amdkfd: Refine locking in restore pages worker

2024-01-08 Thread Philip Yang
To be able to handle multiple GPU page faults concurrently 1. remove mmap write lock, take and release mmap read lock when checking vma, migrating and calling hmm_range_fault. 2. insert new range mmu interval notifier without taking mmap lock. 3. take and release svms lock when checking and

[PATCH] amd/amdkfd: Set correct svm range actual loc after spliting

2024-01-08 Thread Philip Yang
After range spliting, set new range and old range actual_loc: new range actual_loc is 0 if new->vram_pages is 0. old range actual_loc is 0 if old->vram_pages - new->vram_pages == 0. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 8 +--- 1 file changed, 5

RE: Documentation for RGB strip on RX 7900 XTX (Reference)

2024-01-08 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of > Alexander Koskovich > Sent: Sunday, January 7, 2024 11:19 PM > To: amd-gfx@lists.freedesktop.org > Subject: Documentation for RGB strip on RX 7900 XTX (Reference) > > Hello, > > I was wondering if AMD would be able provide any

[PATCH] drm/amdgpu: move kiq_reg_write_reg_wait() out of amdgpu_virt.c

2024-01-08 Thread Alex Deucher
It's used for more than just SR-IOV now, so move it to amdgpu_gmc.c and rename it to better match the functionality and update the comments in the code paths to better document when each path is used and why. No functional change. Signed-off-by: Alex Deucher Cc: shaoyun@amd.com Cc:

Re: [PATCH 2/2] drm/amdgpu: add shared fdinfo stats

2024-01-08 Thread Alex Deucher
Ping? Alex On Thu, Dec 7, 2023 at 1:03 PM Alex Deucher wrote: > > Add shared stats. Useful for seeing shared memory. > > v2: take dma-buf into account as well > > Signed-off-by: Alex Deucher > Cc: Rob Clark > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 4 >

Re: [PATCH v2] drm/amdkfd: fixes for HMM mem allocation

2024-01-08 Thread Felix Kuehling
On 2024-01-07 08:07, Dafna Hirschfeld wrote: Fix err return value and reset pgmap->type after checking it. Fixes: c83dee9b6394 ("drm/amdkfd: add SPM support for SVM") Reviewed-by: Felix Kuehling Signed-off-by: Dafna Hirschfeld --- v2: remove unrelated DOC fix and add 'Fixes' tag. Thank

Re: [PATCH] drm/amd/display: cleanup inconsistent indenting in amdgpu_dm_color

2024-01-08 Thread Rodrigo Siqueira Jordao
On 1/5/24 15:02, Melissa Wen wrote: smatch warnings: amdgpu_dm_update_plane_color_mgmt() warn: inconsistent indenting Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401051643.ppdbmg1u-...@intel.com/ Signed-off-by: Melissa Wen ---

Re: [PATCH 1/1] Revert "drm/amd/display: fix bandwidth validation failure on DCN 2.1"

2024-01-08 Thread Rodrigo Siqueira Jordao
On 1/7/24 11:51, Melissa Wen wrote: On 01/06, LIPSKI, IVAN wrote: [AMD Official Use Only - General] @Siqueira, Rodrigo From: LIPSKI, IVAN Sent: January 5, 2024 7:40 PM To: amd-gfx@lists.freedesktop.org Cc:

Re: [PATCH 1/2] drm: update drm_show_memory_stats() for dma-bufs

2024-01-08 Thread Rob Clark
On Thu, Dec 7, 2023 at 10:02 AM Alex Deucher wrote: > > Show buffers as shared if they are shared via dma-buf as well > (e.g., shared with v4l or some other subsystem). > > Signed-off-by: Alex Deucher > Cc: Rob Clark Reviewed-by: Rob Clark > --- > drivers/gpu/drm/drm_file.c | 2 +- > 1 file

Re: [PATCH] drm/amdgpu: make a correction on comment

2024-01-08 Thread James Zhu
On 2024-01-08 03:12, Christian König wrote: Am 02.01.24 um 21:56 schrieb James Zhu: Current AMDGPU_VM_RESERVED_VRAM is updated to 8M. Signed-off-by: James Zhu Maybe remove the value completely from the comment, just something like "How much memory be reserved for page tables". [JZ] This

Re: [PATCH v5 2/2] drm/amdkfd: Bump KFD ioctl version

2024-01-08 Thread Chen, Xiaogang
Reviewed-by: Xiaogang Chen On 1/3/2024 5:15 PM, Felix Kuehling wrote: This is not strictly a change in the IOCTL API. This version bump is meant to indicate to user mode the presence of a number of changes and fixes that enable the management of VA mappings in compute VMs using the GEM_VA ioctl

Re: [PATCH] drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay()

2024-01-08 Thread SRINIVASAN SHANMUGAM
On 1/8/2024 9:58 PM, Aurabindo Pillai wrote: On 2024-01-08 11:19, Srinivasan Shanmugam wrote: In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay' was dereferenced before the pointer 'link' & 'replay' NULL check. Fixes the below:

Re: [PATCH libdrm 1/2] amdgpu: fix parameter of amdgpu_cs_ctx_create2

2024-01-08 Thread Christian König
Am 08.01.24 um 10:40 schrieb Zhenneng Li: In order to pass the correct priority parameter to the kernel, we must change priority type from uint32_t to int32_t. Hui what? Why should it matter if the parameter is signed or not? That doesn't seem to make sense. Regards, Christian.

Re: [PATCH] drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay()

2024-01-08 Thread Aurabindo Pillai
On 2024-01-08 11:19, Srinivasan Shanmugam wrote: In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay' was dereferenced before the pointer 'link' & 'replay' NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:947

Re: [PATCH] drm/amdgpu: Check resize bar register when system uses large bar

2024-01-08 Thread Christian König
Am 08.01.24 um 10:24 schrieb Ma, Jun: Hi Christian, On 1/5/2024 9:39 PM, Christian König wrote: Am 21.12.23 um 02:58 schrieb Ma, Jun: Hi Christian, On 12/20/2023 10:10 PM, Christian König wrote: Am 19.12.23 um 06:58 schrieb Ma Jun: Print a warnning message if the system can't access the

[PATCH] drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay()

2024-01-08 Thread Srinivasan Shanmugam
In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay' was dereferenced before the pointer 'link' & 'replay' NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:947 edp_setup_replay() warn: variable dereferenced before

Re: [PATCH v2 07/14] LoongArch: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2024-01-08 Thread Christoph Hellwig
On Sun, Jan 07, 2024 at 10:39:07AM +0800, Huacai Chen wrote: > > Do you mean that LoongArch32 does not support double-precision FP in > > hardware? > > At least both of the consumers in this series use double-precision, so my > > first > > thought is that LoongArch32 could not select

[PATCH libdrm 2/2] amdgpu: change proirity value to be consistent with kernel

2024-01-08 Thread Zhenneng Li
In libdrm-amdgpu and amdgpu kernel driver, there are only such priority level: AMDGPU_CTX_PRIORITY_VERY_LOW, AMDGPU_CTX_PRIORITY_LOW, AMDGPU_CTX_PRIORITY_NORMAL, AMDGPU_CTX_PRIORITY_HIGH, AMDGPU_CTX_PRIORITY_VERY_HIGH If priority value is not the one of the above data, the kernel will treat it

[PATCH libdrm 1/2] amdgpu: fix parameter of amdgpu_cs_ctx_create2

2024-01-08 Thread Zhenneng Li
In order to pass the correct priority parameter to the kernel, we must change priority type from uint32_t to int32_t. Signed-off-by: Zhenneng Li --- amdgpu/amdgpu.h| 2 +- amdgpu/amdgpu_cs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amdgpu/amdgpu.h

RE: [PATCH v2 v2 3/5] drm/amdgpu: Add ras helper to query boot errors v2

2024-01-08 Thread Ma, Le
[AMD Official Use Only - General] The patch series is Reviewed-by: Le Ma . If pattern is changed on future asic, we may consider using macro of asic function callback as well. > -Original Message- > From: Hawking Zhang > Sent: Sunday, January 7, 2024 11:40 PM > To:

Re: [PATCH] Revert "drm/amdgpu: Update irq disable flow during unload"

2024-01-08 Thread Lazar, Lijo
On 1/8/2024 4:27 PM, Asad Kamal wrote: Re-evaluate the original workaround: commit f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") This reverts commit 2e8e792e6a51e8cb7f5f96148146b6525dbb9cef. Signed-off-by: Asad Kamal You may reword the commmit message as 'revert

[PATCH] Revert "drm/amdgpu: Update irq disable flow during unload"

2024-01-08 Thread Asad Kamal
Re-evaluate the original workaround: commit f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") This reverts commit 2e8e792e6a51e8cb7f5f96148146b6525dbb9cef. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++--

Re: [PATCH] drm/amdgpu: Check resize bar register when system uses large bar

2024-01-08 Thread Ma, Jun
Hi Alex, On 1/6/2024 12:11 AM, Alex Deucher wrote: > On Fri, Jan 5, 2024 at 9:16 AM Christian König > wrote: >> >> Am 21.12.23 um 02:58 schrieb Ma, Jun: >>> Hi Christian, >>> >>> >>> On 12/20/2023 10:10 PM, Christian König wrote: Am 19.12.23 um 06:58 schrieb Ma Jun: > Print a warnning

Re: [PATCH] drm/amdgpu: Check resize bar register when system uses large bar

2024-01-08 Thread Ma, Jun
Hi Christian, On 1/5/2024 9:39 PM, Christian König wrote: > Am 21.12.23 um 02:58 schrieb Ma, Jun: >> Hi Christian, >> >> >> On 12/20/2023 10:10 PM, Christian König wrote: >>> Am 19.12.23 um 06:58 schrieb Ma Jun: Print a warnning message if the system can't access the resize bar register

Re: [PATCH] drm/amdgpu: Update irq disable flow during unload

2024-01-08 Thread Christian König
Am 08.01.24 um 09:32 schrieb Lazar, Lijo: On 1/8/2024 1:51 PM, Christian König wrote: Am 08.01.24 um 09:13 schrieb Kamal, Asad: [AMD Official Use Only - General] Hi Christian, Thank you for the comment. This is not normal reset, it is reset done during unload for smu v_13_0_2. Yeah, but

Documentation for RGB strip on RX 7900 XTX (Reference)

2024-01-08 Thread Alexander Koskovich
Hello, I was wondering if AMD would be able provide any documentation for the RGB strip on the reference cooler (https://www.amd.com/en/products/graphics/amd-radeon-rx-7900xtx)? It looks to be handled via I2C commands to the SMU, but having proper documentation would be extremely helpful.

[PATCH v2] drm/amdkfd: fixes for HMM mem allocation

2024-01-08 Thread Dafna Hirschfeld
Fix err return value and reset pgmap->type after checking it. Fixes: c83dee9b6394 ("drm/amdkfd: add SPM support for SVM") Reviewed-by: Felix Kuehling Signed-off-by: Dafna Hirschfeld --- v2: remove unrelated DOC fix and add 'Fixes' tag. drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +++--- 1

Re: [PATCH] drm/amdgpu: Update irq disable flow during unload

2024-01-08 Thread Lazar, Lijo
On 1/8/2024 1:51 PM, Christian König wrote: Am 08.01.24 um 09:13 schrieb Kamal, Asad: [AMD Official Use Only - General] Hi Christian, Thank you for the comment. This is not normal reset, it is reset done during unload for smu v_13_0_2. Yeah, but this doesn't explain the rational for this.

Re: [PATCH] drm/amdgpu: Update irq disable flow during unload

2024-01-08 Thread Christian König
Am 08.01.24 um 09:13 schrieb Kamal, Asad: [AMD Official Use Only - General] Hi Christian, Thank you for the comment. This is not normal reset, it is reset done during unload for smu v_13_0_2. Yeah, but this doesn't explain the rational for this. IRQ enable/disable should be balanced in

Re: [PATCH 1/3] drm/amdgpu/gmc9: re-enable AGP

2024-01-08 Thread Christian König
Am 03.01.24 um 22:55 schrieb Alex Deucher: It should be fixed with commit ca0b006939f9 ("drm/amdgpu: fix AGP addressing when GART is not at 0") so re-enable it. Signed-off-by: Alex Deucher Reviewed-by: Christian König for the series. --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1

Re: [PATCH 1/1] drm/amdgpu: add param to specify fw bo location for front-door loading

2024-01-08 Thread Christian König
Am 03.01.24 um 09:06 schrieb Le Ma: This param can help isolating data path issues on new systems in early phase. Change-Id: I0a972dd74fe2aad6b56628cea32ad72dcd17e283 Signed-off-by: Le Ma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5

RE: [PATCH] drm/amdgpu: Update irq disable flow during unload

2024-01-08 Thread Kamal, Asad
[AMD Official Use Only - General] Hi Christian, Thank you for the comment. This is not normal reset, it is reset done during unload for smu v_13_0_2. Thanks & Regards Asad -Original Message- From: Koenig, Christian Sent: Monday, January 8, 2024 1:33 PM To: Kamal, Asad Subject: Re:

Re: [PATCH] drm/amdgpu: make a correction on comment

2024-01-08 Thread Christian König
Am 02.01.24 um 21:56 schrieb James Zhu: Current AMDGPU_VM_RESERVED_VRAM is updated to 8M. Signed-off-by: James Zhu Maybe remove the value completely from the comment, just something like "How much memory be reserved for page tables". Either way Reviewed-by: Christian König ---