aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-04 20:39:59 +0100
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2006-11-04 20:39:59 +0100
commit06639801ce1d515f790739a70b051498c8615288 (patch)
tree71861fc2a779bc21be818df7d36edd7288c2fd88
parent3ea0500be1ab7a058c90be35b5d8d2be26692f6a (diff)
Add some getparams.
-rw-r--r--shared-core/drm_pciids.txt40
-rw-r--r--shared-core/nouveau_drm.h4
-rw-r--r--shared-core/nouveau_state.c14
3 files changed, 38 insertions, 20 deletions
diff --git a/shared-core/drm_pciids.txt b/shared-core/drm_pciids.txt
index a6e917ac..f1d8731e 100644
--- a/shared-core/drm_pciids.txt
+++ b/shared-core/drm_pciids.txt
@@ -494,21 +494,21 @@
0x10de 0x0171 NV_10 "GeForce4 MX 440"
0x10de 0x0172 NV_10 "GeForce4 MX 420"
0x10de 0x0173 NV_10 "GeForce4 MX 440-SE"
-0x10de 0x0178 NV_20 "Quadro4 550 XGL"
+0x10de 0x0178 NV_10 "Quadro4 550 XGL"
0x10de 0x017a NV_10 "Quadro NVS"
0x10de 0x0181 NV_10 "GeForce4 MX 440 with AGP8X"
0x10de 0x0182 NV_10 "GeForce4 MX 440SE with AGP8X"
0x10de 0x0183 NV_10 "GeForce4 MX 420 with AGP8X"
0x10de 0x0185 NV_10 "GeForce4 MX 4000"
-0x10de 0x0188 NV_20 "Quadro4 580 XGL"
+0x10de 0x0188 NV_10 "Quadro4 580 XGL"
0x10de 0x018a NV_10 "Quadro NVS with AGP8X"
-0x10de 0x018b NV_20 "Quadro4 380 XGL"
+0x10de 0x018b NV_10 "Quadro4 380 XGL"
0x10de 0x018c NV_10 "Quadro NVS 50 PCI"
0x10de 0x01f0 NV_10|NV_NFORCE2 "GeForce4 MX Integrated GPU"
0x10de 0x0200 NV_20 "GeForce3"
0x10de 0x0201 NV_20 "GeForce3 Ti 200"
0x10de 0x0202 NV_20 "GeForce3 Ti 500"
-0x10de 0x0203 NV_10 "Quadro DCC"
+0x10de 0x0203 NV_20 "Quadro DCC"
0x10de 0x0250 NV_20 "GeForce4 Ti 4600"
0x10de 0x0251 NV_20 "GeForce4 Ti 4400"
0x10de 0x0252 NV_20 "NV25"
@@ -535,7 +535,7 @@
0x10de 0x0323 NV_30 "GeForce FX 5200LE"
0x10de 0x0326 NV_30 "GeForce FX 5500"
0x10de 0x0327 NV_30 "GeForce FX 5100"
-0x10de 0x032a NV_10 "Quadro NVS 280 PCI"
+0x10de 0x032a NV_30 "Quadro NVS 280 PCI"
0x10de 0x032b NV_30 "Quadro FX 500/FX 600"
0x10de 0x032f NV_30 "NV34GL"
0x10de 0x0330 NV_30 "GeForce FX 5900 Ultra"
@@ -558,13 +558,13 @@
0x10de 0x0043 NV_40 "NV40"
0x10de 0x0045 NV_40 "GeForce 6800 GT"
0x10de 0x0049 NV_40 "NV40GL"
-0x10de 0x004e NV_30 "Quadro FX 4000"
+0x10de 0x004e NV_40 "Quadro FX 4000"
0x10de 0x00c0 NV_40 "NV41"
0x10de 0x00c1 NV_40 "GeForce 6800"
0x10de 0x00c2 NV_40 "GeForce 6800 LE"
-0x10de 0x00cc NV_30 "Quadro FX Go1400"
-0x10de 0x00cd NV_30 "Quadro FX 3450/4000 SDI"
-0x10de 0x00ce NV_30 "Quadro FX 1400"
+0x10de 0x00cc NV_40 "Quadro FX Go1400"
+0x10de 0x00cd NV_40 "Quadro FX 3450/4000 SDI"
+0x10de 0x00ce NV_40 "Quadro FX 1400"
0x10de 0x0140 NV_40 "GeForce 6600 GT"
0x10de 0x0141 NV_40 "GeForce 6600"
0x10de 0x0142 NV_40 "NV43"
@@ -573,13 +573,13 @@
0x10de 0x014b NV_40 "NV43"
0x10de 0x014c NV_40 "NV43GL"
0x10de 0x014d NV_40 "NV43GL"
-0x10de 0x014e NV_30 "Quadro FX 540"
+0x10de 0x014e NV_40 "Quadro FX 540"
0x10de 0x014f NV_40 "GeForce 6200"
0x10de 0x0160 NV_40 "NV44"
0x10de 0x0161 NV_40 "GeForce 6200 TurboCache(TM)"
0x10de 0x0162 NV_40 "NV44"
0x10de 0x0163 NV_40 "NV44"
-0x10de 0x0165 NV_10 "Quadro NVS 285"
+0x10de 0x0165 NV_40 "Quadro NVS 285"
0x10de 0x016e NV_40 "NV44GL"
0x10de 0x0220 NV_40 "NV44"
0x10de 0x0221 NV_40 "NV44"
@@ -601,7 +601,7 @@
0x10de 0x00f9 NV_40 "GeForce 6800 Ultra"
0x10de 0x00f9 NV_40 "GeForce 6800 GT"
0x10de 0x00f9 NV_40 "GeForce 6800 Series GPU"
-0x10de 0x0091 NV_10 "GeForce 7800 GTX"
+0x10de 0x0091 G_70 "GeForce 7800 GTX"
0x10de 0x00fa NV_30 "GeForce PCX 5750"
0x10de 0x00fa NV_30 "GeForce PCX 5750"
0x10de 0x00fb NV_30 "GeForce PCX 5900"
@@ -609,7 +609,7 @@
0x10de 0x00fc NV_30 "GeForce PCX 5300"
0x10de 0x00fc NV_30 "Quadro FX 330"
0x10de 0x00fc NV_30 "GeForce PCX 5300"
-0x10de 0x00fd NV_10 "Quadro NVS 280 PCI-E"
+0x10de 0x00fd NV_30 "Quadro NVS 280 PCI-E"
0x10de 0x00fd NV_30 "Quadro FX 330"
0x10de 0x00fd NV_10 "Quadro PCI-E Series"
0x10de 0x00fe NV_30 "Quadro FX 1300"
@@ -652,21 +652,21 @@
0x10de 0x00c9 NV_30 "GeForce Go 6800 Ultra"
0x10de 0x00cc NV_30 "Quadro FX Go1400"
0x10de 0x0140 NV_40 "NV43"
-0x10de 0x0144 NV_30 "GeForce Go 6600"
+0x10de 0x0144 NV_40 "GeForce Go 6600"
0x10de 0x0147 NV_40 "NV43"
-0x10de 0x0148 NV_30 "GeForce Go 6600"
+0x10de 0x0148 NV_40 "GeForce Go 6600"
0x10de 0x0149 NV_40 "NV43"
0x10de 0x014c NV_40 "NV43GL"
-0x10de 0x0164 NV_30 "GeForce Go 6200"
-0x10de 0x0167 NV_30 "GeForce Go 6200"
+0x10de 0x0164 NV_40 "GeForce Go 6200"
+0x10de 0x0167 NV_40 "GeForce Go 6200"
0x10de 0x0169 NV_40 "NV44M"
0x10de 0x016b NV_40 "NV44GLM"
0x10de 0x016c NV_40 "NV44GLM"
0x10de 0x016d NV_40 "NV44GLM"
0x10de 0x0228 NV_40 "NV44M"
-0x10de 0x0091 NV_10 "NVIDIA GeForce 7800 GTX"
-0x10de 0x0092 NV_10 "NVIDIA GeForce 7800 GT"
-0x10de 0x009d NV_30 "NVIDIA Quadro FX 4500"
+0x10de 0x0091 G_70 "NVIDIA GeForce 7800 GTX"
+0x10de 0x0092 G_70 "NVIDIA GeForce 7800 GT"
+0x10de 0x009d G_70 "NVIDIA Quadro FX 4500"
0x10de 0x0240 NV_40 "NVIDIA GeForce 6150"
0x10de 0x0241 NV_40 "NVIDIA GeForce 6150 LE"
0x10de 0x0242 NV_40 "NVIDIA GeForce 6100"
diff --git a/shared-core/nouveau_drm.h b/shared-core/nouveau_drm.h
index 9e996de9..865dbe95 100644
--- a/shared-core/nouveau_drm.h
+++ b/shared-core/nouveau_drm.h
@@ -84,6 +84,10 @@ typedef struct drm_nouveau_mem_free {
}
drm_nouveau_mem_free_t;
+/* FIXME : maybe unify {GET,SET}PARAMs */
+#define NOUVEAU_GETPARAM_PCI_VENDOR 3
+#define NOUVEAU_GETPARAM_PCI_DEVICE 4
+#define NOUVEAU_GETPARAM_BUS_TYPE 5
typedef struct drm_nouveau_getparam {
unsigned int param;
unsigned int value;
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);