[PATCH v3] drm/ttm: Should to return the evict error

2025-06-03 Thread Emily Deng
For the evict fail case, the evict error should be returned. v2: Consider ENOENT case. v3: Abort directly when the eviction failed for some reason (except for -ENOENT) and not wait for the move to finish Signed-off-by: Emily Deng --- drivers/gpu/drm/ttm/ttm_resource.c | 3 +++ 1 file changed

[PATCH v3] drm/ttm: Should to return the evict error

2025-06-03 Thread Emily Deng
For the evict fail case, the evict error should be returned. v2: Consider ENOENT case. v3: Abort directly when the eviction failed for some reason (except for -ENOENT) and not wait for the move to finish Signed-off-by: Emily Deng --- drivers/gpu/drm/ttm/ttm_resource.c | 3 +++ 1 file changed

[PATCH v2] drm/amdkfd: Move the process suspend and resume out of full access

2025-05-27 Thread Emily Deng
For the suspend and resume process, exclusive access is not required. Therefore, it can be moved out of the full access section to reduce the duration of exclusive access. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 16 + drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdkfd: Move the process suspend and resume out of full access

2025-05-26 Thread Emily Deng
For the suspend and resume process, exclusive access is not required. Therefore, it can be moved out of the full access section to reduce the duration of exclusive access. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 16 + drivers/gpu/drm/amd/amdgpu

[PATCH v2] drm/ttm: Should to return the evict error

2025-05-20 Thread Emily Deng
For the evict fail case, the evict error should be returned. v2: Consider ENOENT case. Signed-off-by: Emily Deng --- drivers/gpu/drm/ttm/ttm_resource.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm

[PATCH] drm/ttm: Should to return the evict error

2025-05-20 Thread Emily Deng
For the evict fail case, the evict error should be returned. Signed-off-by: Emily Deng --- drivers/gpu/drm/ttm/ttm_resource.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index 097716bd248a

[PATCH v2] drm/amdgpu: Clear overflow for SRIOV

2025-04-14 Thread Emily Deng
For VF, it doesn't have the permission to clear overflow, clear the bit by reset. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 15 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 6 +- drivers/gpu/dr

[PATCH v2 1/2] drm/amdgpu: Clear overflow for SRIOV

2025-04-13 Thread Emily Deng
For VF, it doesn't have the permission to clear overflow, clear the bit by reset. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 15 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 6 +- drivers/gpu/dr

[PATCH] drm/amdgpu: Clear overflow for SRIOV

2025-04-11 Thread Emily Deng
For VF, it doesn't have the permission to clear overflow, clear the bit by reset. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 10 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 6 +- drivers/gpu/drm/amd/a

[PATCH] drm/amdgpu: Clear overflow for SRIOV

2025-04-09 Thread Emily Deng
For VF, it doesn't have the permission to clear overflow, clear the bit by reset. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 10 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 6 +- drivers/gpu/drm/amd/a

[PATCH] drm/amdkfd: sriov doesn't support per queue reset

2025-03-28 Thread Emily Deng
Disable per queue reset for sriov. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index e477d7509646

[PATCH] drm/amdkfd: Fix some kfd related recover issues

2025-03-21 Thread Emily Deng
-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 4 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 22 +++ 4 files changed, 28 insertions(+), 1

[PATCH v4] drm/amdgpu: Fix the race condition for draining retry fault

2025-03-05 Thread Emily Deng
v4: Refine code. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 30 +++- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index d04725583f19..83ac14bf7a7a 1006

[PATCH v3] drm/amdgpu: Fix the race condition for draining retry fault

2025-03-05 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 34 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index d04725583f19..42ee49d19ee9 100644 --- a/dri

[PATCH v2] drm/amdgpu: Fix the race condition for draining retry fault

2025-03-05 Thread Emily Deng
ddr. This results in a "failed to find prange..." error, causing the page recovery to fail. How to fix: Move the timestamp check code under the protection of svm->lock. v2: Make sure all right locks are released before go out. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkf

[PATCH] drm/amdgpu: Fix the race condition for draining retry fault

2025-03-05 Thread Emily Deng
ddr. This results in a "failed to find prange..." error, causing the page recovery to fail. How to fix: Move the timestamp check code under the protection of svm->lock. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 27 ++- 1 file change

[PATCH v2] drm/amdgpu: Fix missing drain retry fault the last entry

2025-03-04 Thread Emily Deng
While the entry get in svm_range_unmap_from_cpu is the last entry, and the entry is page fault, it also need to be dropped. So for equal case, it also need to be dropped. v2: Only modify the svm_range_restore_pages. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 3

[PATCH] drm/amdgpu: Fix missing drain retry fault the last entry

2025-03-03 Thread Emily Deng
For equal case, it also need to be dropped. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h index 7d4395a5d8ac..73b8bcb54734

[PATCH v2] drm/amdkfd: Correct the postion of reserve and unreserve memory

2025-02-20 Thread Emily Deng
Call amdgpu_amdkfd_reserve_mem_limit in svm_range_vram_node_new when creating a new SVM BO. Call amdgpu_amdkfd_unreserve_mem_limit in svm_range_bo_release when the SVM BO is deleted. v2: Refine the error handle part in svm_range_vram_node_new. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd

[PATCH] drm/amdkfd: Don't over commit vram while xnack is off

2025-02-20 Thread Emily Deng
For xnack is off, the application should ensure the vram not overcommit. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdkfd: Correct the postion of reserve and unreserve memory

2025-02-20 Thread Emily Deng
Call amdgpu_amdkfd_reserve_mem_limit in svm_range_vram_node_new when creating a new SVM BO. Call amdgpu_amdkfd_unreserve_mem_limit in svm_range_bo_release when the SVM BO is deleted. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 13 - drivers/gpu/drm/amd

[PATCH 3/3] drm/amdkfd: Skip update vmid in while update queue

2025-02-19 Thread Emily Deng
Avoid updating the vmid to 0 during the queue update process, as this may trigger a wptr poll address page fault when a ring doorbell is activated in doorbell_mode=1. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 1/3] drm/amdgpu: Add amdgpu_sriov_multi_vf_mode function

2025-02-19 Thread Emily Deng
Use amdgpu_sriov_multi_vf_mode to replace amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev). Signed-off-by: Emily Deng Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h| 2 ++ drivers/gpu/drm/amd/pm/amd

[PATCH 2/3] drm/amdgpu: set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 for sriov multiple vf.

2025-02-19 Thread Emily Deng
In sriov multiple vf, Set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to read WPTR from MQD. Signed-off-by: Emily Deng Acked-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 27 --- 2 files changed, 25

[PATCH] drm/amdkfd: Fix the deadlock in svm_range_restore_work

2025-02-07 Thread Emily Deng
_vm_ptes_update ->amdgpu_vm_pt_alloc ->svm_range_evict_svm_bo_worker ->mmap_read_lock(deadlock here, because already get mmap_write_lock) How to fix? Downgrade the write lock to read lock. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c |

[PATCH v3 1/2] drm/amdgpu: Add amdgpu_sriov_multi_vf_mode function

2025-02-06 Thread Emily Deng
Use amdgpu_sriov_multi_vf_mode to replace amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev). Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h| 2 ++ drivers/gpu/drm/amd/pm/amdgpu_pm.c

[PATCH v3 2/2] drm/amdgpu: set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 for sriov multiple vf.

2025-02-06 Thread Emily Deng
In sriov multiple vf, Set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to read WPTR from MQD. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 23 +-- 2 files changed, 22 insertions(+), 3

[PATCH v2] drm/amdgpu: set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 for sriov multiple vf.

2025-02-06 Thread Emily Deng
In sriov multiple vf, Set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to read WPTR from MQD. v2: Add amdgpu_sriov_multi_vf_mode Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 ++ drivers/gpu/drm/amd

[PATCH] drm/amdgpu: set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 for sriov multiple vf.

2025-02-06 Thread Emily Deng
In sriov multiple vf, Set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to read WPTR from MQD. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- .../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 25 +-- 2 files changed, 24 insertions(+), 3

[PATCH v5] drm/amdkfd: Fix partial migrate issue

2025-01-10 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. v2: Add mpages to break the loop earlier. v3: Uses MIGRATE_PFN_MIGRATE to identify whether page could be migrated. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 20 1 file changed, 12 i

[PATCH v4] drm/amdkfd: Fix partial migrate issue

