Re: [PATCH i-g-t 6/8] tools/intel_vbt_decode: dump eDP data rate override field

Nautiyal, Ankit K
2026-04-27T12:38:55Z

On 4/27/2026 10:47 AM, Karthik B S wrote:
>
> On 4/22/2026 9:13 AM, Ankit Nautiyal wrote:
>> Add decoding support for the eDP data rate override field introduced
>> in VBT version 263+.
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>>   tools/intel_vbt_decode.c | 36 ++++++++++++++++++++++++++++++++++++
>>   1 file changed, 36 insertions(+)
>>
>> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
>> index 7785e9e82b1f..6c0273aeecfc 100644
>> --- a/tools/intel_vbt_decode.c
>> +++ b/tools/intel_vbt_decode.c
>> @@ -1121,6 +1121,39 @@ static const char * const hdmi_frl_rate_str[] = {
>>       [5] = "12 GT/s",
>>   };
>>   +static void dump_edp_data_rate_override(uint32_t
>> edp_data_rate_override)
>> +{
>> +    int i;
>> +    static const uint32_t link_rates[BDB_263_VBT_EDP_NUM_RATES][2] = {
>> +        { BDB_263_VBT_EDP_LINK_RATE_1_62, 162000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_2_16, 216000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_2_43, 243000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_2_7, 270000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_3_24, 324000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_4_32, 432000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_5_4, 540000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_6_75, 675000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_8_1, 810000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_10, 1000000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_13_5, 1350000 },
>> +        { BDB_263_VBT_EDP_LINK_RATE_20, 2000000},
>> +    };
>> +
>> +    edp_data_rate_override &= BDB_263_VBT_EDP_RATES_MASK;
>> +
>> +    printf("\t\teDP data rate override:");
>> +
>> +    if (!edp_data_rate_override) {
>> +        printf("(none)\n");
> Nit: Add a space before (none)?

Thanks for catching this. I will add the extra space.

>> +        return;
>> +    }
>> +    printf("\n");
>> +
>> +    for (i = 0; i < BDB_263_VBT_EDP_NUM_RATES; i++)
>> +        if (link_rates[i][0] & edp_data_rate_override)
>> +            printf("\t\t\t%d kbps\n", link_rates[i][1]);
>
> Nit: '%d' -> '%u' ?

Makes sense since the array is uint32_t.

Will change this as well.

Thanks,

Ankit

>
> Both can be fixed during merge. With this,
>
> Reviewed-by: Karthik B S <karthik.b.s@intel.com>
>
>> +}
>> +
>>   static void dump_child_device(struct context *context,
>>                     const struct child_device_config *child)
>>   {
>> @@ -1281,6 +1314,9 @@ static void dump_child_device(struct context
>> *context,
>>         if (context->bdb->version >= 256)
>>           printf("\t\tEFP panel index: %d\n", child->efp_index);
>> +
>> +    if (context->bdb->version >= 263)
>> + dump_edp_data_rate_override(child->edp_data_rate_override);
>>   }
>>     static void dump_child_devices(struct context *context, const
>> uint8_t *devices,