Skip to contentSkip to conversation

Move struct drm_device.hose to legacy section

PATCH In review Thomas Zimmermann 3 participants 14 messages Jan 12, 2021

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

cover Move struct drm_device.hose to legacy section

This patchset moves struct drm_device.hose to the section for legacy drivers. As part of this, a number of other changes are applied in order to protect all uses of hose by CONFIG_DRM_LEGACY.

Patches 1 to 3 move non-legacy code out put drm_memory.c and add the remaining I/O-memory helpers to the legacy code.

Patch 4 addresses CONFIG_DRM_VM, which is only selected by legacy drivers, so drm_vm.c can directly be compiled by CONFIG_DRM_LEGACY.

Patch 5 changes radeon to maintain its own copy of the hose field of struct drm_device.

Patch 6 makes the hose field legacy.

The patchset has been compile-tested w/o CONFIG_DRM_LEGACY enabled.

Thomas Zimmermann (6):
drm: Inline AGP wrappers into their only callers
drm: Implement drm_need_swiotlb() in drm_cache.c
drm: Build drm_memory.o only for legacy drivers
drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY drm/radeon: Store PCI controller in struct radeon_device.hose
drm: Move struct drm_device.hose to legacy section

 drivers/gpu/drm/Kconfig             |  5 ---
 drivers/gpu/drm/Makefile            |  6 ++--
 drivers/gpu/drm/drm_agpsupport.c    | 12 +++----
 drivers/gpu/drm/drm_cache.c         | 32 ++++++++++++++++++
 drivers/gpu/drm/drm_file.c          |  2 ++
 drivers/gpu/drm/drm_legacy.h        |  2 +-
 drivers/gpu/drm/drm_memory.c        | 51 -----------------------------
 drivers/gpu/drm/radeon/radeon.h     |  3 ++
 drivers/gpu/drm/radeon/radeon_drv.c |  4 ---
 drivers/gpu/drm/radeon/radeon_kms.c |  4 +++
 drivers/gpu/drm/radeon/radeon_ttm.c |  2 +-
 include/drm/drm_agpsupport.h        | 18 ----------
 include/drm/drm_device.h            |  9 ++---
 13 files changed, 57 insertions(+), 93 deletions(-)

base-commit: cd0df21e28c36de80356344ff8683be2813c6ff2
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d --
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author maintainer
#1 lore raw

PATCH 1/6 drm: Inline AGP wrappers into their only callers

The AGP wrapper functions serve no purpose.

---
 drivers/gpu/drm/drm_agpsupport.c | 12 ++++++------
 drivers/gpu/drm/drm_memory.c     | 18 ------------------
 include/drm/drm_agpsupport.h     | 18 ------------------
 3 files changed, 6 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +6 -6
index 4c7ad46fdd21..8b690ef306de 100644
@@ -285,7 +285,7 @@ int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
 	entry = drm_agp_lookup_entry(dev, request->handle);
 	if (!entry || !entry->bound)
 		return -EINVAL;
-	ret = drm_unbind_agp(entry->memory);
+	ret = agp_unbind_memory(entry->memory);
 	if (ret == 0)
 		entry->bound = 0;
 	return ret;
@@ -326,7 +326,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
 	if (!entry || entry->bound)
 		return -EINVAL;
 	page = DIV_ROUND_UP(request->offset, PAGE_SIZE);
-	retcode = drm_bind_agp(entry->memory, page);
+	retcode = agp_bind_memory(entry->memory, page);
 	if (retcode)
 		return retcode;
 	entry->bound = dev->agp->base + (page << PAGE_SHIFT);
@@ -369,11 +369,11 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
 	if (!entry)
 		return -EINVAL;
 	if (entry->bound)
-		drm_unbind_agp(entry->memory);
+		agp_unbind_memory(entry->memory);
 
 	list_del(&entry->head);
 
-	drm_free_agp(entry->memory, entry->pages);
+	agp_free_memory(entry->memory);
 	kfree(entry);
 	return 0;
 }
@@ -453,8 +453,8 @@ void drm_legacy_agp_clear(struct drm_device *dev)
 
 	list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
 		if (entry->bound)
-			drm_unbind_agp(entry->memory);
-		drm_free_agp(entry->memory, entry->pages);
+			agp_unbind_memory(entry->memory);
+		agp_free_memory(entry->memory);
 		kfree(entry);
 	}
 	INIT_LIST_HEAD(&dev->agp->memory);
drivers/gpu/drm/drm_memory.c +0 -18
index fbea69d6f909..f4f2bffdd5bd 100644
@@ -100,24 +100,6 @@ static void *agp_remap(unsigned long offset, unsigned long size,
 	return addr;
 }
 
-/** Wrapper around agp_free_memory() */
-void drm_free_agp(struct agp_memory *handle, int pages)
-{
-	agp_free_memory(handle);
-}
-
-/** Wrapper around agp_bind_memory() */
-int drm_bind_agp(struct agp_memory *handle, unsigned int start)
-{
-	return agp_bind_memory(handle, start);
-}
-
-/** Wrapper around agp_unbind_memory() */
-int drm_unbind_agp(struct agp_memory *handle)
-{
-	return agp_unbind_memory(handle);
-}
-
 #else /*  CONFIG_AGP  */
 static inline void *agp_remap(unsigned long offset, unsigned long size,
 			      struct drm_device *dev)
