diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2013-03-27 17:16:54 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-04-26 01:37:41 -0400 |
commit | 7e22e71e80fe35592fbc64a0e382108a8ce28495 (patch) | |
tree | 56a4866445e32a5e59e0e0cbc3f6153b5d52a7b9 /drivers/gpu/drm/nouveau/nouveau_abi16.c | |
parent | e30441adb91b020044f257c5c8e41022f3406ba1 (diff) |
drm/nvc0-: support NOUVEAU_GETPARAM_GRAPH_UNITS
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_abi16.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 5eb3e0da7c6e..1c4c6c9161ac 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <subdev/fb.h> | 30 | #include <subdev/fb.h> |
31 | #include <subdev/timer.h> | 31 | #include <subdev/timer.h> |
32 | #include <subdev/instmem.h> | 32 | #include <subdev/instmem.h> |
33 | #include <engine/graph.h> | ||
33 | 34 | ||
34 | #include "nouveau_drm.h" | 35 | #include "nouveau_drm.h" |
35 | #include "nouveau_dma.h" | 36 | #include "nouveau_dma.h" |
@@ -168,6 +169,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) | |||
168 | struct nouveau_drm *drm = nouveau_drm(dev); | 169 | struct nouveau_drm *drm = nouveau_drm(dev); |
169 | struct nouveau_device *device = nv_device(drm->device); | 170 | struct nouveau_device *device = nv_device(drm->device); |
170 | struct nouveau_timer *ptimer = nouveau_timer(device); | 171 | struct nouveau_timer *ptimer = nouveau_timer(device); |
172 | struct nouveau_graph *graph = (void *)nouveau_engine(device, NVDEV_ENGINE_GR); | ||
171 | struct drm_nouveau_getparam *getparam = data; | 173 | struct drm_nouveau_getparam *getparam = data; |
172 | 174 | ||
173 | switch (getparam->param) { | 175 | switch (getparam->param) { |
@@ -208,14 +210,8 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) | |||
208 | getparam->value = 1; | 210 | getparam->value = 1; |
209 | break; | 211 | break; |
210 | case NOUVEAU_GETPARAM_GRAPH_UNITS: | 212 | case NOUVEAU_GETPARAM_GRAPH_UNITS: |
211 | /* NV40 and NV50 versions are quite different, but register | 213 | getparam->value = graph->units ? graph->units(graph) : 0; |
212 | * address is the same. User is supposed to know the card | 214 | break; |
213 | * family anyway... */ | ||
214 | if (device->chipset >= 0x40) { | ||
215 | getparam->value = nv_rd32(device, 0x001540); | ||
216 | break; | ||
217 | } | ||
218 | /* FALLTHRU */ | ||
219 | default: | 215 | default: |
220 | nv_debug(device, "unknown parameter %lld\n", getparam->param); | 216 | nv_debug(device, "unknown parameter %lld\n", getparam->param); |
221 | return -EINVAL; | 217 | return -EINVAL; |