v3d,v3dv: add compatibility revision in GPU name

So the version matches exactly the same as reported by the kernel in
`/sys/kernel/debug/dri/128/v3d_ident`, or the version used in the
simulator.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29186>
This commit is contained in:
Juan A. Suarez Romero
2024-05-10 23:12:42 +02:00
committed by Marge Bot
parent ac7971e7f4
commit a54f7f7dc5
4 changed files with 10 additions and 4 deletions

View File

@@ -90,6 +90,7 @@ v3d_get_device_info(int fd, struct v3d_device_info* devinfo, v3d_ioctl_fun drm_i
}
devinfo->rev = (hub_ident3.value >> 8) & 0xff;
devinfo->compat_rev = (hub_ident3.value >> 16) & 0xff;
ret = drm_ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &max_perfcnt);
if (ret != 0) {

View File

@@ -37,6 +37,9 @@ struct v3d_device_info {
/** V3D revision number */
uint8_t rev;
/** V3D compatitiblity revision number */
uint8_t compat_rev;
/** Maximum number of performance counters for a given V3D version **/
uint8_t max_perfcnt;

View File

@@ -1382,10 +1382,11 @@ create_physical_device(struct v3dv_instance *instance,
device->next_program_id = 0;
ASSERTED int len =
asprintf(&device->name, "V3D %d.%d.%d",
asprintf(&device->name, "V3D %d.%d.%d.%d",
device->devinfo.ver / 10,
device->devinfo.ver % 10,
device->devinfo.rev);
device->devinfo.rev,
device->devinfo.compat_rev);
assert(len != -1);
v3dv_physical_device_init_disk_cache(device);

View File

@@ -54,10 +54,11 @@ v3d_screen_get_name(struct pipe_screen *pscreen)
if (!screen->name) {
screen->name = ralloc_asprintf(screen,
"V3D %d.%d.%d",
"V3D %d.%d.%d.%d",
screen->devinfo.ver / 10,
screen->devinfo.ver % 10,
screen->devinfo.rev);
screen->devinfo.rev,
screen->devinfo.compat_rev);
}
return screen->name;