[PATCH 1/2] drm/radeon: add rdev in ring struct

2021-02-15 Thread Nirmoy Das
Retrieving radeon device struct from ring struct will be used in next patch where debugfs's show function can only pass one private data pointer. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_ring.c | 1 + 2 files changed, 2 insertions

[PATCH 1/1] drm/amdgpu: remove unused variable from struct amdgpu_bo

2021-02-18 Thread Nirmoy Das
Fixes: 62914a99dee5a("drm/amdgpu: Use mmu_interval_insert instead of hmm_mirror") Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 3/3] drm/amdgpu: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
ead of not so important "gpu recover" message. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 157 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 47 +++--- drivers/gpu/drm/amd/amdgpu

[PATCH 1/3] drm/amd/display: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
Use debugfs API directly instead of drm middle layer. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +-- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 46 --- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 2 +- 3 files changed, 21

[PATCH 2/3] drm/amd/pm: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
Use debugfs API directly instead of drm middle layer. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 26 ++--- drivers/gpu/drm/amd/pm/inc/amdgpu_pm.h | 2 +- 3 files changed, 15 insertions

[PATCH v2 1/3] drm/amd/display: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
Use debugfs API directly instead of drm middle layer. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +-- .../amd/display/amdgpu_dm

[PATCH v2 2/3] drm/amd/pm: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
Use debugfs API directly instead of drm middle layer. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 + drivers/gpu/drm/amd/pm/amdgpu_pm.c

[PATCH v2 3/3] drm/amdgpu: do not use drm middle layer for debugfs

2021-02-15 Thread Nirmoy Das
ead of not so important "gpu recover" message. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_de

[PATCH 1/1] drm/amdgpu: print pci link status

2021-02-15 Thread Nirmoy Das
Printing PCI link status will help user detect scenarios when the device is placed in a pci slot which has less bandwidth than the device's capability. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH 1/4] drm/amdgpu: expose amdgpu_bo_create_shadow()

2021-04-21 Thread Nirmoy Das
Exposed amdgpu_bo_create_shadow() will be needed for amdgpu_vm handling. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/4] drm/amdgpu: create shadow bo using amdgpu_bo_create_shadow()

2021-04-21 Thread Nirmoy Das
Shadow BOs are only needed for vm code so call amdgpu_bo_create_shadow() directly instead of depending on amdgpu_bo_create(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[PATCH 4/4] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag

2021-04-21 Thread Nirmoy Das
Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 + include/uapi/drm/amdgpu_drm.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers

[PATCH 3/4] drm/amdgpu: cleanup amdgpu_bo_create()

2021-04-21 Thread Nirmoy Das
Remove shadow bo related code as vm code is creating shadow bo using proper API. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b

[PATCH 1/6] drm/amdgpu: expose amdgpu_bo_create_shadow()

2021-04-23 Thread Nirmoy Das
Exposed amdgpu_bo_create_shadow() will be needed for amdgpu_vm handling. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/6] drm/amdgpu: cleanup amdgpu_vm_init()

2021-04-23 Thread Nirmoy Das
Currently only way to create compute vm is through amdgpu_vm_make_compute(). So vm_context isn't required anymore for amdgpu_vm_init(). Signed-off-by: Nirmoy Das Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16

[PATCH 3/6] drm/amdgpu: remove unused vm context flags

2021-04-23 Thread Nirmoy Das
Remove unused AMDGPU_VM_CONTEXT_GFX and AMDGPU_VM_CONTEXT_COMPUTE flags. Signed-off-by: Nirmoy Das Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu

[PATCH 4/6] create shadow bo using amdgpu_bo_create_shadow()

2021-04-23 Thread Nirmoy Das
Shadow BOs are only needed for vm code so call amdgpu_bo_create_shadow() directly instead of depending on amdgpu_bo_create(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 69 +- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git

[PATCH 5/6] drm/amdgpu: cleanup amdgpu_bo_create()

2021-04-23 Thread Nirmoy Das
Remove shadow bo related code as vm code is creating shadow bo using proper API. Without shadow bo code, amdgpu_bo_create() is basically a wrapper around amdgpu_bo_do_create(). So rename amdgpu_bo_do_create() to amdgpu_bo_create(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu

[PATCH 6/6] drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag

2021-04-23 Thread Nirmoy Das
Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Userspace is never allowed to use this. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 + include/uapi/drm/amdgpu_drm.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu

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

2021-08-25 Thread Nirmoy Das
priority. Use userspace provided context priority, AMDGPU_CTX_PRIORITY_* to map a context to proper hardware queue priority. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 127 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 8 +- drivers/gpu/drm/amd

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

2021-08-26 Thread Nirmoy Das
to define its own priority levels. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 9 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/gpu

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

2021-08-26 Thread Nirmoy Das
to define its own priority levels. Signed-off-by: Nirmoy Das Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 5 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 9 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

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

2021-08-25 Thread Nirmoy Das
to define its own priority levels. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 10 -- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm

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

2021-09-02 Thread Nirmoy Das
debugfs APIs returns encoded error so use IS_ERR for checking return value. References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c| 2 +- 2 files changed

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

2021-09-02 Thread Nirmoy Das
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 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c| 16 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h

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

2021-09-02 Thread Nirmoy Das
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 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c| 18 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h

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

2021-09-02 Thread Nirmoy Das
debugfs APIs returns encoded error so use IS_ERR for checking return value. v2: return PTR_ERR(ent) References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 -- drivers/gpu/drm/amd/amdgpu

[PATCH 1/1] drm/radeon: pass drm dev radeon_agp_head_init directly

2021-09-13 Thread Nirmoy Das
Pass drm dev directly as rdev->ddev gets initialized later on at radeon_device_init(). Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214375 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/

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

2021-10-13 Thread Nirmoy Das
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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 +- 1 file chan

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

2021-10-13 Thread 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 25 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu

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

2021-10-12 Thread Nirmoy Das
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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 +- 1 file chan

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

2021-10-21 Thread 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. v2: pass adev's gtt_mgr instead of adev Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu

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

2021-10-21 Thread Nirmoy Das
v2: pin gart at amdgpu_gart_table_vram_alloc() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 80 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

[PATCH v2 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-21 Thread Nirmoy Das
Do not allow exported amdgpu_vram_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 vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu

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

2021-10-19 Thread 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: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - drivers/gpu/drm/amd

[PATCH 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-19 Thread Nirmoy Das
Do not allow exported amdgpu_vram_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 vram_mgr functions. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 3 +- drivers/gpu

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

2021-10-19 Thread 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 amdgpu_device_evict_resources() while evicting GART table. Signed-off-by: Nirmoy Das --- drivers

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

2021-10-19 Thread 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. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +-- drivers/gpu/drm

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

2021-10-06 Thread 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: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +-- drivers/gpu/drm/amd

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

2021-10-06 Thread Nirmoy Das
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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd

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

2021-10-06 Thread Nirmoy Das
Unify BO evicting functionality for possible memory types in amdgpu_ttm.c and remove corresponding function from amdgpu_object.c. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 8 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +-- drivers/gpu/drm/amd

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

2021-10-07 Thread 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 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 30 - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 23

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

2021-10-05 Thread 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. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h

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

2021-10-05 Thread 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 debugfs files. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

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

2021-10-22 Thread Nirmoy Das
instead of adev Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 23 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 ++-- 4 files changed

[PATCH v2 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_vram_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 vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu

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

2021-10-22 Thread Nirmoy Das
v2: pin gart at amdgpu_gart_table_vram_alloc() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 80 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

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

2021-10-22 Thread Nirmoy Das
: pass adev's gtt_mgr instead of adev. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 22 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h

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

2021-10-22 Thread Nirmoy Das
() directly without checking its return value. v3: remove gart recovery from other places v2: pin gart at amdgpu_gart_table_vram_alloc() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 82 ++ drivers/gpu

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

2021-10-22 Thread Nirmoy Das
v2: pin gart at amdgpu_gart_table_vram_alloc() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 84 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

[PATCH 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_vram_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 vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by: Nirmoy Das Reviewed-by: Christian König

[PATCH 1/1] drm/amdgpu: remove unnecessary checks

2021-10-22 Thread Nirmoy Das
amdgpu_ttm_backend_bind() only needed for TTM_PL_TT and AMDGPU_PL_PREEMPT. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index

[PATCH 1/1] drm/amdgpu: return early on error while setting bar0 memtype

2021-10-29 Thread Nirmoy Das
We set WC memtype for aper_base but don't check return value of arch_io_reserve_memtype_wc(). Be more defensive and return early on error. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers

[RFC PATCH 1/3] drm/amdgpu: add HIQ ring to amdgpu

2021-11-05 Thread Nirmoy Das
Add HIQ ring structs and functions that will map HIQ using KIQ. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 142 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 24 drivers/gpu/drm

[RFC PATCH 2/3] drm/amdgpu: add HIQ eng_sel to KIQ packets

2021-11-05 Thread Nirmoy Das
Allow KIQ to map/unmap HIQ MQD as well. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 4 files

[RFC PATCH 3/3] drm/amdgpu: enable HIQ in amdgpu without kfd

2021-11-05 Thread Nirmoy Das
There is a HW bug which prevents CP to read secure buffers with HIQ being configured and mapped using KIQ. KFD already does this for amdgpu but when kfd is not enabled amdgpu should that for itself. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 - drivers/gpu

[PATCH 1/1] drm/amdgpu: move bo_va ref counting to internal funcs

2022-01-13 Thread Nirmoy Das
GEM code should not deal with struct amdgpu_bo_va's ref_count. Move ref counting to amdgpu_vm.c. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 38 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h

[PATCH REBASED 1/4] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2022-01-07 Thread Nirmoy Das
: pass adev's gtt_mgr instead of adev. Reviewed-by: Christian König Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 22 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- drivers/gpu/drm

[PATCH 2/4] drm/amdkfd: remove unused function

2022-01-07 Thread Nirmoy Das
Remove unused amdgpu_amdkfd_get_vram_usage() CC: felix.kuehl...@amd.com Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 - 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH REBASED 3/4] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2022-01-07 Thread Nirmoy Das
Do not allow exported amdgpu_vram_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 vram_mgr functions. v2: pass adev's vram_mgr instead of adev Reviewed-by: Christian König Signed-off-by: Nirmoy Das

[PATCH REBASED 4/4] drm/amdgpu: recover gart table at resume

2022-01-07 Thread Nirmoy Das
v2: pin gart at amdgpu_gart_table_vram_alloc() Reviewed-by: Christian König Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 84 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +- drivers/gpu

[PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

2023-01-17 Thread Nirmoy Das
There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Signed-off-by: Nirmoy Das --- include/drm/drm_print.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH 1/2] drm/radeon: Do not use deprecated drm log API

2023-01-17 Thread Nirmoy Das
Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs. Cc: Alex Deucher Cc: Christian König Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon

[PATCH v2] drm/radeon: Do not use deprecated drm log API

2023-01-17 Thread Nirmoy Das
Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs. v2: replace pr_err with dev_err(Alex). Cc: Alex Deucher Cc: Christian König Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon_dp_auxch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH 2/2] drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED()

2023-01-17 Thread Nirmoy Das
There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Signed-off-by: Nirmoy Das Reviewed-by: Sam Ravnborg --- include/drm/drm_print.h | 3 --- 1 file

<    1   2   3   4   5