drivers/gpu/drm/openchrome/via_drv.c | 8 ++++---- drivers/gpu/drm/openchrome/via_ttm.c | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 15 deletions(-)
New commits: commit b6e3d9cb13103e937b63cb358d0cc33a9cbecd03 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Aug 19 23:34:44 2017 -0700 Replace drm_pci_device_is_agp with pci_find_capability Commit 2ce0264d61548b51d5d406ff9f414af10b9c7348 made this change, so our side needs to change as well. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c index 29ac0612102e..998130d28896 100644 --- a/drivers/gpu/drm/openchrome/via_drv.c +++ b/drivers/gpu/drm/openchrome/via_drv.c @@ -349,7 +349,7 @@ via_driver_load(struct drm_device *dev, unsigned long chipset) #if IS_ENABLED(CONFIG_AGP) if ((dev_priv->engine_type <= VIA_ENG_H2) || - (dev->agp && drm_pci_device_is_agp(dev))) { + (dev->agp && pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))) { ret = via_detect_agp(dev); if (!ret) via_agp_engine_init(dev_priv); diff --git a/drivers/gpu/drm/openchrome/via_ttm.c b/drivers/gpu/drm/openchrome/via_ttm.c index 980cf41b3bf4..d65ec04a7490 100644 --- a/drivers/gpu/drm/openchrome/via_ttm.c +++ b/drivers/gpu/drm/openchrome/via_ttm.c @@ -113,7 +113,7 @@ via_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, struct via_device *dev_priv = container_of(bdev, struct via_device, bdev); - if (drm_pci_device_is_agp(dev_priv->dev)) + if (pci_find_capability(dev_priv->dev->pdev, PCI_CAP_ID_AGP)) return ttm_agp_tt_create(bdev, dev_priv->dev->agp->bridge, size, page_flags, dummy_read_page); #endif @@ -136,7 +136,7 @@ via_ttm_tt_populate(struct ttm_tt *ttm) return 0; #if IS_ENABLED(CONFIG_AGP) - if (drm_pci_device_is_agp(dev_priv->dev)) + if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP)) return ttm_agp_tt_populate(ttm); #endif @@ -178,7 +178,7 @@ via_ttm_tt_unpopulate(struct ttm_tt *ttm) unsigned int i; #if IS_ENABLED(CONFIG_AGP) - if (drm_pci_device_is_agp(dev_priv->dev)) { + if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP)) { ttm_agp_tt_unpopulate(ttm); return; } @@ -238,7 +238,8 @@ via_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, man->default_caching = TTM_PL_FLAG_CACHED; #if IS_ENABLED(CONFIG_AGP) - if (drm_pci_device_is_agp(dev) && dev->agp != NULL) { + if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP) && + dev->agp != NULL) { man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; man->default_caching = TTM_PL_FLAG_WC; @@ -520,7 +521,7 @@ via_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) case TTM_PL_TT: #if IS_ENABLED(CONFIG_AGP) - if (drm_pci_device_is_agp(dev)) { + if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP)) { mem->bus.is_iomem = !dev->agp->cant_use_aperture; mem->bus.base = dev->agp->base; } commit 31931921388df5ed6e0f88bb82f34531edda084a Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Aug 19 23:20:04 2017 -0700 Replacing __OS_HAS_AGP with IS_ENABLED(CONFIG_AGP) Commit a7fb8a23c1afa607ec8ce9f61df645f37c529434 made this change, so our side needs to change as well. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c index 73b00cc4549f..29ac0612102e 100644 --- a/drivers/gpu/drm/openchrome/via_drv.c +++ b/drivers/gpu/drm/openchrome/via_drv.c @@ -47,7 +47,7 @@ MODULE_DEVICE_TABLE(pci, via_pci_table); #define SGDMA_MEMORY (256*1024) #define VQ_MEMORY (256*1024) -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) #define VIA_AGP_MODE_MASK 0x17 #define VIA_AGPV3_MODE 0x08 @@ -303,7 +303,7 @@ static int via_driver_unload(struct drm_device *dev) via_mm_fini(dev); -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if (dev->agp && dev->agp->acquired) drm_agp_release(dev); #endif @@ -347,7 +347,7 @@ via_driver_load(struct drm_device *dev, unsigned long chipset) chip_revision_info(dev); -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if ((dev_priv->engine_type <= VIA_ENG_H2) || (dev->agp && drm_pci_device_is_agp(dev))) { ret = via_detect_agp(dev); diff --git a/drivers/gpu/drm/openchrome/via_ttm.c b/drivers/gpu/drm/openchrome/via_ttm.c index d30369b99eaf..980cf41b3bf4 100644 --- a/drivers/gpu/drm/openchrome/via_ttm.c +++ b/drivers/gpu/drm/openchrome/via_ttm.c @@ -109,7 +109,7 @@ static struct ttm_tt * via_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) struct via_device *dev_priv = container_of(bdev, struct via_device, bdev); @@ -135,7 +135,7 @@ via_ttm_tt_populate(struct ttm_tt *ttm) if (ttm->state != tt_unpopulated) return 0; -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if (drm_pci_device_is_agp(dev_priv->dev)) return ttm_agp_tt_populate(ttm); #endif @@ -177,7 +177,7 @@ via_ttm_tt_unpopulate(struct ttm_tt *ttm) struct drm_device *dev = dev_priv->dev; unsigned int i; -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if (drm_pci_device_is_agp(dev_priv->dev)) { ttm_agp_tt_unpopulate(ttm); return; @@ -214,7 +214,7 @@ static int via_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) { -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) struct via_device *dev_priv = container_of(bdev, struct via_device, bdev); struct drm_device *dev = dev_priv->dev; @@ -237,7 +237,7 @@ via_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, man->available_caching = TTM_PL_MASK_CACHING; man->default_caching = TTM_PL_FLAG_CACHED; -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if (drm_pci_device_is_agp(dev) && dev->agp != NULL) { man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; @@ -519,7 +519,7 @@ via_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) return 0; case TTM_PL_TT: -#if __OS_HAS_AGP +#if IS_ENABLED(CONFIG_AGP) if (drm_pci_device_is_agp(dev)) { mem->bus.is_iomem = !dev->agp->cant_use_aperture; mem->bus.base = dev->agp->base; _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel