Re: [PATCH] drm/amdgpu: have bos for PDs/PTS cpu accessible when kfd uses cpu to update vm

2023-06-29 Thread Christian König
Am 29.06.23 um 18:09 schrieb Xiaogang.Chen: From: Xiaogang Chen When kfd uses cpu to update vm iterates all current PDs/PTs bos, adds AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED flag and kmap them to kernel virtual address space before kfd updates the vm that was created by gfx. Signed-off-by: Xiaog

Re: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread Sui Jingfeng
Hi, On 2023/6/30 01:44, Limonciello, Mario wrote: I think what you can do is pick up all the tags in your next version. Once the whole series has tags we can discuss how it merges. Yes, you are right. I will prepare the next version. But I think, I should only gather the reverent part toget

Re: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread suijingfeng
Hi, On 2023/6/30 01:44, Limonciello, Mario wrote: [Public] -Original Message- From: 15330273...@189.cn <15330273...@189.cn> Sent: Thursday, June 29, 2023 12:00 PM To: Bjorn Helgaas ; Sui Jingfeng Cc: Bjorn Helgaas ; linux-fb...@vger.kernel.org; Cornelia Huck ; Karol Herbst ; nouv...@l

[PATCH] drm/amd/amdgpu: Add cu_occupancy sysfs file to GFX9.4.3

2023-06-29 Thread Sreekant Somasekharan
Include kgd_gfx_v9_get_cu_occupancy call inside kfd2kgd_calls for GFX9.4.3 to expose cu_occupancy sysfs file. Signed-off-by: Sreekant Somasekharan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_

Re: [PATCH] drm/amdkfd: Skip handle mapping SVM range with no GPU access

2023-06-29 Thread Sierra Guiza, Alejandro (Alex)
On 6/29/2023 5:29 PM, Philip Yang wrote: If the SVM range has no GPU access or access-in-place attribute, Just a nit-pick. Shouldn't be no GPU access nor access-in-place? validate and map to GPU should skip the range. Add NULL pointer check if find_first_bit(ctx->bitmap, MAX_GPU_INSTANCE) retu

[PATCH] drm/amdkfd: Skip handle mapping SVM range with no GPU access

2023-06-29 Thread Philip Yang
If the SVM range has no GPU access or access-in-place attribute, validate and map to GPU should skip the range. Add NULL pointer check if find_first_bit(ctx->bitmap, MAX_GPU_INSTANCE) returns MAX_GPU_INSTANCE as gpuidx if ctx->bitmap is empty. Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/

RE: [PATCHv2] drm/amdkfd: Use KIQ to unmap HIQ

2023-06-29 Thread Kasiviswanathan, Harish
[AMD Official Use Only - General] Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Mukul Joshi Sent: Thursday, June 29, 2023 12:35 PM To: amd-gfx@lists.freedesktop.org Cc: Lin, Amber ; Joshi, Mukul ; Kuehling, Felix Subject: [PATCHv2] drm/amdkfd: Use K

RE: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread Limonciello, Mario
[Public] > -Original Message- > From: 15330273...@189.cn <15330273...@189.cn> > Sent: Thursday, June 29, 2023 12:00 PM > To: Bjorn Helgaas ; Sui Jingfeng > > Cc: Bjorn Helgaas ; linux-fb...@vger.kernel.org; > Cornelia Huck ; Karol Herbst ; > nouv...@lists.freedesktop.org; Joonas Lahtinen

Re: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread Sui Jingfeng
Hi, On 2023/6/29 23:54, Bjorn Helgaas wrote: On Thu, Jun 22, 2023 at 01:08:15PM +0800, Sui Jingfeng wrote: Hi, A nouveau developer(Lyude) from redhat send me a R-B, Thanks for the developers of nouveau project. Please allow me add a link[1] here. [1] https://lore.kernel.org/all/0afadc69

[PATCHv2] drm/amdkfd: Use KIQ to unmap HIQ

