* [PATCH] drm/amd/powerplay: revise Vega20 pptable version check
@ 2018-10-30 1:38 Evan Quan
[not found] ` <20181030013825.10739-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Evan Quan @ 2018-10-30 1:38 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: feifei.xu-5C7GfCeVMHo, Evan Quan
Tell the version numbers when the pptable versions do not match.
Change-Id: I3ea8aac7493927281b14d28866fa87690621f0f0
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
.../drm/amd/powerplay/hwmgr/vega20_processpptables.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
index 5eca2b7c78d5..8e70e806f639 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
@@ -642,8 +642,14 @@ static int check_powerplay_tables(
"Unsupported PPTable format!", return -1);
PP_ASSERT_WITH_CODE(powerplay_table->sHeader.structuresize > 0,
"Invalid PowerPlay Table!", return -1);
- PP_ASSERT_WITH_CODE(powerplay_table->smcPPTable.Version == PPTABLE_V20_SMU_VERSION,
- "Unmatch PPTable version, vbios update may be needed!", return -1);
+
+ if (powerplay_table->smcPPTable.Version != PPTABLE_V20_SMU_VERSION) {
+ pr_info("Unmatch PPTable version: "
+ "pptable from VBIOS is V%d while driver supported is V%d!",
+ powerplay_table->smcPPTable.Version,
+ PPTABLE_V20_SMU_VERSION);
+ return -1;
+ }
//dump_pptable(&powerplay_table->smcPPTable);
--
2.19.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/powerplay: revise Vega20 pptable version check
[not found] ` <20181030013825.10739-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
@ 2018-10-30 1:41 ` Alex Deucher
[not found] ` <CADnq5_NFi8k0r7oYRJhq24tkufMD=OUbRkSSFPdfgnhnG4Wfaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2018-10-30 1:41 UTC (permalink / raw)
To: Quan, Evan; +Cc: Feifei Xu, amd-gfx list
On Mon, Oct 29, 2018 at 9:39 PM Evan Quan <evan.quan@amd.com> wrote:
>
> Tell the version numbers when the pptable versions do not match.
>
> Change-Id: I3ea8aac7493927281b14d28866fa87690621f0f0
> Signed-off-by: Evan Quan <evan.quan@amd.com>
> ---
> .../drm/amd/powerplay/hwmgr/vega20_processpptables.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> index 5eca2b7c78d5..8e70e806f639 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
> @@ -642,8 +642,14 @@ static int check_powerplay_tables(
> "Unsupported PPTable format!", return -1);
> PP_ASSERT_WITH_CODE(powerplay_table->sHeader.structuresize > 0,
> "Invalid PowerPlay Table!", return -1);
> - PP_ASSERT_WITH_CODE(powerplay_table->smcPPTable.Version == PPTABLE_V20_SMU_VERSION,
> - "Unmatch PPTable version, vbios update may be needed!", return -1);
> +
> + if (powerplay_table->smcPPTable.Version != PPTABLE_V20_SMU_VERSION) {
> + pr_info("Unmatch PPTable version: "
> + "pptable from VBIOS is V%d while driver supported is V%d!",
> + powerplay_table->smcPPTable.Version,
> + PPTABLE_V20_SMU_VERSION);
> + return -1;
Return a proper error codes here. E.g., -EINVAL. With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> + }
>
> //dump_pptable(&powerplay_table->smcPPTable);
>
> --
> 2.19.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/powerplay: revise Vega20 pptable version check
[not found] ` <CADnq5_NFi8k0r7oYRJhq24tkufMD=OUbRkSSFPdfgnhnG4Wfaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-10-30 12:14 ` William Lewis
0 siblings, 0 replies; 3+ messages in thread
From: William Lewis @ 2018-10-30 12:14 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 10/29/18 8:41 PM, Alex Deucher wrote:
> On Mon, Oct 29, 2018 at 9:39 PM Evan Quan <evan.quan@amd.com> wrote:
>> Tell the version numbers when the pptable versions do not match.
>>
>> Change-Id: I3ea8aac7493927281b14d28866fa87690621f0f0
>> Signed-off-by: Evan Quan <evan.quan@amd.com>
>> ---
>> .../drm/amd/powerplay/hwmgr/vega20_processpptables.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
>> index 5eca2b7c78d5..8e70e806f639 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
>> @@ -642,8 +642,14 @@ static int check_powerplay_tables(
>> "Unsupported PPTable format!", return -1);
>> PP_ASSERT_WITH_CODE(powerplay_table->sHeader.structuresize > 0,
>> "Invalid PowerPlay Table!", return -1);
>> - PP_ASSERT_WITH_CODE(powerplay_table->smcPPTable.Version == PPTABLE_V20_SMU_VERSION,
>> - "Unmatch PPTable version, vbios update may be needed!", return -1);
>> +
>> + if (powerplay_table->smcPPTable.Version != PPTABLE_V20_SMU_VERSION) {
>> + pr_info("Unmatch PPTable version: "
>> + "pptable from VBIOS is V%d while driver supported is V%d!",
>> + powerplay_table->smcPPTable.Version,
>> + PPTABLE_V20_SMU_VERSION);
>> + return -1;
> Return a proper error codes here. E.g., -EINVAL. With that fixed:
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Doesn't "mismatched" sound like a much better word here?
>
>> + }
>>
>> //dump_pptable(&powerplay_table->smcPPTable);
>>
>> --
>> 2.19.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7C%7C262cceca682f450fdb1908d63e08ea82%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636764605340766976&sdata=P1cJGaVlMLE2NJNgViqu9YLoxMsScNY9EEbPDQNM%2BWA%3D&reserved=0
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7C%7C262cceca682f450fdb1908d63e08ea82%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636764605340766976&sdata=P1cJGaVlMLE2NJNgViqu9YLoxMsScNY9EEbPDQNM%2BWA%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-30 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 1:38 [PATCH] drm/amd/powerplay: revise Vega20 pptable version check Evan Quan
[not found] ` <20181030013825.10739-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-10-30 1:41 ` Alex Deucher
[not found] ` <CADnq5_NFi8k0r7oYRJhq24tkufMD=OUbRkSSFPdfgnhnG4Wfaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-30 12:14 ` William Lewis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.