2025-01-09 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. v2: Add mpages to break the loop earlier. v3: Uses MIGRATE_PFN_MIGRATE to identify whether page could be migrated. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 17 ++--- 1 file changed, 10 insertions(

[PATCH v4] drm/amdgpu: Fix the looply call svm_range_restore_pages

2025-01-09 Thread Emily Deng
o has been freed. And then it will call svm_range_restore_pages again. How to fix? Duplicate the free bo list. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH v3] drm/amdgpu: Fix the looply call svm_range_restore_pages

2025-01-08 Thread Emily Deng
o has been freed. And then it will call svm_range_restore_pages again. How to fix? Duplicate the free bo list. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH v3] drm/amdkfd: Fix partial migrate issue

2025-01-08 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. v2: Add mpages to break the loop earlier. v3: Uses MIGRATE_PFN_MIGRATE to identify whether page could be migrated. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 14 +- 1 file changed, 9 insertions(

[PATCH v2] drm/amdkfd: Fix partial migrate issue

2025-01-06 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. v2: Add mpages to break the loop eariler. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/

[PATCH v2] drm/amdgpu: Fix the looply call svm_range_restore_pages issue

2025-01-02 Thread Emily Deng
pt bo has been freed. And then it will call svm_range_restore_pages again. How to fix? Add a workqueue, and flush the workqueue each time before updating page table. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_g

[PATCH] drm/amdkfd: Fix partial migrate issue

2025-01-02 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c ind

[PATCH 1/2] drm/amdgpu: Fix the looply call svm_range_restore_pages issue

2025-01-02 Thread Emily Deng
pt bo has been freed. And then it will call svm_range_restore_pages again. How to fix? Add a workqueue, and flush the workqueue each time before updating page table. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 8 ++-

[PATCH 1/2] drm/amdkfd: Fix partial migrate issue

2025-01-01 Thread Emily Deng
migrate the wrong pages based on the migrate->dst[i]. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c ind

[PATCH] drm/amdgpu: Fix the looply call svm_range_restore_pages issue

2024-12-29 Thread Emily Deng
pt bo has been freed. And then it will call svm_range_restore_pages again. How to fix? Add a workqueue, and flush the workqueue each time before updating page table. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 8 ++-

[PATCH] PCI: Add vf reset notification for pf

2024-02-03 Thread Emily Deng
When a vf has been reset, the pf wants to get notification to remove the vf out of schedule. Solution: Add the callback function in pci_driver sriov_vf_reset_notification. When vf reset happens, then call this callback function. Signed-off-by: Emily Deng --- drivers/pci/pci.c | 8

[PATCH 2/2] drm/amdgpu: Add timeout for sync wait

2023-10-20 Thread Emily Deng
er return, so the recover couldn't continue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index dcd8

[PATCH 1/2] drm/amdgpu: handle the return for sync wait

2023-10-20 Thread Emily Deng
Add error handling for amdgpu_sync_wait. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 6 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: handle the return for sync wait

2023-10-19 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 6 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdgpu: Add timeout for sync wait

2023-10-19 Thread Emily Deng
er return, so the recover couldn't continue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index dcd8

[PATCH] drm/amdgpu: Add timeout for sync wait

2023-10-19 Thread Emily Deng
ne_work+0x3d0/0x3d0 [ 1935.484307] kthread+0x12a/0x150 [ 1935.493993] ? set_kthread_struct+0x50/0x50 [ 1935.506513] ret_from_fork+0x22/0x30 It is because the amdgpu_sync_wait is waiting for the bad job's fence, and never return, so the recover couldn't continue. Signed-off-by: Emily

[PATCH] drm/amdgpu/irq: Move irq resume to the beginning

2023-08-06 Thread Emily Deng
Need to move irq resume to the beginning of reset sriov, or if one interrupt occurs before irq resume, then the irq won't work anymore. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gp

[PATCH] drm/amdgpu/vcn: Need to unpause dpg before stop dpg

2023-06-20 Thread Emily Deng
Need to unpause dpg first, or it will hit follow error during stop dpg: "[drm] Register(1) [regUVD_POWER_STATUS] failed to reach value 0x0001 != 0xn" Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] drm/amdgpu/vcn: Need to pause dpg before stop dpg

2023-06-19 Thread Emily Deng
Need to pause dpg first, or it will hit follow error during stop dpg: "[drm] Register(1) [regUVD_POWER_STATUS] failed to reach value 0x0001 != 0xn" Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d

[PATCH] drm/amdgpu/mmsch: Correct the definition for mmsch init header

2023-06-05 Thread Emily Deng
For the header, it is version related, shouldn't use MAX_VCN_INSTANCES. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h | 4 +++- drivers/gpu/drm/amd/amdgpu/mmsch_v4_0.h | 4 +++- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c

[PATCH v2] drm/amd/amdgpu: Enable gfx pipe1 and fix related issues

2022-11-06 Thread Emily Deng
Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues for performance concern. v2: Don't change the entity number of AMDGPU_HW_IP_GFX Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 42 +- 1 file change

[PATCH] drm/amd/amdgpu: Enable gfx pipe1 and fix related issues

2022-11-04 Thread Emily Deng
Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues for performance concern. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 42 - 2 files changed, 22 insertions

[PATCH] drm/amd/amdgpu: Enable gfx pipe1 and fix related issues

2022-11-03 Thread Emily Deng
Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues for performance concern. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 43 + 2 files changed, 23 insertions

[PATCH] drm/amdgpu/vcn: Correct the register setting for vcn1

2022-03-21 Thread Emily Deng
Correct the code error for setting register UVD_GFX10_ADDR_CONFIG. Need to use inst_idx, or it only will set VCN0. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b

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

2021-07-06 Thread Emily Deng
The irq number should be decided by num_crtc, and the num_crtc could change by parameter. Signed-off-by: Emily Deng --- 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 b/drivers/gpu/drm/amd

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

2021-07-06 Thread Emily Deng
The irq number should be decided by num_crtc, and the num_crtc could change by parameter. Signed-off-by: Emily Deng --- 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 b/drivers/gpu/drm/amd

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

2021-07-01 Thread Emily Deng
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 b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 33324427b555..7e0d8c092c7e 100644 --- a

[PATCH] SWDEV-235359 drm/amdgpu: Correct the irq numbers for virtual ctrc

2021-07-01 Thread Emily Deng
Change-Id: I02035f65b71ec52795c3e8ae979fb582c3cce592 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 b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Revert "SWDEV-238407 Add clear vf fw support"

2021-03-30 Thread Emily Deng
As already moved the support to host driver, so revert this in guest driver. This reverts commit 8d5e6f45df5f9073760dea0ab94321615cea16ec. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 36 ++--- drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 8 -- 2

[PATCH 1/2] drm/amdgpu: Revert "SWDEV-238407 drm/amdgpu/sriov: Need to clear kiq position"

2021-03-30 Thread Emily Deng
As already moved the implementation to host driver, so remove this from guest driver. This reverts commit 96f7d59858ada4a6372fcb249b04805d14482c49. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: Toggle msix after FLR for sriov

2021-03-30 Thread Emily Deng
From: "Emily.Deng" For vf assigned to guest VM, after FLR, the msix table will be reset. As the flr is done on host driver. The qemu and vfio driver don't know this, and the msix is still enable from qemu and vfio driver side. So if want to re-setup the msix table, first need to disable and re-e

[PATCH] drm/amdgpu: Toggle msix after FLR for sriov

2021-03-30 Thread Emily Deng
From: "Emily.Deng" After FLR, the msix will be cleared, so need to toggle it for sriov. v2: Change name with amdgpu_irq prefix, remove #ifdef. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/

[PATCH 6/6] drm/amdgpu: Fix driver unload issue

2021-03-29 Thread Emily Deng
During driver unloading, don't need to copy mem, or it will introduce some call trace, such as when sa_manager is freed, it will introduce warn call trace in amdgpu_sa_bo_new. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH 5/6] drm/amdgpu: Disable RPTR write back for navi12

2021-03-29 Thread Emily Deng
. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c index 920fc6d4a127..63e4a78181b8 100644 --- a/drivers/gpu

[PATCH 4/6] drm/amdgpu: Disable fetch discovery data from vram for navi12 sriov

2021-03-29 Thread Emily Deng
To fix the board disappear issue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/nv.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 46d4bbabce75..48dc171bc759 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c

[PATCH 3/6] drm/amdgpu: Restore msix after FLR

2021-03-29 Thread Emily Deng
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. v2: Change name with amdgpu_irq prefix, remove #ifdef. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/a

[PATCH 1/6] drm/amdgpu: Disable vcn decode ring for sriov navi12

2021-03-29 Thread Emily Deng
Since vcn decoding ring is not required, so just disable it. Signed-off-by: Frank.Min Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 +++- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 29 - 2 files changed, 17 insertions(+), 16 deletions

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

