diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 12715d3c078d6e9d111c265fe96b5ccc63961d3e..fab899eec051ed1a7ae0f4c42fafd0c5ebd4f4b2 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -36,13 +36,13 @@ #include #include "drmP.h" -unsigned long drm_get_resource_start(struct drm_device *dev, unsigned int resource) +resource_size_t drm_get_resource_start(struct drm_device *dev, unsigned int resource) { return pci_resource_start(dev->pdev, resource); } EXPORT_SYMBOL(drm_get_resource_start); -unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource) +resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resource) { return pci_resource_len(dev->pdev, resource); } diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 6d21b9e48b89a4624936123fd169d79ce3f35cc9..4d9f5c6818ca8ab534d6c1ccf5b8d2a41088d3c6 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1057,7 +1057,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) int i915_driver_load(struct drm_device *dev, unsigned long flags) { struct drm_i915_private *dev_priv = dev->dev_private; - unsigned long base, size; + resource_size_t base, size; int ret = 0, mmio_bar = IS_I9XX(dev) ? 0 : 1; /* i915 has 4 more counters */ diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h index 88257c276eb9f640f4d5b3399acfe099900ed569..6bf4de9903250fa1b0ed4db73d185b08a53a4003 100644 --- a/drivers/gpu/drm/mga/mga_drv.h +++ b/drivers/gpu/drm/mga/mga_drv.h @@ -113,8 +113,8 @@ typedef struct drm_mga_private { * \sa drm_mga_private_t::mmio */ /*@{ */ - u32 mmio_base; /**< Bus address of base of MMIO. */ - u32 mmio_size; /**< Size of the MMIO region. */ + resource_size_t mmio_base; /**< Bus address of base of MMIO. */ + resource_size_t mmio_size; /**< Size of the MMIO region. */ /*@} */ u32 clear_cmd; diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 490bc7ceef60fe21dcaa8bb800fdc18fdbe1aea1..c608e22f73f936703e040adbf483891af3b49388 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h @@ -316,7 +316,7 @@ typedef struct drm_radeon_private { /* starting from here on, data is preserved accross an open */ uint32_t flags; /* see radeon_chip_flags */ - unsigned long fb_aper_offset; + resource_size_t fb_aper_offset; int num_gb_pipes; int track_flush; diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c index d465b2f9c1cdb999a3ec168d910a0c60db5580fa..456cd040f31a285e732d0d1752bc5cc8e8a506bb 100644 --- a/drivers/gpu/drm/savage/savage_bci.c +++ b/drivers/gpu/drm/savage/savage_bci.c @@ -599,8 +599,8 @@ int savage_driver_firstopen(struct drm_device *dev) drm_mtrr_add(dev_priv->mtrr[2].base, dev_priv->mtrr[2].size, DRM_MTRR_WC); } else { - DRM_ERROR("strange pci_resource_len %08lx\n", - drm_get_resource_len(dev, 0)); + DRM_ERROR("strange pci_resource_len %08llx\n", + (unsigned long long)drm_get_resource_len(dev, 0)); } } else if (dev_priv->chipset != S3_SUPERSAVAGE && dev_priv->chipset != S3_SAVAGE2000) { @@ -620,8 +620,8 @@ int savage_driver_firstopen(struct drm_device *dev) drm_mtrr_add(dev_priv->mtrr[0].base, dev_priv->mtrr[0].size, DRM_MTRR_WC); } else { - DRM_ERROR("strange pci_resource_len %08lx\n", - drm_get_resource_len(dev, 1)); + DRM_ERROR("strange pci_resource_len %08llx\n", + (unsigned long long)drm_get_resource_len(dev, 1)); } } else { mmio_base = drm_get_resource_start(dev, 0); diff --git a/include/drm/drmP.h b/include/drm/drmP.h index e5f4ae989abf15bd0b7ead6428840584cede0f85..34e1676b53d1fb8eeb6cd85fc539ecbb39dbc2b2 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1173,10 +1173,10 @@ extern int drm_freebufs(struct drm_device *dev, void *data, extern int drm_mapbufs(struct drm_device *dev, void *data, struct drm_file *file_priv); extern int drm_order(unsigned long size); -extern unsigned long drm_get_resource_start(struct drm_device *dev, +extern resource_size_t drm_get_resource_start(struct drm_device *dev, + unsigned int resource); +extern resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resource); -extern unsigned long drm_get_resource_len(struct drm_device *dev, - unsigned int resource); /* DMA support (drm_dma.h) */ extern int drm_dma_setup(struct drm_device *dev); diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 5ded1acfb5430fd969094e9fa817c285aefa9611..33ae98ced80e9b68b8fb34f9e19c1575da2bb36b 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -550,7 +550,7 @@ struct drm_mode_config { int min_width, min_height; int max_width, max_height; struct drm_mode_config_funcs *funcs; - unsigned long fb_base; + resource_size_t fb_base; /* pointers to standard properties */ struct list_head property_blob_list;