[Openchrome-devel] drm-openchrome: Branch 'drm-next-4.13' - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Fri Aug 4 12:05:33 UTC 2017


 drivers/gpu/drm/openchrome/via_drv.c |    6 +++---
 drivers/gpu/drm/openchrome/via_ttm.c |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b68949cc8b5dad30b7eb89e717c01e8b90e55540
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Aug 4 05:04:54 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 <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c
index b9e2c5bb4e29..66302fac4263 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;


More information about the Openchrome-devel mailing list