2023-06-29 Thread Mukul Joshi
Currently, we unmap HIQ by directly writing to HQD registers. This doesn't work for GFX9.4.3. Instead, use KIQ to unmap HIQ, similar to how we use KIQ to map HIQ. Using KIQ to unmap HIQ works for all GFX series post GFXv9. Signed-off-by: Mukul Joshi --- v1->v2: - Use kiq_unmap_queues function ins

[PATCH] drm/amdgpu: have bos for PDs/PTS cpu accessible when kfd uses cpu to update vm

2023-06-29 Thread Xiaogang . Chen
From: Xiaogang Chen When kfd uses cpu to update vm iterates all current PDs/PTs bos, adds AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED flag and kmap them to kernel virtual address space before kfd updates the vm that was created by gfx. Signed-off-by: Xiaogang Chen --- drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread Bjorn Helgaas
On Thu, Jun 22, 2023 at 01:08:15PM +0800, Sui Jingfeng wrote: > Hi, > > > A nouveau developer(Lyude) from redhat send me a R-B, > > Thanks for the developers of nouveau project. > > > Please allow me add a link[1] here. > > > [1] > https://lore.kernel.org/all/0afadc69f99a36bc9d03ecf54ff2585

Re: [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register

2023-06-29 Thread Sui Jingfeng
Hi, Humble ping ! Please share some bandwidth to help reviewing this series, OK ? As this series is useful for all architecture, I have tested on my X86, mips and LoongArch computer. Questions and comments is also welcome. If no one response within three days, I'm going to send a update

Re: [PATCHv4] drm/amdgpu: Update invalid PTE flag setting

2023-06-29 Thread Christian König
Am 19.06.23 um 19:38 schrieb Mukul Joshi: Update the invalid PTE flag setting with TF enabled. This is to ensure, in addition to transitioning the retry fault to a no-retry fault, it also causes the wavefront to enter the trap handler. With the current setting, the fault only transitions to a no-

Re: [PATCH] drm/amdgpu: return an error of query_video_caps is not set

2023-06-29 Thread Christian König
Am 29.06.23 um 15:22 schrieb Alex Deucher: Should only be an issue for bring up when the function pointer is not set, but check it anyway to be safe. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertion

Re: [PATCH 4/6] drm/amd/display: Fix warning about msleep in amdgpu_dm_helpers.c

2023-06-29 Thread Harry Wentland
On 6/29/23 09:53, Alex Deucher wrote: > On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam > wrote: >> >> Fixes the following category of checkpatch warning: >> >> WARNING: msleep < 20ms can sleep for up to 20ms; see >> Documentation/timers/timers-howto.rst >> + msleep(10); >>

Re: [PATCH 5/6] drm/amd/display: Clean up warnings in amdgpu_dm _mst_types, _plane, _psr.c

2023-06-29 Thread Alex Deucher
Reviewed-by: Alex Deucher On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam wrote: > > Fix the following warnings reported by checkpatch: > > WARNING: Missing a blank line after declarations > WARNING: Prefer 'unsigned int' to bare use of 'unsigned' > > Cc: Rodrigo Siqueira > Cc: Aurabindo

Re: [PATCH 3/6] drm/amd/display: Clean up warnings in amdgpu_dm_pp_smu.c

2023-06-29 Thread Alex Deucher
Reviewed-by: Alex Deucher On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam wrote: > > Fixes the following category of checkpatch warning: > > WARNING: Block comments use a trailing */ on a separate line > +* non-boosted one. */ > > WARNING: suspect code inden

Re: [PATCH 1/6] drm/amd/display: Remove unnecessary casts in amdgpu_dm_helpers.c

2023-06-29 Thread Alex Deucher
Reviewed-by: Alex Deucher On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam wrote: > > Fixes the following category of checkpatch complaints: > > WARNING: unnecessary cast may hide bugs, see > http://c-faq.com/malloc/mallocnocast.html > + char *buf = (char *)kvcalloc(total, si

Re: [PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-29 Thread Christian König
Am 29.06.23 um 10:20 schrieb Tatsuyuki Ishi: On 6/28/23 19:44, Christian König wrote: @@ -958,18 +904,57 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,   e->user_invalidated = userpage_invalidated;   }   -    r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, t

Re: [PATCH 4/6] drm/amd/display: Fix warning about msleep in amdgpu_dm_helpers.c

2023-06-29 Thread Alex Deucher
On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam wrote: > > Fixes the following category of checkpatch warning: > > WARNING: msleep < 20ms can sleep for up to 20ms; see > Documentation/timers/timers-howto.rst > + msleep(10); > > Cc: Rodrigo Siqueira > Cc: Aurabindo Pillai > S

Re: [patch V2] drm/amdkfd: Access gpuvm_export_dmabuf() api

2023-06-29 Thread David Francis
Does this read well. drm/amdkfd: Access gpuvm_export_dmabuf() API to get Dmabuf Directly invoking the function amdgpu_gem_prime_export() from within KFD is not correct. By utilizing the KFD API to obtain Dmabuf, the implementation can prevent the creation of multiple instances of struct dm

[PATCH] drm/amdgpu: return an error of query_video_caps is not set

2023-06-29 Thread Alex Deucher
Should only be an issue for bring up when the function pointer is not set, but check it anyway to be safe. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd

Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations

2023-06-29 Thread André Almeida
Em 27/06/2023 18:17, André Almeida escreveu: Em 27/06/2023 14:47, Christian König escreveu: Am 27.06.23 um 15:23 schrieb André Almeida: Create a section that specifies how to deal with DRM device resets for kernel and userspace drivers. Acked-by: Pekka Paalanen Signed-off-by: André Almeida

RE: [PATCH] drm/amdgpu: skip address adjustment for GFX RAS injection

2023-06-29 Thread Li, Candice
[AMD Official Use Only - General] Reviewed-by: Candice Li Thanks, Candice -Original Message- From: amd-gfx On Behalf Of Tao Zhou Sent: Thursday, June 29, 2023 6:01 PM To: amd-gfx@lists.freedesktop.org; Li, Candice ; Zhang, Hawking ; Yang, Stanley ; Chai, Thomas Cc: Zhou1, Tao Sub

[PATCH] drm/amdgpu: skip address adjustment for GFX RAS injection

2023-06-29 Thread Tao Zhou
The address parameter of GFX RAS injection isn't related to XGMI node number, keep it unchanged. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/am

[PATCH] drm/amdgpu: Fix the mmio remap failure issue

2023-06-29 Thread Ma Jun
Initialize the rmmio_remap to fix the mmio remap issue when start the kfdtest. The error message is as follows. "Failed to map remapped mmio page on gpu_mem 0" Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/

Re: [PATCH 4/6] drm/amdgpu: use drm_exec for GEM and CSA handling

2023-06-29 Thread Tatsuyuki Ishi
On 6/28/23 19:44, Christian König wrote: diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 74055cba3dc9..6811fc866494 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -728,36 +723,37 @@ int a

Re: [PATCH 6/6] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-29 Thread Tatsuyuki Ishi
On 6/28/23 19:44, Christian König wrote: @@ -958,18 +904,57 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, e->user_invalidated = userpage_invalidated; } - r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true, - &d

Re: [PATCH 2/2] drm/amdgpu: use psp_execute_load_ip_fw_cmd_buf instead

2023-06-29 Thread Lang Yu
Ping. On 06/27/ , Lang Yu wrote: > Replace the old ones with psp_execute_load_ip_fw_cmd_buf. > > Signed-off-by: Lang Yu > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 31 - > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 -- > drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c |

Re: [PATCH 1/2] drm/amdgpu: extract a PSP function to execute IP FW loading commands

2023-06-29 Thread Lang Yu
Ping. On 06/27/ , Lang Yu wrote: > This function is more general and easy to use by more clients. > > Signed-off-by: Lang Yu > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 29 + > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 6 + > 2 files changed, 35 insertions(+)