include/drm/drm_agpsupport.h +0 -18
index 664e120b93e6..f3136750c490 100644
@@ -28,10 +28,6 @@ struct drm_agp_head {
 
 #if IS_ENABLED(CONFIG_AGP)
 
-void drm_free_agp(struct agp_memory * handle, int pages);
-int drm_bind_agp(struct agp_memory * handle, unsigned int start);
-int drm_unbind_agp(struct agp_memory * handle);
-
 struct drm_agp_head *drm_agp_init(struct drm_device *dev);
 void drm_legacy_agp_clear(struct drm_device *dev);
 int drm_agp_acquire(struct drm_device *dev);
@@ -61,20 +57,6 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
 
 #else /* CONFIG_AGP */
 
-static inline void drm_free_agp(struct agp_memory * handle, int pages)
-{
-}
-
-static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
-{
-	return -ENODEV;
-}
-
-static inline int drm_unbind_agp(struct agp_memory * handle)
-{
-	return -ENODEV;
-}
-
 static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
 {
 	return NULL;
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

Quoted 3 lines · Thomas Zimmermann

The AGP wrapper functions serve no purpose.

They do, without them we fail compiling (I think at least) when agp isn't enabled. Did you check for that? I should all work if we have the dummy inlines for relevant agp functions in linux/agp_backend.h. -Daniel

Quoted 121 lines
---
 drivers/gpu/drm/drm_agpsupport.c | 12 ++++++------
 drivers/gpu/drm/drm_memory.c     | 18 ------------------
 include/drm/drm_agpsupport.h     | 18 ------------------
 3 files changed, 6 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +6 -6
index 4c7ad46fdd21..8b690ef306de 100644
@@ -285,7 +285,7 @@ int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
 	entry = drm_agp_lookup_entry(dev, request->handle);
 	if (!entry || !entry->bound)
 		return -EINVAL;
-	ret = drm_unbind_agp(entry->memory);
+	ret = agp_unbind_memory(entry->memory);
 	if (ret == 0)
 		entry->bound = 0;
 	return ret;
@@ -326,7 +326,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
 	if (!entry || entry->bound)
 		return -EINVAL;
 	page = DIV_ROUND_UP(request->offset, PAGE_SIZE);
-	retcode = drm_bind_agp(entry->memory, page);
+	retcode = agp_bind_memory(entry->memory, page);
 	if (retcode)
 		return retcode;
 	entry->bound = dev->agp->base + (page << PAGE_SHIFT);
@@ -369,11 +369,11 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
 	if (!entry)
 		return -EINVAL;
 	if (entry->bound)
-		drm_unbind_agp(entry->memory);
+		agp_unbind_memory(entry->memory);
 
 	list_del(&entry->head);
 
-	drm_free_agp(entry->memory, entry->pages);
+	agp_free_memory(entry->memory);
 	kfree(entry);
 	return 0;
 }
@@ -453,8 +453,8 @@ void drm_legacy_agp_clear(struct drm_device *dev)
 
 	list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
 		if (entry->bound)
-			drm_unbind_agp(entry->memory);
-		drm_free_agp(entry->memory, entry->pages);
+			agp_unbind_memory(entry->memory);
+		agp_free_memory(entry->memory);
 		kfree(entry);
 	}
 	INIT_LIST_HEAD(&dev->agp->memory);
drivers/gpu/drm/drm_memory.c +0 -18
index fbea69d6f909..f4f2bffdd5bd 100644
@@ -100,24 +100,6 @@ static void *agp_remap(unsigned long offset, unsigned long size,
 	return addr;
 }
 
-/** Wrapper around agp_free_memory() */
-void drm_free_agp(struct agp_memory *handle, int pages)
-{
-	agp_free_memory(handle);
-}
-
-/** Wrapper around agp_bind_memory() */
-int drm_bind_agp(struct agp_memory *handle, unsigned int start)
-{
-	return agp_bind_memory(handle, start);
-}
-
-/** Wrapper around agp_unbind_memory() */
-int drm_unbind_agp(struct agp_memory *handle)
-{
-	return agp_unbind_memory(handle);
-}
-
 #else /*  CONFIG_AGP  */
 static inline void *agp_remap(unsigned long offset, unsigned long size,
 			      struct drm_device *dev)
include/drm/drm_agpsupport.h +0 -18
index 664e120b93e6..f3136750c490 100644
@@ -28,10 +28,6 @@ struct drm_agp_head {
 
 #if IS_ENABLED(CONFIG_AGP)
 
-void drm_free_agp(struct agp_memory * handle, int pages);
-int drm_bind_agp(struct agp_memory * handle, unsigned int start);
-int drm_unbind_agp(struct agp_memory * handle);
-
 struct drm_agp_head *drm_agp_init(struct drm_device *dev);
 void drm_legacy_agp_clear(struct drm_device *dev);
 int drm_agp_acquire(struct drm_device *dev);
@@ -61,20 +57,6 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
 
 #else /* CONFIG_AGP */
 
-static inline void drm_free_agp(struct agp_memory * handle, int pages)
-{
-}
-
-static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
-{
-	return -ENODEV;
-}
-
-static inline int drm_unbind_agp(struct agp_memory * handle)
-{
-	return -ENODEV;
-}
-
 static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
 {
 	return NULL;
Signature · 1 line
2.29.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#3 lore raw

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

Hi

Am 12.01.21 um 09:59 schrieb Daniel Vetter:

Quoted 6 lines · Thomas Zimmermann
Quoted 3 lines

The AGP wrapper functions serve no purpose.

They do, without them we fail compiling (I think at least) when agp isn't

I thought so. But the only callers are in drm_agpsupport.c, which depends on CONFIG_AGP in the Makefile. So I expected this to work.

Best regards
Thomas

Quoted 126 lines

enabled. Did you check for that? I should all work if we have the dummy inlines for relevant agp functions in linux/agp_backend.h. -Daniel

Quoted 121 lines
---
  drivers/gpu/drm/drm_agpsupport.c | 12 ++++++------
  drivers/gpu/drm/drm_memory.c     | 18 ------------------
  include/drm/drm_agpsupport.h     | 18 ------------------
  3 files changed, 6 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +6 -6
index 4c7ad46fdd21..8b690ef306de 100644
@@ -285,7 +285,7 @@ int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
  	entry = drm_agp_lookup_entry(dev, request->handle);
  	if (!entry || !entry->bound)
  		return -EINVAL;
-	ret = drm_unbind_agp(entry->memory);
+	ret = agp_unbind_memory(entry->memory);
  	if (ret == 0)
  		entry->bound = 0;
  	return ret;
@@ -326,7 +326,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
  	if (!entry || entry->bound)
  		return -EINVAL;
  	page = DIV_ROUND_UP(request->offset, PAGE_SIZE);
-	retcode = drm_bind_agp(entry->memory, page);
+	retcode = agp_bind_memory(entry->memory, page);
  	if (retcode)
  		return retcode;
  	entry->bound = dev->agp->base + (page << PAGE_SHIFT);
@@ -369,11 +369,11 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
  	if (!entry)
  		return -EINVAL;
  	if (entry->bound)
-		drm_unbind_agp(entry->memory);
+		agp_unbind_memory(entry->memory);
 
  	list_del(&entry->head);
 
-	drm_free_agp(entry->memory, entry->pages);
+	agp_free_memory(entry->memory);
  	kfree(entry);
  	return 0;
  }
@@ -453,8 +453,8 @@ void drm_legacy_agp_clear(struct drm_device *dev)
 
  	list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
  		if (entry->bound)
-			drm_unbind_agp(entry->memory);
-		drm_free_agp(entry->memory, entry->pages);
+			agp_unbind_memory(entry->memory);
+		agp_free_memory(entry->memory);
  		kfree(entry);
  	}
  	INIT_LIST_HEAD(&dev->agp->memory);
drivers/gpu/drm/drm_memory.c +0 -18
index fbea69d6f909..f4f2bffdd5bd 100644
@@ -100,24 +100,6 @@ static void *agp_remap(unsigned long offset, unsigned long size,
  	return addr;
  }
 
-/** Wrapper around agp_free_memory() */
-void drm_free_agp(struct agp_memory *handle, int pages)
-{
-	agp_free_memory(handle);
-}
-
-/** Wrapper around agp_bind_memory() */
-int drm_bind_agp(struct agp_memory *handle, unsigned int start)
-{
-	return agp_bind_memory(handle, start);
-}
-
-/** Wrapper around agp_unbind_memory() */
-int drm_unbind_agp(struct agp_memory *handle)
-{
-	return agp_unbind_memory(handle);
-}
-
  #else /*  CONFIG_AGP  */
  static inline void *agp_remap(unsigned long offset, unsigned long size,
  			      struct drm_device *dev)
include/drm/drm_agpsupport.h +0 -18
index 664e120b93e6..f3136750c490 100644
@@ -28,10 +28,6 @@ struct drm_agp_head {
 
  #if IS_ENABLED(CONFIG_AGP)
 
-void drm_free_agp(struct agp_memory * handle, int pages);
-int drm_bind_agp(struct agp_memory * handle, unsigned int start);
-int drm_unbind_agp(struct agp_memory * handle);
-
  struct drm_agp_head *drm_agp_init(struct drm_device *dev);
  void drm_legacy_agp_clear(struct drm_device *dev);
  int drm_agp_acquire(struct drm_device *dev);
@@ -61,20 +57,6 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
 
  #else /* CONFIG_AGP */
 
-static inline void drm_free_agp(struct agp_memory * handle, int pages)
-{
-}
-
-static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
-{
-	return -ENODEV;
-}
-
-static inline int drm_unbind_agp(struct agp_memory * handle)
-{
-	return -ENODEV;
-}
-
  static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
  {
  	return NULL;
Signature · 1 line
2.29.2
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

Quoted 5 lines · Thomas Zimmermann

Hi

Am 12.01.21 um 09:59 schrieb Daniel Vetter:

Quoted 1 line · Thomas Zimmermann
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

The AGP wrapper functions serve no purpose.

They do, without them we fail compiling (I think at least) when agp isn't

I thought so. But the only callers are in drm_agpsupport.c, which depends on CONFIG_AGP in the Makefile. So I expected this to work.

Please add that information to the commit message, with that r-b: me too. -Daniel

Quoted 139 lines

Best regards
Thomas

Quoted 117 lines

enabled. Did you check for that? I should all work if we have the dummy inlines for relevant agp functions in linux/agp_backend.h. -Daniel

Quoted 113 lines
---
  drivers/gpu/drm/drm_agpsupport.c | 12 ++++++------
  drivers/gpu/drm/drm_memory.c     | 18 ------------------
  include/drm/drm_agpsupport.h     | 18 ------------------
  3 files changed, 6 insertions(+), 42 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +6 -6
index 4c7ad46fdd21..8b690ef306de 100644
@@ -285,7 +285,7 @@ int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
     entry = drm_agp_lookup_entry(dev, request->handle);
     if (!entry || !entry->bound)
             return -EINVAL;
-    ret = drm_unbind_agp(entry->memory);
+    ret = agp_unbind_memory(entry->memory);
     if (ret == 0)
             entry->bound = 0;
     return ret;
@@ -326,7 +326,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
     if (!entry || entry->bound)
             return -EINVAL;
     page = DIV_ROUND_UP(request->offset, PAGE_SIZE);
-    retcode = drm_bind_agp(entry->memory, page);
+    retcode = agp_bind_memory(entry->memory, page);
     if (retcode)
             return retcode;
     entry->bound = dev->agp->base + (page << PAGE_SHIFT);
@@ -369,11 +369,11 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
     if (!entry)
             return -EINVAL;
     if (entry->bound)
-            drm_unbind_agp(entry->memory);
+            agp_unbind_memory(entry->memory);
 
     list_del(&entry->head);
 
-    drm_free_agp(entry->memory, entry->pages);
+    agp_free_memory(entry->memory);
     kfree(entry);
     return 0;
  }
@@ -453,8 +453,8 @@ void drm_legacy_agp_clear(struct drm_device *dev)
 
     list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
             if (entry->bound)
-                    drm_unbind_agp(entry->memory);
-            drm_free_agp(entry->memory, entry->pages);
+                    agp_unbind_memory(entry->memory);
+            agp_free_memory(entry->memory);
             kfree(entry);
     }
     INIT_LIST_HEAD(&dev->agp->memory);
drivers/gpu/drm/drm_memory.c +0 -18
index fbea69d6f909..f4f2bffdd5bd 100644
@@ -100,24 +100,6 @@ static void *agp_remap(unsigned long offset, unsigned long size,
     return addr;
  }
 
-/** Wrapper around agp_free_memory() */
-void drm_free_agp(struct agp_memory *handle, int pages)
-{
-    agp_free_memory(handle);
-}
-
-/** Wrapper around agp_bind_memory() */
-int drm_bind_agp(struct agp_memory *handle, unsigned int start)
-{
-    return agp_bind_memory(handle, start);
-}
-
-/** Wrapper around agp_unbind_memory() */
-int drm_unbind_agp(struct agp_memory *handle)
-{
-    return agp_unbind_memory(handle);
-}
-
  #else /*  CONFIG_AGP  */
  static inline void *agp_remap(unsigned long offset, unsigned long size,
                           struct drm_device *dev)
include/drm/drm_agpsupport.h +0 -16
index 664e120b93e6..f3136750c490 100644
@@ -28,10 +28,6 @@ struct drm_agp_head {
 
  #if IS_ENABLED(CONFIG_AGP)
 
-void drm_free_agp(struct agp_memory * handle, int pages);
-int drm_bind_agp(struct agp_memory * handle, unsigned int start);
-int drm_unbind_agp(struct agp_memory * handle);
-
  struct drm_agp_head *drm_agp_init(struct drm_device *dev);
  void drm_legacy_agp_clear(struct drm_device *dev);
  int drm_agp_acquire(struct drm_device *dev);
@@ -61,20 +57,6 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
 
  #else /* CONFIG_AGP */
 
-static inline void drm_free_agp(struct agp_memory * handle, int pages)
-{
-}
-
-static inline int drm_bind_agp(struct agp_memory * handle, unsigned int start)
-{
-    return -ENODEV;
-}
-
-static inline int drm_unbind_agp(struct agp_memory * handle)
-{
-    return -ENODEV;
Quoted 9 lines
Quoted 8 lines
include/drm/drm_agpsupport.h +0 -3
-}
-
  static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)
  {
     return NULL;
--

2.29.2

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#5 lore raw

PATCH 2/6 drm: Implement drm_need_swiotlb() in drm_cache.c

In reply to Thomas Zimmermann

The function is declared in drm_cache.h. I also removed the curly braces from the for loop to adhere to kernel coding style.

---
 drivers/gpu/drm/drm_cache.c  | 32 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_memory.c | 33 ---------------------------------
 2 files changed, 32 insertions(+), 33 deletions(-)
drivers/gpu/drm/drm_cache.c +32 -0
index 0fe3c496002a..49551a7fa22f 100644
@@ -30,6 +30,7 @@
 
 #include <linux/export.h>
 #include <linux/highmem.h>
+#include <xen/xen.h>
 
 #include <drm/drm_cache.h>
 
@@ -176,3 +177,34 @@ drm_clflush_virt_range(void *addr, unsigned long length)
 #endif
 }
 EXPORT_SYMBOL(drm_clflush_virt_range);
+
+bool drm_need_swiotlb(int dma_bits)
+{
+	struct resource *tmp;
+	resource_size_t max_iomem = 0;
+
+	/*
+	 * Xen paravirtual hosts require swiotlb regardless of requested dma
+	 * transfer size.
+	 *
+	 * NOTE: Really, what it requires is use of the dma_alloc_coherent
+	 *       allocator used in ttm_dma_populate() instead of
+	 *       ttm_populate_and_map_pages(), which bounce buffers so much in
+	 *       Xen it leads to swiotlb buffer exhaustion.
+	 */
+	if (xen_pv_domain())
+		return true;
+
+	/*
+	 * Enforce dma_alloc_coherent when memory encryption is active as well
+	 * for the same reasons as for Xen paravirtual hosts.
+	 */
+	if (mem_encrypt_active())
+		return true;
+
+	for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling)
+		max_iomem = max(max_iomem,  tmp->end);
+
+	return max_iomem > ((u64)1 << dma_bits);
+}
+EXPORT_SYMBOL(drm_need_swiotlb);
drivers/gpu/drm/drm_memory.c +0 -33
index f4f2bffdd5bd..e4f20a2eb6e7 100644
@@ -37,7 +37,6 @@
 #include <linux/highmem.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <xen/xen.h>
 
 #include <drm/drm_agpsupport.h>
 #include <drm/drm_cache.h>
@@ -138,35 +137,3 @@ void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
 		iounmap(map->handle);
 }
 EXPORT_SYMBOL(drm_legacy_ioremapfree);
-
-bool drm_need_swiotlb(int dma_bits)
-{
-	struct resource *tmp;
-	resource_size_t max_iomem = 0;
-
-	/*
-	 * Xen paravirtual hosts require swiotlb regardless of requested dma
-	 * transfer size.
-	 *
-	 * NOTE: Really, what it requires is use of the dma_alloc_coherent
-	 *       allocator used in ttm_dma_populate() instead of
-	 *       ttm_populate_and_map_pages(), which bounce buffers so much in
-	 *       Xen it leads to swiotlb buffer exhaustion.
-	 */
-	if (xen_pv_domain())
-		return true;
-
-	/*
-	 * Enforce dma_alloc_coherent when memory encryption is active as well
-	 * for the same reasons as for Xen paravirtual hosts.
-	 */
-	if (mem_encrypt_active())
-		return true;
-
-	for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
-		max_iomem = max(max_iomem,  tmp->end);
-	}
-
-	return max_iomem > ((u64)1 << dma_bits);
-}
-EXPORT_SYMBOL(drm_need_swiotlb);
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 2/6
#6 lore raw

Re: [PATCH 2/6] drm: Implement drm_need_swiotlb() in drm_cache.c

Quoted 4 lines · Thomas Zimmermann

The function is declared in drm_cache.h. I also removed the curly braces from the for loop to adhere to kernel coding style.

s/implement in/move to/ in the subject. Also would be nice to add kerneldoc while moving (there's not kerneldoc for drm_memory) to avoid the new warning. With that fixed:

It's mildly confusing, but in a way drm_cache.c is our "hack around dma-api layering issues" pile, so fits :-) Maybe we should even make this the official DOC: kerneldoc intro section for this file ...

Cheers, Daniel

Quoted 103 lines
---
 drivers/gpu/drm/drm_cache.c  | 32 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_memory.c | 33 ---------------------------------
 2 files changed, 32 insertions(+), 33 deletions(-)
drivers/gpu/drm/drm_cache.c +32 -0
index 0fe3c496002a..49551a7fa22f 100644
@@ -30,6 +30,7 @@
 
 #include <linux/export.h>
 #include <linux/highmem.h>
+#include <xen/xen.h>
 
 #include <drm/drm_cache.h>
 
@@ -176,3 +177,34 @@ drm_clflush_virt_range(void *addr, unsigned long length)
 #endif
 }
 EXPORT_SYMBOL(drm_clflush_virt_range);
+
+bool drm_need_swiotlb(int dma_bits)
+{
+	struct resource *tmp;
+	resource_size_t max_iomem = 0;
+
+	/*
+	 * Xen paravirtual hosts require swiotlb regardless of requested dma
+	 * transfer size.
+	 *
+	 * NOTE: Really, what it requires is use of the dma_alloc_coherent
+	 *       allocator used in ttm_dma_populate() instead of
+	 *       ttm_populate_and_map_pages(), which bounce buffers so much in
+	 *       Xen it leads to swiotlb buffer exhaustion.
+	 */
+	if (xen_pv_domain())
+		return true;
+
+	/*
+	 * Enforce dma_alloc_coherent when memory encryption is active as well
+	 * for the same reasons as for Xen paravirtual hosts.
+	 */
+	if (mem_encrypt_active())
+		return true;
+
+	for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling)
+		max_iomem = max(max_iomem,  tmp->end);
+
+	return max_iomem > ((u64)1 << dma_bits);
+}
+EXPORT_SYMBOL(drm_need_swiotlb);
drivers/gpu/drm/drm_memory.c +0 -33
index f4f2bffdd5bd..e4f20a2eb6e7 100644
@@ -37,7 +37,6 @@
 #include <linux/highmem.h>
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
-#include <xen/xen.h>
 
 #include <drm/drm_agpsupport.h>
 #include <drm/drm_cache.h>
@@ -138,35 +137,3 @@ void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
 		iounmap(map->handle);
 }
 EXPORT_SYMBOL(drm_legacy_ioremapfree);
-
-bool drm_need_swiotlb(int dma_bits)
-{
-	struct resource *tmp;
-	resource_size_t max_iomem = 0;
-
-	/*
-	 * Xen paravirtual hosts require swiotlb regardless of requested dma
-	 * transfer size.
-	 *
-	 * NOTE: Really, what it requires is use of the dma_alloc_coherent
-	 *       allocator used in ttm_dma_populate() instead of
-	 *       ttm_populate_and_map_pages(), which bounce buffers so much in
-	 *       Xen it leads to swiotlb buffer exhaustion.
-	 */
-	if (xen_pv_domain())
-		return true;
-
-	/*
-	 * Enforce dma_alloc_coherent when memory encryption is active as well
-	 * for the same reasons as for Xen paravirtual hosts.
-	 */
-	if (mem_encrypt_active())
-		return true;
-
-	for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
-		max_iomem = max(max_iomem,  tmp->end);
-	}
-
-	return max_iomem > ((u64)1 << dma_bits);
-}
-EXPORT_SYMBOL(drm_need_swiotlb);
Signature · 1 line
2.29.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#7 lore raw

PATCH 3/6 drm: Build drm_memory.o only for legacy drivers

In reply to Thomas Zimmermann

The file contains I/O-memory functions that are only used by legacy drivers.

---
 drivers/gpu/drm/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/Makefile +3 -2
index fefaff4c832d..ba0ecb7756c6 100644
@@ -5,7 +5,7 @@
 
 drm-y       :=	drm_auth.o drm_cache.o \
 		drm_file.o drm_gem.o drm_ioctl.o drm_irq.o \
-		drm_memory.o drm_drv.o \
+		drm_drv.o \
 		drm_sysfs.o drm_hashtab.o drm_mm.o \
 		drm_crtc.o drm_fourcc.o drm_modes.o drm_edid.o \
 		drm_encoder_slave.o \
@@ -20,7 +20,8 @@ drm-y       :=	drm_auth.o drm_cache.o \
 		drm_client_modeset.o drm_atomic_uapi.o drm_hdcp.o \
 		drm_managed.o drm_vblank_work.o
 
-drm-$(CONFIG_DRM_LEGACY) += drm_legacy_misc.o drm_bufs.o drm_context.o drm_dma.o drm_scatter.o drm_lock.o
+drm-$(CONFIG_DRM_LEGACY) += drm_bufs.o drm_context.o drm_dma.o drm_legacy_misc.o drm_lock.o \
+		drm_memory.o drm_scatter.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
 drm-$(CONFIG_DRM_VM) += drm_vm.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by on v1 3/6
#8 lore raw

Re: [PATCH 3/6] drm: Build drm_memory.o only for legacy drivers

Quoted 2 lines · Thomas Zimmermann

The file contains I/O-memory functions that are only used by legacy drivers.

Yay!

Quoted 1 line
Quoted 30 lines
---
 drivers/gpu/drm/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/Makefile +3 -2
index fefaff4c832d..ba0ecb7756c6 100644
@@ -5,7 +5,7 @@
 
 drm-y       :=	drm_auth.o drm_cache.o \
 		drm_file.o drm_gem.o drm_ioctl.o drm_irq.o \
-		drm_memory.o drm_drv.o \
+		drm_drv.o \
 		drm_sysfs.o drm_hashtab.o drm_mm.o \
 		drm_crtc.o drm_fourcc.o drm_modes.o drm_edid.o \
 		drm_encoder_slave.o \
@@ -20,7 +20,8 @@ drm-y       :=	drm_auth.o drm_cache.o \
 		drm_client_modeset.o drm_atomic_uapi.o drm_hdcp.o \
 		drm_managed.o drm_vblank_work.o
 
-drm-$(CONFIG_DRM_LEGACY) += drm_legacy_misc.o drm_bufs.o drm_context.o drm_dma.o drm_scatter.o drm_lock.o
+drm-$(CONFIG_DRM_LEGACY) += drm_bufs.o drm_context.o drm_dma.o drm_legacy_misc.o drm_lock.o \
+		drm_memory.o drm_scatter.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
 drm-$(CONFIG_DRM_VM) += drm_vm.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
Signature · 1 line
2.29.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#9 lore raw

PATCH 4/6 drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY

In reply to Thomas Zimmermann

CONFIG_DRM_VM gets selected by CONFIG_DRM_LEGACY, but nothing else. So remove it and build drm_vm.o as part of CONFIG_DRM_LEGACY.

---
 drivers/gpu/drm/Kconfig      | 5 -----
 drivers/gpu/drm/Makefile     | 3 +--
 drivers/gpu/drm/drm_legacy.h | 2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/Kconfig +0 -5
index 0973f408d75f..8bf103de1594 100644
@@ -214,10 +214,6 @@ config DRM_GEM_SHMEM_HELPER
 	help
 	  Choose this if you need the GEM shmem helper functions
 
-config DRM_VM
-	bool
-	depends on DRM && MMU
-
 config DRM_SCHED
 	tristate
 	depends on DRM
@@ -391,7 +387,6 @@ source "drivers/gpu/drm/xlnx/Kconfig"
 menuconfig DRM_LEGACY
 	bool "Enable legacy drivers (DANGEROUS)"
 	depends on DRM && MMU
-	select DRM_VM
 	help
 	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
 	  APIs to user-space, which can be used to circumvent access
drivers/gpu/drm/Makefile +1 -2
index ba0ecb7756c6..926adef289db 100644
@@ -21,9 +21,8 @@ drm-y       :=	drm_auth.o drm_cache.o \
 		drm_managed.o drm_vblank_work.o
 
 drm-$(CONFIG_DRM_LEGACY) += drm_bufs.o drm_context.o drm_dma.o drm_legacy_misc.o drm_lock.o \
-		drm_memory.o drm_scatter.o
+		drm_memory.o drm_scatter.o drm_vm.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
-drm-$(CONFIG_DRM_VM) += drm_vm.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
 drm-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_gem_shmem_helper.o
drivers/gpu/drm/drm_legacy.h +1 -1
index 1be3ea320474..f71358f9eac9 100644
@@ -127,7 +127,7 @@ static inline void drm_legacy_master_rmmaps(struct drm_device *dev,
 static inline void drm_legacy_rmmaps(struct drm_device *dev) {}
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_VM) && IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_LEGACY)
 void drm_legacy_vma_flush(struct drm_device *d);
 #else
 static inline void drm_legacy_vma_flush(struct drm_device *d)
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 4/6
#10 lore raw

Re: [PATCH 4/6] drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY

Quoted 26 lines · Thomas Zimmermann

CONFIG_DRM_VM gets selected by CONFIG_DRM_LEGACY, but nothing else. So remove it and build drm_vm.o as part of CONFIG_DRM_LEGACY.

---
 drivers/gpu/drm/Kconfig      | 5 -----
 drivers/gpu/drm/Makefile     | 3 +--
 drivers/gpu/drm/drm_legacy.h | 2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/Kconfig +0 -4
index 0973f408d75f..8bf103de1594 100644
@@ -214,10 +214,6 @@ config DRM_GEM_SHMEM_HELPER
 	help
 	  Choose this if you need the GEM shmem helper functions
 
-config DRM_VM
-	bool
-	depends on DRM && MMU
-
 config DRM_SCHED
 	tristate
 	depends on DRM

drivers/gpu/drm/Kconfig source "drivers/gpu/drm/xlnx/Kconfig" · line 389

Quoted 3 lines
drivers/gpu/drm/Kconfig +0 -0
@@ -391,7 +387,6 @@ source "drivers/gpu/drm/xlnx/Kconfig"
 menuconfig DRM_LEGACY
 	bool "Enable legacy drivers (DANGEROUS)"
 	depends on DRM && MMU

Ah we already depend upon MMU here, so should be all good.

Quoted 35 lines
drivers/gpu/drm/Kconfig +0 -1
-	select DRM_VM
 	help
 	  Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
 	  APIs to user-space, which can be used to circumvent access
drivers/gpu/drm/Makefile +1 -2
index ba0ecb7756c6..926adef289db 100644
@@ -21,9 +21,8 @@ drm-y       :=	drm_auth.o drm_cache.o \
 		drm_managed.o drm_vblank_work.o
 
 drm-$(CONFIG_DRM_LEGACY) += drm_bufs.o drm_context.o drm_dma.o drm_legacy_misc.o drm_lock.o \
-		drm_memory.o drm_scatter.o
+		drm_memory.o drm_scatter.o drm_vm.o
 drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
-drm-$(CONFIG_DRM_VM) += drm_vm.o
 drm-$(CONFIG_COMPAT) += drm_ioc32.o
 drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
 drm-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_gem_shmem_helper.o
drivers/gpu/drm/drm_legacy.h +1 -1
index 1be3ea320474..f71358f9eac9 100644
@@ -127,7 +127,7 @@ static inline void drm_legacy_master_rmmaps(struct drm_device *dev,
 static inline void drm_legacy_rmmaps(struct drm_device *dev) {}
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_VM) && IS_ENABLED(CONFIG_DRM_LEGACY)
+#if IS_ENABLED(CONFIG_DRM_LEGACY)
 void drm_legacy_vma_flush(struct drm_device *d);
 #else
 static inline void drm_legacy_vma_flush(struct drm_device *d)
Signature · 1 line
2.29.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#11 lore raw

PATCH 5/6 drm/radeon: Store PCI controller in struct radeon_device.hose

In reply to Thomas Zimmermann

Moves struct drm_device.hose into struct radeon_device. The field in struct DRM device is only for legacy drivers.

---
 drivers/gpu/drm/radeon/radeon.h     | 3 +++
 drivers/gpu/drm/radeon/radeon_drv.c | 4 ----
 drivers/gpu/drm/radeon/radeon_kms.c | 4 ++++
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 4 files changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/radeon/radeon.h +3 -0
index 6bcb851d7e22..f09989bdce98 100644
@@ -2313,6 +2313,9 @@ struct radeon_device {
 	struct device			*dev;
 	struct drm_device		*ddev;
 	struct pci_dev			*pdev;
+#ifdef __alpha__
+	struct pci_controller		*hose;
+#endif
 	struct rw_semaphore		exclusive_lock;
 	/* ASIC */
 	union radeon_asic_config	config;
drivers/gpu/drm/radeon/radeon_drv.c +0 -4
index 8193a2e9c415..efeb115ae70e 100644
@@ -342,10 +342,6 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		goto err_free;
 
-#ifdef __alpha__
-	dev->hose = pdev->sysdata;
-#endif
-
 	pci_set_drvdata(pdev, dev);
 
 	if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
drivers/gpu/drm/radeon/radeon_kms.c +4 -0
index 7c360d31ab6a..2479d6ab7a36 100644
@@ -115,6 +115,10 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 	}
 	dev->dev_private = (void *)rdev;
 
