Re: [PATCH] drm/amd/powerplay: revise Vega20 pptable version check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/18 8:41 PM, Alex Deucher wrote:
> On Mon, Oct 29, 2018 at 9:39 PM Evan Quan <evan.quan@xxxxxxx> wrote:
>> Tell the version numbers when the pptable versions do not match.
>>
>> Change-Id: I3ea8aac7493927281b14d28866fa87690621f0f0
>> Signed-off-by: Evan Quan <evan.quan@xxxxxxx>
>> ---
>>   .../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@xxxxxxx>
Doesn't "mismatched" sound like a much better word here?
>
>> +       }
>>
>>          //dump_pptable(&powerplay_table->smcPPTable);
>>
>> --
>> 2.19.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
>> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7C%7C262cceca682f450fdb1908d63e08ea82%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636764605340766976&amp;sdata=P1cJGaVlMLE2NJNgViqu9YLoxMsScNY9EEbPDQNM%2BWA%3D&amp;reserved=0
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7C%7C262cceca682f450fdb1908d63e08ea82%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636764605340766976&amp;sdata=P1cJGaVlMLE2NJNgViqu9YLoxMsScNY9EEbPDQNM%2BWA%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux