diff options
author | Marcin KoĆcielnicki <koriakin@0x04.net> | 2010-05-23 11:36:04 +0000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-05-28 16:06:21 +1000 |
commit | 7fc74f17e6c9b4d86371c3a947afc32bd6bc9691 (patch) | |
tree | 3658c270bd5c45a408779040e2db181e5fca855b /drivers/gpu | |
parent | b334f2b3b68c35fd86a0cbc90ecee40e63ba2f37 (diff) | |
download | linux-7fc74f17e6c9b4d86371c3a947afc32bd6bc9691.tar.gz linux-7fc74f17e6c9b4d86371c3a947afc32bd6bc9691.tar.bz2 linux-7fc74f17e6c9b4d86371c3a947afc32bd6bc9691.zip |
drm/nouveau: Add getparam for current PTIMER time.
This will be useful for computing GPU-CPU latency, including
GL_ARB_timer_query extension.
Signed-off-by: Marcin KoĆcielnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index e632339c323e..a2544ffd02cc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -913,6 +913,9 @@ int nouveau_ioctl_getparam(struct drm_device *dev, void *data, case NOUVEAU_GETPARAM_VM_VRAM_BASE: getparam->value = dev_priv->vm_vram_base; break; + case NOUVEAU_GETPARAM_PTIMER_TIME: + getparam->value = dev_priv->engine.timer.read(dev); + break; case NOUVEAU_GETPARAM_GRAPH_UNITS: /* NV40 and NV50 versions are quite different, but register * address is the same. User is supposed to know the card |