rove job distribution with multiple
> queues")
> Cc: Nirmoy Das
> Cc: Christian König
> Cc: Luben Tuikov
> Cc: Matthew Brost
> Cc: David Airlie
> Cc: Daniel Vetter
> Cc: dri-de...@lists.freedesktop.org
> Cc: # v5.9+
Reviewed-by: Nirmoy Das
> ---
> driv
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
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
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
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
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
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
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
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: Nirmo
: 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/gp
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
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
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
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/dr
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
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
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
() 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
: 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_
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/a
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
t_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 | 23 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 ++--
4 files ch
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/a
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
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/a
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
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
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
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/dr
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
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
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
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
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
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
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
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_debu
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_debu
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/
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
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
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
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
se 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/driver
se 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/a
se 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/gp
queue 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/dr
Use new helper function amdgpu_vm_set_pasid() to
assign vm pasid value. This also ensures that we don't free
a pasid from vm code as pasids are allocated somewhere else.
Signed-off-by: Nirmoy Das
Acked-by: Felix Kuehling
---
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 13 -
dr
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
Acked-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 149 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
Use new helper function amdgpu_vm_set_pasid() to
assign vm pasid value. This also ensures that we don't free
a pasid from vm code as pasids are allocated somewhere else.
Signed-off-by: Nirmoy Das
---
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 13 -
drivers/gpu/drm/amd/a
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 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +-
2 files changed, 73
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.
v3: remove extra braces.
v2: merge if-conditions.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drive
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
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 --
2 files changed, 8
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 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +-
2 files changed, 60
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
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu
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: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
1 file
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 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
b
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 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
b
Return early for AMDGPU_PL_PREEMPT 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.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +
1 file changed, 5 insertion
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 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +-
2 files changed, 60
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 | 6 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 -
2 files changed, 6
Cleanup code related to vm pasid by adding helper functions.
Also replace idr with xarray as we actually need hash functionality.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 130 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +-
2 files
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 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu
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
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2
Make provision to pass different ttm BO destroy callback
while creating a amdgpu_bo.
v3: remove unnecessary amdgpu_bo_destroy_base.
v2: remove whitespace.
call amdgpu_bo_destroy_base() at the end for cleaner code.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
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 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 ++
drivers/gpu
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 insertion(+), 2 deletions(-)
di
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 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 ++
drivers/gpu
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 48 --
drivers/gpu/drm/amd
Use different ttm destroy callback for different type of amdgpu BO.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 47 --
1 file changed, 35 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b/drivers/gpu/drm
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 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 13 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 ++
drivers/gpu
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 a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b
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)"
Signed-off-by:
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 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Fixes handling when page tables are in system memory.
v3: remove struct amdgpu_vm_parser.
v2: remove unwanted variable.
change amdgpu_amdkfd_validate instead of amdgpu_amdkfd_bo_validate.
Signed-off-by: Nirmoy Das
---
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 21
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 15 ---
1 file changed, 4 insertions(+), 11
Create shadow BOs only for no-compute VM context and only for dGPU.
The existing if-condition would create shadow bo for compute context
on dGPU which not what we wanted.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Remove fixed domain and use BO's allowed domain for PT/PD
BO validation.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
b/drivers/gpu/dr
Fixes: 60d198ca66ecf778 ("drm/amd/display: WARN_ON cleanups")
Signed-off-by: Nirmoy Das
---
Hi Alex,
Can you please squash this with the "Fixes" patch?
Thanks,
Nirmoy
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
1 file changed, 1 insertion(+), 2 deleti
flushing logic to amdgpu_gart.c
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c| 22 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h| 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 4
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 +
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() -> amdgpu_gart_invalidate_tlb()
v2: abstract out gart tlb flushing logic to amdgpu_gart.c
Signed-off-by
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 get adev in amdgpu_gtt_mgr_recover()?
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
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 --
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 -
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dr
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++---
1 file changed, 20 insertions(+), 14 deletions
Remove unused code related to shadow BO.
v2: removing shadow bo ptr from base class.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 -
2 files changed, 35
patches.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 123
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 5 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 14 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 19 +--
4 files changed, 96
Add amdgpu_bo_add_to_shadow_list() to handle shadow list
additions and amdgpu_bo_shadowed() to check if a BO is shadowed.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 16
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 17
Do the shadow bo validation in the VM code as
VM code knows/owns shadow BOs.
v2: Fix a typo.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +
2 files changed, 9
Add new BO subclass that will be used by amdgpu vm code.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 32 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 10 +++
2 files changed, 42 insertions(+)
diff --git a
/0x80
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 10 +-
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 4 ++--
4 files
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 --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
b/drivers/gpu/drm/amd/display
WARN_ON() will not kill the process so the second WARN_ON()
will try to dereference NULL pointer.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm
Remove unused code related to shadow BO.
v2: removing shadow bo ptr from base class.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 -
2 files changed, 35 deletions(-)
diff --git a
Add amdgpu_bo_add_to_shadow_list() to handle shadow list
additions and amdgpu_bo_shadowed() to check if a BO is shadowed.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 16
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 17 +
2 files
Do the shadow bo validation in the VM code as
VM code knows/owns shadow BOs.
v2: Fix a typo.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +
2 files changed, 9
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++---
1 file changed, 20 insertions(+), 14 deletions
The subclass, amdgpu_bo_vm is intended for PT/PD BOs which are also
shadowed, so switch to amdgpu_bo_vm BO for PT/PD BOs.
v3: simplify code.
check also if shadow bo exist, instead of checking only bo's type.
v2: squash three related patches.
Signed-off-by: Nirmoy Das
---
drivers/gp
Add new BO subclass that will be used by amdgpu vm code.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 32 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 10 +++
2 files changed, 42 insertions(+)
diff --git a
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++---
1 file changed, 20 insertions(+), 14 deletions
Remove unused code related to shadow BO.
v2: removing shadow bo ptr from base class.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 -
2 files changed, 35 deletions(-)
diff --git a
1 - 100 of 468 matches
Mail list logo