2014-09-10 06:16:10 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2014 Intel Corporation
|
|
|
|
* Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
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: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-6-dh.herrmann@gmail.com
2016-09-01 12:48:36 +00:00
|
|
|
#define DRM_IF_MAJOR 1
|
|
|
|
#define DRM_IF_MINOR 4
|
|
|
|
|
2017-03-08 14:12:40 +00:00
|
|
|
/* drm_file.c */
|
2014-09-10 10:43:54 +00:00
|
|
|
extern struct mutex drm_global_mutex;
|
2016-04-26 17:29:35 +00:00
|
|
|
void drm_lastclose(struct drm_device *dev);
|
2014-09-10 10:43:53 +00:00
|
|
|
|
|
|
|
/* drm_pci.c */
|
|
|
|
int drm_irq_by_busid(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
2017-01-25 06:26:52 +00:00
|
|
|
void drm_pci_agp_destroy(struct drm_device *dev);
|
2014-09-10 10:43:53 +00:00
|
|
|
|
|
|
|
/* drm_prime.c */
|
|
|
|
int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
|
|
|
|
void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
|
|
|
|
void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
|
|
|
|
void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpriv,
|
|
|
|
struct dma_buf *dma_buf);
|
|
|
|
|
2016-11-14 11:58:19 +00:00
|
|
|
/* drm_drv.c */
|
|
|
|
struct drm_minor *drm_minor_acquire(unsigned int minor_id);
|
|
|
|
void drm_minor_release(struct drm_minor *minor);
|
|
|
|
|
2014-09-10 10:43:53 +00:00
|
|
|
/* drm_info.c */
|
|
|
|
int drm_name_info(struct seq_file *m, void *data);
|
|
|
|
int drm_clients_info(struct seq_file *m, void* data);
|
|
|
|
int drm_gem_name_info(struct seq_file *m, void *data);
|
|
|
|
|
2017-05-31 09:21:46 +00:00
|
|
|
/* drm_vblank.c */
|
2016-11-14 09:02:55 +00:00
|
|
|
extern unsigned int drm_timestamp_monotonic;
|
2017-05-31 09:21:46 +00:00
|
|
|
void drm_vblank_disable_and_save(struct drm_device *dev, unsigned int pipe);
|
2016-11-14 09:02:55 +00:00
|
|
|
|
|
|
|
/* IOCTLS */
|
|
|
|
int drm_wait_vblank(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *filp);
|
2016-12-13 23:08:02 +00:00
|
|
|
int drm_legacy_irq_control(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_legacy_modeset_ctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
2014-09-10 10:43:53 +00:00
|
|
|
|
|
|
|
/* drm_auth.c */
|
|
|
|
int drm_getmagic(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_authmagic(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
2016-06-14 18:50:59 +00:00
|
|
|
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
2016-06-14 18:51:00 +00:00
|
|
|
int drm_master_open(struct drm_file *file_priv);
|
2016-06-14 18:51:01 +00:00
|
|
|
void drm_master_release(struct drm_file *file_priv);
|
2014-09-10 10:43:53 +00:00
|
|
|
|
|
|
|
/* drm_sysfs.c */
|
2014-09-10 10:43:59 +00:00
|
|
|
extern struct class *drm_class;
|
|
|
|
|
2015-09-09 12:21:30 +00:00
|
|
|
int drm_sysfs_init(void);
|
2014-09-10 10:43:53 +00:00
|
|
|
void drm_sysfs_destroy(void);
|
|
|
|
struct device *drm_sysfs_minor_alloc(struct drm_minor *minor);
|
|
|
|
int drm_sysfs_connector_add(struct drm_connector *connector);
|
|
|
|
void drm_sysfs_connector_remove(struct drm_connector *connector);
|
|
|
|
|
|
|
|
/* drm_gem.c */
|
|
|
|
int drm_gem_init(struct drm_device *dev);
|
|
|
|
void drm_gem_destroy(struct drm_device *dev);
|
|
|
|
int drm_gem_handle_create_tail(struct drm_file *file_priv,
|
|
|
|
struct drm_gem_object *obj,
|
|
|
|
u32 *handlep);
|
|
|
|
int drm_gem_close_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_gem_flink_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
int drm_gem_open_ioctl(struct drm_device *dev, void *data,
|
|
|
|
struct drm_file *file_priv);
|
|
|
|
void drm_gem_open(struct drm_device *dev, struct drm_file *file_private);
|
|
|
|
void drm_gem_release(struct drm_device *dev, struct drm_file *file_private);
|
2014-09-23 13:46:51 +00:00
|
|
|
|
2017-03-22 20:54:01 +00:00
|
|
|
/* drm_debugfs.c drm_debugfs_crc.c */
|
2014-09-23 13:46:52 +00:00
|
|
|
#if defined(CONFIG_DEBUG_FS)
|
|
|
|
int drm_debugfs_init(struct drm_minor *minor, int minor_id,
|
|
|
|
struct dentry *root);
|
|
|
|
int drm_debugfs_cleanup(struct drm_minor *minor);
|
|
|
|
int drm_debugfs_connector_add(struct drm_connector *connector);
|
|
|
|
void drm_debugfs_connector_remove(struct drm_connector *connector);
|
2016-10-06 15:21:06 +00:00
|
|
|
int drm_debugfs_crtc_add(struct drm_crtc *crtc);
|
|
|
|
void drm_debugfs_crtc_remove(struct drm_crtc *crtc);
|
|
|
|
int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc);
|
2014-09-23 13:46:52 +00:00
|
|
|
#else
|
|
|
|
static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
|
|
|
|
struct dentry *root)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int drm_debugfs_cleanup(struct drm_minor *minor)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int drm_debugfs_connector_add(struct drm_connector *connector)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
|
|
|
|
{
|
|
|
|
}
|
2016-10-06 15:21:06 +00:00
|
|
|
|
|
|
|
static inline int drm_debugfs_crtc_add(struct drm_crtc *crtc)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static inline void drm_debugfs_crtc_remove(struct drm_crtc *crtc)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2014-09-23 13:46:52 +00:00
|
|
|
#endif
|