This patch will ignore non-fatal errors and try to
stop amdgpu's sw stack on fatal errors.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 56 -
1 file changed, 54 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Fixes: c030f2e4166c3f55 (drm/amdgpu: add amdgpu_ras.c to support ras (v2))
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
Cleanup of phase1 suspend code to reduce unnecessary indentation.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 --
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm
For passthrough device, we do baco reset after 1st vm boot so
if we disable SMU on 1st VM shutdown baco reset will fail for
2nd vm boot.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
Fixes: 394e9a14c63d58e0f (drm/amdgpu: Need to set the baco cap before baco
reset)
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 8c739b285915
, hi_base_addr, 0);
| ^~~~
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
index
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +++---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 2 +-
drivers/gpu/drm/amd
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c| 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 6
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++
.../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 26 ++-
.../drm/amd/display/dc/dce/dce_panel_cntl.c | 10 +++
.../drm/amd/display/dc
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
Reviewed-by: Alex Deucher
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10
.../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 24 ++-
.../drm/amd/display/dc/dce/dce_panel_cntl.c | 10
Used sparse(make C=1) to find these loose ends.
Signed-off-by: Nirmoy Das
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 2
Used sparse(make C=1) to find these loose ends.
v2:
removed unwanted extra line
Signed-off-by: Nirmoy Das
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Used sparse(make C=1) to find these loose ends.
v2:
removed unwanted extra line
Signed-off-by: Nirmoy Das
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++--
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
2 files changed, 3 insertions
Remove unused amdgpu_xgmi_hive_try_lock() and smu7_reset_asic_tasks().
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 5 -
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 --
2 files changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu
If (smu)->ppt_funcs->intf is not initialized then
smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumBottom32, ) and
smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumTop32, ) will not
touch bottom32 and top32.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 2 +-
1 file c
This fixes incorrect output when reading pp_dpm_dcefclk sysfs.
Output before this patch:
cat /sys/devices/pci:/pp_dpm_dcefclk
0: 506Mhz
1: 42949671Mhz *
2: 1266Mhz
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 +++
drivers/gpu/drm/amd/powerplay
arcturus doesn't support DCEFCLK
Fixes: c67c791cd87d (drm/amd/powerplay: return current DCEFCLK on sysfs read)
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
b
The release_firmware() function is NULL tolerant so we do not need
to check for NULL param before calling it.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 6 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++
drivers/gpu/drm/amd/amdgpu
Replace hardcoded vmid number with AMDGPU_NUM_VMID macro.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
drivers/gpu/drm
/0x140
[ 21.057039] ? __kthread_bind_mask+0x60/0x60
[ 21.057043] ret_from_fork+0x22/0x30
Signed-off-by: Nirmoy Das
---
I had to keep amdgpu_bo_unreserve() before calling amdgpu_bo_free_kernel()
or else amdgpu doesn't respond after loading. Is there any better
solution ?
drivers/gpu/drm/amd/
[amdgpu]
[ 21.057030] process_one_work+0x1df/0x370
[ 21.057033] worker_thread+0x46/0x340
[ 21.057034] ? process_one_work+0x370/0x370
[ 21.057037] kthread+0x11b/0x140
[ 21.057039] ? __kthread_bind_mask+0x60/0x60
[ 21.057043] ret_from_fork+0x22/0x30
Signed-off-by: Nirmoy Das
/0x30 [amdgpu]
[ 21.057030] process_one_work+0x1df/0x370
[ 21.057033] worker_thread+0x46/0x340
[ 21.057034] ? process_one_work+0x370/0x370
[ 21.057037] kthread+0x11b/0x140
[ 21.057039] ? __kthread_bind_mask+0x60/0x60
[ 21.057043] ret_from_fork+0x22/0x30
Signed-off-by: Nirmoy Das
Use amdgpu_sa_bo instead of amdgpu_bo.
v2:
* do not initialize bo to get hint from compiler for -Wuninitialized
* pass NULL fence to amdgpu_sa_bo_free if fence is undefined.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 56 +++--
drivers/gpu/drm
Use amdgpu_sa_bo instead of amdgpu_bo.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 56 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 17
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 47 ++---
3 files changed, 45 insertions
amdgpu_do_test_moves() is failing because of wrong
usable gart size calculation and throwing:
[drm:amdgpu_do_test_moves [amdgpu]] *ERROR* 20bdc9f3 bind failed
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 13 -
1 file changed, 4 insertions(+), 9
Use generic DMA api instead of bus-specific API.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index e01e681d2a60
Use generic DMA api instead of bus-specific API.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index e01e681d2a60
Use generic DMA api instead of bus-specific API.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/radeon/radeon_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_device.c
b/drivers/gpu/drm/radeon/radeon_device.c
index 7f384ffe848a
ng compute queue priority between
normal and high priority.
Fixes: 33abcb1f5a1719b1c (drm/amdgpu: set compute queue priority at mqd_init)
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 10 +++---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/am
Check validity of drm_gpu_scheduler before setting hw priority.
Also fix a minor indentation issue.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
b
Because of firmware bug, Raven asics can't handle jobs
scheduled to multiple compute queues. So enable only one
compute queue till we have a firmware fix.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu
amdgpu_do_test_moves() is failing because of wrong
usable gart size calculation and throwing:
[drm:amdgpu_do_test_moves [amdgpu]] *ERROR* 20bdc9f3 bind failed
Signed-off-by: Nirmoy Das
---
This still doesn't work. As per my calculation 1st 4MB of GART is not
accounted for in adev
Wave limiting can be use to load balance high priority
compute jobs along with gfx jobs. When enabled, this will reserve
70% of waves for compute jobs
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 16
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs more resources
to finish early.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm
Wave limiting can be use to load balance high priority
compute jobs along with gfx jobs. When enabled, this will reserve
~75% of waves for compute jobs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 18
that register simultaneously.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs gets more resources
to finish early.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu
that register simultaneously.
Signed-off-by: Nirmoy Das
Acked-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6
Assign correct ring priority.
Fixes: 33abcb1f5a17 ("drm/amdgpu: set compute queue priority at mqd_init")
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu
Wave limiting can be use to load balance high priority
compute jobs along with gfx jobs. When enabled, this will reserve
~75% of waves for compute jobs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 18
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs gets more resources
to finish early.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu
v2: remove ring->priority_mutex.
Fixes: 33abcb1f5a17 ("drm/amdgpu: set compute queue priority at mqd_init")
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 8 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 +-
2 files changed, 3 insertions(+), 11 deleti
that register simultaneously.
Signed-off-by: Nirmoy Das
Acked-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6
Wave limiting can be use to load balance high priority
compute jobs along with gfx jobs. When enabled, this will reserve
~75% of waves for compute jobs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 18
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs gets more resources
to finish early.
v2: use ring priority instead of job priority.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +
1 file
Wave limiting can be use to load balance high priority
compute jobs along with gfx jobs. When enabled, this will reserve
~75% of waves for compute jobs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 18
that register simultaneously.
Signed-off-by: Nirmoy Das
Acked-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6
uot;)
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 1a612f51ec
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs gets more resources
to finish early.
v2: use ring priority instead of job priority.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +
1 file
jobs.
v2: use adev->gfx.mec.num_pipe_per_mec instead of hardcoding 4.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 50 ++-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 46 +++-
2 files changed, 94 insertions(+), 2 deletions(-)
d
v2: remove ring->priority_mutex.
Fixes: 33abcb1f5a17 ("drm/amdgpu: set compute queue priority at mqd_init")
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 8 ++--
drivers/gpu/drm/amd/amdgpu/amdgp
Enable gfx wave limiting for gfx jobs before pushing high priority
compute jobs so that high priority compute jobs gets more resources
to finish early.
v2: use ring priority instead of job priority.
Signed-off-by: Nirmoy Das
Reviewed-by: Christian König
Reviewed-by: Alex Deucher
---
drivers
off-by: Nirmoy Das
Reviewed-by: Christian König
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 18 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 21 -
3 files changed, 38 insertions(+)
that register simultaneously.
Signed-off-by: Nirmoy Das
Acked-by: Christian König
Reviewed-by: Alex Deucher
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++
drivers/gpu/drm/amd/amdgpu
jobs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 49 ++-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 46 -
2 files changed, 93 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.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
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
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:
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
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
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
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
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
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
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
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
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.
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(-)
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/drm/amd
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
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
Use amdgpu_bo_vm for BO for PT/PD.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 43 ++
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index
Add has_shadow to identify if a BO is shadowed.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b
Add new BO subcalss that will be used by amdgpu vm code.
Signed-off-by: Nirmoy Das
---
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/drivers/gpu/drm/amd/amdgpu
Use shadow of amdgpu_bo_vm instead of the base class.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +--
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 16 ++--
3 files changed, 26
Remove unused code related to shadow BO.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 30 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 ---
2 files changed, 34 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b
Allocate PD/PT entries while allocating VM BOs and use that
instead of allocating those entries separately.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 31 ++
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/amd
Shadow BOs are only needed by VM code so create it
directly within vm code.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 23 +--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm
Do the shadow bo validation in the VM code as
VM code knows/owns shadow BOs.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +
2 files changed, 9 insertions(+), 19 deletions(-)
diff --git
Use amdgpu_bo_vm subclass for creating BOs related to PD/PT.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 43 ++
1 file changed, 24 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu
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
Add new BO subclass that will be used by amdgpu vm code.
Signed-off-by: Nirmoy Das
---
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/drivers/gpu/drm/amd/amdgpu
Shadow BOs are only needed by VM code so create it
directly within the vm code.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 --
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu
The subclass, amdgpu_bo_vm is intended for PT/PD BOs which are shadowed,
so switch to shadow pointer of amdgpu_bo_vm.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 16 ++--
2 files
Remove unused code related to shadow BO.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 29 --
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 ---
2 files changed, 32 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b
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
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +
2 files changed, 9 insertions(+), 19 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
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.
v2: squash three related patches.
Signed-off-by: Nirmoy Das
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 90 +
drivers/gpu/drm/amd/amdgpu
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
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
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/gpu/drm
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
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
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
201 - 300 of 465 matches
Mail list logo