+#ifdef __alpha__
+	rdev->hose = pdev->sysdata;
+#endif
+
 	/* update BUS flag */
 	if (pci_find_capability(pdev, PCI_CAP_ID_AGP)) {
 		flags |= RADEON_IS_AGP;
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
index 35b715f82ed8..e8c66d10478f 100644
@@ -324,7 +324,7 @@ static int radeon_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_reso
 		 * access, as done in ttm_bo_vm_fault().
 		 */
 		mem->bus.offset = (mem->bus.offset & 0x0ffffffffUL) +
-			rdev->ddev->hose->dense_mem_base;
+			rdev->hose->dense_mem_base;
 #endif
 		break;
 	default:
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#12 lore raw

PATCH 6/6 drm: Move struct drm_device.hose to legacy section

In reply to Thomas Zimmermann

The field is only relevant for legacy DRM drivers. Its only non-legacy user in the DRM core is in drm_file.c. This code is now protected by CONFIG_DRM_LEGACY. Radeon, the only driver that used the field, has been changed to maintain it's own copy.

---
 drivers/gpu/drm/drm_file.c | 2 ++
 include/drm/drm_device.h   | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_file.c +2 -0
index 80886d50d0f1..86c405d86a68 100644
@@ -370,6 +370,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
 	list_add(&priv->lhead, &dev->filelist);
 	mutex_unlock(&dev->filelist_mutex);
 
+#ifdef CONFIG_DRM_LEGACY
 #ifdef __alpha__
 	/*
 	 * Default the hose
@@ -389,6 +390,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
 				dev->hose = b->sysdata;
 		}
 	}
+#endif
 #endif
 
 	return 0;
include/drm/drm_device.h +5 -4
index 939904ae88fc..d647223e8390 100644
@@ -282,10 +282,6 @@ struct drm_device {
 	/** @pdev: PCI device structure */
 	struct pci_dev *pdev;
 
-#ifdef __alpha__
-	/** @hose: PCI hose, only used on ALPHA platforms. */
-	struct pci_controller *hose;
-#endif
 	/** @num_crtcs: Number of CRTCs on this device */
 	unsigned int num_crtcs;
 
@@ -328,6 +324,11 @@ struct drm_device {
 	/* List of devices per driver for stealth attach cleanup */
 	struct list_head legacy_dev_list;
 
+#ifdef __alpha__
+	/** @hose: PCI hose, only used on ALPHA platforms. */
+	struct pci_controller *hose;
+#endif
+
 	/* Context handle management - linked list of context handles */
 	struct list_head ctxlist;
 
Signature · 6 lines
2.29.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer
#13 lore raw
In reply to Thomas Zimmermann

I'm not even sure the radeon stuff still compiles/works on alpha :)

Anyway looks sane to me and the whole set is Reviewed-by: Christian König <[email protected]>.

Thanks,
Christian.

Am 12.01.21 um 09:10 schrieb Thomas Zimmermann:

Quoted 41 lines

This patchset moves struct drm_device.hose to the section for legacy drivers. As part of this, a number of other changes are applied in order to protect all uses of hose by CONFIG_DRM_LEGACY.

Patches 1 to 3 move non-legacy code out put drm_memory.c and add the remaining I/O-memory helpers to the legacy code.

Patch 4 addresses CONFIG_DRM_VM, which is only selected by legacy drivers, so drm_vm.c can directly be compiled by CONFIG_DRM_LEGACY.

Patch 5 changes radeon to maintain its own copy of the hose field of struct drm_device.

Patch 6 makes the hose field legacy.

The patchset has been compile-tested w/o CONFIG_DRM_LEGACY enabled.

Thomas Zimmermann (6):
drm: Inline AGP wrappers into their only callers
drm: Implement drm_need_swiotlb() in drm_cache.c
drm: Build drm_memory.o only for legacy drivers
drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY drm/radeon: Store PCI controller in struct radeon_device.hose
drm: Move struct drm_device.hose to legacy section

  drivers/gpu/drm/Kconfig             |  5 ---
  drivers/gpu/drm/Makefile            |  6 ++--
  drivers/gpu/drm/drm_agpsupport.c    | 12 +++----
  drivers/gpu/drm/drm_cache.c         | 32 ++++++++++++++++++
  drivers/gpu/drm/drm_file.c          |  2 ++
  drivers/gpu/drm/drm_legacy.h        |  2 +-
  drivers/gpu/drm/drm_memory.c        | 51 -----------------------------
  drivers/gpu/drm/radeon/radeon.h     |  3 ++
  drivers/gpu/drm/radeon/radeon_drv.c |  4 ---
  drivers/gpu/drm/radeon/radeon_kms.c |  4 +++
  drivers/gpu/drm/radeon/radeon_ttm.c |  2 +-
  include/drm/drm_agpsupport.h        | 18 ----------
  include/drm/drm_device.h            |  9 ++---
  13 files changed, 57 insertions(+), 93 deletions(-)
Quoted 5 lines

base-commit: cd0df21e28c36de80356344ff8683be2813c6ff2
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d --
2.29.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel