drm/nouveau/nvif: extend nop ioctl to return nvif version identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs
2015-08-20 14:54:16 +10:00
والد bf81df9be2
کامیت 99d4d36ad6
4فایلهای تغییر یافته به همراه18 افزوده شده و 4 حذف شده

مشاهده پرونده

@@ -71,6 +71,10 @@ int
nvif_client_init(const char *driver, const char *name, u64 device,
const char *cfg, const char *dbg, struct nvif_client *client)
{
struct {
struct nvif_ioctl_v0 ioctl;
struct nvif_ioctl_nop_v0 nop;
} args = {};
int ret, i;
ret = nvif_object_init(NULL, 0, 0, NULL, 0, &client->object);
@@ -91,6 +95,11 @@ nvif_client_init(const char *driver, const char *name, u64 device,
}
}
if (ret == 0) {
ret = nvif_client_ioctl(client, &args, sizeof(args));
client->version = args.nop.version;
}
if (ret)
nvif_client_fini(client);
return ret;