2021-03-29 Thread Emily Deng
Set the num_types equal to the enabled num_crtc. Signed-off-by: Emily Deng --- 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 b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 5c11144da051

[PATCH v2] drm/amdgpu: Restore msix after FLR

2021-03-29 Thread Emily Deng
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. v2: Change name with amdgpu_irq prefix, remove #ifdef. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/a

[PATCH 6/6] drm/amdgpu: Fix driver unload issue

2021-03-29 Thread Emily Deng
During driver unloading, don't need to copy mem, or it will introduce some call trace, such as when sa_manager is freed, it will introduce warn call trace in amdgpu_sa_bo_new. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH 5/6] drm/amdgpu: Disable RPTR write back for navi12

2021-03-29 Thread Emily Deng
. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c index 920fc6d4a127..6d268c70857c 100644 --- a/drivers/gpu

[PATCH 4/6] drm/amdgpu: Disable fetch discovery data from vram for navi12 sriov

2021-03-29 Thread Emily Deng
To fix the board disappear issue. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/nv.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 46d4bbabce75..b9832d31f00d 100644 --- a/drivers/gpu/drm

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

2021-03-29 Thread Emily Deng
Set the num_types equal to the enabled num_crtc. Signed-off-by: Emily Deng --- 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 b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 5c11144da051

[PATCH 3/6] drm/amdgpu: Restore msix after FLR

2021-03-29 Thread Emily Deng
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 1/6] drm/amdgpu: Disable vcn decode ring for sriov navi12

2021-03-29 Thread Emily Deng
Since vcn decoding ring is not required, so just disable it. Signed-off-by: Frank.Min Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 +++- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 29 - 2 files changed, 17 insertions(+), 16 deletions

[PATCH] drm/amdgpu: Fix the page fault issue in amdgpu_irq_fini

2021-03-18 Thread Emily Deng
For some source, it will be shared by some client ID and source ID. To fix the page fault issue, set all those to null. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: Fix some unload driver issues

2021-03-05 Thread Emily Deng
If have memory leak, maybe it will have issue in ttm_bo_force_list_clean-> ttm_mem_evict_first. Set adev->gart.ptr to null to avoid to call amdgpu_gmc_set_pte_pde to cause ptr issue pointer when calling amdgpu_gart_unbind in amdgpu_bo_fini which is after gart_fini. Signed-off-by: Emil

[PATCH] drm/amdgpu: Fix some unload driver issues

2021-03-04 Thread Emily Deng
. Set adev->gart.ptr to null to fix null pointer when calling amdgpu_gart_unbind in amdgpu_bo_fini which is after gart_fini. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- drivers/gpu/drm/amd/amd

[PATCH v2] drm/amdgpu:Limit the resolution for virtual_display

2021-01-06 Thread Emily Deng
From: "Emily.Deng" Limit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384. v2: Refine the code Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(

[PATCH v2] drm/amdgpu: Decrease compute timeout to 10 s for sriov multiple VF

2021-01-06 Thread Emily Deng
From: "Emily.Deng" For multiple VF, after engine hang,as host driver will first encounter FLR, so has no meanning to set compute to 60s. v2: Refine the patch and comment Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - 1 file changed, 4 insertions(+), 1 d

[PATCH] drm/amdgpu: Decrease compute timeout to 10 s for sriov multiple VF

2021-01-06 Thread Emily Deng
From: "Emily.Deng" For multiple VF, after engine hang,as host driver will first encounter FLR, so has no meanning to set compute to 60s. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH] drm/amdgpu: For sriov multiple VF, set compute timeout to 10s

2021-01-06 Thread Emily . Deng
For multiple VF, after engine hang,as host driver will first encounter FLR, so has no meanning to set compute to 60s. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display

2021-01-05 Thread Emily . Deng
Limit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/

[PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display

2021-01-05 Thread Emily . Deng
Limit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/

[PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10

2021-01-05 Thread Emily . Deng
According to hw, after navi10,it runs in dfll mode, and should read sclk from AverageGfxclkFrequency. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c

[PATCH 1/3] drm/amdgpu: Add new mode 2560x1440

2021-01-05 Thread Emily . Deng
Add one more 2k resolution which appears frequently in market. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c inde

[PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display

2021-01-05 Thread Emily . Deng
Limit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384. Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/

[PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10

2021-01-05 Thread Emily . Deng
Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 51e83123f72a..7ebf9588983f 100644 --- a/driver

[PATCH 1/3] drm/amdgpu: Add new mode 2560x1440

2021-01-05 Thread Emily . Deng
Signed-off-by: Emily.Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index bc3dcc262fc2..2b16c8faca34 100644 --- a/drivers/gpu/drm/amd/am

[PATCH] drm/amdgpu: Remove warning for virtual_display

2020-10-08 Thread Emily . Deng
Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null. Signed-off-by: Emily.Deng Change-Id: I755150a32478d8c128eed7ed98a71175d2b3aefc --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH] drm/amdgpu: Remove warning for virtual_display

2020-10-07 Thread Emily . Deng
Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null. Signed-off-by: Emily.Deng Change-Id: I755150a32478d8c128eed7ed98a71175d2b3aefc --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH] drm/amdgpu: Remove some useless code

2020-09-23 Thread Emily . Deng
Signed-off-by: Emily.Deng Change-Id: I1a14dcc6f2d5395b2c385f4f290494ce7de108b4 --- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c| 5 - drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 5 - drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 13 - .../gpu/drm/am

[PATCH] drm/amdgpu/sriov: Enable the mcbp parameter for sriov

2020-09-21 Thread Emily . Deng
For debug convenient, reuse mcbp parameter for sriov mcbp Signed-off-by: Emily.Deng Change-Id: If1222b2c050376feefb8fed4be58b4b87d36bd77 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c

[PATCH] drm/amdgpu: Fix dead lock issue for vblank

2020-09-18 Thread Emily . Deng
Always start vblank timer, but only calls vblank function when vblank is enabled. This is used to fix the dead lock issue. When drm_crtc_vblank_off want to disable vblank, it first get event_lock, and then call hrtimer_cancel, but hrtimer_cancel want to wait timer handler function finished. Timer

[PATCH 2/2] drm/amdgpu: Fix dead lock issue for vblank

2020-09-17 Thread Emily . Deng
Always start vblank timer, but only calls vblank function when vblank is enabled. This is used to fix the dead lock issue. When drm_crtc_vblank_off want to disable vblank, it first get event_lock, and then call hrtimer_cancel, but hrtimer_cancel want to wait timer handler function finished. Timer

[PATCH 1/2] drm/amdgpu/sriov: Add one parameter for mcbp debug

2020-09-17 Thread Emily . Deng
For debug convenient, add sriov_mcbp parameter. Signed-off-by: Emily.Deng Change-Id: I84019eb4344e00d85b2ecc853145aabb312412fe --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- drivers/gpu/dr

[PATCH 1/2] drm/amdgpu: Fix repeatly flr issue

2020-08-18 Thread Emily . Deng
From: jqdeng Only for no job running test case need to do recover in flr notification. For having job in mirror list, then let guest driver to hit job timeout, and then do recover. Signed-off-by: jqdeng Change-Id: Ic6234fce46fa1655ba81c4149235eeac75e75868 --- drivers/gpu/drm/amd/amdgpu/amdgpu.

[PATCH 2/2] drm/amdgpu: Limit the error info print rate

2020-08-18 Thread Emily . Deng
From: jqdeng Use function printk_ratelimit to limit the print rate. Signed-off-by: jqdeng Change-Id: Ief05debe30d975cbcf88e473c9f486d70b5a202c --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 1/2] drm/amdgpu: Fix repeatly flr issue

2020-08-18 Thread Emily . Deng
From: jqdeng Only for no job running test case need to do recover in flr notification. For having job in mirror list, then let guest driver to hit job timeout, and then do recover. Signed-off-by: jqdeng Change-Id: Ic6234fce46fa1655ba81c4149235eeac75e75868 --- drivers/gpu/drm/amd/amdgpu/amdgpu.

[PATCH 1/2] drm/amdgpu: Fix repeatly flr issue

2020-08-18 Thread Emily . Deng
From: jqdeng Only for no job running test case need to do recover in flr notification. For having job in mirror list, then let guest driver to hit job timeout, and then do recover. Signed-off-by: jqdeng Change-Id: Ic6234fce46fa1655ba81c4149235eeac75e75868 --- drivers/gpu/drm/amd/amdgpu/amdgpu.

  1   2   3   >