All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 18/19] drm: kill the ->agp_destroy callback
Date: Sun,  3 Nov 2013 14:31:24 +0100	[thread overview]
Message-ID: <1383485485-8210-19-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1383485485-8210-1-git-send-email-daniel.vetter@ffwll.ch>

Call drm_pci_agp_destroy directly, there's no point in the
indirection. Long term we want to shuffle this into each driver's
unload logic, but that needs cleared-up drm lifetime rules first.

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

diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index d0937dd62899..36e7f8e74027 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -276,7 +276,7 @@ static void drm_pci_agp_init(struct drm_device *dev)
 	}
 }
 
-static void drm_pci_agp_destroy(struct drm_device *dev)
+void drm_pci_agp_destroy(struct drm_device *dev)
 {
 	if (dev->agp) {
 		arch_phys_wc_del(dev->agp->agp_mtrr);
@@ -292,7 +292,6 @@ static struct drm_bus drm_pci_bus = {
 	.get_name = drm_pci_get_name,
 	.set_busid = drm_pci_set_busid,
 	.set_unique = drm_pci_set_unique,
-	.agp_destroy = drm_pci_agp_destroy,
 };
 
 /**
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 4b25f693ae89..3ec8d4f9f09a 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -569,8 +569,8 @@ void drm_dev_unregister(struct drm_device *dev)
 	if (dev->driver->unload)
 		dev->driver->unload(dev);
 
-	if (dev->driver->bus->agp_destroy)
-		dev->driver->bus->agp_destroy(dev);
+	if (dev->agp)
+		drm_pci_agp_destroy(dev);
 
 	drm_vblank_cleanup(dev);
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 8cf8cfef8c56..f67104aa7b51 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -748,9 +748,6 @@ struct drm_bus {
 	int (*set_unique)(struct drm_device *dev, struct drm_master *master,
 			  struct drm_unique *unique);
 	int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p);
-	/* hooks that are for PCI */
-	void (*agp_destroy)(struct drm_device *dev);
-
 };
 
 /**
@@ -1658,6 +1655,7 @@ static __inline__ int drm_pci_device_is_agp(struct drm_device *dev)
 
 	return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
 }
+void drm_pci_agp_destroy(struct drm_device *dev);
 
 extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
 extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
-- 
1.8.4.rc3

  parent reply	other threads:[~2013-11-03 13:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 13:31 [PATCH 00/19] drm de-midlayer, part 1: device list and agp bus stuff Daniel Vetter
2013-11-03 13:31 ` [PATCH 01/19] drm/rcar: call drm_put_dev directly in the ->remove hook Daniel Vetter
2013-11-03 13:47   ` Laurent Pinchart
2013-11-03 13:31 ` [PATCH 02/19] drm/exynos: call drm_put_dev directly from ->remove Daniel Vetter
2013-11-03 13:31 ` [PATCH 03/19] drm/imx: directly call drm_put_dev in ->remove Daniel Vetter
2013-11-04  8:19   ` Sascha Hauer
2013-11-03 13:31 ` [PATCH 04/19] drm/tilcdc: call drm_put_dev directly from ->remove Daniel Vetter
2013-11-03 13:31 ` [PATCH 05/19] drm/omap: call drm_put_dev directly in ->remove Daniel Vetter
2013-11-03 13:31 ` [PATCH 06/19] drm/shmob: call drm_put_dev directly from ->remove hook Daniel Vetter
2013-11-03 13:31 ` [PATCH 07/19] drm/host1x: Call drm_put_dev directly instead of drm_platform_exit Daniel Vetter
2013-11-04  9:10   ` Thierry Reding
2013-11-04  9:13     ` Thierry Reding
2013-11-04 10:14     ` Daniel Vetter
2013-11-04 10:51       ` Thierry Reding
2013-11-03 13:31 ` [PATCH 08/19] drm/armada: directly call drm_put_dev in ->remove Daniel Vetter
2013-11-03 13:31 ` [PATCH 09/19] drm/msm: call drm_put_dev directly " Daniel Vetter
2013-11-03 13:31 ` [PATCH 10/19] drm: rip out drm_platform_exit Daniel Vetter
2013-11-03 13:31 ` [PATCH 11/19] drm: restrict the device list for shadow attached drivers Daniel Vetter
2013-11-03 14:05   ` David Herrmann
2013-11-03 14:14     ` Daniel Vetter
2013-11-03 18:51       ` [PATCH] " Daniel Vetter
2013-11-04  9:20       ` [PATCH 11/19] " Thierry Reding
2013-11-03 13:31 ` [PATCH 12/19] drm/bufs: remove handling of _DRM_GEM mappings Daniel Vetter
2013-11-03 14:06   ` David Herrmann
2013-11-03 13:31 ` [PATCH 13/19] drm: kill DRIVER_REQUIRE_AGP Daniel Vetter
2013-11-03 13:31 ` [PATCH 14/19] drm: ->agp_init can't fail Daniel Vetter
2013-11-03 14:12   ` David Herrmann
2013-11-03 13:31 ` [PATCH 15/19] drm: rip out drm_core_has_AGP Daniel Vetter
2013-11-03 13:31 ` [PATCH 16/19] drm: remove agp_init() bus callback Daniel Vetter
2013-11-03 14:14   ` David Herrmann
2013-11-03 14:20     ` Daniel Vetter
2013-11-03 14:42       ` [PATCH] " Daniel Vetter
2013-11-03 13:31 ` [PATCH 17/19] drm: inline drm_agp_destroy Daniel Vetter
2013-11-03 13:43   ` David Herrmann
2013-11-03 14:36     ` Daniel Vetter
2013-11-03 13:31 ` Daniel Vetter [this message]
2013-11-03 13:49   ` [PATCH 18/19] drm: kill the ->agp_destroy callback David Herrmann
2013-11-03 14:24     ` [PATCH] " Daniel Vetter
2013-11-03 14:34       ` David Herrmann
2013-11-03 17:32         ` Daniel Vetter
2013-11-03 13:31 ` [PATCH 19/19] drm: remove global_mutex locking around agp_init 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=1383485485-8210-19-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.