Re: [RFC PATCH] drm/scheduler: rework entity creation

2019-12-05 Thread Das, Nirmoy
[AMD Official Use Only - Internal Distribution Only] Thanks Christian, I will modify and resend. Regards, Nirmoy From: Koenig, Christian Sent: Thursday, December 5, 2019 1:29:49 PM To: Das, Nirmoy ; Nirmoy Das ; Deucher, Alexander ; Ho, Kenny Cc: amd-gfx

Re: [RFC PATCH 1/1] drm/amdgpu: wait for sched to become ready on job submit

2020-02-24 Thread Das, Nirmoy
md-gfx@lists.freedesktop.org; Deucher, Alexander; Liu, Monk; Li, Dennis; Das, Nirmoy Subject: Re: [RFC PATCH 1/1] drm/amdgpu: wait for sched to become ready on job submit Hi Nirmoy, Am 24.02.2020 17:48 schrieb Nirmoy Das : On reset, amdgpu can set a drm sched's ready status to false temporarily. drm jo

Re: [RFC PATCH 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-02-27 Thread Das, Nirmoy
oy Das Cc: amd-gfx list ; Deucher, Alexander ; Huang, Ray ; Das, Nirmoy ; Koenig, Christian Subject: Re: [RFC PATCH 1/4] drm/amdgpu: set compute queue priority at mqd_init On Thu, Feb 27, 2020 at 4:48 PM Alex Deucher wrote: > > On Thu, Feb 27, 2020 at 4:37 PM Nirmoy Das wrote: > > &g

Re: [PATCH] drm/amdgpu: check sdma ras funcs pointer before accessing

2020-01-09 Thread Das, Nirmoy
[AMD Official Use Only - Internal Distribution Only] I just got hit by this bug. Reviewed-by: Nirmoy Das mailto:le...@amd.com>> Thanks, Nirmoy From: amd-gfx on behalf of Hawking Zhang Sent: Thursday, January 9, 2020 12:42:13 PM To:

Re: [PATCH 1/1] drm/amdgpu: cleanup sysfs file handling

2020-05-07 Thread Das, Nirmoy
On 5/7/2020 9:21 PM, Alex Deucher wrote: On Thu, May 7, 2020 at 4:15 PM Nirmoy Das wrote: Create sysfs file using attributes when possible. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 36 +++ Reviewed-by: Alex Deucher for the amdgpu_device.c changes.

Re: [PATCH 1/3] drm/amdgpu: parameterize ttm BO destroy callback

2021-06-14 Thread Das, Nirmoy
On 6/14/2021 4:32 PM, Nirmoy Das wrote: Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 28 ++ 1 file changed, 24 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 1/1] drm/amdgpu: remove amdgpu_vm_pt

2021-06-14 Thread Das, Nirmoy
ping. On 6/10/2021 7:24 PM, Nirmoy Das wrote: Page table entries are now in embedded in VM BO, so we do not need struct amdgpu_vm_pt. This patch replaces struct amdgpu_vm_pt with struct amdgpu_vm_bo_base. Signed-off-by: Nirmoy Das --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 26 +--

Re: [PATCH 1/3] drm/amdgpu: parameterize ttm BO destroy callback

2021-06-14 Thread Das, Nirmoy
On 6/14/2021 7:10 PM, Christian König wrote: Am 14.06.21 um 16:32 schrieb Nirmoy Das: Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 28 ++   1 file

Re: [PATCH v2 1/1] drm/amdkfd: use allowed domain for vmbo validation

2021-06-08 Thread Das, Nirmoy
Regards, Oak On 2021-06-08, 8:02 AM, "amd-gfx on behalf of Das, Nirmoy" wrote: On 6/8/2021 1:42 PM, Christian König wrote: > > > Am 08.06.21 um 13:27 schrieb Nirmoy Das: >> Fixes handling when page tables are in system memory. >&

Re: [PATCH] drm/amdgpu: fix VM handling for GART allocations

2021-06-07 Thread Das, Nirmoy
Reviewed-by: Nirmoy Das On 6/5/2021 4:51 PM, Christian König wrote: For GTT allocations with a GART address the res contains the VMID0 addresses and can't be used for VM handling. So ignore the res when the pages array is given or we fill the page tables with nonsense. Signed-off-by:

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
On 6/21/2021 12:59 PM, Christian König wrote: Am 21.06.21 um 12:56 schrieb Das, Nirmoy: On 6/21/2021 12:26 PM, Christian König wrote: Well you completely break the handling in amdgpu_vm_handle_fault() with this. I see one issue with:  if (!vm || (vm && vm->root.bo !=

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
ping. On 6/17/2021 3:03 PM, Nirmoy Das wrote: Cleanup code related to vm pasid by adding helper function. This reduces lots code duplication. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 176

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
On 6/21/2021 12:59 PM, Christian König wrote: Am 21.06.21 um 12:56 schrieb Das, Nirmoy: On 6/21/2021 12:26 PM, Christian König wrote: Well you completely break the handling in amdgpu_vm_handle_fault() with this. I see one issue with:  if (!vm || (vm && vm->root.bo !=

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
istian. Am 21.06.21 um 11:47 schrieb Das, Nirmoy: ping. On 6/17/2021 3:03 PM, Nirmoy Das wrote: Cleanup code related to vm pasid by adding helper function. This reduces lots code duplication. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |  17 +--   drivers/gpu/drm

Re: [PATCH 1/1] drm/amdgpu: cleanup pasid handling

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 10:23 AM, Christian König wrote: Am 23.06.21 um 09:56 schrieb Nirmoy Das: Cleanup code related to vm pasid by adding helper functions. Also replace idr with xarray as we actually need hash functionality. That looks quite a bit better than before, but I think we should approach

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 134

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 3:40 PM, Christian König wrote: Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper

Re: [PATCH 2/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-23 Thread Das, Nirmoy
On 6/23/2021 5:02 PM, Christian König wrote: Am 23.06.21 um 16:54 schrieb Das, Nirmoy: On 6/23/2021 3:40 PM, Christian König wrote: Am 23.06.21 um 15:11 schrieb Das, Nirmoy: On 6/23/2021 2:50 PM, Christian König wrote: Am 23.06.21 um 14:25 schrieb Nirmoy Das: Replace idr

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
On 6/21/2021 1:18 PM, Christian König wrote: Am 21.06.21 um 13:10 schrieb Das, Nirmoy: On 6/21/2021 12:59 PM, Christian König wrote: Am 21.06.21 um 12:56 schrieb Das, Nirmoy: On 6/21/2021 12:26 PM, Christian König wrote: Well you completely break the handling in amdgpu_vm_handle_fault

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-21 Thread Das, Nirmoy
On 6/21/2021 1:35 PM, Christian König wrote: Am 21.06.21 um 13:27 schrieb Das, Nirmoy: On 6/21/2021 1:18 PM, Christian König wrote: Am 21.06.21 um 13:10 schrieb Das, Nirmoy: On 6/21/2021 12:59 PM, Christian König wrote: Am 21.06.21 um 12:56 schrieb Das, Nirmoy: On 6/21/2021 12:26 PM

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-22 Thread Das, Nirmoy
On 6/22/2021 9:03 AM, Christian König wrote: Am 22.06.21 um 08:57 schrieb Nirmoy Das: Cleanup code related to vm pasid by adding helper functions. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 105 -   1 file changed, 50 insertions(+), 55

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-22 Thread Das, Nirmoy
On 6/22/2021 10:36 AM, Christian König wrote: Am 22.06.21 um 09:39 schrieb Das, Nirmoy: On 6/22/2021 9:03 AM, Christian König wrote: Am 22.06.21 um 08:57 schrieb Nirmoy Das: Cleanup code related to vm pasid by adding helper functions. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd

Re: [PATCH 1/1] drm/amdgpu: add helper function for vm pasid

2021-06-22 Thread Das, Nirmoy
On 6/22/2021 12:36 PM, Christian König wrote: Am 22.06.21 um 12:30 schrieb Das, Nirmoy: On 6/22/2021 10:36 AM, Christian König wrote: Am 22.06.21 um 09:39 schrieb Das, Nirmoy: On 6/22/2021 9:03 AM, Christian König wrote: Am 22.06.21 um 08:57 schrieb Nirmoy Das: Cleanup code related

Re: [PATCH v2 1/2] drm/amdgpu: parameterize ttm BO destroy callback

2021-06-15 Thread Das, Nirmoy
On 6/14/2021 10:00 PM, Alex Deucher wrote: On Mon, Jun 14, 2021 at 3:27 PM Nirmoy Das wrote: Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. v2: pass destroy callback using amdgpu_bo_param. Signed-off-by: Nirmoy Das ---

Re: [PATCH v2 1/1] drm/amdgpu: remove amdgpu_vm_pt

2021-06-15 Thread Das, Nirmoy
ping. On 6/14/2021 2:31 PM, Nirmoy Das wrote: Page table entries are now in embedded in VM BO, so we do not need struct amdgpu_vm_pt. This patch replaces struct amdgpu_vm_pt with struct amdgpu_vm_bo_base. v2: change "!(cursor->level < AMDGPU_VM_PTB)" --> "(cursor->level == AMDGPU_VM_PTB)"

Re: [PATCH v2 1/2] drm/amdgpu: parameterize ttm BO destroy callback

2021-06-15 Thread Das, Nirmoy
On 6/15/2021 8:53 AM, Christian König wrote: Am 14.06.21 um 21:26 schrieb Nirmoy Das: Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. v2: pass destroy callback using amdgpu_bo_param. Signed-off-by: Nirmoy Das ---  

Re: [PATCH v2 1/2] drm/amdgpu: parameterize ttm BO destroy callback

2021-06-15 Thread Das, Nirmoy
On 6/15/2021 12:48 PM, Christian König wrote: Am 15.06.21 um 11:23 schrieb Nirmoy Das: Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. v2: remove whitespace. call amdgpu_bo_destroy_base() at the end for cleaner code. Signed-off-by: Nirmoy Das ---  

Re: [PATCH 2/2] drm/amdgpu: move shadow_list to amdgpu_bo_vm

2021-06-15 Thread Das, Nirmoy
On 6/15/2021 1:57 PM, Christian König wrote: Am 15.06.21 um 13:51 schrieb Nirmoy Das: Move shadow_list to struct amdgpu_bo_vm as shadow BOs are part of PT/PD BOs. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |  5 +++--  

Re: [PATCH 1/1] drm/amdkfd: remove unused variable

2021-06-15 Thread Das, Nirmoy
On 6/15/2021 12:33 PM, Nirmoy Das wrote: Remove it. CC: jonathan@amd.com CC: felix.kuehl...@amd.com Fixes: d7b132507384c("drm/amdkfd: fix circular locking on get_wave_state") Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +-- 1 file changed, 1

Re: [PATCH 1/1] drm/amdkfd: use allowed domain for vmbo validation

2021-06-08 Thread Das, Nirmoy
On 6/8/2021 11:37 AM, Christian König wrote: Am 08.06.21 um 11:32 schrieb Nirmoy Das: Remove fixed domain and use BO's allowed domain for PT/PD BO validation. "Fixes handling when page tables are in system memory". And I think you can now remove the validate structure as well. Do you

Re: [PATCH v2 1/1] drm/amdkfd: use allowed domain for vmbo validation

2021-06-08 Thread Das, Nirmoy
On 6/8/2021 1:42 PM, Christian König wrote: Am 08.06.21 um 13:27 schrieb Nirmoy Das: Fixes handling when page tables are in system memory. v2: remove unwanted variable. change amdgpu_amdkfd_validate instead of amdgpu_amdkfd_bo_validate. Signed-off-by: Nirmoy Das ---  

RE: [PATCH v2] drm/amdgpu: fix metadata_size for ubo ioctl queries

2021-05-26 Thread Das, Nirmoy
[AMD Official Use Only] Reviewed-by: Nirmoy Das -Original Message- From: Zhang, Morris Sent: Wednesday, May 26, 2021 5:11 AM To: amd-gfx@lists.freedesktop.org; Das, Nirmoy Subject: [PATCH v2] drm/amdgpu: fix metadata_size for ubo ioctl queries Although the kfd_ioctl_get_dmabuf_info

Re: [PATCH 6/7] drm/amdgpu: remove unused code

2021-05-26 Thread Das, Nirmoy
[AMD Official Use Only] I just realized that I didn't remove the shadow pointer from the amdgpu_bo. I will update that in the next version. Regards, Nirmoy From: Das, Nirmoy Sent: Wednesday, May 26, 2021 12:10 PM To: amd-gfx@lists.freedesktop.org Cc: Koenig

RE: [PATCH] free the metadata buffer for sg type BOs as well

2021-05-26 Thread Das, Nirmoy
[AMD Official Use Only] Please add a commit message as well. With that, this is Acked-by: Nirmoy Das but Christian should review it as well. Nirmoy -Original Message- From: Zhang, Morris Sent: Wednesday, May 26, 2021 5:46 AM To: amd-gfx@lists.freedesktop.org; Das, Nirmoy Subject

RE: [PATCH 2/7] drm/amdgpu: move shadow bo validation to VM code

2021-05-26 Thread Das, Nirmoy
[AMD Official Use Only] Thanks Christian, I found some more issues as well, I will update and resend again. -Original Message- From: Koenig, Christian Sent: Wednesday, May 26, 2021 2:03 PM To: Das, Nirmoy ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH 2/7

Re: [PATCH] drm/amdgpu: take back kvmalloc_array for entries alloc because of kzalloc memory limit

2021-06-02 Thread Das, Nirmoy
PM To: Das, Nirmoy ; Zhu, Changfeng ; Huang, Ray ; amd-...@freedesktop.org Subject: Re: [PATCH] drm/amdgpu: take back kvmalloc_array for entries alloc because of kzalloc memory limit Am 02.06.21 um 10:54 schrieb Das, Nirmoy: On 6/2/2021 10:30 AM, Changfeng wrote: From: changzhu From

Re: [PATCH] drm/amdgpu: take back kvmalloc_array for entries alloc because of kzalloc memory limit

2021-06-02 Thread Das, Nirmoy
On 6/2/2021 10:30 AM, Changfeng wrote: From: changzhu From: Changfeng It will cause error when alloc memory larger than 128KB in amdgpu_bo_create->kzalloc. I wonder why I didn't see the error on my machine. Is there any config I might be missing ? Thanks, Nirmoy Call Trace:

Re: [PATCH] drm/amdgpu: take back kvmalloc_array for entries alloc because of kzalloc memory limit

2021-06-02 Thread Das, Nirmoy
On 6/2/2021 10:57 AM, Christian König wrote: Am 02.06.21 um 10:54 schrieb Das, Nirmoy: On 6/2/2021 10:30 AM, Changfeng wrote: From: changzhu From: Changfeng It will cause error when alloc memory larger than 128KB in amdgpu_bo_create->kzalloc. I wonder why I didn't see the er

RE: [PATCH 1/1] drm/amd/display: WARN_ON cleanups

2021-05-27 Thread Das, Nirmoy
[AMD Official Use Only] s/Uuse/use -Original Message- From: Das, Nirmoy Sent: Thursday, May 27, 2021 2:15 PM To: Wentland, Harry Cc: Deucher, Alexander ; Koenig, Christian ; amd-gfx@lists.freedesktop.org; Das, Nirmoy Subject: [PATCH 1/1] drm/amd/display: WARN_ON cleanups Uuse

RE: [PATCH v3 4/6] drm/amdgpu: switch to amdgpu_bo_vm for vm code

2021-05-28 Thread Das, Nirmoy
[AMD Official Use Only] Thanks Christian, I will resend with your suggestions included. Nirmoy -Original Message- From: Koenig, Christian Sent: Friday, May 28, 2021 10:01 AM To: Das, Nirmoy ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH v3 4/6] drm/amdgpu

Re: [PATCH 1/1] drm/amdgpu: flush gpu tlb after a gart allocation

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 3:03 PM, Christian König wrote: Am 28.05.21 um 14:54 schrieb Nirmoy Das: Flush gpu tlb in amdgpu_ttm_alloc_gart(). Also don't flush gpu tlb after recovering each BO. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 --  

Re: [PATCH v3 1/1] drm/amdgpu: flush gart changes after all BO recovery

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 5:59 PM, Christian König wrote: Am 28.05.21 um 17:54 schrieb Nirmoy Das: Don't flush gart changes after recovering each BO instead do it after recovering all the BOs. Flishing gart also needed for amdgpu_ttm_alloc_gart(). v3: rename amdgpu_gart_tlb_flush() ->

Re: [PATCH 1/1] drm/amd/display: WARN_ON cleanups

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 5:28 PM, Christian König wrote: Am 27.05.21 um 14:14 schrieb Nirmoy Das: Uuse WARN_ON() inside if-condition when possible. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ---   1 file changed, 4 insertions(+), 7 deletions(-) diff

Re: [PATCH 1/1] drm/amdgpu: make sure we unpin the UVD BO

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 4:36 PM, Christian König wrote: Am 20.04.21 um 12:50 schrieb Nirmoy Das: Releasing pinned BOs is illegal now. UVD 6 was missing from: commit 2f40801dc553 ("drm/amdgpu: make sure we unpin the UVD BO") Signed-off-by: Nirmoy Das Reviewed-by: Christian König Maybe add a

Re: [PATCH v2 1/1] drm/amdgpu: cleanup gart tlb flush logic

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 4:48 PM, Christian König wrote: Am 28.05.21 um 16:44 schrieb Nirmoy Das: Don't flush gpu tlb after recovering each BO instead do it after receovering all the BOs. v2: abstract out gart tlb flushing logic to amdgpu_gart.c Signed-off-by: Nirmoy Das --- Is there a better way to

Re: [PATCH v2 6/6] drm/amdgpu: do not allocate entries separately

2021-05-28 Thread Das, Nirmoy
On 5/28/2021 4:09 PM, Christian König wrote: Am 28.05.21 um 12:56 schrieb Nirmoy Das: Allocate PD/PT entries while allocating VM BOs and use that instead of allocating those entries separately. v2: create a new var for num entries. Signed-off-by: Nirmoy Das ---  

Re: [PATCH v2 2/2] drm/amdgpu: free pasid early before converting a vm

2021-06-29 Thread Das, Nirmoy
On 6/29/2021 1:12 PM, Christian König wrote: Am 29.06.21 um 09:55 schrieb Nirmoy Das: VM code should not be responsible for freeing pasid as pasid gets allocated outside of VM code, before initializing a vm. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8

Re: [PATCH] drm/amdgpu: Set ttm caching flags during bo allocation

2021-06-29 Thread Das, Nirmoy
Thanks for the detailed commit message :) Acked-by: Nirmoy Das On 6/29/2021 1:15 AM, Oak Zeng wrote: The ttm caching flags (ttm_cached, ttm_write_combined etc) are used to determine a buffer object's mapping attributes in both CPU page table and GPU page table (when that buffer is also

Re: [PATCH v2 1/2] drm/amdgpu: return early for non-TTM_PL_TT type BOs

2021-06-29 Thread Das, Nirmoy
On 6/29/2021 1:05 PM, Christian König wrote: Am 29.06.21 um 09:36 schrieb Nirmoy Das: Return early for non-TTM_PL_TT BOs so that we don't pass wrong pointer to amdgpu_gtt_mgr_has_gart_addr() which assumes ttm_resource argument to be TTM_PL_TT type BO's. v2: merge if-conditions Signed-off-by:

Re: [PATCH 2/2] drm/amdgpu: raise error on incorrect mem_type

2021-06-29 Thread Das, Nirmoy
On 6/29/2021 1:06 PM, Christian König wrote: Am 29.06.21 um 09:36 schrieb Nirmoy Das: Be more defensive and raise error on wrong mem_type argument in amdgpu_gtt_mgr_has_gart_addr(). Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 +-   1 file changed, 5

Re: [PATCH v3 1/1] drm/amdgpu: return early for non-TTM_PL_TT type BOs

2021-06-29 Thread Das, Nirmoy
Hi Christian, Could you please pick  this up for drm-misc-next or fixes ? Regards, Nirmoy On 6/29/2021 1:44 PM, Nirmoy Das wrote: Return early for non-TTM_PL_TT BOs so that we don't pass wrong pointer to amdgpu_gtt_mgr_has_gart_addr() which assumes ttm_resource argument to be TTM_PL_TT

Re: [PATCH 1/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-29 Thread Das, Nirmoy
On 6/29/2021 1:10 PM, Christian König wrote: Am 29.06.21 um 09:49 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 136

Re: [PATCH] drm/amdgpu: Correct the irq numbers for virtual ctrc

2021-07-02 Thread Das, Nirmoy
Please describe bit more with a commit message. On 7/1/2021 6:37 AM, Emily Deng wrote: Signed-off-by: Emily Deng Signed-off-by: Victor --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c

Re: [PATCH] drm/aperture: Pass DRM driver structure instead of driver name

2021-06-29 Thread Das, Nirmoy
LGTM Acked-by: Nirmoy Das On 6/29/2021 3:58 PM, Thomas Zimmermann wrote: Print the name of the DRM driver when taking over fbdev devices. Makes the output to dmesg more consistent. Note that the driver name is only used for printing a string to the kernel log. No UAPI is affected by this

Re: [PATCH 1/2] drm/amdgpu: use xarray for storing pasid in vm

2021-06-30 Thread Das, Nirmoy
On 6/29/2021 7:40 PM, Christian König wrote: Am 29.06.21 um 17:19 schrieb Nirmoy Das: Replace idr with xarray as we actually need hash functionality. Cleanup code related to vm pasid by adding helper function. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 149

Re: Xorg doesn't work anymore after the latest DRM updates

2021-07-05 Thread Das, Nirmoy
Hi Christian, This issue looks similar to the one Mikel Rychliski fixed recently  : https://patchwork.freedesktop.org/patch/440791. Let us know if this helps. Regards, Nirmoy On 7/3/2021 9:30 AM, Christian Zigotzky wrote: Hi All, Xorg doesn't work anymore after the latest DRM updates.

Re: Xorg doesn't work anymore after the latest DRM updates

2021-07-06 Thread Das, Nirmoy
Happy to help, Christian :) Nirmoy On 7/6/2021 5:33 PM, Christian Zigotzky wrote: Hi Nirmoy, This patch works! Thanks a lot! We tested it on an A-EON AmigaOne X5000/20 today. Screenshot:

Re: [PATCH 1/2] drm/amdgpu: free pasid early before converting a vm

2021-06-29 Thread Das, Nirmoy
On 6/23/2021 9:05 PM, Felix Kuehling wrote: On 2021-06-23 8:25 a.m., Nirmoy Das wrote: VM code should not be responsible for freeing pasid as pasid gets allocated outside of VM code, before initializing a vm. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c |

Re: [PATCH 1/5] drm/sched:add new priority level

2021-08-24 Thread Das, Nirmoy
On 8/24/2021 2:07 PM, Christian König wrote: Am 24.08.21 um 13:57 schrieb Das, Nirmoy: Hi Christian, On 8/24/2021 8:10 AM, Christian König wrote: I haven't followed the previous discussion, but that looks like this change is based on a misunderstanding. In previous discussion I sort

Re: [PATCH 1/5] drm/sched:add new priority level

2021-08-24 Thread Das, Nirmoy
On 8/24/2021 3:18 PM, Christian König wrote: Am 24.08.21 um 14:39 schrieb Das, Nirmoy: On 8/24/2021 2:07 PM, Christian König wrote: Am 24.08.21 um 13:57 schrieb Das, Nirmoy: Hi Christian, On 8/24/2021 8:10 AM, Christian König wrote: I haven't followed the previous discussion

Re: [PATCH 1/5] drm/sched:add new priority level

2021-08-24 Thread Das, Nirmoy
Hi Christian, On 8/24/2021 8:10 AM, Christian König wrote: I haven't followed the previous discussion, but that looks like this change is based on a misunderstanding. In previous discussion I sort of suggested to have new DRM prio as I didn't see any other way to map priority provided by

Re: [PATCH] drm/amd/amdgpu: New debugfs interface for MMIO registers (v2)

2021-08-25 Thread Das, Nirmoy
On 8/25/2021 1:09 PM, Christian König wrote: I suggest to give this command here at least a try (remembered the name after a moment): pahole drivers/gpu/drm/amd/amdgpu/amdgpu.o -C amdgpu_debugfs_regs2_iocdata It has a rather nifty output with padding holes, byte addresses, cache lines etc

Re: [PATCH 1/1] drm/amdgpu: detach ring priority from gfx priority

2021-08-26 Thread Das, Nirmoy
On 8/26/2021 11:27 AM, Lazar, Lijo wrote: On 8/25/2021 9:12 PM, Nirmoy Das wrote: Currently AMDGPU_RING_PRIO_MAX is redefinition of a max gfx hwip priority, this won't work well when we will have a hwip with different set of priorities than gfx. Also, HW ring priorities are different from

Re: [PATCH 1/1] drm/amdgpu: detach ring priority from gfx priority

2021-08-26 Thread Das, Nirmoy
On 8/26/2021 11:54 AM, Christian König wrote: Am 26.08.21 um 11:27 schrieb Lazar, Lijo: On 8/25/2021 9:12 PM, Nirmoy Das wrote: Currently AMDGPU_RING_PRIO_MAX is redefinition of a max gfx hwip priority, this won't work well when we will have a hwip with different set of priorities than gfx.

Re: [PATCH v2 1/1] drm/amdgpu: detach ring priority from gfx priority

2021-08-26 Thread Das, Nirmoy
On 8/26/2021 12:48 PM, Christian König wrote: Am 26.08.21 um 12:08 schrieb Nirmoy Das: Currently AMDGPU_RING_PRIO_MAX is redefinition of a max gfx hwip priority, this won't work well when we will have a hwip with different set of priorities than gfx. Also, HW ring priorities are different

Re: [PATCH 1/1] drm/amdgpu: rework context priority handling

2021-08-25 Thread Das, Nirmoy
On 8/25/2021 2:29 PM, Christian König wrote: Am 25.08.21 um 14:20 schrieb Lazar, Lijo: On 8/25/2021 4:52 PM, Nirmoy Das wrote: To get a hardware queue priority for a context, we are currently mapping AMDGPU_CTX_PRIORITY_* to DRM_SCHED_PRIORITY_* and then to hardware queue priority, which is

Re: [PATCH 2/2] drm/amdgpu: cleanup debugfs for amdgpu rings

2021-09-03 Thread Das, Nirmoy
On 9/3/2021 5:26 PM, Sharma, Shashank wrote: On 9/3/2021 1:39 PM, Das, Nirmoy wrote: On 9/3/2021 8:36 AM, Sharma, Shashank wrote: On 9/2/2021 5:14 PM, Nirmoy Das wrote: Use debugfs_create_file_size API for creating ring debugfs file, also cleanup surrounding code. Signed-off

Re: [PATCH 2/2] drm/amdgpu: cleanup debugfs for amdgpu rings

2021-09-03 Thread Das, Nirmoy
Hi Shashank, On 9/3/2021 5:51 PM, Das, Nirmoy wrote: On 9/3/2021 5:26 PM, Sharma, Shashank wrote: On 9/3/2021 1:39 PM, Das, Nirmoy wrote: On 9/3/2021 8:36 AM, Sharma, Shashank wrote: On 9/2/2021 5:14 PM, Nirmoy Das wrote: Use debugfs_create_file_size API for creating ring debugfs file

Re: [PATCH 1/2] drm/amdgpu: use IS_ERR for debugfs APIs

2021-09-03 Thread Das, Nirmoy
Hi Christian and Shashank, Please review the v2 : https://patchwork.freedesktop.org/patch/452175/ In v2, I am returning "PTR_ERR(ent)" instead of -EIO which I think makes more sense. Regards, Nirmoy On 9/3/2021 9:53 AM, Christian König wrote: Am 02.09.21 um 13:44 schrieb Nirmoy Das:

Re: [PATCH 2/2] drm/amdgpu: cleanup debugfs for amdgpu rings

2021-09-08 Thread Das, Nirmoy
On 9/6/2021 6:45 PM, Sharma, Shashank wrote: On 9/5/2021 5:01 PM, Das, Nirmoy wrote: On 9/5/2021 10:03 AM, Sharma, Shashank wrote: On 9/3/2021 9:44 PM, Das, Nirmoy wrote: Hi Shashank, On 9/3/2021 5:51 PM, Das, Nirmoy wrote: On 9/3/2021 5:26 PM, Sharma, Shashank wrote: On 9/3/2021

Re: [PATCH 1/2] drm/amdgpu: fix use after free during BO move

2021-09-07 Thread Das, Nirmoy
 Acked-by: Nirmoy Das for the 1st patch and second patch is Reviewed-by: Nirmoy Das On 9/7/2021 10:14 AM, Christian König wrote: The memory backing old_mem is already freed at that point, move the check a bit more up. Signed-off-by: Christian König Fixes: bfa3357ef9ab ("drm/ttm: allocate

Re: [PATCH 2/2] drm/amdgpu: cleanup debugfs for amdgpu rings

2021-09-05 Thread Das, Nirmoy
On 9/5/2021 10:03 AM, Sharma, Shashank wrote: On 9/3/2021 9:44 PM, Das, Nirmoy wrote: Hi Shashank, On 9/3/2021 5:51 PM, Das, Nirmoy wrote: On 9/3/2021 5:26 PM, Sharma, Shashank wrote: On 9/3/2021 1:39 PM, Das, Nirmoy wrote: On 9/3/2021 8:36 AM, Sharma, Shashank wrote: On 9/2/2021

Re: [PATCH 2/2] drm/amdgpu: cleanup debugfs for amdgpu rings

2021-09-03 Thread Das, Nirmoy
On 9/3/2021 8:36 AM, Sharma, Shashank wrote: On 9/2/2021 5:14 PM, Nirmoy Das wrote: Use debugfs_create_file_size API for creating ring debugfs file, also cleanup surrounding code. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c |  4 +---  

Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Das, Nirmoy
On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +--

Re: [PATCH] drm/amdgpu/vcn:enable priority queues for encoder

2021-08-10 Thread Das, Nirmoy
On 8/10/2021 11:38 AM, Sahu, Satyajit wrote: On 8/10/2021 2:01 PM, Das, Nirmoy wrote: On 8/10/2021 9:09 AM, Satyajit Sahu wrote: VCN and VCE support multiple queues with different priority. Use differnt encoder queue based on the priority set by UMD. Signed-off-by: Satyajit Sahu

Re: [PATCH] drm/amdkfd: Fix an inappropriate error handling in allloc memory of gpu

2021-10-13 Thread Das, Nirmoy
LGTM as we create a gem object 1st and retrieve amdgpu_bo from the gem object. Acked-by: Nirmoy Das On 10/13/2021 9:28 AM, Lang Yu wrote: We should unreference a gem object instead of an amdgpu bo here. Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD") Signed-off-by: Lang Yu

Re: [PATCH 1/1] drm/amdgpu: release gtt bo after each move test

2021-10-13 Thread Das, Nirmoy
On 10/13/2021 3:22 AM, zhang wrote: Hi . Nirmoy If you let continue to unpin. this will  allways test a same va for gtt I think we should  rafresh calculate  the value n Right, I guess then the test should only run till gart size. Regards, Nirmoy On 2021/10/12 20:10, Nirmoy Das

Re: [PATCH 1/1] drm/amdgpu: release gtt bo after each move test

2021-10-13 Thread Das, Nirmoy
On 10/13/2021 12:42 PM, Das, Nirmoy wrote: On 10/13/2021 3:22 AM, zhang wrote: Hi . Nirmoy If you let continue to unpin. this will  allways test a same va for gtt I think we should  rafresh calculate the value n Right, I guess then the test should only run till gart size. Actually

Re: [PATCH 1/1] drm/amdgpu: release gtt bo after each move test

2021-10-13 Thread Das, Nirmoy
Please ignore this! On 10/13/2021 5:04 PM, Nirmoy Das wrote: When gart size is < gtt size this test will fail with -ENOMEM as we are not freeing gtt bo after each move test. This is generally not an issue when gart size >= gtt size. Reported-by: zhang Signed-off-by: Nirmoy Das ---

Re: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed

2021-10-13 Thread Das, Nirmoy
On 10/13/2021 2:29 PM, Christian König wrote: Am 12.10.21 um 15:12 schrieb Das, Nirmoy: On 10/12/2021 1:58 PM, Stanley.Yang wrote: Test scenario: modprobe amdgpu -> rmmod amdgpu -> modprobe amdgpu Error log: [   54.396807] debugfs: File 'page_pool' in directory 'amdttm' a

Re: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed

2021-10-12 Thread Das, Nirmoy
On 10/12/2021 1:58 PM, Stanley.Yang wrote: Test scenario: modprobe amdgpu -> rmmod amdgpu -> modprobe amdgpu Error log: [ 54.396807] debugfs: File 'page_pool' in directory 'amdttm' already present! [ 54.396833] debugfs: File 'page_pool_shrink' in directory 'amdttm' already

Re: [PATCH 1/1] drm/amdgpu: recover gart table at resume

2021-10-19 Thread Das, Nirmoy
On 10/19/2021 5:43 PM, Christian König wrote: Am 19.10.21 um 15:22 schrieb Nirmoy Das: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. Also remove 2nd call to amdgpu_device_evict_resources() as we don't need it. Signed-off-by:

Re: [PATCH 1/1] drm/amdgpu: fix BO leak after successful move test

2021-10-20 Thread Das, Nirmoy
ping. On 10/13/2021 5:09 PM, Nirmoy Das wrote: GTT BO cleanup code is with in the test for loop and we would skip cleaning up GTT BO on success. Reported-by: zhang Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 25 1 file changed, 12

Re: [PATCH v2 3/3] drm/amdgpu: recover gart table at resume

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 12:15 PM, Lazar, Lijo wrote: On 10/20/2021 3:42 PM, Das, Nirmoy wrote: On 10/20/2021 12:03 PM, Lazar, Lijo wrote: On 10/20/2021 3:23 PM, Das, Nirmoy wrote: On 10/20/2021 11:11 AM, Lazar, Lijo wrote: On 10/19/2021 11:44 PM, Nirmoy Das wrote: Get rid off pin/unpin

Re: [PATCH v2 3/3] drm/amdgpu: recover gart table at resume

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 8:52 AM, Christian König wrote: Am 19.10.21 um 20:14 schrieb Nirmoy Das: Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to

Re: [PATCH v2 3/3] drm/amdgpu: recover gart table at resume

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 12:03 PM, Lazar, Lijo wrote: On 10/20/2021 3:23 PM, Das, Nirmoy wrote: On 10/20/2021 11:11 AM, Lazar, Lijo wrote: On 10/19/2021 11:44 PM, Nirmoy Das wrote: Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content

Re: [PATCH 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 8:49 AM, Christian König wrote: Am 19.10.21 um 20:14 schrieb Nirmoy Das: Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call gtt_mgr functions. That's a

Re: [PATCH v2 3/3] drm/amdgpu: recover gart table at resume

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 11:11 AM, Lazar, Lijo wrote: On 10/19/2021 11:44 PM, Nirmoy Das wrote: Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to

Re: [PATCH 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 12:49 PM, Christian König wrote: Am 20.10.21 um 11:19 schrieb Lazar, Lijo: On 10/20/2021 2:18 PM, Das, Nirmoy wrote: On 10/20/2021 8:49 AM, Christian König wrote: Am 19.10.21 um 20:14 schrieb Nirmoy Das: Do not allow exported amdgpu_gtt_mgr_*() to accept any

Re: [PATCH 1/1] drm/amdgpu: fix BO leak after successful move test

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 1:51 PM, Christian König wrote: Am 20.10.21 um 13:50 schrieb Christian König: Am 13.10.21 um 17:09 schrieb Nirmoy Das: GTT BO cleanup code is with in the test for loop and we would skip cleaning up GTT BO on success. Reported-by: zhang Signed-off-by: Nirmoy Das ---  

Re: [PATCH v2 3/3] drm/amdgpu: recover gart table at resume

2021-10-20 Thread Das, Nirmoy
On 10/20/2021 12:51 PM, Christian König wrote: Am 20.10.21 um 12:21 schrieb Das, Nirmoy: On 10/20/2021 12:15 PM, Lazar, Lijo wrote: On 10/20/2021 3:42 PM, Das, Nirmoy wrote: On 10/20/2021 12:03 PM, Lazar, Lijo wrote: On 10/20/2021 3:23 PM, Das, Nirmoy wrote: On 10/20/2021 11:11

Re: [PATCH] drm/amdgpu: revert "Add autodump debugfs node for gpu reset v8"

2021-09-30 Thread Das, Nirmoy
Acked-by: Nirmoy Das On 9/30/2021 11:26 AM, Christian König wrote: This reverts commit 728e7e0cd61899208e924472b9e641dbeb0775c4. Further discussion reveals that this feature is severely broken and needs to be reverted ASAP. GPU reset can never be delayed by userspace even for debugging or

Re: [PATCH 1/1] drm/amdgpu: add and use amdgpu_bo_evict_gtt

2021-10-06 Thread Das, Nirmoy
On 10/6/2021 4:58 PM, Christian König wrote: Am 06.10.21 um 16:45 schrieb Nirmoy Das: Unify BO evicting functionality for VRAM and TT memory types in amdgpu_object.c. Use amdgpu_bo_evict_gtt() for evicting gtt memory similar to how we do that for amdgpu_debugfs_evict_vram(). Signed-off-by:

Re: [PATCH 1/1] drm/amdgpu: return early if debugfs is not initialized

2021-10-06 Thread Das, Nirmoy
On 10/6/2021 1:55 PM, Lazar, Lijo wrote: On 10/6/2021 3:21 PM, Nirmoy Das wrote: Check first if debugfs is initialized before creating amdgpu debugfs files. References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 Signed-off-by: Nirmoy Das ---  

Re: [PATCH 1/1] drm/amdgpu: unify BO evicting method in amdgpu_ttm

2021-10-07 Thread Das, Nirmoy
On 10/7/2021 12:38 PM, Christian König wrote: Am 07.10.21 um 12:00 schrieb Nirmoy Das: Unify BO evicting functionality for possible memory types in amdgpu_ttm.c. Signed-off-by: Nirmoy Das ---   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c |  8 +++---  

Re: [PATCH 1/1] drm/amdgpu: init debugfs drm driver callback

2021-10-05 Thread Das, Nirmoy
On 10/5/2021 2:41 PM, Christian König wrote: Am 05.10.21 um 14:20 schrieb Das, Nirmoy: Hi Christian, On 10/5/2021 2:01 PM, Christian König wrote: Am 05.10.21 um 13:58 schrieb Nirmoy Das: drm_dev_register() will try to init driver's debugfs using drm_driver.debugfs_init call back function

Re: [PATCH 1/1] drm/amdgpu: init debugfs drm driver callback

2021-10-05 Thread Das, Nirmoy
On 10/5/2021 2:01 PM, Christian König wrote: Am 05.10.21 um 13:58 schrieb Nirmoy Das: drm_dev_register() will try to init driver's debugfs using drm_driver.debugfs_init call back function. Use that callback also for amdgpu to intialize debugfs. Mhm, why is that useful? We rather wanted to

Re: [PATCH 1/1] drm/amdgpu: ignore -EPERM error from debugfs

2021-10-05 Thread Das, Nirmoy
On 10/5/2021 3:22 PM, Christian König wrote: Am 05.10.21 um 15:11 schrieb Nirmoy Das: Debugfs core APIs will throw -EPERM when user disables debugfs using CONFIG_DEBUG_FS_ALLOW_NONE or with kernel param. We shouldn't see that as an error. Also validate drm root dentry before creating amdgpu

Re: [PATCH 1/1] drm/amdgpu: init debugfs drm driver callback

2021-10-05 Thread Das, Nirmoy
On 10/5/2021 1:58 PM, Nirmoy Das wrote: drm_dev_register() will try to init driver's debugfs using drm_driver.debugfs_init call back function. Use that callback also for amdgpu to intialize debugfs. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 +-

Re: [PATCH 1/1] drm/amdgpu: init debugfs drm driver callback

2021-10-05 Thread Das, Nirmoy
Hi Christian, On 10/5/2021 2:01 PM, Christian König wrote: Am 05.10.21 um 13:58 schrieb Nirmoy Das: drm_dev_register() will try to init driver's debugfs using drm_driver.debugfs_init call back function. Use that callback also for amdgpu to intialize debugfs. Mhm, why is that useful? We

  1   2   >