diff options
author | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-11-04 20:39:59 +0100 |
---|---|---|
committer | Stephane Marchesin <marchesin@icps.u-strasbg.fr> | 2006-11-04 20:39:59 +0100 |
commit | 06639801ce1d515f790739a70b051498c8615288 (patch) | |
tree | 71861fc2a779bc21be818df7d36edd7288c2fd88 /shared-core/nouveau_state.c | |
parent | 3ea0500be1ab7a058c90be35b5d8d2be26692f6a (diff) |
Add some getparams.
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r-- | shared-core/nouveau_state.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index bd70aef9..1901f08c 100644 --- a/shared-core/nouveau_state.c +++ b/shared-core/nouveau_state.c @@ -103,6 +103,20 @@ int nouveau_ioctl_getparam(DRM_IOCTL_ARGS) sizeof(getparam)); switch (getparam.param) { + case NOUVEAU_GETPARAM_PCI_VENDOR: + getparam.value=dev->pci_vendor; + break; + case NOUVEAU_GETPARAM_PCI_DEVICE: + getparam.value=dev->pci_device; + break; + case NOUVEAU_GETPARAM_BUS_TYPE: + if (drm_device_is_agp(dev)) + getparam.value=NV_AGP; + else if (drm_device_is_pcie(dev)) + getparam.value=NV_PCIE; + else + getparam.value=NV_PCI; + break; default: DRM_ERROR("unknown parameter %d\n", getparam.param); return DRM_ERR(EINVAL); |