dri-devel Archive on 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 06/15] drm: Move __drm_pci_free to drm_legacy.c
Date: Wed, 10 Sep 2014 12:43:51 +0200	[thread overview]
Message-ID: <1410345840-3326-7-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1410345840-3326-1-git-send-email-daniel.vetter@ffwll.ch>

Also sprinkle the customary legacy_ prefix.

Unfortunately we can't move the other functions since i915 is still
using them. Shame on me for that one :(

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

diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 70ba89f66199..569064a00693 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -473,7 +473,7 @@ int drm_legacy_rmmap_locked(struct drm_device *dev, struct drm_local_map *map)
 		dmah.vaddr = map->handle;
 		dmah.busaddr = map->offset;
 		dmah.size = map->size;
-		__drm_pci_free(dev, &dmah);
+		__drm_legacy_pci_free(dev, &dmah);
 		break;
 	}
 	kfree(map);
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 7563130c6b70..02ab8c52f311 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(drm_pci_alloc);
  *
  * This function is for internal use in the Linux-specific DRM core code.
  */
-void __drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
+void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
 {
 	unsigned long addr;
 	size_t sz;
@@ -105,7 +105,7 @@ void __drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
  */
 void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
 {
-	__drm_pci_free(dev, dmah);
+	__drm_legacy_pci_free(dev, dmah);
 	kfree(dmah);
 }
 
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 4b3e9c4754d1..06cad0323699 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -272,7 +272,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
 				dmah.vaddr = map->handle;
 				dmah.busaddr = map->offset;
 				dmah.size = map->size;
-				__drm_pci_free(dev, &dmah);
+				__drm_legacy_pci_free(dev, &dmah);
 				break;
 			}
 			kfree(map);
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index fe18acae9a73..3c5990b5da80 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1299,7 +1299,6 @@ extern int drm_vma_info(struct seq_file *m, void *data);
 
 extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
 				       size_t align);
-extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
 extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
 extern int drm_pci_set_unique(struct drm_device *dev,
 			      struct drm_master *master,
diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
index 2af19f81eea5..49767e9dcc6b 100644
--- a/include/drm/drm_legacy.h
+++ b/include/drm/drm_legacy.h
@@ -55,6 +55,9 @@ int drm_legacy_addbufs_pci(struct drm_device *d, struct drm_buf_desc *req);
 void drm_legacy_idlelock_take(struct drm_lock_data *lock);
 void drm_legacy_idlelock_release(struct drm_lock_data *lock);
 
+/* drm_pci.c dma alloc wrappers */
+void __drm_legacy_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
+
 /* ATI GART (ati_pcigart.c) */
 #define DRM_ATI_GART_MAIN 1
 #define DRM_ATI_GART_FB   2
-- 
1.9.3

  parent reply	other threads:[~2014-09-10 12:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 10:43 [PATCH 00/15] put drmP.h on diet Daniel Vetter
2014-09-10 10:43 ` [PATCH 01/15] drm: Move dma functions into drm_legacy.h Daniel Vetter
2014-09-10 14:42   ` David Herrmann
2014-09-11  6:24     ` Daniel Vetter
2014-09-11  5:41   ` [PATCH] " Daniel Vetter
2014-09-10 10:43 ` [PATCH 02/15] drm: Move sg " Daniel Vetter
2014-09-10 14:43   ` David Herrmann
2014-09-11  6:29     ` Daniel Vetter
2014-09-11  5:42   ` [PATCH] " Daniel Vetter
2014-09-10 10:43 ` [PATCH 03/15] drm: Move drm_legacy_vma_flush " Daniel Vetter
2014-09-10 10:43 ` [PATCH 04/15] drm: Create drm legacy driver header Daniel Vetter
2014-09-10 10:43 ` [PATCH 05/15] drm: Move ati pci gart into <drm/drm_legacy.h> Daniel Vetter
2014-09-10 10:43 ` Daniel Vetter [this message]
2014-09-10 10:43 ` [PATCH 07/15] drm: Drop drm_sysfs_class from drmP.h Daniel Vetter
2014-09-10 10:43 ` [PATCH 08/15] drm: Move piles of functions from drmP.h to drm_internal.h Daniel Vetter
2014-09-10 10:43 ` [PATCH 09/15] drm: unexport drm_global_mutex Daniel Vetter
2014-09-10 10:43 ` [PATCH 10/15] drm: Purge ioctl forward declarations from drmP.h Daniel Vetter
2014-09-10 10:43 ` [PATCH 11/15] drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h> Daniel Vetter
2014-09-10 10:43 ` [PATCH 12/15] drm: Move legacy buffer structures " Daniel Vetter
2014-09-11  5:43   ` [PATCH] " Daniel Vetter
2014-09-10 10:43 ` [PATCH 13/15] drm: Move LOCK_TEST_WITH_RETURN " Daniel Vetter
2014-09-10 10:43 ` [PATCH 14/15] drm: Move drm_class to drm_internal.h Daniel Vetter
2014-09-10 10:44 ` [PATCH 15/15] drm: Move DRM_MAGIC_HASH_ORDER into drm_drv.c 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=1410345840-3326-7-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox