summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:16 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:33 +1000
commit22827fa42b0baa9287ea56691f26dc45fecea049 (patch)
tree3b6186bdf6b2aa2ca79c6d13134afab4a00af8ba
parentd56241794c293ff7341d373d853e5a4e2f5de244 (diff)
downloadtalos-obmc-linux-22827fa42b0baa9287ea56691f26dc45fecea049.tar.gz
talos-obmc-linux-22827fa42b0baa9287ea56691f26dc45fecea049.zip
drm/nouveau/nvif: return chipset/board names from device info method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/include/nvif/class.h2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/user.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvif/class.h b/drivers/gpu/drm/nouveau/include/nvif/class.h
index f7394b9a1047..9c25272b4b79 100644
--- a/drivers/gpu/drm/nouveau/include/nvif/class.h
+++ b/drivers/gpu/drm/nouveau/include/nvif/class.h
@@ -153,6 +153,8 @@ struct nv_device_info_v0 {
__u8 pad06[2];
__u64 ram_size;
__u64 ram_user;
+ char chip[16];
+ char name[64];
};
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
index c16bde41c279..e44d60739b56 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
@@ -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;
}
OpenPOWER on IntegriCloud