drm/nouveau/nvif: return chipset/board names from device info method
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:16 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:33 +0000 (12:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c

index f7394b9a1047b8ae0edf9af1b041830c4e0ddcef..9c25272b4b793f91a09f14dabc7eb5a6cec9ed35 100644 (file)
@@ -153,6 +153,8 @@ struct nv_device_info_v0 {
        __u8  pad06[2];
        __u64 ram_size;
        __u64 ram_user;
+       char  chip[16];
+       char  name[64];
 };
 
 
index c16bde41c279aba0b0c31fd34ee9b6e12f4098fc..e44d60739b56ee3e3127a331c0218816f855da69 100644 (file)
@@ -106,6 +106,8 @@ nvkm_udevice_info(struct nvkm_object *object, void *data, u32 size)
        if (imem && args->v0.ram_size > 0)
                args->v0.ram_user = args->v0.ram_user - imem->reserved;
 
+       strncpy(args->v0.chip, device->cname, sizeof(args->v0.chip));
+       strncpy(args->v0.name, device->cname, sizeof(args->v0.name));
        return 0;
 }