[PATCH] drm/amdgpu: add unmap latency when gfx11 set kiq resources

2023-10-26 Thread Tong Liu01
when do kiq set resources. The unmap latency is set to be 1 second that is synchronized with Windows driver. Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: fix incorrect pcie_gen_mask in passthrough case

2023-05-17 Thread Tong Liu01
if it is passthrough case when set pcie_gen_mask Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a9d9bbe8586b

[PATCH] drm/amdgpu: fix incorrect pcie_gen_mask in passthrough case

2023-05-16 Thread Tong Liu01
if it is passthrough case when set pcie_gen_mask Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a9d9bbe8586b

[PATCH] drm/amdgpu: refine get gpu clock counter method

2023-04-06 Thread Tong Liu01
sriov. Refine get gpu clock counter method to make the result more precise. Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd

[PATCH 3/3] drm/amdgpu: enable sysfs node vclk1 and dclk1 for NV3X

2023-03-29 Thread Tong Liu01
Enable node pp_dpm_vclk1 and pp_dpm_dclk1 for gc11.0.2 and gc11.0.3 Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index

[PATCH 2/3] drm/amdgpu: enable sysfs node vclk1 and dclk1 for NV2X

2023-03-29 Thread Tong Liu01
Enable vclk1 and dclk1 node for gc10.3.0 and gc10.3.1 Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index ced295eeaf97..d8b9c6136fc0 100644

[PATCH 1/3] drm/amdgpu: add sysfs node vclk1 and dclk1

2023-03-29 Thread Tong Liu01
User can check pp_dpm_vclk1 and pp_dpm_dclk1 for DPM frequency of vcn and dcn Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 ++ drivers/gpu/drm/amd/pm/amdgpu_pm.c| 32 +++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 + 3

[PATCH 3/3] drm/amdgpu: enable sysfs node vclk1 and dclk1 for NV3X

2023-03-29 Thread Tong Liu01
Enable node pp_dpm_vclk1 and pp_dpm_dclk1 for gc11.0.2 and gc11.0.3 Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index

[PATCH 2/3] drm/amdgpu: enable sysfs node vclk1 and dclk1 for NV2X

2023-03-29 Thread Tong Liu01
Enable vclk1 and dclk1 node for gc10.3.0 and gc10.3.1 Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 9991447b5f14..ea8e5e3829dd 100644

[PATCH 1/3] drm/amdgpu: add sysfs node vclk1 and dclk1

2023-03-29 Thread Tong Liu01
User can check pp_dpm_vclk1 and pp_dpm_dclk1 for DPM frequency of vcn and dcn Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 ++ drivers/gpu/drm/amd/pm/amdgpu_pm.c| 32 +++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 + 3

[PATCH] drm/amdgpu: enable sysfs node pp_dpm_vclk1 for some asics

2023-03-28 Thread Tong Liu01
Add sysfs node pp_dpm_vclk1 for gc11.0.3 Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/include/kgd_pp_interface.h| 1 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 22 +++ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 3 files changed, 27 insertions(+) diff

[PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded

2023-03-21 Thread Tong Liu01
[why] For Navi12 and CHIP_SIENNA_CICHLID SRIOV, TMR is not loaded. Should also skip tmr unload Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers

[PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded

2023-03-21 Thread Tong Liu01
[why] For Navi12 and CHIP_SIENNA_CICHLID SRIOV, TMR is not loaded. Should also skip tmr unload Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: add mes resume when do gfx post soft reset

2023-03-15 Thread Tong Liu01
[why] when gfx do soft reset, mes will also do reset, if mes is not resumed when do recover from soft reset, mes is unable to respond in later sequence [how] resume mes when do gfx post soft reset Signed-off-by: Tong Liu01 --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 9 + 1 file

[PATCH] drm/amdgpu: add drv_vram_usage_va for virt data exchange

2022-11-21 Thread Tong Liu01
Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 16 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 54 --- 4 files changed, 50

[PATCH] drm/amdgpu: add drv_vram_usage_va for virt data exchange

2022-11-17 Thread Tong Liu01
Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 16 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 59 +-- 4 files changed, 54 insertions

[PATCH] drm/amdgpu: add vram reservation logic based on vram_usagebyfirmware_v2_2

2022-11-08 Thread Tong Liu01
Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 106 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 50

[PATCH] drm/amdgpu: add vram reservation logic based on vram_usagebyfirmware_v2_2

2022-11-07 Thread Tong Liu01
Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 106 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 50

[PATCH] drm/amdgpu: add vram reservation logic based on vram_usagebyfirmware_v2_2

2022-11-06 Thread Tong Liu01
Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 106 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 51

[PATCH] drm/amdgpu: add vram reservation logic based on vram_usagebyfirmware_v2_2

2022-11-04 Thread Tong Liu01
Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 106 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 52

[PATCH] drm/amdgpu: add vram reservation logic based on vram_usagebyfirmware_v2_2

2022-11-04 Thread Tong Liu01
Move TMR region from top of FB to 2MB for FFBM, so we need to reserve TMR region firstly to make sure TMR can be allocated at 2MB Signed-off-by: Tong Liu01 --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 84 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 52