drm: Remove __OS_HAS_AGP
We already express the drm/agp depencies correctly in Kconfig, so we can rip this remnant from the shared drm core days. Aside: Pretty much all the #ifdefs in radeon/nouveau could be killed if ttm would provide dummy functions. I'm not going to volunteer for that though. v2: Use IS_ENABLED(CONFIG_AGP) as suggested by Ville v3: Polish from Ville's review. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> (v2) Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -311,7 +311,7 @@ static void r128_cce_init_ring_buffer(struct drm_device *dev,
|
||||
/* The manual (p. 2) says this address is in "VM space". This
|
||||
* means it's an offset from the start of AGP space.
|
||||
*/
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
if (!dev_priv->is_pci)
|
||||
ring_start = dev_priv->cce_ring->offset - dev->agp->base;
|
||||
else
|
||||
@@ -505,7 +505,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
|
||||
(drm_r128_sarea_t *) ((u8 *) dev_priv->sarea->handle +
|
||||
init->sarea_priv_offset);
|
||||
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
if (!dev_priv->is_pci) {
|
||||
drm_legacy_ioremap_wc(dev_priv->cce_ring, dev);
|
||||
drm_legacy_ioremap_wc(dev_priv->ring_rptr, dev);
|
||||
@@ -529,7 +529,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
|
||||
(void *)(unsigned long)dev->agp_buffer_map->offset;
|
||||
}
|
||||
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
if (!dev_priv->is_pci)
|
||||
dev_priv->cce_buffers_offset = dev->agp->base;
|
||||
else
|
||||
@@ -552,7 +552,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
|
||||
dev_priv->sarea_priv->last_dispatch = 0;
|
||||
R128_WRITE(R128_LAST_DISPATCH_REG, dev_priv->sarea_priv->last_dispatch);
|
||||
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
if (dev_priv->is_pci) {
|
||||
#endif
|
||||
dev_priv->gart_info.table_mask = DMA_BIT_MASK(32);
|
||||
@@ -568,7 +568,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
|
||||
return -ENOMEM;
|
||||
}
|
||||
R128_WRITE(R128_PCI_GART_PAGE, dev_priv->gart_info.bus_addr);
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -600,7 +600,7 @@ int r128_do_cleanup_cce(struct drm_device *dev)
|
||||
if (dev->dev_private) {
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
#if __OS_HAS_AGP
|
||||
#if IS_ENABLED(CONFIG_AGP)
|
||||
if (!dev_priv->is_pci) {
|
||||
if (dev_priv->cce_ring != NULL)
|
||||
drm_legacy_ioremapfree(dev_priv->cce_ring, dev);
|
||||
|
Reference in New Issue
Block a user