* [PATCH] drm: split ati_pcigart.h out of drmP.h
@ 2014-09-10 8:23 Dave Airlie
2014-09-10 10:56 ` Daniel Vetter
2014-09-10 13:43 ` Alex Deucher
0 siblings, 2 replies; 3+ messages in thread
From: Dave Airlie @ 2014-09-10 8:23 UTC (permalink / raw)
To: dri-devel
From: Dave Airlie <airlied@redhat.com>
Just move this into a separate header file, and make the
two users use it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/ati_pcigart.c | 2 ++
drivers/gpu/drm/r128/r128_drv.h | 1 +
drivers/gpu/drm/radeon/radeon_drv.h | 1 +
include/drm/ati_pcigart.h | 28 ++++++++++++++++++++++++++++
include/drm/drmP.h | 23 -----------------------
5 files changed, 32 insertions(+), 23 deletions(-)
create mode 100644 include/drm/ati_pcigart.h
diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
index c399dea..6c4d4b6 100644
--- a/drivers/gpu/drm/ati_pcigart.c
+++ b/drivers/gpu/drm/ati_pcigart.c
@@ -34,6 +34,8 @@
#include <linux/export.h>
#include <drm/drmP.h>
+#include <drm/ati_pcigart.h>
+
# define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */
static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
index 5bf3f5f..49fe026 100644
--- a/drivers/gpu/drm/r128/r128_drv.h
+++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -35,6 +35,7 @@
#ifndef __R128_DRV_H__
#define __R128_DRV_H__
+#include <drm/ati_pcigart.h>
/* General customization:
*/
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
index dafd812..3590cb4 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.h
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -34,6 +34,7 @@
#include <linux/firmware.h>
#include <linux/platform_device.h>
+#include <drm/ati_pcigart.h>
#include "radeon_family.h"
/* General customization:
diff --git a/include/drm/ati_pcigart.h b/include/drm/ati_pcigart.h
new file mode 100644
index 0000000..da4bfcd
--- /dev/null
+++ b/include/drm/ati_pcigart.h
@@ -0,0 +1,28 @@
+#ifndef DRM_ATI_PCIGART_H
+#define DRM_ATI_PCIGART_H
+
+/* location of GART table */
+#define DRM_ATI_GART_MAIN 1
+#define DRM_ATI_GART_FB 2
+
+#define DRM_ATI_GART_PCI 1
+#define DRM_ATI_GART_PCIE 2
+#define DRM_ATI_GART_IGP 3
+
+struct drm_ati_pcigart_info {
+ int gart_table_location;
+ int gart_reg_if;
+ void *addr;
+ dma_addr_t bus_addr;
+ dma_addr_t table_mask;
+ struct drm_dma_handle *table_handle;
+ struct drm_local_map mapping;
+ int table_size;
+};
+
+extern int drm_ati_pcigart_init(struct drm_device *dev,
+ struct drm_ati_pcigart_info * gart_info);
+extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
+ struct drm_ati_pcigart_info * gart_info);
+
+#endif
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 0dadc10..e0ee9ce 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -397,24 +397,6 @@ struct drm_map_list {
struct drm_master *master;
};
-/* location of GART table */
-#define DRM_ATI_GART_MAIN 1
-#define DRM_ATI_GART_FB 2
-
-#define DRM_ATI_GART_PCI 1
-#define DRM_ATI_GART_PCIE 2
-#define DRM_ATI_GART_IGP 3
-
-struct drm_ati_pcigart_info {
- int gart_table_location;
- int gart_reg_if;
- void *addr;
- dma_addr_t bus_addr;
- dma_addr_t table_mask;
- struct drm_dma_handle *table_handle;
- struct drm_local_map mapping;
- int table_size;
-};
/**
* This structure defines the drm_mm memory object, which will be used by the
@@ -1253,11 +1235,6 @@ extern int drm_sg_alloc(struct drm_device *dev, void *data,
extern int drm_sg_free(struct drm_device *dev, void *data,
struct drm_file *file_priv);
- /* ATI PCIGART support (ati_pcigart.h) */
-extern int drm_ati_pcigart_init(struct drm_device *dev,
- struct drm_ati_pcigart_info * gart_info);
-extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
- struct drm_ati_pcigart_info * gart_info);
extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
size_t align);
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: split ati_pcigart.h out of drmP.h
2014-09-10 8:23 [PATCH] drm: split ati_pcigart.h out of drmP.h Dave Airlie
@ 2014-09-10 10:56 ` Daniel Vetter
2014-09-10 13:43 ` Alex Deucher
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-09-10 10:56 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
On Wed, Sep 10, 2014 at 06:23:07PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Just move this into a separate header file, and make the
> two users use it.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
I've shuffled this into the new include/drm/drm_legacy.h I'm creating, but
this makes more sense. Can you please apply this to drm-next so that I can
rebase?
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/ati_pcigart.c | 2 ++
> drivers/gpu/drm/r128/r128_drv.h | 1 +
> drivers/gpu/drm/radeon/radeon_drv.h | 1 +
> include/drm/ati_pcigart.h | 28 ++++++++++++++++++++++++++++
> include/drm/drmP.h | 23 -----------------------
> 5 files changed, 32 insertions(+), 23 deletions(-)
> create mode 100644 include/drm/ati_pcigart.h
>
> diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
> index c399dea..6c4d4b6 100644
> --- a/drivers/gpu/drm/ati_pcigart.c
> +++ b/drivers/gpu/drm/ati_pcigart.c
> @@ -34,6 +34,8 @@
> #include <linux/export.h>
> #include <drm/drmP.h>
>
> +#include <drm/ati_pcigart.h>
> +
> # define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */
>
> static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
> diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
> index 5bf3f5f..49fe026 100644
> --- a/drivers/gpu/drm/r128/r128_drv.h
> +++ b/drivers/gpu/drm/r128/r128_drv.h
> @@ -35,6 +35,7 @@
> #ifndef __R128_DRV_H__
> #define __R128_DRV_H__
>
> +#include <drm/ati_pcigart.h>
> /* General customization:
> */
> #define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
> index dafd812..3590cb4 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> @@ -34,6 +34,7 @@
> #include <linux/firmware.h>
> #include <linux/platform_device.h>
>
> +#include <drm/ati_pcigart.h>
> #include "radeon_family.h"
>
> /* General customization:
> diff --git a/include/drm/ati_pcigart.h b/include/drm/ati_pcigart.h
> new file mode 100644
> index 0000000..da4bfcd
> --- /dev/null
> +++ b/include/drm/ati_pcigart.h
> @@ -0,0 +1,28 @@
> +#ifndef DRM_ATI_PCIGART_H
> +#define DRM_ATI_PCIGART_H
> +
> +/* location of GART table */
> +#define DRM_ATI_GART_MAIN 1
> +#define DRM_ATI_GART_FB 2
> +
> +#define DRM_ATI_GART_PCI 1
> +#define DRM_ATI_GART_PCIE 2
> +#define DRM_ATI_GART_IGP 3
> +
> +struct drm_ati_pcigart_info {
> + int gart_table_location;
> + int gart_reg_if;
> + void *addr;
> + dma_addr_t bus_addr;
> + dma_addr_t table_mask;
> + struct drm_dma_handle *table_handle;
> + struct drm_local_map mapping;
> + int table_size;
> +};
> +
> +extern int drm_ati_pcigart_init(struct drm_device *dev,
> + struct drm_ati_pcigart_info * gart_info);
> +extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
> + struct drm_ati_pcigart_info * gart_info);
> +
> +#endif
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 0dadc10..e0ee9ce 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -397,24 +397,6 @@ struct drm_map_list {
> struct drm_master *master;
> };
>
> -/* location of GART table */
> -#define DRM_ATI_GART_MAIN 1
> -#define DRM_ATI_GART_FB 2
> -
> -#define DRM_ATI_GART_PCI 1
> -#define DRM_ATI_GART_PCIE 2
> -#define DRM_ATI_GART_IGP 3
> -
> -struct drm_ati_pcigart_info {
> - int gart_table_location;
> - int gart_reg_if;
> - void *addr;
> - dma_addr_t bus_addr;
> - dma_addr_t table_mask;
> - struct drm_dma_handle *table_handle;
> - struct drm_local_map mapping;
> - int table_size;
> -};
>
> /**
> * This structure defines the drm_mm memory object, which will be used by the
> @@ -1253,11 +1235,6 @@ extern int drm_sg_alloc(struct drm_device *dev, void *data,
> extern int drm_sg_free(struct drm_device *dev, void *data,
> struct drm_file *file_priv);
>
> - /* ATI PCIGART support (ati_pcigart.h) */
> -extern int drm_ati_pcigart_init(struct drm_device *dev,
> - struct drm_ati_pcigart_info * gart_info);
> -extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
> - struct drm_ati_pcigart_info * gart_info);
>
> extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
> size_t align);
> --
> 1.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: split ati_pcigart.h out of drmP.h
2014-09-10 8:23 [PATCH] drm: split ati_pcigart.h out of drmP.h Dave Airlie
2014-09-10 10:56 ` Daniel Vetter
@ 2014-09-10 13:43 ` Alex Deucher
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2014-09-10 13:43 UTC (permalink / raw)
To: Dave Airlie; +Cc: Maling list - DRI developers
On Wed, Sep 10, 2014 at 4:23 AM, Dave Airlie <airlied@gmail.com> wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Just move this into a separate header file, and make the
> two users use it.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/ati_pcigart.c | 2 ++
> drivers/gpu/drm/r128/r128_drv.h | 1 +
> drivers/gpu/drm/radeon/radeon_drv.h | 1 +
> include/drm/ati_pcigart.h | 28 ++++++++++++++++++++++++++++
> include/drm/drmP.h | 23 -----------------------
> 5 files changed, 32 insertions(+), 23 deletions(-)
> create mode 100644 include/drm/ati_pcigart.h
>
> diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
> index c399dea..6c4d4b6 100644
> --- a/drivers/gpu/drm/ati_pcigart.c
> +++ b/drivers/gpu/drm/ati_pcigart.c
> @@ -34,6 +34,8 @@
> #include <linux/export.h>
> #include <drm/drmP.h>
>
> +#include <drm/ati_pcigart.h>
> +
> # define ATI_PCIGART_PAGE_SIZE 4096 /**< PCI GART page size */
>
> static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
> diff --git a/drivers/gpu/drm/r128/r128_drv.h b/drivers/gpu/drm/r128/r128_drv.h
> index 5bf3f5f..49fe026 100644
> --- a/drivers/gpu/drm/r128/r128_drv.h
> +++ b/drivers/gpu/drm/r128/r128_drv.h
> @@ -35,6 +35,7 @@
> #ifndef __R128_DRV_H__
> #define __R128_DRV_H__
>
> +#include <drm/ati_pcigart.h>
> /* General customization:
> */
> #define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
> index dafd812..3590cb4 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> @@ -34,6 +34,7 @@
> #include <linux/firmware.h>
> #include <linux/platform_device.h>
>
> +#include <drm/ati_pcigart.h>
> #include "radeon_family.h"
>
> /* General customization:
> diff --git a/include/drm/ati_pcigart.h b/include/drm/ati_pcigart.h
> new file mode 100644
> index 0000000..da4bfcd
> --- /dev/null
> +++ b/include/drm/ati_pcigart.h
> @@ -0,0 +1,28 @@
> +#ifndef DRM_ATI_PCIGART_H
> +#define DRM_ATI_PCIGART_H
> +
> +/* location of GART table */
> +#define DRM_ATI_GART_MAIN 1
> +#define DRM_ATI_GART_FB 2
> +
> +#define DRM_ATI_GART_PCI 1
> +#define DRM_ATI_GART_PCIE 2
> +#define DRM_ATI_GART_IGP 3
> +
> +struct drm_ati_pcigart_info {
> + int gart_table_location;
> + int gart_reg_if;
> + void *addr;
> + dma_addr_t bus_addr;
> + dma_addr_t table_mask;
> + struct drm_dma_handle *table_handle;
> + struct drm_local_map mapping;
> + int table_size;
> +};
> +
> +extern int drm_ati_pcigart_init(struct drm_device *dev,
> + struct drm_ati_pcigart_info * gart_info);
> +extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
> + struct drm_ati_pcigart_info * gart_info);
> +
> +#endif
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 0dadc10..e0ee9ce 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -397,24 +397,6 @@ struct drm_map_list {
> struct drm_master *master;
> };
>
> -/* location of GART table */
> -#define DRM_ATI_GART_MAIN 1
> -#define DRM_ATI_GART_FB 2
> -
> -#define DRM_ATI_GART_PCI 1
> -#define DRM_ATI_GART_PCIE 2
> -#define DRM_ATI_GART_IGP 3
> -
> -struct drm_ati_pcigart_info {
> - int gart_table_location;
> - int gart_reg_if;
> - void *addr;
> - dma_addr_t bus_addr;
> - dma_addr_t table_mask;
> - struct drm_dma_handle *table_handle;
> - struct drm_local_map mapping;
> - int table_size;
> -};
>
> /**
> * This structure defines the drm_mm memory object, which will be used by the
> @@ -1253,11 +1235,6 @@ extern int drm_sg_alloc(struct drm_device *dev, void *data,
> extern int drm_sg_free(struct drm_device *dev, void *data,
> struct drm_file *file_priv);
>
> - /* ATI PCIGART support (ati_pcigart.h) */
> -extern int drm_ati_pcigart_init(struct drm_device *dev,
> - struct drm_ati_pcigart_info * gart_info);
> -extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
> - struct drm_ati_pcigart_info * gart_info);
>
> extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
> size_t align);
> --
> 1.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-10 13:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 8:23 [PATCH] drm: split ati_pcigart.h out of drmP.h Dave Airlie
2014-09-10 10:56 ` Daniel Vetter
2014-09-10 13:43 ` Alex Deucher
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.