dri-devel Archive on lore.kernel.org
 help / color / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: dri-devel@lists.sourceforge.net
Cc: intel-gfx@lists.freedesktop.org, Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 1/3] drm: kill drm_agp_chipset_flush
Date: Wed, 14 Apr 2010 12:16:27 +0200
Message-ID: <1271240189-21087-2-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1271240189-21087-1-git-send-email-daniel.vetter@ffwll.ch>

This is only used by the gem code in the i915 drm driver. Not point
in abstracting this simple call. Furthermore I want to integrate the
gtt handling from intel-agp much tighter with the gem code in the
drm module, so this indirection through the agp will vanish, anyway.
The reason for this is a rather gross amount of fragile code duplication
between these two parts of the kernel intel graphics driver.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_agpsupport.c |    7 -------
 drivers/gpu/drm/i915/i915_gem.c  |    8 ++++----
 include/drm/drmP.h               |    1 -
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index ba38e01..54cfbc4 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -497,11 +497,4 @@ drm_agp_bind_pages(struct drm_device *dev,
 	return mem;
 }
 EXPORT_SYMBOL(drm_agp_bind_pages);
-
-void drm_agp_chipset_flush(struct drm_device *dev)
-{
-	agp_flush_chipset(dev->agp->bridge);
-}
-EXPORT_SYMBOL(drm_agp_chipset_flush);
-
 #endif /* __OS_HAS_AGP */
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 47c46ed..6e71b5b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1901,7 +1901,7 @@ i915_gem_flush(struct drm_device *dev,
 				     invalidate_domains, flush_domains);
 
 	if (flush_domains & I915_GEM_DOMAIN_CPU)
-		drm_agp_chipset_flush(dev);
+		agp_flush_chipset(dev->agp->bridge);
 
 	if ((invalidate_domains | flush_domains) & I915_GEM_GPU_DOMAINS) {
 		/*
@@ -2795,7 +2795,7 @@ i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj)
 		return;
 
 	i915_gem_clflush_object(obj);
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 	old_write_domain = obj->write_domain;
 	obj->write_domain = 0;
 
@@ -4962,7 +4962,7 @@ void i915_gem_detach_phys_object(struct drm_device *dev,
 		kunmap_atomic(dst, KM_USER0);
 	}
 	drm_clflush_pages(obj_priv->pages, page_count);
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 
 	i915_gem_object_put_pages(obj);
 out:
@@ -5047,7 +5047,7 @@ i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *obj,
 	if (ret)
 		return -EFAULT;
 
-	drm_agp_chipset_flush(dev);
+	agp_flush_chipset(dev->agp->bridge);
 	return 0;
 }
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index c1b9871..12ffa05 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1341,7 +1341,6 @@ extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size
 extern int drm_agp_free_memory(DRM_AGP_MEM * handle);
 extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start);
 extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
-extern void drm_agp_chipset_flush(struct drm_device *dev);
 
 				/* Stub support (drm_stub.h) */
 extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,
-- 
1.6.6.1

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 10:16 [PATCH 0/3] clean up drm agp Daniel Vetter
2010-04-14 10:16 ` Daniel Vetter [this message]
2010-04-14 10:16 ` [PATCH 2/3] drm: drop return value of drm_free_agp Daniel Vetter
2010-04-14 10:16 ` [PATCH 3/3] drm: kill agp indirection mess Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271240189-21087-2-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
		dri-devel@lists.freedesktop.org
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.dri-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git