[PATCH] drm/amd/amdgpu: fix SDMA IRQ client ID <-> req mapping.

2024-07-08 Thread Gavin Wan
sdma has 2 instances in SRIOV cpx mode. Odd numbered VFs have sdma0/sdma1 instances. Even numbered vfs have sdma2/sdma3. For Even numbered vfs, the sdma2 & sdma3 (irq srouce id CLIENTID_SDMA2 and CLIENTID_SDMA3) shoud map to irq seq 0 & 1. Signed-off-by: Gavin Wan C

[PATCH] drm/amd/amdgpu: fix SDMA IRQ client ID <-> req mapping.

2024-07-08 Thread Gavin Wan
sdma has 2 instances in SRIOV cpx mode. Odd numbered VFs have sdma0/sdma1 instances. Even numbered vfs have sdma2/sdma3. For Even numbered vfs, the sdma2 & sdma3 (irq srouce id CLIENTID_SDMA2 and CLIENTID_SDMA2) shoud map to irq seq 0 & 1. Signed-off-by: Gavin Wan C

[PATCH] drm/amdgpu: Ignore stop rlc on SRIOV environment.

2022-11-09 Thread Gavin Wan
For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC. On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled. Signed-off-by: Gavin Wan Change-Id: Iac31332e2c958aae9506759de1d3a311b5c84942

[PATCH] drm/amdgpu: Check hive->reset_domain not NULL before releasing it.

2022-11-01 Thread Gavin Wan
et_domain before releasing. The hive->reset_domain need be checked not NULL before releasing. Fixed: d95e8e97e2d5 ("drm/amdgpu: refine create and release logic of hive info") Signed-off-by: Gavin Wan Change-Id: I17189e4d7357e399c6b70e43c24051356c025a3a --- drivers/gpu/drm/amd/amd

[PATCH] drm/amdgpu: Disable GPU reset on SRIOV before remove pci.

2022-10-25 Thread Gavin Wan
e removing PCI device. Signed-off-by: Gavin Wan Fixes: f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") Acked-by: Alex Deucher Change-Id: I1ff8dcbffd85d7f3d8267d660fd8292423d2f70f --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed

[PATCH] drm/amdgpu: Disable GPU reset on SRIOV before remove pci.

2022-10-24 Thread Gavin Wan
e is wrong while removing PCI device. Fixes: f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") Acked-by: Alex Deucher Signed-off-by: Gavin Wan Change-Id: I1ff8dcbffd85d7f3d8267d660fd8292423d2f70f --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++

[PATCH] drm/amdgpu: Disable GPU reset on SRIOV before remove pci.

2022-10-24 Thread Gavin Wan
is that the VF FLR was requested while unloading amdgpu driver, but the VF FLR of SRIOV sequence is wrong while removing PCI device. Signed-off-by: Gavin Wan Change-Id: I1ff8dcbffd85d7f3d8267d660fd8292423d2f70f --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 inser

[PATCH] drm/amdgpu: Disable GPU reset on SRIOV before remove pci.

2022-10-24 Thread Gavin Wan
e. Signed-off-by: Gavin Wan Change-Id: I1ff8dcbffd85d7f3d8267d660fd8292423d2f70f --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 16

[PATCH] drm/amdgpu: fix scratch register access method in SRIOV

2022-07-18 Thread Gavin Wan
The scratch register should be accessed through MMIO instead of RLCG in SRIOV, since it being used in RLCG register access function. Fixes: 0e1314781b9c("drm/amdgpu: nuke dynamic gfx scratch reg allocation") Signed-off-by: Gavin Wan Change-Id: I888cb3b96856583e764b35a098bcf8

[PATCH] drm/amd/amdgpu: Remove static from variable in RLCG Reg RW.

2022-04-13 Thread Gavin Wan
wrong GPU. [fix] Removed the static from the variables. The variables are in stack. Signed-off-by: Gavin Wan Change-Id: Iee78849291d4f7a9688ecc5165bec70ee85cdfbe --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH] drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV.

2020-05-22 Thread Gavin Wan
For SRIOV, since the CP_INT_CNTL_RING0 is programed on host side. The Guest should not program CP_INT_CNTL_RING0 again. Change-Id: Ic336fab3b23b8371c9e9e192182a3ba14a8db8e1 Signed-off-by: Gavin Wan --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++- 1 file changed, 6 insertions(+), 1

[PATCH] drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV.

2020-05-22 Thread Gavin Wan
For SRIOV, since the CP_INT_CNTL_RING0 is programed on host side. The Guest should not program CP_INT_CNTL_RING0 again. Change-Id: Ic336fab3b23b8371c9e9e192182a3ba14a8db8e1 Signed-off-by: Gavin Wan --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH] drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV.

2020-05-21 Thread Gavin Wan
For SRIOV, since the CGCG is set on host side. The Guest should not program CGCG again. The patch ignores setting CGCG for SRIOV. Change-Id: Ic336fab3b23b8371c9e9e192182a3ba14a8db8e1 Signed-off-by: Gavin Wan --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 15 +++ 1 file changed, 15

[PATCH] drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox.

2017-06-25 Thread Gavin Wan
before amdgpu initialization function (amdgpu_device_init) exit. Change-Id: Ib20156130553b3c47046e6ca967e2c6c02b8e9ff Signed-off-by: Gavin Wan --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

[PATCH] drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox.

2017-06-25 Thread Gavin Wan
before amdgpu initialization function (amdgpu_device_init) exit. Change-Id: Ib20156130553b3c47046e6ca967e2c6c02b8e9ff Signed-off-by: Gavin Wan --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c