aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-10-04 07:53:40 -0400
committerDave Airlie <airlied@redhat.com>2013-10-09 01:55:33 -0400
commitffbab09bf939975b62ec233c426bf7df0dd4cea8 (patch)
treef1ae5917f5061a3cfd2586d515fb36cd793f920a /drivers/gpu/drm/nouveau
parentfc6ff1935b550bdf525e0caa5ef0894010375414 (diff)
drm: Remove pci_vendor and pci_device from struct drm_device
We can get the PCI vendor and device IDs via dev->pdev. So we can drop the duplicated information. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/arb.c8
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/dfp.c4
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/disp.h6
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/hw.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_abi16.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c4
7 files changed, 17 insertions, 17 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index 2e70462883e8..2a15b98b4d2b 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
@@ -210,8 +210,8 @@ nv04_update_arb(struct drm_device *dev, int VClk, int bpp,
210 sim_data.nvclk_khz = NVClk; 210 sim_data.nvclk_khz = NVClk;
211 sim_data.bpp = bpp; 211 sim_data.bpp = bpp;
212 sim_data.two_heads = nv_two_heads(dev); 212 sim_data.two_heads = nv_two_heads(dev);
213 if ((dev->pci_device & 0xffff) == 0x01a0 /*CHIPSET_NFORCE*/ || 213 if ((dev->pdev->device & 0xffff) == 0x01a0 /*CHIPSET_NFORCE*/ ||
214 (dev->pci_device & 0xffff) == 0x01f0 /*CHIPSET_NFORCE2*/) { 214 (dev->pdev->device & 0xffff) == 0x01f0 /*CHIPSET_NFORCE2*/) {
215 uint32_t type; 215 uint32_t type;
216 216
217 pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type); 217 pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type);
@@ -256,8 +256,8 @@ nouveau_calc_arb(struct drm_device *dev, int vclk, int bpp, int *burst, int *lwm
256 256
257 if (nv_device(drm->device)->card_type < NV_20) 257 if (nv_device(drm->device)->card_type < NV_20)
258 nv04_update_arb(dev, vclk, bpp, burst, lwm); 258 nv04_update_arb(dev, vclk, bpp, burst, lwm);
259 else if ((dev->pci_device & 0xfff0) == 0x0240 /*CHIPSET_C51*/ || 259 else if ((dev->pdev->device & 0xfff0) == 0x0240 /*CHIPSET_C51*/ ||
260 (dev->pci_device & 0xfff0) == 0x03d0 /*CHIPSET_C512*/) { 260 (dev->pdev->device & 0xfff0) == 0x03d0 /*CHIPSET_C512*/) {
261 *burst = 128; 261 *burst = 128;
262 *lwm = 0x0480; 262 *lwm = 0x0480;
263 } else 263 } else
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dfp.c b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
index 93dd23ff0093..59d1c040b84f 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/dfp.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/dfp.c
@@ -490,8 +490,8 @@ static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode)
490 /* BIOS scripts usually take care of the backlight, thanks 490 /* BIOS scripts usually take care of the backlight, thanks
491 * Apple for your consistency. 491 * Apple for your consistency.
492 */ 492 */
493 if (dev->pci_device == 0x0174 || dev->pci_device == 0x0179 || 493 if (dev->pdev->device == 0x0174 || dev->pdev->device == 0x0179 ||
494 dev->pci_device == 0x0189 || dev->pci_device == 0x0329) { 494 dev->pdev->device == 0x0189 || dev->pdev->device == 0x0329) {
495 if (mode == DRM_MODE_DPMS_ON) { 495 if (mode == DRM_MODE_DPMS_ON) {
496 nv_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 0, 1 << 31); 496 nv_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 0, 1 << 31);
497 nv_mask(device, NV_PCRTC_GPIO_EXT, 3, 1); 497 nv_mask(device, NV_PCRTC_GPIO_EXT, 3, 1);
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.h b/drivers/gpu/drm/nouveau/dispnv04/disp.h
index 9928187f0a7d..2cf65e0b517e 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/disp.h
+++ b/drivers/gpu/drm/nouveau/dispnv04/disp.h
@@ -127,7 +127,7 @@ static inline bool
127nv_two_heads(struct drm_device *dev) 127nv_two_heads(struct drm_device *dev)
128{ 128{
129 struct nouveau_drm *drm = nouveau_drm(dev); 129 struct nouveau_drm *drm = nouveau_drm(dev);
130 const int impl = dev->pci_device & 0x0ff0; 130 const int impl = dev->pdev->device & 0x0ff0;
131 131
132 if (nv_device(drm->device)->card_type >= NV_10 && impl != 0x0100 && 132 if (nv_device(drm->device)->card_type >= NV_10 && impl != 0x0100 &&
133 impl != 0x0150 && impl != 0x01a0 && impl != 0x0200) 133 impl != 0x0150 && impl != 0x01a0 && impl != 0x0200)
@@ -139,14 +139,14 @@ nv_two_heads(struct drm_device *dev)
139static inline bool 139static inline bool
140nv_gf4_disp_arch(struct drm_device *dev) 140nv_gf4_disp_arch(struct drm_device *dev)
141{ 141{
142 return nv_two_heads(dev) && (dev->pci_device & 0x0ff0) != 0x0110; 142 return nv_two_heads(dev) && (dev->pdev->device & 0x0ff0) != 0x0110;
143} 143}
144 144
145static inline bool 145static inline bool
146nv_two_reg_pll(struct drm_device *dev) 146nv_two_reg_pll(struct drm_device *dev)
147{ 147{
148 struct nouveau_drm *drm = nouveau_drm(dev); 148 struct nouveau_drm *drm = nouveau_drm(dev);
149 const int impl = dev->pci_device & 0x0ff0; 149 const int impl = dev->pdev->device & 0x0ff0;
150 150
151 if (impl == 0x0310 || impl == 0x0340 || nv_device(drm->device)->card_type >= NV_40) 151 if (impl == 0x0310 || impl == 0x0340 || nv_device(drm->device)->card_type >= NV_40)
152 return true; 152 return true;
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c b/drivers/gpu/drm/nouveau/dispnv04/hw.c
index 973056b86207..f8dee834527f 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/hw.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c
@@ -220,7 +220,7 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)
220 int ret; 220 int ret;
221 221
222 if (plltype == PLL_MEMORY && 222 if (plltype == PLL_MEMORY &&
223 (dev->pci_device & 0x0ff0) == CHIPSET_NFORCE) { 223 (dev->pdev->device & 0x0ff0) == CHIPSET_NFORCE) {
224 uint32_t mpllP; 224 uint32_t mpllP;
225 225
226 pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP); 226 pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP);
@@ -230,7 +230,7 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)
230 return 400000 / mpllP; 230 return 400000 / mpllP;
231 } else 231 } else
232 if (plltype == PLL_MEMORY && 232 if (plltype == PLL_MEMORY &&
233 (dev->pci_device & 0xff0) == CHIPSET_NFORCE2) { 233 (dev->pdev->device & 0xff0) == CHIPSET_NFORCE2) {
234 uint32_t clock; 234 uint32_t clock;
235 235
236 pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock); 236 pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock);
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index 3897549aabba..72055a35f845 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -178,10 +178,10 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
178 getparam->value = device->chipset; 178 getparam->value = device->chipset;
179 break; 179 break;
180 case NOUVEAU_GETPARAM_PCI_VENDOR: 180 case NOUVEAU_GETPARAM_PCI_VENDOR:
181 getparam->value = dev->pci_vendor; 181 getparam->value = dev->pdev->vendor;
182 break; 182 break;
183 case NOUVEAU_GETPARAM_PCI_DEVICE: 183 case NOUVEAU_GETPARAM_PCI_DEVICE:
184 getparam->value = dev->pci_device; 184 getparam->value = dev->pdev->device;
185 break; 185 break;
186 case NOUVEAU_GETPARAM_BUS_TYPE: 186 case NOUVEAU_GETPARAM_BUS_TYPE:
187 if (drm_pci_device_is_agp(dev)) 187 if (drm_pci_device_is_agp(dev))
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 3e7287675ecf..4c3feaaa1037 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -127,8 +127,8 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp
127#ifdef __powerpc__ 127#ifdef __powerpc__
128 /* Powerbook specific quirks */ 128 /* Powerbook specific quirks */
129 if (script == LVDS_RESET && 129 if (script == LVDS_RESET &&
130 (dev->pci_device == 0x0179 || dev->pci_device == 0x0189 || 130 (dev->pdev->device == 0x0179 || dev->pdev->device == 0x0189 ||
131 dev->pci_device == 0x0329)) 131 dev->pdev->device == 0x0329))
132 nv_write_tmds(dev, dcbent->or, 0, 0x02, 0x72); 132 nv_write_tmds(dev, dcbent->or, 0, 0x02, 0x72);
133#endif 133#endif
134 134
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index c5b36f9e9a10..2136d0038252 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -215,8 +215,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
215 connector->doublescan_allowed = true; 215 connector->doublescan_allowed = true;
216 if (nv_device(drm->device)->card_type == NV_20 || 216 if (nv_device(drm->device)->card_type == NV_20 ||
217 (nv_device(drm->device)->card_type == NV_10 && 217 (nv_device(drm->device)->card_type == NV_10 &&
218 (dev->pci_device & 0x0ff0) != 0x0100 && 218 (dev->pdev->device & 0x0ff0) != 0x0100 &&
219 (dev->pci_device & 0x0ff0) != 0x0150)) 219 (dev->pdev->device & 0x0ff0) != 0x0150))
220 /* HW is broken */ 220 /* HW is broken */
221 connector->interlace_allowed = false; 221 connector->interlace_allowed = false;
222 else 222 else