diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-04 07:53:40 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2013-10-09 01:55:33 -0400 |
| commit | ffbab09bf939975b62ec233c426bf7df0dd4cea8 (patch) | |
| tree | f1ae5917f5061a3cfd2586d515fb36cd793f920a | |
| parent | fc6ff1935b550bdf525e0caa5ef0894010375414 (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>
| -rw-r--r-- | drivers/gpu/drm/drm_pci.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/gma500/psb_drv.h | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 36 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/arb.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/dfp.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/disp.h | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/hw.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_bios.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 2 | ||||
| -rw-r--r-- | include/drm/drmP.h | 2 |
16 files changed, 46 insertions, 51 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index cabe2bd702ae..f00d7a9671ea 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c | |||
| @@ -331,9 +331,6 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | |||
| 331 | goto err_free; | 331 | goto err_free; |
| 332 | 332 | ||
| 333 | dev->pdev = pdev; | 333 | dev->pdev = pdev; |
| 334 | dev->pci_device = pdev->device; | ||
| 335 | dev->pci_vendor = pdev->vendor; | ||
| 336 | |||
| 337 | #ifdef __alpha__ | 334 | #ifdef __alpha__ |
| 338 | dev->hose = pdev->sysdata; | 335 | dev->hose = pdev->sysdata; |
| 339 | #endif | 336 | #endif |
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h index 6856bce58445..0bab46bd73d2 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h | |||
| @@ -44,10 +44,10 @@ enum { | |||
| 44 | CHIP_MFLD_0130 = 3, /* Medfield */ | 44 | CHIP_MFLD_0130 = 3, /* Medfield */ |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | #define IS_PSB(dev) (((dev)->pci_device & 0xfffe) == 0x8108) | 47 | #define IS_PSB(dev) (((dev)->pdev->device & 0xfffe) == 0x8108) |
| 48 | #define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100) | 48 | #define IS_MRST(dev) (((dev)->pdev->device & 0xfffc) == 0x4100) |
| 49 | #define IS_MFLD(dev) (((dev)->pci_device & 0xfff8) == 0x0130) | 49 | #define IS_MFLD(dev) (((dev)->pdev->device & 0xfff8) == 0x0130) |
| 50 | #define IS_CDV(dev) (((dev)->pci_device & 0xfff0) == 0x0be0) | 50 | #define IS_CDV(dev) (((dev)->pdev->device & 0xfff0) == 0x0be0) |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| 53 | * Driver definitions | 53 | * Driver definitions |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 93cbacba26a2..d8478f7cdbf0 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
| @@ -931,7 +931,7 @@ static int i915_getparam(struct drm_device *dev, void *data, | |||
| 931 | value = READ_BREADCRUMB(dev_priv); | 931 | value = READ_BREADCRUMB(dev_priv); |
| 932 | break; | 932 | break; |
| 933 | case I915_PARAM_CHIPSET_ID: | 933 | case I915_PARAM_CHIPSET_ID: |
| 934 | value = dev->pci_device; | 934 | value = dev->pdev->device; |
| 935 | break; | 935 | break; |
| 936 | case I915_PARAM_HAS_GEM: | 936 | case I915_PARAM_HAS_GEM: |
| 937 | value = 1; | 937 | value = 1; |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 923d9d0eecf5..a404e7dc065a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
| @@ -1590,39 +1590,39 @@ struct drm_i915_file_private { | |||
| 1590 | 1590 | ||
| 1591 | #define INTEL_INFO(dev) (to_i915(dev)->info) | 1591 | #define INTEL_INFO(dev) (to_i915(dev)->info) |
| 1592 | 1592 | ||
| 1593 | #define IS_I830(dev) ((dev)->pci_device == 0x3577) | 1593 | #define IS_I830(dev) ((dev)->pdev->device == 0x3577) |
| 1594 | #define IS_845G(dev) ((dev)->pci_device == 0x2562) | 1594 | #define IS_845G(dev) ((dev)->pdev->device == 0x2562) |
| 1595 | #define IS_I85X(dev) (INTEL_INFO(dev)->is_i85x) | 1595 | #define IS_I85X(dev) (INTEL_INFO(dev)->is_i85x) |
| 1596 | #define IS_I865G(dev) ((dev)->pci_device == 0x2572) | 1596 | #define IS_I865G(dev) ((dev)->pdev->device == 0x2572) |
| 1597 | #define IS_I915G(dev) (INTEL_INFO(dev)->is_i915g) | 1597 | #define IS_I915G(dev) (INTEL_INFO(dev)->is_i915g) |
| 1598 | #define IS_I915GM(dev) ((dev)->pci_device == 0x2592) | 1598 | #define IS_I915GM(dev) ((dev)->pdev->device == 0x2592) |
| 1599 | #define IS_I945G(dev) ((dev)->pci_device == 0x2772) | 1599 | #define IS_I945G(dev) ((dev)->pdev->device == 0x2772) |
| 1600 | #define IS_I945GM(dev) (INTEL_INFO(dev)->is_i945gm) | 1600 | #define IS_I945GM(dev) (INTEL_INFO(dev)->is_i945gm) |
| 1601 | #define IS_BROADWATER(dev) (INTEL_INFO(dev)->is_broadwater) | 1601 | #define IS_BROADWATER(dev) (INTEL_INFO(dev)->is_broadwater) |
| 1602 | #define IS_CRESTLINE(dev) (INTEL_INFO(dev)->is_crestline) | 1602 | #define IS_CRESTLINE(dev) (INTEL_INFO(dev)->is_crestline) |
| 1603 | #define IS_GM45(dev) ((dev)->pci_device == 0x2A42) | 1603 | #define IS_GM45(dev) ((dev)->pdev->device == 0x2A42) |
| 1604 | #define IS_G4X(dev) (INTEL_INFO(dev)->is_g4x) | 1604 | #define IS_G4X(dev) (INTEL_INFO(dev)->is_g4x) |
| 1605 | #define IS_PINEVIEW_G(dev) ((dev)->pci_device == 0xa001) | 1605 | #define IS_PINEVIEW_G(dev) ((dev)->pdev->device == 0xa001) |
| 1606 | #define IS_PINEVIEW_M(dev) ((dev)->pci_device == 0xa011) | 1606 | #define IS_PINEVIEW_M(dev) ((dev)->pdev->device == 0xa011) |
| 1607 | #define IS_PINEVIEW(dev) (INTEL_INFO(dev)->is_pineview) | 1607 | #define IS_PINEVIEW(dev) (INTEL_INFO(dev)->is_pineview) |
| 1608 | #define IS_G33(dev) (INTEL_INFO(dev)->is_g33) | 1608 | #define IS_G33(dev) (INTEL_INFO(dev)->is_g33) |
| 1609 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) | 1609 | #define IS_IRONLAKE_M(dev) ((dev)->pdev->device == 0x0046) |
| 1610 | #define IS_IVYBRIDGE(dev) (INTEL_INFO(dev)->is_ivybridge) | 1610 | #define IS_IVYBRIDGE(dev) (INTEL_INFO(dev)->is_ivybridge) |
| 1611 | #define IS_IVB_GT1(dev) ((dev)->pci_device == 0x0156 || \ | 1611 | #define IS_IVB_GT1(dev) ((dev)->pdev->device == 0x0156 || \ |
| 1612 | (dev)->pci_device == 0x0152 || \ | 1612 | (dev)->pdev->device == 0x0152 || \ |
| 1613 | (dev)->pci_device == 0x015a) | 1613 | (dev)->pdev->device == 0x015a) |
| 1614 | #define IS_SNB_GT1(dev) ((dev)->pci_device == 0x0102 || \ | 1614 | #define IS_SNB_GT1(dev) ((dev)->pdev->device == 0x0102 || \ |
| 1615 | (dev)->pci_device == 0x0106 || \ | 1615 | (dev)->pdev->device == 0x0106 || \ |
| 1616 | (dev)->pci_device == 0x010A) | 1616 | (dev)->pdev->device == 0x010A) |
| 1617 | #define IS_VALLEYVIEW(dev) (INTEL_INFO(dev)->is_valleyview) | 1617 | #define IS_VALLEYVIEW(dev) (INTEL_INFO(dev)->is_valleyview) |
| 1618 | #define IS_HASWELL(dev) (INTEL_INFO(dev)->is_haswell) | 1618 | #define IS_HASWELL(dev) (INTEL_INFO(dev)->is_haswell) |
| 1619 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) | 1619 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) |
| 1620 | #define IS_HSW_EARLY_SDV(dev) (IS_HASWELL(dev) && \ | 1620 | #define IS_HSW_EARLY_SDV(dev) (IS_HASWELL(dev) && \ |
| 1621 | ((dev)->pci_device & 0xFF00) == 0x0C00) | 1621 | ((dev)->pdev->device & 0xFF00) == 0x0C00) |
| 1622 | #define IS_ULT(dev) (IS_HASWELL(dev) && \ | 1622 | #define IS_ULT(dev) (IS_HASWELL(dev) && \ |
| 1623 | ((dev)->pci_device & 0xFF00) == 0x0A00) | 1623 | ((dev)->pdev->device & 0xFF00) == 0x0A00) |
| 1624 | #define IS_HSW_GT3(dev) (IS_HASWELL(dev) && \ | 1624 | #define IS_HSW_GT3(dev) (IS_HASWELL(dev) && \ |
| 1625 | ((dev)->pci_device & 0x00F0) == 0x0020) | 1625 | ((dev)->pdev->device & 0x00F0) == 0x0020) |
| 1626 | #define IS_PRELIMINARY_HW(intel_info) ((intel_info)->is_preliminary) | 1626 | #define IS_PRELIMINARY_HW(intel_info) ((intel_info)->is_preliminary) |
| 1627 | 1627 | ||
| 1628 | /* | 1628 | /* |
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 7bea61325741..3858825e0978 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c | |||
| @@ -304,7 +304,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, | |||
| 304 | err_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec, | 304 | err_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec, |
| 305 | error->time.tv_usec); | 305 | error->time.tv_usec); |
| 306 | err_printf(m, "Kernel: " UTS_RELEASE "\n"); | 306 | err_printf(m, "Kernel: " UTS_RELEASE "\n"); |
| 307 | err_printf(m, "PCI ID: 0x%04x\n", dev->pci_device); | 307 | err_printf(m, "PCI ID: 0x%04x\n", dev->pdev->device); |
| 308 | err_printf(m, "EIR: 0x%08x\n", error->eir); | 308 | err_printf(m, "EIR: 0x%08x\n", error->eir); |
| 309 | err_printf(m, "IER: 0x%08x\n", error->ier); | 309 | err_printf(m, "IER: 0x%08x\n", error->ier); |
| 310 | err_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er); | 310 | err_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er); |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index dd6f84bf6c22..fa602d3b1cb7 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
| @@ -1044,7 +1044,7 @@ static void intel_tv_mode_set(struct intel_encoder *encoder) | |||
| 1044 | tv_mode->dda3_inc << TV_SCDDA3_INC_SHIFT; | 1044 | tv_mode->dda3_inc << TV_SCDDA3_INC_SHIFT; |
| 1045 | 1045 | ||
| 1046 | /* Enable two fixes for the chips that need them. */ | 1046 | /* Enable two fixes for the chips that need them. */ |
| 1047 | if (dev->pci_device < 0x2772) | 1047 | if (dev->pdev->device < 0x2772) |
| 1048 | tv_ctl |= TV_ENC_C0_FIX | TV_ENC_SDP_FIX; | 1048 | tv_ctl |= TV_ENC_C0_FIX | TV_ENC_SDP_FIX; |
| 1049 | 1049 | ||
| 1050 | I915_WRITE(TV_H_CTL_1, hctl1); | 1050 | I915_WRITE(TV_H_CTL_1, hctl1); |
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 | ||
