drm/nouveau/nvif: device time mthd

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs
2015-08-20 14:54:16 +10:00
parent 159045cdc4
commit d61f4c178c
4 changed files with 33 additions and 2 deletions

View File

@@ -27,7 +27,11 @@
u64
nvif_device_time(struct nvif_device *device)
{
return nvxx_timer(device)->read(nvxx_timer(device));
struct nv_device_time_v0 args = {};
int ret = nvif_object_mthd(&device->object, NV_DEVICE_V0_TIME,
&args, sizeof(args));
WARN_ON_ONCE(ret != 0);
return args.time;
}
void