* [PATCH AUTOSEL 5.15 5/6] drm/amdgpu: Match against exact bootloader status
[not found] <20230822113658.3551550-1-sashal@kernel.org>
@ 2023-08-22 11:36 ` Sasha Levin
2023-08-22 11:36 ` [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default Sasha Levin
1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2023-08-22 11:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Xinhui.Pan, john.clements, dri-devel, Lijo Lazar,
amd-gfx, mario.limonciello, Alex Deucher, Likun.Gao, candice.li,
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 47a500f64db20..bcf356df1ef33 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
@@ -101,14 +101,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] 4+ messages in thread
* [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default
[not found] <20230822113658.3551550-1-sashal@kernel.org>
2023-08-22 11:36 ` [PATCH AUTOSEL 5.15 5/6] drm/amdgpu: Match against exact bootloader status Sasha Levin
@ 2023-08-22 11:36 ` Sasha Levin
2023-08-22 15:41 ` Deucher, Alexander
1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2023-08-22 11:36 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Felix Kuehling, Xinhui.Pan, amd-gfx, dri-devel,
Alex Deucher, 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 e574aa32a111d..46dfd9baeb013 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -1523,11 +1523,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] 4+ messages in thread
* RE: [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default
2023-08-22 11:36 ` [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default Sasha Levin
@ 2023-08-22 15:41 ` Deucher, Alexander
2023-08-23 18:42 ` Felix Kuehling
0 siblings, 1 reply; 4+ 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: Kuehling, Felix, Pan, Xinhui, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, Koenig, Christian
[Public]
> -----Original Message-----
> From: Sasha Levin <sashal@kernel.org>
> Sent: Tuesday, August 22, 2023 7:37 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 5.15 6/6] 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 e574aa32a111d..46dfd9baeb013 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> @@ -1523,11 +1523,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] 4+ messages in thread
* Re: [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default
2023-08-22 15:41 ` Deucher, Alexander
@ 2023-08-23 18:42 ` Felix Kuehling
0 siblings, 0 replies; 4+ messages in thread
From: Felix Kuehling @ 2023-08-23 18:42 UTC (permalink / raw)
To: Deucher, Alexander, Sasha Levin, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Cc: Pan, Xinhui, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, Koenig, Christian
On 2023-08-22 11:41, Deucher, Alexander wrote:
> [Public]
>
>> -----Original Message-----
>> From: Sasha Levin <sashal@kernel.org>
>> Sent: Tuesday, August 22, 2023 7:37 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 5.15 6/6] 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 agree. I was about to comment in the 5.10 patch as well.
Regards,
Felix
>
> 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 e574aa32a111d..46dfd9baeb013 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
>> @@ -1523,11 +1523,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] 4+ messages in thread
end of thread, other threads:[~2023-08-23 18:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230822113658.3551550-1-sashal@kernel.org>
2023-08-22 11:36 ` [PATCH AUTOSEL 5.15 5/6] drm/amdgpu: Match against exact bootloader status Sasha Levin
2023-08-22 11:36 ` [PATCH AUTOSEL 5.15 6/6] drm/amdkfd: ignore crat by default Sasha Levin
2023-08-22 15:41 ` Deucher, Alexander
2023-08-23 18:42 ` Felix Kuehling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).