diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 241e24d60eb4..fcd7610817a1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -825,6 +825,15 @@ int nouveau_ioctl_getparam(struct drm_device *dev, void *data, | |||
825 | case NOUVEAU_GETPARAM_VM_VRAM_BASE: | 825 | case NOUVEAU_GETPARAM_VM_VRAM_BASE: |
826 | getparam->value = dev_priv->vm_vram_base; | 826 | getparam->value = dev_priv->vm_vram_base; |
827 | break; | 827 | break; |
828 | case NOUVEAU_GETPARAM_GRAPH_UNITS: | ||
829 | /* NV40 and NV50 versions are quite different, but register | ||
830 | * address is the same. User is supposed to know the card | ||
831 | * family anyway... */ | ||
832 | if (dev_priv->chipset >= 0x40) { | ||
833 | getparam->value = nv_rd32(dev, NV40_PMC_GRAPH_UNITS); | ||
834 | break; | ||
835 | } | ||
836 | /* FALLTHRU */ | ||
828 | default: | 837 | default: |
829 | NV_ERROR(dev, "unknown parameter %lld\n", getparam->param); | 838 | NV_ERROR(dev, "unknown parameter %lld\n", getparam->param); |
830 | return -EINVAL; | 839 | return -EINVAL; |