Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98faa78c authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'topic/drm-header-rework-2014-09-12' of...

Merge tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel into drm-next

So here's the header cleanup, rebased on top of drm-next. Two new header
files are created here:

- drivers/gpu/drm/drm_internal.h for non-legacy drm.ko private
  declarations.

- include/drm/drm_legacy.h for legacy interfaces used by non-kms drivers.

And of course lots fo stuff gets shuffled into the already existing
drivers/gpu/drm/drm_legacy.h for drm.ko internal stuff.

topic branch smoke-tested in drm-intel-nightly for a bit. And the 0day
tester also worked through it (and found a few places I didn't add a
static to functions).

* tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel:
  drm: Move DRM_MAGIC_HASH_ORDER into drm_drv.c
  drm: Move drm_class to drm_internal.h
  drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h>
  drm: Move legacy buffer structures to <drm/drm_legacy.h>
  drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h>
  drm: Purge ioctl forward declarations from drmP.h
  drm: unexport drm_global_mutex
  drm: Move piles of functions from drmP.h to drm_internal.h
  drm: Move vblank related module options into drm_irq.c
  drm: Drop drm_sysfs_class from drmP.h
  drm: Move __drm_pci_free to drm_legacy.h
  drm: Create drm legacy driver header
  drm: Move drm_legacy_vma_flush into drm_legacy.h
  drm: Move sg functions into drm_legacy.h
  drm: Move dma functions into drm_legacy.h
parents edbaae5a 6865b20a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
 */

#include <drm/drmP.h>
#include "drm_internal.h"

struct drm_magic_entry {
	struct list_head head;
+2 −2
Original line number Diff line number Diff line
@@ -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);
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <drm/drm_modeset_lock.h>

#include "drm_crtc_internal.h"
#include "drm_internal.h"

static struct drm_framebuffer *add_framebuffer_internal(struct drm_device *dev,
							struct drm_mode_fb_cmd2 *r,
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <linux/export.h>
#include <drm/drmP.h>
#include <drm/drm_edid.h>
#include "drm_internal.h"

#if defined(CONFIG_DEBUG_FS)

+5 −6
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@

#include <linux/export.h>
#include <drm/drmP.h>
#include "drm_legacy.h"

/**
 * Initialize the DMA data.
@@ -124,7 +125,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 +143,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_reclaim_buffers(struct drm_device *dev,
				struct drm_file *file_priv)
{
	struct drm_device_dma *dma = dev->dma;
@@ -154,7 +155,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 +167,3 @@ void drm_core_reclaim_buffers(struct drm_device *dev,
		}
	}
}

EXPORT_SYMBOL(drm_core_reclaim_buffers);
Loading