drm: move a bunch of legacy dma/buf tracking to legacy header
Subsystems (2)
Dave Airlie
maintainerPATCH 1/1 drm: move a bunch of legacy dma/buf tracking to legacy header
From: Dave Airlie <[email protected]>
This moves the drm_dma and drm_bufs stuff out of drmP.h as much as possible and hides it in drm_legacy.h.
It built.
Signed-off-by-: Dave Airlie <[email protected]>
--- drivers/gpu/drm/drm_bufs.c | 2 +- drivers/gpu/drm/drm_dma.c | 10 ++--- drivers/gpu/drm/drm_fops.c | 2 +- drivers/gpu/drm/drm_info.c | 1 + drivers/gpu/drm/drm_legacy.h | 73 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i810/i810_dma.c | 1 + drivers/gpu/drm/mga/mga_dma.c | 1 + drivers/gpu/drm/mga/mga_state.c | 1 + drivers/gpu/drm/r128/r128_cce.c | 1 + drivers/gpu/drm/r128/r128_state.c | 1 + drivers/gpu/drm/savage/savage_bci.c | 1 + drivers/gpu/drm/savage/savage_state.c | 1 + include/drm/drmP.h | 73 +---------------------------------- 13 files changed, 88 insertions(+), 80 deletions(-)
drivers/gpu/drm/drm_bufs.c +1 -1
@@ -1338,7 +1338,7 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data, task_pid_nr(current));return -EINVAL ; } -drm_free_buffer (dev, buf); +drm_legacy_free_buffer (dev, buf); }return 0 ;
drivers/gpu/drm/drm_dma.c +4 -6
@@ -35,7 +35,7 @@#include <linux/export.h> #include <drm/drmP.h> - +#include "drm_legacy.h" /** * Initialize the DMA data. *
@@ -124,7 +124,7 @@ void drm_legacy_dma_takedown(struct drm_device *dev)* * Resets the fields of \p buf. */ -void drm_free_buffer (struct drm_device *dev,struct drm_buf * buf) +void drm_legacy_free_buffer (struct drm_device *dev,struct drm_buf * buf) {if (!buf)return ;
@@ -142,7 +142,7 @@ void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf)* * Frees each buffer associated with \p file_priv not already on the hardware. */ -void drm_core_reclaim_buffers (struct drm_device *dev, +void drm_legacy_core_reclaim_buffers (struct drm_device *dev,struct drm_file *file_priv) {struct drm_device_dma *dma = dev->dma;
@@ -154,7 +154,7 @@ void drm_core_reclaim_buffers(struct drm_device *dev,if (dma->buflist[i]->file_priv == file_priv) {switch (dma->buflist[i]->list) {case DRM_LIST_NONE : -drm_free_buffer (dev, dma->buflist[i]); +drm_legacy_free_buffer (dev, dma->buflist[i]);break ;case DRM_LIST_WAIT : dma->buflist[i]->list =DRM_LIST_RECLAIM ;
@@ -166,5 +166,3 @@ void drm_core_reclaim_buffers(struct drm_device *dev, } } } - -EXPORT_SYMBOL (drm_core_reclaim_buffers);
drivers/gpu/drm/drm_fops.c +1 -1
@@ -404,7 +404,7 @@ int drm_release(struct inode *inode, struct file *filp)drm_master_release (dev, filp);if (drm_core_check_feature (dev,DRIVER_HAVE_DMA )) -drm_core_reclaim_buffers (dev, file_priv); +drm_legacy_core_reclaim_buffers (dev, file_priv);drm_events_release (file_priv);
drivers/gpu/drm/drm_info.c +1 -0
@@ -35,6 +35,7 @@#include <linux/seq_file.h> #include <drm/drmP.h> +#include "drm_legacy.h" /** * Called when "/proc/dri/.../name" is read.
drivers/gpu/drm/drm_legacy.h +73 -0
77 lines not on this page · raw message
drivers/gpu/drm/i810/i810_dma.c +1 -0
@@ -31,6 +31,7 @@*/ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/i810_drm.h> #include "i810_drv.h" #include <linux/interrupt.h> /* For task queue support */
drivers/gpu/drm/mga/mga_dma.c +1 -0
@@ -36,6 +36,7 @@*/ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/mga_drm.h> #include "mga_drv.h"
drivers/gpu/drm/mga/mga_state.c +1 -0
@@ -33,6 +33,7 @@*/ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/mga_drm.h> #include "mga_drv.h"
drivers/gpu/drm/r128/r128_cce.c +1 -0
@@ -35,6 +35,7 @@#include <linux/module.h> #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/r128_drm.h> #include "r128_drv.h"
drivers/gpu/drm/r128/r128_state.c +1 -0
@@ -29,6 +29,7 @@*/ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/r128_drm.h> #include "r128_drv.h"
drivers/gpu/drm/savage/savage_bci.c +1 -0
@@ -23,6 +23,7 @@* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/savage_drm.h> #include "savage_drv.h"
drivers/gpu/drm/savage/savage_state.c +1 -0
@@ -23,6 +23,7 @@* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <drm/drmP.h> +#include "../drm_legacy.h" #include <drm/savage_drm.h> #include "savage_drv.h"
include/drm/drmP.h +1 -72
97 lines not on this page · raw message
Signature · 1 line
1.9.3
Hi
Quoted 6 lines · Dave Airlie
From: Dave Airlie <[email protected]>
This moves the
drm_dmaanddrm_bufsstuff out ofdrmP.has much as possible and hides it indrm_legacy.h.It built.
I guess this is now obsolete with Daniel's series? I prefer his way (using a global drm_legacy.h and a drm-core drm_legacy.h header). Then headers in drivers/gpu/drm are local to drm.ko, headers in include/drm/ are global with interfaces exported to drivers from drm.ko.
Thanks
David