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

Commit 82d5e73f authored by David Herrmann's avatar David Herrmann Committed by Daniel Vetter
Browse files

drm: drop obsolete drm_core.h



The drm_core.h header contains a set of constants meant to be used
throughout DRM. However, as it turns out, they're each used just once and
don't bring any benefit. They're also grossly mis-named and lack
name-spacing. This patch inlines them, or moves them into drm_internal.h
as appropriate:

 - CORE_AUTHOR and CORE_DESC are inlined into corresponding MODULE_*()
   macros. It's just confusing having to follow 2 pointers when trying to
   find the definition of these fields. Grep'ping for MODULE_AUTHOR()
   should reveal the full information, if there's no strong reason not to.

 - CORE_NAME, CORE_DATE, CORE_MAJOR, CORE_MINOR, and CORE_PATCHLEVEL are
   inlined into the sysfs 'version' attribute. They're stripped
   everywhere else (which is just some printk() statements). CORE_NAME
   just doesn't make *any* sense, as we hard-code it in many places,
   anyway. The other constants are outdated and just serve
   binary-compatibility purposes. Hence, inline them in 'version' sysfs
   attribute (we might even try dropping it..).

 - DRM_IF_MAJOR and DRM_IF_MINOR are moved into drm_internal.h as they're
   only used by the global ioctl handlers. Furthermore, versioning
   interfaces breaks backports and as such is deprecated, anyway. We just
   keep them for historic reasons. I doubt anyone will ever modify them
   again.

Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-6-dh.herrmann@gmail.com
parent d9a1f0b4
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -33,7 +33,6 @@
#include <linux/mount.h>
#include <linux/mount.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <drm/drmP.h>
#include <drm/drmP.h>
#include <drm/drm_core.h>
#include "drm_crtc_internal.h"
#include "drm_crtc_internal.h"
#include "drm_legacy.h"
#include "drm_legacy.h"
#include "drm_internal.h"
#include "drm_internal.h"
@@ -46,8 +45,8 @@
unsigned int drm_debug = 0;
unsigned int drm_debug = 0;
EXPORT_SYMBOL(drm_debug);
EXPORT_SYMBOL(drm_debug);


MODULE_AUTHOR(CORE_AUTHOR);
MODULE_AUTHOR("Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl");
MODULE_DESCRIPTION(CORE_DESC);
MODULE_DESCRIPTION("DRM shared core routines");
MODULE_LICENSE("GPL and additional rights");
MODULE_LICENSE("GPL and additional rights");
MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n"
"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n"
@@ -845,8 +844,7 @@ static int __init drm_core_init(void)
		goto err_p3;
		goto err_p3;
	}
	}


	DRM_INFO("Initialized %s %d.%d.%d %s\n",
	DRM_INFO("Initialized\n");
		 CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE);
	return 0;
	return 0;
err_p3:
err_p3:
	drm_sysfs_destroy();
	drm_sysfs_destroy();
+3 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,9 @@
 * OTHER DEALINGS IN THE SOFTWARE.
 * OTHER DEALINGS IN THE SOFTWARE.
 */
 */


#define DRM_IF_MAJOR 1
#define DRM_IF_MINOR 4

/* drm_irq.c */
/* drm_irq.c */
extern unsigned int drm_timestamp_monotonic;
extern unsigned int drm_timestamp_monotonic;


+0 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,6 @@
#include <linux/export.h>
#include <linux/export.h>


#include <drm/drmP.h>
#include <drm/drmP.h>
#include <drm/drm_core.h>


#define DRM_IOCTL_VERSION32		DRM_IOWR(0x00, drm_version32_t)
#define DRM_IOCTL_VERSION32		DRM_IOWR(0x00, drm_version32_t)
#define DRM_IOCTL_GET_UNIQUE32		DRM_IOWR(0x01, drm_unique32_t)
#define DRM_IOCTL_GET_UNIQUE32		DRM_IOWR(0x01, drm_unique32_t)
+0 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
 */
 */


#include <drm/drmP.h>
#include <drm/drmP.h>
#include <drm/drm_core.h>
#include <drm/drm_auth.h>
#include <drm/drm_auth.h>
#include "drm_legacy.h"
#include "drm_legacy.h"
#include "drm_internal.h"
#include "drm_internal.h"
+1 −7
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@
#include <linux/export.h>
#include <linux/export.h>


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


@@ -37,12 +36,7 @@ static char *drm_devnode(struct device *dev, umode_t *mode)
	return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev));
	return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev));
}
}


static CLASS_ATTR_STRING(version, S_IRUGO,
static CLASS_ATTR_STRING(version, S_IRUGO, "drm 1.1.0 20060810");
		CORE_NAME " "
		__stringify(CORE_MAJOR) "."
		__stringify(CORE_MINOR) "."
		__stringify(CORE_PATCHLEVEL) " "
		CORE_DATE);


/**
/**
 * drm_sysfs_init - initialize sysfs helpers
 * drm_sysfs_init - initialize sysfs helpers
Loading