[Intel-xe] [PATCH 02/12] fixup! drm/xe/guc: Report submission version of GuC firmware

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Tue Oct 31 19:00:54 UTC 2023



On 10/31/2023 7:09 AM, Andrzej Hajda wrote:
> On 28.10.2023 00:29, Daniele Ceraolo Spurio wrote:
>> Major GuC versions greater than 70 will have the submission version in
>> the herader irrespective of their minor version number.
>
> header I guess.
>
>>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>> Cc: Matthew Brost <matthew.brost at intel.com>
>> Cc: John Harrison <John.C.Harrison at Intel.com>
>> Reviewed-by: Matthew Brost <matthew.brost at intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_uc_fw.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c 
>> b/drivers/gpu/drm/xe/xe_uc_fw.c
>> index 3032c4f148d4..91d4a2272ee7 100644
>> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
>> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
>> @@ -278,7 +278,7 @@ static void guc_read_css_info(struct xe_uc_fw 
>> *uc_fw, struct uc_css_header *css)
>>       xe_gt_assert(gt, uc_fw->type == XE_UC_FW_TYPE_GUC);
>>       xe_gt_assert(gt, uc_fw->major_ver_found >= 70);
>>   -    if (uc_fw->minor_ver_found >= 6) {
>> +    if (uc_fw->major_ver_found > 70 || uc_fw->minor_ver_found >= 6) {
>
> Shouldn't be major > 70 || (major == 70 && minor >=6) ?

In Xe we don't support any GuC version below 70 (there is an assert 
above to enforce that), so in the second part of the OR we're guaranteed 
that major == 70 without having to check for it.

> Anyway working with such representation of version looks quite painful :)

Unfortunately the FWs don't guarantee that their version can fit in a 
u32 for easier comparisons :/

Daniele

>
> Regards
> Andrzej
>
>
>>           /* v70.6.0 adds CSS header support */
>>           guc->submission_state.version.major =
>>               FIELD_GET(CSS_SW_VERSION_UC_MAJOR,
>



More information about the Intel-xe mailing list