* [PATCH AUTOSEL 6.4 07/11] drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11
[not found] <20230822113553.3551206-1-sashal@kernel.org>
@ 2023-08-22 11:35 ` Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 08/11] drm/amdgpu: Match against exact bootloader status Sasha Levin
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-08-22 11:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Tim Huang, lijo.lazar, kenneth.feng, dri-devel,
Xinhui.Pan, amd-gfx, Mario Limonciello, daniel, trix,
Alex Deucher, Kun.Liu2, evan.quan, airlied, christian.koenig,
Hawking.Zhang
From: Tim Huang <Tim.Huang@amd.com>
[ Upstream commit 730d44e1fa306a20746ad4a85da550662aed9daa ]
For SMU v13.0.4/11, driver does not need to stop RLC for S0i3,
the firmwares will handle that properly.
Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index ea03e8d9a3f6c..818379276a582 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1573,9 +1573,9 @@ static int smu_disable_dpms(struct smu_context *smu)
/*
* For SMU 13.0.4/11, PMFW will handle the features disablement properly
- * for gpu reset case. Driver involvement is unnecessary.
+ * for gpu reset and S0i3 cases. Driver involvement is unnecessary.
*/
- if (amdgpu_in_reset(adev)) {
+ if (amdgpu_in_reset(adev) || adev->in_s0ix) {
switch (adev->ip_versions[MP1_HWIP][0]) {
case IP_VERSION(13, 0, 4):
case IP_VERSION(13, 0, 11):
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 6.4 08/11] drm/amdgpu: Match against exact bootloader status
[not found] <20230822113553.3551206-1-sashal@kernel.org>
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 07/11] drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11 Sasha Levin
@ 2023-08-22 11:35 ` Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default Sasha Levin
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-08-22 11:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Xinhui.Pan, john.clements, dri-devel, Lijo Lazar,
amd-gfx, mario.limonciello, daniel, Alex Deucher, Likun.Gao,
candice.li, airlied, christian.koenig, Hawking.Zhang
From: Lijo Lazar <lijo.lazar@amd.com>
[ Upstream commit d3de41ee5febe5c2d9989fe9810bce2bb54a3a8e ]
On PSP v13.x ASICs, boot loader will set only the MSB to 1 and clear the
least significant bits for any command submission. Hence match against
the exact register value, otherwise a register value of all 0xFFs also
could falsely indicate that boot loader is ready. Also, from PSP v13.0.6
and newer, bits[7:0] will be used to indicate command error status.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
index caee76ab71105..92f2ee412908d 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
@@ -136,14 +136,15 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)
int ret;
int retry_loop;
+ /* Wait for bootloader to signify that it is ready having bit 31 of
+ * C2PMSG_35 set to 1. All other bits are expected to be cleared.
+ * If there is an error in processing command, bits[7:0] will be set.
+ * This is applicable for PSP v13.0.6 and newer.
+ */
for (retry_loop = 0; retry_loop < 10; retry_loop++) {
- /* Wait for bootloader to signify that is
- ready having bit 31 of C2PMSG_35 set to 1 */
- ret = psp_wait_for(psp,
- SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_35),
- 0x80000000,
- 0x80000000,
- false);
+ ret = psp_wait_for(
+ psp, SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_35),
+ 0x80000000, 0xffffffff, false);
if (ret == 0)
return 0;
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default
[not found] <20230822113553.3551206-1-sashal@kernel.org>
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 07/11] drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11 Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 08/11] drm/amdgpu: Match against exact bootloader status Sasha Levin
@ 2023-08-22 11:35 ` Sasha Levin
2023-08-22 15:41 ` Deucher, Alexander
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven Sasha Levin
4 siblings, 1 reply; 10+ messages in thread
From: Sasha Levin @ 2023-08-22 11:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mike Lothian, Felix Kuehling, Xinhui.Pan, amd-gfx,
dri-devel, daniel, Alex Deucher, airlied, Christian König
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit a6dea2d64ff92851e68cd4e20a35f6534286e016 ]
We are dropping the IOMMUv2 path, so no need to enable this.
It's often buggy on consumer platforms anyway.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
index 475e470273540..ee0cc35d68a84 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -1543,11 +1543,7 @@ static bool kfd_ignore_crat(void)
if (ignore_crat)
return true;
-#ifndef KFD_SUPPORT_IOMMU_V2
ret = true;
-#else
- ret = false;
-#endif
return ret;
}
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ
[not found] <20230822113553.3551206-1-sashal@kernel.org>
` (2 preceding siblings ...)
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default Sasha Levin
@ 2023-08-22 11:35 ` Sasha Levin
2023-08-22 15:39 ` Deucher, Alexander
2023-08-24 14:24 ` Alex Deucher
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven Sasha Levin
4 siblings, 2 replies; 10+ messages in thread
From: Sasha Levin @ 2023-08-22 11:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mike Lothian, Felix Kuehling, Xinhui.Pan, amd-gfx,
dri-devel, daniel, Alex Deucher, airlied, Christian König
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit 616f92d188ee7142a95a52068efdbea82645f859 ]
Use the dGPU path instead. There were a lot of platform
issues with IOMMU in general on these chips due to windows
not enabling IOMMU at the time. The dGPU path has been
used for a long time with newer APUs and works fine. This
also paves the way to simplify the driver significantly.
v2: use the dGPU queue manager functions
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ------
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 8 +-------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 00f528eb98126..9c8197573dee7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -224,10 +224,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd,
asic_type != CHIP_TONGA)
kfd->device_info.supports_cwsr = true;
- if (asic_type == CHIP_KAVERI ||
- asic_type == CHIP_CARRIZO)
- kfd->device_info.needs_iommu_device = true;
-
if (asic_type != CHIP_HAWAII && !vf)
kfd->device_info.needs_pci_atomics = true;
}
@@ -240,7 +236,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
uint32_t gfx_target_version = 0;
switch (adev->asic_type) {
-#ifdef KFD_SUPPORT_IOMMU_V2
#ifdef CONFIG_DRM_AMDGPU_CIK
case CHIP_KAVERI:
gfx_target_version = 70000;
@@ -253,7 +248,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
if (!vf)
f2g = &gfx_v8_kfd2kgd;
break;
-#endif
#ifdef CONFIG_DRM_AMDGPU_CIK
case CHIP_HAWAII:
gfx_target_version = 70001;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 7a95698d83f73..c73417e79745e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -2335,18 +2335,12 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)
}
switch (dev->adev->asic_type) {
- case CHIP_CARRIZO:
- device_queue_manager_init_vi(&dqm->asic_ops);
- break;
-
case CHIP_KAVERI:
- device_queue_manager_init_cik(&dqm->asic_ops);
- break;
-
case CHIP_HAWAII:
device_queue_manager_init_cik_hawaii(&dqm->asic_ops);
break;
+ case CHIP_CARRIZO:
case CHIP_TONGA:
case CHIP_FIJI:
case CHIP_POLARIS10:
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven
[not found] <20230822113553.3551206-1-sashal@kernel.org>
` (3 preceding siblings ...)
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ Sasha Levin
@ 2023-08-22 11:35 ` Sasha Levin
2023-08-22 15:39 ` Deucher, Alexander
4 siblings, 1 reply; 10+ messages in thread
From: Sasha Levin @ 2023-08-22 11:35 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Mike Lothian, Felix Kuehling, Xinhui.Pan, amd-gfx,
dri-devel, daniel, Alex Deucher, airlied, Christian König
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit 091ae5473f96ced844af6ba39b94757359b12348 ]
Use the dGPU path instead. There were a lot of platform
issues with IOMMU in general on these chips due to windows
not enabling IOMMU at the time. The dGPU path has been
used for a long time with newer APUs and works fine. This
also paves the way to simplify the driver significantly.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 9c8197573dee7..224e057d2dbbf 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -185,11 +185,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd,
kfd_device_info_set_event_interrupt_class(kfd);
- /* Raven */
- if (gc_version == IP_VERSION(9, 1, 0) ||
- gc_version == IP_VERSION(9, 2, 2))
- kfd->device_info.needs_iommu_device = true;
-
if (gc_version < IP_VERSION(11, 0, 0)) {
/* Navi2x+, Navi1x+ */
if (gc_version == IP_VERSION(10, 3, 6))
@@ -283,7 +278,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
gfx_target_version = 90000;
f2g = &gfx_v9_kfd2kgd;
break;
-#ifdef KFD_SUPPORT_IOMMU_V2
/* Raven */
case IP_VERSION(9, 1, 0):
case IP_VERSION(9, 2, 2):
@@ -291,7 +285,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
if (!vf)
f2g = &gfx_v9_kfd2kgd;
break;
-#endif
/* Vega12 */
case IP_VERSION(9, 2, 1):
gfx_target_version = 90004;
--
2.40.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ Sasha Levin
@ 2023-08-22 15:39 ` Deucher, Alexander
2023-08-24 14:24 ` Alex Deucher
1 sibling, 0 replies; 10+ messages in thread
From: Deucher, Alexander @ 2023-08-22 15:39 UTC (permalink / raw)
To: Sasha Levin, linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Lothian, Kuehling, Felix, Pan, Xinhui,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
daniel@ffwll.ch, airlied@gmail.com, Koenig, Christian
[Public]
> -----Original Message-----
> From: Sasha Levin <sashal@kernel.org>
> Sent: Tuesday, August 22, 2023 7:36 AM
> To: linux-kernel@vger.kernel.org; stable@vger.kernel.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Kuehling, Felix
> <Felix.Kuehling@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
> Mike Lothian <mike@fireburn.co.uk>; Sasha Levin <sashal@kernel.org>; Pan,
> Xinhui <Xinhui.Pan@amd.com>; airlied@gmail.com; daniel@ffwll.ch; amd-
> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Subject: [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2
> support for KV/CZ
>
> From: Alex Deucher <alexander.deucher@amd.com>
>
> [ Upstream commit 616f92d188ee7142a95a52068efdbea82645f859 ]
>
> Use the dGPU path instead. There were a lot of platform issues with IOMMU
> in general on these chips due to windows not enabling IOMMU at the time.
> The dGPU path has been used for a long time with newer APUs and works
> fine. This also paves the way to simplify the driver significantly.
>
> v2: use the dGPU queue manager functions
This is not needed for stable.
Alex
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ------
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 8 +-------
> 2 files changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 00f528eb98126..9c8197573dee7 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -224,10 +224,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd,
> asic_type != CHIP_TONGA)
> kfd->device_info.supports_cwsr = true;
>
> - if (asic_type == CHIP_KAVERI ||
> - asic_type == CHIP_CARRIZO)
> - kfd->device_info.needs_iommu_device = true;
> -
> if (asic_type != CHIP_HAWAII && !vf)
> kfd->device_info.needs_pci_atomics = true;
> }
> @@ -240,7 +236,6 @@ struct kfd_dev *kgd2kfd_probe(struct
> amdgpu_device *adev, bool vf)
> uint32_t gfx_target_version = 0;
>
> switch (adev->asic_type) {
> -#ifdef KFD_SUPPORT_IOMMU_V2
> #ifdef CONFIG_DRM_AMDGPU_CIK
> case CHIP_KAVERI:
> gfx_target_version = 70000;
> @@ -253,7 +248,6 @@ struct kfd_dev *kgd2kfd_probe(struct
> amdgpu_device *adev, bool vf)
> if (!vf)
> f2g = &gfx_v8_kfd2kgd;
> break;
> -#endif
> #ifdef CONFIG_DRM_AMDGPU_CIK
> case CHIP_HAWAII:
> gfx_target_version = 70001;
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index 7a95698d83f73..c73417e79745e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -2335,18 +2335,12 @@ struct device_queue_manager
> *device_queue_manager_init(struct kfd_dev *dev)
> }
>
> switch (dev->adev->asic_type) {
> - case CHIP_CARRIZO:
> - device_queue_manager_init_vi(&dqm->asic_ops);
> - break;
> -
> case CHIP_KAVERI:
> - device_queue_manager_init_cik(&dqm->asic_ops);
> - break;
> -
> case CHIP_HAWAII:
> device_queue_manager_init_cik_hawaii(&dqm->asic_ops);
> break;
>
> + case CHIP_CARRIZO:
> case CHIP_TONGA:
> case CHIP_FIJI:
> case CHIP_POLARIS10:
> --
> 2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven Sasha Levin
@ 2023-08-22 15:39 ` Deucher, Alexander
0 siblings, 0 replies; 10+ messages in thread
From: Deucher, Alexander @ 2023-08-22 15:39 UTC (permalink / raw)
To: Sasha Levin, linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Lothian, Kuehling, Felix, Pan, Xinhui,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
daniel@ffwll.ch, airlied@gmail.com, Koenig, Christian
[Public]
> -----Original Message-----
> From: Sasha Levin <sashal@kernel.org>
> Sent: Tuesday, August 22, 2023 7:36 AM
> To: linux-kernel@vger.kernel.org; stable@vger.kernel.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Kuehling, Felix
> <Felix.Kuehling@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
> Mike Lothian <mike@fireburn.co.uk>; Sasha Levin <sashal@kernel.org>; Pan,
> Xinhui <Xinhui.Pan@amd.com>; airlied@gmail.com; daniel@ffwll.ch; amd-
> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Subject: [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2
> support for Raven
>
> From: Alex Deucher <alexander.deucher@amd.com>
>
> [ Upstream commit 091ae5473f96ced844af6ba39b94757359b12348 ]
>
> Use the dGPU path instead. There were a lot of platform issues with IOMMU
> in general on these chips due to windows not enabling IOMMU at the time.
> The dGPU path has been used for a long time with newer APUs and works
> fine. This also paves the way to simplify the driver significantly.
This is not needed for stable.
Alex
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 9c8197573dee7..224e057d2dbbf 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -185,11 +185,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd,
>
> kfd_device_info_set_event_interrupt_class(kfd);
>
> - /* Raven */
> - if (gc_version == IP_VERSION(9, 1, 0) ||
> - gc_version == IP_VERSION(9, 2, 2))
> - kfd->device_info.needs_iommu_device = true;
> -
> if (gc_version < IP_VERSION(11, 0, 0)) {
> /* Navi2x+, Navi1x+ */
> if (gc_version == IP_VERSION(10, 3, 6)) @@ -283,7
> +278,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev,
> bool vf)
> gfx_target_version = 90000;
> f2g = &gfx_v9_kfd2kgd;
> break;
> -#ifdef KFD_SUPPORT_IOMMU_V2
> /* Raven */
> case IP_VERSION(9, 1, 0):
> case IP_VERSION(9, 2, 2):
> @@ -291,7 +285,6 @@ struct kfd_dev *kgd2kfd_probe(struct
> amdgpu_device *adev, bool vf)
> if (!vf)
> f2g = &gfx_v9_kfd2kgd;
> break;
> -#endif
> /* Vega12 */
> case IP_VERSION(9, 2, 1):
> gfx_target_version = 90004;
> --
> 2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default Sasha Levin
@ 2023-08-22 15:41 ` Deucher, Alexander
2023-08-23 18:03 ` Sasha Levin
0 siblings, 1 reply; 10+ messages in thread
From: Deucher, Alexander @ 2023-08-22 15:41 UTC (permalink / raw)
To: Sasha Levin, linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Lothian, Kuehling, Felix, Pan, Xinhui,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
daniel@ffwll.ch, airlied@gmail.com, Koenig, Christian
[Public]
> -----Original Message-----
> From: Sasha Levin <sashal@kernel.org>
> Sent: Tuesday, August 22, 2023 7:36 AM
> To: linux-kernel@vger.kernel.org; stable@vger.kernel.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Kuehling, Felix
> <Felix.Kuehling@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
> Mike Lothian <mike@fireburn.co.uk>; Sasha Levin <sashal@kernel.org>; Pan,
> Xinhui <Xinhui.Pan@amd.com>; airlied@gmail.com; daniel@ffwll.ch; amd-
> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Subject: [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default
>
> From: Alex Deucher <alexander.deucher@amd.com>
>
> [ Upstream commit a6dea2d64ff92851e68cd4e20a35f6534286e016 ]
>
> We are dropping the IOMMUv2 path, so no need to enable this.
> It's often buggy on consumer platforms anyway.
>
This is not needed for stable.
Alex
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> index 475e470273540..ee0cc35d68a84 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> @@ -1543,11 +1543,7 @@ static bool kfd_ignore_crat(void)
> if (ignore_crat)
> return true;
>
> -#ifndef KFD_SUPPORT_IOMMU_V2
> ret = true;
> -#else
> - ret = false;
> -#endif
>
> return ret;
> }
> --
> 2.40.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default
2023-08-22 15:41 ` Deucher, Alexander
@ 2023-08-23 18:03 ` Sasha Levin
0 siblings, 0 replies; 10+ messages in thread
From: Sasha Levin @ 2023-08-23 18:03 UTC (permalink / raw)
To: Deucher, Alexander
Cc: dri-devel@lists.freedesktop.org, Mike Lothian, Kuehling, Felix,
Pan, Xinhui, linux-kernel@vger.kernel.org, stable@vger.kernel.org,
amd-gfx@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com,
Koenig, Christian
On Tue, Aug 22, 2023 at 03:41:17PM +0000, Deucher, Alexander wrote:
>[Public]
>
>> -----Original Message-----
>> From: Sasha Levin <sashal@kernel.org>
>> Sent: Tuesday, August 22, 2023 7:36 AM
>> To: linux-kernel@vger.kernel.org; stable@vger.kernel.org
>> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Kuehling, Felix
>> <Felix.Kuehling@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
>> Mike Lothian <mike@fireburn.co.uk>; Sasha Levin <sashal@kernel.org>; Pan,
>> Xinhui <Xinhui.Pan@amd.com>; airlied@gmail.com; daniel@ffwll.ch; amd-
>> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
>> Subject: [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default
>>
>> From: Alex Deucher <alexander.deucher@amd.com>
>>
>> [ Upstream commit a6dea2d64ff92851e68cd4e20a35f6534286e016 ]
>>
>> We are dropping the IOMMUv2 path, so no need to enable this.
>> It's often buggy on consumer platforms anyway.
>>
>
>This is not needed for stable.
I'll drop all the patches you've pointed out, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ Sasha Levin
2023-08-22 15:39 ` Deucher, Alexander
@ 2023-08-24 14:24 ` Alex Deucher
1 sibling, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2023-08-24 14:24 UTC (permalink / raw)
To: Sasha Levin
Cc: dri-devel, Mike Lothian, Felix Kuehling, Xinhui.Pan, linux-kernel,
amd-gfx, stable, daniel, Alex Deucher, airlied,
Christian König
On Tue, Aug 22, 2023 at 7:36 AM Sasha Levin <sashal@kernel.org> wrote:
>
> From: Alex Deucher <alexander.deucher@amd.com>
>
> [ Upstream commit 616f92d188ee7142a95a52068efdbea82645f859 ]
>
> Use the dGPU path instead. There were a lot of platform
> issues with IOMMU in general on these chips due to windows
> not enabling IOMMU at the time. The dGPU path has been
> used for a long time with newer APUs and works fine. This
> also paves the way to simplify the driver significantly.
>
> v2: use the dGPU queue manager functions
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Tested-by: Mike Lothian <mike@fireburn.co.uk>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
This is not necessary for stable.
Alex
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ------
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 8 +-------
> 2 files changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 00f528eb98126..9c8197573dee7 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -224,10 +224,6 @@ static void kfd_device_info_init(struct kfd_dev *kfd,
> asic_type != CHIP_TONGA)
> kfd->device_info.supports_cwsr = true;
>
> - if (asic_type == CHIP_KAVERI ||
> - asic_type == CHIP_CARRIZO)
> - kfd->device_info.needs_iommu_device = true;
> -
> if (asic_type != CHIP_HAWAII && !vf)
> kfd->device_info.needs_pci_atomics = true;
> }
> @@ -240,7 +236,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
> uint32_t gfx_target_version = 0;
>
> switch (adev->asic_type) {
> -#ifdef KFD_SUPPORT_IOMMU_V2
> #ifdef CONFIG_DRM_AMDGPU_CIK
> case CHIP_KAVERI:
> gfx_target_version = 70000;
> @@ -253,7 +248,6 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
> if (!vf)
> f2g = &gfx_v8_kfd2kgd;
> break;
> -#endif
> #ifdef CONFIG_DRM_AMDGPU_CIK
> case CHIP_HAWAII:
> gfx_target_version = 70001;
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index 7a95698d83f73..c73417e79745e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -2335,18 +2335,12 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)
> }
>
> switch (dev->adev->asic_type) {
> - case CHIP_CARRIZO:
> - device_queue_manager_init_vi(&dqm->asic_ops);
> - break;
> -
> case CHIP_KAVERI:
> - device_queue_manager_init_cik(&dqm->asic_ops);
> - break;
> -
> case CHIP_HAWAII:
> device_queue_manager_init_cik_hawaii(&dqm->asic_ops);
> break;
>
> + case CHIP_CARRIZO:
> case CHIP_TONGA:
> case CHIP_FIJI:
> case CHIP_POLARIS10:
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-08-24 14:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230822113553.3551206-1-sashal@kernel.org>
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 07/11] drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11 Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 08/11] drm/amdgpu: Match against exact bootloader status Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 09/11] drm/amdkfd: ignore crat by default Sasha Levin
2023-08-22 15:41 ` Deucher, Alexander
2023-08-23 18:03 ` Sasha Levin
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 10/11] drm/amdkfd: disable IOMMUv2 support for KV/CZ Sasha Levin
2023-08-22 15:39 ` Deucher, Alexander
2023-08-24 14:24 ` Alex Deucher
2023-08-22 11:35 ` [PATCH AUTOSEL 6.4 11/11] drm/amdkfd: disable IOMMUv2 support for Raven Sasha Levin
2023-08-22 15:39 ` Deucher, Alexander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox