[PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread Emily Deng
As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 38 ---

[PATCH] drm/amdgpu: Correct the ndw of bo update mapping.

2018-06-07 Thread Emily Deng
For buffer object that has shadow buffer, need twice commands. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

[PATCH] drm/amdgpu: Correct the IB size of bo update mapping.

2017-12-27 Thread Emily Deng
The amdgpu_vm_frag_ptes will call amdgpu_vm_update_ptes, and for buffer object that has shadow buffer, need twice commands. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: Temparary disable the sdma use pollmem feature for sriov.

2018-01-19 Thread Emily Deng
It still has some serious issues(guest driver reload fail, etc), when use pollmem feature for sdma3. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm

[PATCH] drm/amdgpu: Temparary disable the sdma use pollmem feature for sriov.

2018-01-19 Thread Emily Deng
It still has some serious issues(guest driver reload fail, etc), when use pollmem feature for sdma3. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm

[PATCH] drm/amdgpu: Temparary disable the sdma use pollmem feature for sriov.

2018-01-19 Thread Emily Deng
It still has some serious issues(guest driver reload fail, etc), when use pollmem feature for sdma3. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm

[PATCH] drm/amdgpu: Temparary disable the sdma use pollmem feature for sriov.

2018-01-19 Thread Emily Deng
It still has some serious issues(guest driver reload fail, etc), when use pollmem feature for sdma3. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm

[PATCH 03/13] drm/amdgpu: Initialize dce_virtual_display_funcs.

2016-08-03 Thread Emily Deng
For virtual display feature, initialize dce_virtual_display_funcs, which will be used in function dce_virtual_set_display_funcs. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 222 +-- 1 file changed, 208 insertions(+), 14 deletions(-) diff

[PATCH 01/13] drm/amdgpu: Add virtual connector and encoder macros.

2016-08-03 Thread Emily Deng
For virtual display feature, add virtual connector and encoder macros. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/ObjectID.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/ObjectID.h b/drivers/gpu/drm/amd/amdgpu/ObjectID.h index 0619269

[PATCH 04/13] drm/amdgpu: Initialize crtc, pageflip irq funcs

2016-08-03 Thread Emily Deng
r. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 130 --- 1 file changed, 118 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 2da8847..704806f 100644 --- a/d

[PATCH 02/13] drm/amdgpu: Initialize dce_virtual_ip_funcs

2016-08-03 Thread Emily Deng
For virtual display feature, first need to initialize dce_virtual_ip_funcs, which will be used when set ip blocks. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c

[PATCH 11/13] drm/amdgpu: Define vitual display ip blocks.

2016-08-03 Thread Emily Deng
For virtual display feature, define virtual display ip blocks, and set dce_virtual_ip_funcs to DCE block. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/cik.c | 341 +++ drivers/gpu/drm/amd/amdgpu/vi.c | 282 2

[PATCH 08/13] drm/amdgpu: Use software timer to generate vsync interrupt.

2016-08-03 Thread Emily Deng
For virtual display feature, use the software timer to simulate the vsync interrupt. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 33 ++-- drivers/gpu/drm/amd/amdgpu/dce_virtual.h | 2

[PATCH 07/13] drm/amdgpu: Disable VGA render and crtc when init GMC.

2016-08-03 Thread Emily Deng
For virtual display feature, when the GPU has DCE engine, need to disable the VGA render and CRTC, or it will hang when initialize GMC. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 27 + drivers/gpu/drm

[PATCH 05/13] drm/amdgpu: Initialize dce_virtual_crtc_helper_funcs

2016-08-03 Thread Emily Deng
For virtual display feature, initialize dce_virtual_crtc_helper_funcs. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 137 +-- 1 file changed, 128 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b

[PATCH 10/13] drm/amdgpu: Add DRM_MODE_CONNECTOR_VIRTUAL connector in amdgpu_connector_add.

2016-08-03 Thread Emily Deng
For virtual display feature, add one connector type in amdgpu_connector_add. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 95 ++ 1 file changed, 95 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu

[PATCH 09/13] drm/amdgpu: Call pageflip irq funtion when receiced vsync interrupt.

2016-08-03 Thread Emily Deng
For virtual display feature, as there is no dce engine, so no pageflip irq generated. So directly call pageflip irq funtion when received vysn interrupt. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[PATCH 13/13] drm/amdgpu: Set ip_blocks according variable amdgpu_virtual_display.

2016-08-03 Thread Emily Deng
For virtual display feature, if user set the option "amdgpu.virtual_display=1" when load amdgpu.ko. Then need to set the ip_blocks with virtual display ip blocks. And when enable virtual display, the amdgpu_dal need to be set to zero. Signed-off-by: Emily Deng --- drivers/gpu/drm/

[PATCH 06/13] drm/amdgpu: Initialize dce_virtual_crtc_funcs.

2016-08-03 Thread Emily Deng
For virtual display feature, initialize dce_virtual_crtc_funcs. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm

[PATCH 12/13] drm/amdgpu: Define one variable for virtual display.

2016-08-03 Thread Emily Deng
For virtual display feature, define on variable in amdgpu.ko. When want to enable virtual display feature, need set the option "amdgpu.virtual_display=1". And then disable vga render and crtc if have DCE engine. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 00/13] drm/amdgpu: Add virtual display feature.

2016-08-04 Thread Emily Deng
example, SR-IOV virtualization enabled Video BIOS often disables display connector. Some S-series Pro-Graphics designed for headless computer also disable display capability in Video BIOS; 3)For whatever reason, end user wants to enable a virtual display (don’t need HW display capability). Emily

[PATCH 07/14] drm/amdgpu: To define whether the GPU has DCE engine.

2016-08-04 Thread Emily Deng
For virtual display feature, when the GPU has DCE engine, need to disable the VGA render and CRTC, or it will hang when initialize GMC. So first detect whether the GPU has DCE engine. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 27

[PATCH 08/14] drm/amdgpu: Disable VGA render and crtc when init GMC.

2016-08-04 Thread Emily Deng
For virtual display feature, when the GPU has DCE engine, need to disable the VGA render and CRTC, or it will hang when initialize GMC. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 42 - drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 1 + drivers

[PATCH 13/14] drm/amdgpu: Define one variable for virtual display.

2016-08-04 Thread Emily Deng
For virtual display feature, define on variable in amdgpu.ko. When want to enable virtual display feature, need set the option "amdgpu.virtual_display=1". And then disable vga render and crtc if have DCE engine. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 11/14] drm/amdgpu: Add DRM_MODE_CONNECTOR_VIRTUAL connector in amdgpu_connector_add.

2016-08-04 Thread Emily Deng
For virtual display feature, add one connector type in amdgpu_connector_add. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 91 ++ 1 file changed, 91 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu

[PATCH] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-08 Thread Emily Deng
For virtual display feature, as there may be mutiple GPUs, for user could choose whiche GPU need to enable this feature, change the type of virtual_display from int to char*. The variable will be set like this virtual_display="xx:xx.x;xx:xx.x;". Signed-off-by: Emily Deng --- drivers/g

[PATCH] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-08 Thread Emily Deng
For virtual display feature, as there may be mutiple GPUs, for user could choose whiche GPU need to enable this feature, change the type of virtual_display from int to char*. The variable will be set like this virtual_display="xx:xx.x;xx:xx.x;". Signed-off-by: Emily Deng --- drivers/g

[no subject]

2016-08-09 Thread Emily Deng
from int to char*. The variable will be set like this virtual_display=":xx:xx.x;:xx:xx.x;". Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 ++- drivers/gpu/drm/

[PATCH v2] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-09 Thread Emily Deng
:xx.x;:xx:xx.x;". Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 +++--- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- d

[PATCH v3] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-09 Thread Emily Deng
ned-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 +++--- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/a

[PATCH v4] drm/amdgpu: Change the virtual_display type from int to char*.

2016-08-09 Thread Emily Deng
this virtual_display=":xx:xx.x;:xx:xx.x;". Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 6 +++--- drivers/gpu/drm/

[PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-10 Thread Emily Deng
The adev->ddev->vblank[crtc].count couldn't be used here, so define another variable to compute the vblank count. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 + drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 -- 2 files changed, 5 inser

[PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 2ce5f90..85f14a6 100644 --- a/drivers/gpu/drm

[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 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] 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 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 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 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] 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] 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 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 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] 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] 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/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 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: 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 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] 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 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 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 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 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 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 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 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: 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] 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: 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/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/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/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/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 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 v4] drm/amdkfd: Move the process suspend and resume out of full access

2025-06-06 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. v3: Move suspend processes before hardware fini. Remove twice call for bare metal. v4: Refine code Signed-off-by: Emily

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

2025-06-04 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. v3: Move suspend processes before hardware fini. Remove twice call for bare metal. Signed-off-by: Emily Deng --- drivers

<    1   2   3