[PATCH v5 1/6] drm/v3d: Associate a V3D tech revision to all supported devices

Maíra Canal mcanal at igalia.com
Sun Mar 16 17:35:20 UTC 2025


Hi Stefan,

On 16/03/25 13:51, Stefan Wahren wrote:
> Hi Maíra,
> 
> Am 16.03.25 um 15:15 schrieb Maíra Canal:
>> The V3D driver currently determines the GPU tech version (33, 41...)
>> by reading a register. This approach has worked so far since this
>> information wasn’t needed before powering on the GPU.
>>
>> V3D 7.1 introduces new registers that must be written to power on the
>> GPU, requiring us to know the V3D version beforehand. To address this,
>> associate each supported SoC with the corresponding VideoCore GPU version
>> as part of the device data.
>>
>> To prevent possible mistakes, add an assertion to verify that the version
>> specified in the device data matches the one reported by the hardware.
>> If there is a mismatch, the kernel will trigger a warning.
>>
>> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
>> Signed-off-by: Maíra Canal <mcanal at igalia.com>
>> ---
>>   drivers/gpu/drm/v3d/v3d_debugfs.c | 126 ++++++++++++++++++ 
>> +-------------------
>>   drivers/gpu/drm/v3d/v3d_drv.c     |  22 +++++--
>>   drivers/gpu/drm/v3d/v3d_drv.h     |  11 +++-
>>   drivers/gpu/drm/v3d/v3d_gem.c     |  10 +--
>>   drivers/gpu/drm/v3d/v3d_irq.c     |   6 +-
>>   drivers/gpu/drm/v3d/v3d_perfmon.c |   4 +-
>>   drivers/gpu/drm/v3d/v3d_sched.c   |   6 +-
>>   7 files changed, 101 insertions(+), 84 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/ 
>> v3d_debugfs.c
>> index 
>> 76816f2551c10026a775e4331ad7eb2f008cfb0a..7e789e181af0ac138044f194a29555c30ab01836 100644
>> --- a/drivers/gpu/drm/v3d/v3d_debugfs.c
>> +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c

[...]

>> @@ -196,11 +196,11 @@ static int v3d_v3d_debugfs_ident(struct seq_file 
>> *m, void *unused)
>>           seq_printf(m, "  QPUs:         %d\n", nslc * qups);
>>           seq_printf(m, "  Semaphores:   %d\n",
>>                  V3D_GET_FIELD(ident1, V3D_IDENT1_NSEM));
>> -        if (v3d->ver <= 42) {
>> +        if (v3d->ver <= V3D_GEN_42) {
>>               seq_printf(m, "  BCG int:      %d\n",
>>                      (ident2 & V3D_IDENT2_BCG_INT) != 0);
>>           }
>> -        if (v3d->ver < 40) {
>> +        if (v3d->ver < V3D_GEN_41) {
> I had expected that such a behavior change was at least mentioned in the
> commit log.

I can add a comment about it in the commit message, but this isn't a
functional change. V3D 4.0 doesn't exist and hypothetically, if it did,
the driver doesn't support it. The driver only supports 33, 41, 42, and
71.

In the end, `v3d->ver < 40` means V3D 3.3.

Best Regards,
- Maíra

> 
> Except of this, look good to me.
> 



More information about the dri-devel mailing list