Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5055 → Rev 5056

/drivers/include/drm/drmP.h
64,17 → 64,19
#include <linux/file.h>
#include <linux/pci.h>
#include <linux/jiffies.h>
#include <linux/dma-mapping.h>
 
#include <linux/irqreturn.h>
//#include <linux/smp_lock.h> /* For (un)lock_kernel */
//#include <linux/dma-mapping.h>
#include <linux/mutex.h>
//#include <asm/io.h>
//#include <asm/mman.h>
#include <linux/slab.h>
 
//#include <asm/uaccess.h>
//#include <linux/workqueue.h>
//#include <linux/poll.h>
//#include <asm/pgalloc.h>
 
#include <linux/types.h>
#include <linux/workqueue.h>
 
 
92,6 → 94,7
 
struct device_node;
struct videomode;
struct reservation_object;
 
struct inode;
struct poll_table_struct;
117,48 → 120,41
#define DRM_SCANOUTPOS_INVBL (1 << 1)
#define DRM_SCANOUTPOS_ACCURATE (1 << 2)
 
 
 
#define DRM_UT_CORE 0x01
#define DRM_UT_DRIVER 0x02
#define DRM_UT_KMS 0x04
#define DRM_UT_PRIME 0x08
/*
* Three debug levels are defined.
* drm_core, drm_driver, drm_kms
* drm_core level can be used in the generic drm code. For example:
* drm_ioctl, drm_mm, drm_memory
* The macro definition of DRM_DEBUG is used.
* DRM_DEBUG(fmt, args...)
* The debug info by using the DRM_DEBUG can be obtained by adding
* the boot option of "drm.debug=1".
* 4 debug categories are defined:
*
* drm_driver level can be used in the specific drm driver. It is used
* to add the debug info related with the drm driver. For example:
* i915_drv, i915_dma, i915_gem, radeon_drv,
* The macro definition of DRM_DEBUG_DRIVER can be used.
* DRM_DEBUG_DRIVER(fmt, args...)
* The debug info by using the DRM_DEBUG_DRIVER can be obtained by
* adding the boot option of "drm.debug=0x02"
* CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, drm_memory.c, ...
* This is the category used by the DRM_DEBUG() macro.
*
* drm_kms level can be used in the KMS code related with specific drm driver.
* It is used to add the debug info related with KMS mode. For example:
* the connector/crtc ,
* The macro definition of DRM_DEBUG_KMS can be used.
* DRM_DEBUG_KMS(fmt, args...)
* The debug info by using the DRM_DEBUG_KMS can be obtained by
* adding the boot option of "drm.debug=0x04"
* DRIVER: Used in the vendor specific part of the driver: i915, radeon, ...
* This is the category used by the DRM_DEBUG_DRIVER() macro.
*
* If we add the boot option of "drm.debug=0x06", we can get the debug info by
* using the DRM_DEBUG_KMS and DRM_DEBUG_DRIVER.
* If we add the boot option of "drm.debug=0x05", we can get the debug info by
* using the DRM_DEBUG_KMS and DRM_DEBUG.
* KMS: used in the modesetting code.
* This is the category used by the DRM_DEBUG_KMS() macro.
*
* PRIME: used in the prime code.
* This is the category used by the DRM_DEBUG_PRIME() macro.
*
* Enabling verbose debug messages is done through the drm.debug parameter,
* each category being enabled by a bit.
*
* drm.debug=0x1 will enable CORE messages
* drm.debug=0x2 will enable DRIVER messages
* drm.debug=0x3 will enable CORE and DRIVER messages
* ...
* drm.debug=0xf will enable all messages
*
* An interesting feature is that it's possible to enable verbose logging at
* run-time by echoing the debug value in its sysfs node:
* # echo 0xf > /sys/module/drm/parameters/debug
*/
#define DRM_UT_CORE 0x01
#define DRM_UT_DRIVER 0x02
#define DRM_UT_KMS 0x04
#define DRM_UT_PRIME 0x08
 
extern __printf(4, 5)
void drm_ut_debug_printk(unsigned int request_level,
const char *prefix,
const char *function_name,
extern __printf(2, 3)
void drm_ut_debug_printk(const char *function_name,
const char *format, ...);
extern __printf(2, 3)
int drm_err(const char *func, const char *format, ...);
192,8 → 188,6
also include looping detection. */
 
#define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */
#define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */
#define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */
 
#define DRM_MAP_HASH_OFFSET 0x10000000
 
231,6 → 225,9
#define DRM_INFO(fmt, ...) \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
 
#define DRM_INFO_ONCE(fmt, ...) \
printk_once(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
 
/**
* Debug output.
*
238,49 → 235,28
* \param arg arguments
*/
#if DRM_DEBUG_CODE
#define DRM_DEBUG(fmt, ...) \
#define DRM_DEBUG(fmt, args...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args); \
} while (0)
 
#define DRM_DEBUG_DRIVER(fmt, ...) \
#define DRM_DEBUG_DRIVER(fmt, args...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args); \
} while (0)
#define DRM_DEBUG_KMS(fmt, ...) \
#define DRM_DEBUG_KMS(fmt, args...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args); \
} while (0)
#define DRM_DEBUG_PRIME(fmt, ...) \
#define DRM_DEBUG_PRIME(fmt, args...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args); \
} while (0)
#define DRM_LOG(fmt, ...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
} while (0)
#define DRM_LOG_KMS(fmt, ...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
} while (0)
#define DRM_LOG_MODE(fmt, ...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
} while (0)
#define DRM_LOG_DRIVER(fmt, ...) \
do { \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__); \
} while (0)
#else
#define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
#define DRM_DEBUG_KMS(fmt, args...) do { } while (0)
#define DRM_DEBUG_PRIME(fmt, args...) do { } while (0)
#define DRM_DEBUG(fmt, arg...) do { } while (0)
#define DRM_LOG(fmt, arg...) do { } while (0)
#define DRM_LOG_KMS(fmt, args...) do { } while (0)
#define DRM_LOG_MODE(fmt, arg...) do { } while (0)
#define DRM_LOG_DRIVER(fmt, arg...) do { } while (0)
 
#endif
 
/*@}*/
310,7 → 286,6
} \
} while (0)
 
#if 0
/**
* Ioctl function type.
*
351,6 → 326,7
#define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags) \
[DRM_IOCTL_NR(DRM_##ioctl)] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl, .name = #ioctl}
 
#if 0
struct drm_magic_entry {
struct list_head head;
struct drm_hash_item hash_item;
405,18 → 381,7
};
#endif
 
struct drm_freelist {
int initialized; /**< Freelist in use */
atomic_t count; /**< Number of free buffers */
struct drm_buf *next; /**< End pointer */
 
wait_queue_head_t waiting; /**< Processes waiting on free bufs */
int low_mark; /**< Low water mark */
int high_mark; /**< High water mark */
atomic_t wfh; /**< If waiting for high mark */
spinlock_t lock;
};
 
typedef struct drm_dma_handle {
dma_addr_t busaddr;
void *vaddr;
434,7 → 399,8
int page_order;
struct drm_dma_handle **seglist;
 
struct drm_freelist freelist;
int low_mark; /**< Low water mark */
int high_mark; /**< High water mark */
};
 
/* Event queued up for userspace to read */
455,11 → 421,16
 
/** File private data */
struct drm_file {
unsigned always_authenticated :1;
unsigned authenticated :1;
unsigned is_master :1; /* this file private is a master for a minor */
/* Whether we're master for a minor. Protected by master_mutex */
unsigned is_master :1;
/* true when the client has asked us to expose stereo 3D mode flags */
unsigned stereo_allowed :1;
/*
* true if client understands CRTC primary planes and cursor planes
* in the plane list
*/
unsigned universal_planes:1;
struct list_head lhead;
unsigned long lock_count;
 
470,7 → 441,16
 
void *driver_priv;
 
struct drm_master *master; /* master this node is currently associated with
N.B. not always minor->master */
/**
* fbs - List of framebuffers associated with this file.
*
* Protected by fbs_lock. Note that the fbs list holds a reference on
* the fb object to prevent it from untimely disappearing.
*/
struct list_head fbs;
struct mutex fbs_lock;
 
wait_queue_head_t event_wait;
struct list_head event_list;
478,23 → 458,6
};
 
#if 0
/** Wait queue */
struct drm_queue {
atomic_t use_count; /**< Outstanding uses (+1) */
atomic_t finalization; /**< Finalization in progress */
atomic_t block_count; /**< Count of processes waiting */
atomic_t block_read; /**< Queue blocked for reads */
wait_queue_head_t read_queue; /**< Processes waiting on block_read */
atomic_t block_write; /**< Queue blocked for writes */
wait_queue_head_t write_queue; /**< Processes waiting on block_write */
atomic_t total_queued; /**< Total queued statistic */
atomic_t total_flushed; /**< Total flushes statistic */
atomic_t total_locks; /**< Total locks statistics */
enum drm_ctx_flags flags; /**< Context preserving and 2D-only */
struct drm_waitlist waitlist; /**< Pending buffers */
wait_queue_head_t flush_queue; /**< Processes waiting until flush */
};
 
/**
* Lock data.
*/
578,7 → 541,6
 
#endif
 
 
/**
* Kernel side of a mapping
*/
605,15 → 567,6
struct drm_master *master;
};
 
/**
* Context handle list
*/
struct drm_ctx_list {
struct list_head head; /**< list head */
drm_context_t handle; /**< context handle */
struct drm_file *tag; /**< associated fd private data */
};
 
/* location of GART table */
#define DRM_ATI_GART_MAIN 1
#define DRM_ATI_GART_FB 2
691,38 → 644,46
uint32_t pending_read_domains;
uint32_t pending_write_domain;
 
/**
* dma_buf - dma buf associated with this GEM object
*
* Pointer to the dma-buf associated with this gem object (either
* through importing or exporting). We break the resulting reference
* loop when the last gem handle for this object is released.
*
* Protected by obj->object_name_lock
*/
struct dma_buf *dma_buf;
 
};
 
#include <drm/drm_crtc.h>
 
/* per-master structure */
/**
* struct drm_master - drm master structure
*
* @refcount: Refcount for this master object.
* @minor: Link back to minor char device we are master for. Immutable.
* @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
* @unique_len: Length of unique field. Protected by drm_global_mutex.
* @unique_size: Amount allocated. Protected by drm_global_mutex.
* @magiclist: Hash of used authentication tokens. Protected by struct_mutex.
* @magicfree: List of used authentication tokens. Protected by struct_mutex.
* @lock: DRI lock information.
* @driver_priv: Pointer to driver-private information.
*/
struct drm_master {
 
struct kref refcount; /* refcount for this master */
 
struct list_head head; /**< each minor contains a list of masters */
struct drm_minor *minor; /**< link back to minor we are a master for */
 
char *unique; /**< Unique identifier: e.g., busid */
int unique_len; /**< Length of unique field */
int unique_size; /**< amount allocated */
 
int blocked; /**< Blocked due to VC switch? */
 
/** \name Authentication */
/*@{ */
struct kref refcount;
struct drm_minor *minor;
char *unique;
int unique_len;
int unique_size;
// struct drm_open_hash magiclist;
// struct list_head magicfree;
/*@} */
 
// struct drm_lock_data lock; /**< Information on hardware lock */
 
void *driver_priv; /**< Private structure for driver to use */
// struct drm_lock_data lock;
void *driver_priv;
};
 
#if 0
 
/* Size of ringbuffer for vblank timestamps. Just double-buffer
* in initial implementation.
*/
739,18 → 700,9
#define DRM_SCANOUTPOS_ACCURATE (1 << 2)
 
struct drm_bus {
int bus_type;
int (*get_irq)(struct drm_device *dev);
const char *(*get_name)(struct drm_device *dev);
int (*set_busid)(struct drm_device *dev, struct drm_master *master);
int (*set_unique)(struct drm_device *dev, struct drm_master *master,
struct drm_unique *unique);
int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p);
};
#endif
 
#define DRM_IRQ_ARGS int irq, void *arg
 
/**
* DRM driver structure. This structure represent the common code for
* a family of cards. There will one drm_device for each card present
876,7 → 828,7
 
/* these have to be filled in */
 
irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
irqreturn_t(*irq_handler) (int irq, void *arg);
void (*irq_preinstall) (struct drm_device *dev);
int (*irq_postinstall) (struct drm_device *dev);
void (*irq_uninstall) (struct drm_device *dev);
891,12 → 843,15
int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
u32 driver_features;
int dev_priv_size;
};
 
#define DRM_MINOR_UNASSIGNED 0
#define DRM_MINOR_LEGACY 1
#define DRM_MINOR_CONTROL 2
#define DRM_MINOR_RENDER 3
enum drm_minor_type {
DRM_MINOR_LEGACY,
DRM_MINOR_CONTROL,
DRM_MINOR_RENDER,
DRM_MINOR_CNT,
};
 
/**
* Info file list entry. This structure represents a debugfs or proc file to
925,33 → 880,17
struct drm_minor {
int index; /**< Minor device number */
int type; /**< Control or render */
// dev_t device; /**< Device number for mknod */
// struct device kdev; /**< Linux device */
struct drm_device *dev;
 
// struct proc_dir_entry *proc_root; /**< proc directory entry */
// struct drm_info_node proc_nodes;
// struct dentry *debugfs_root;
// struct drm_info_node debugfs_nodes;
struct dentry *debugfs_root;
 
struct drm_master *master; /* currently active master for this node */
// struct list_head master_list;
// struct drm_mode_group mode_group;
};
struct list_head debugfs_list;
struct mutex debugfs_lock; /* Protects debugfs_list. */
 
/* mode specified on the command line */
struct drm_cmdline_mode {
bool specified;
bool refresh_specified;
bool bpp_specified;
int xres, yres;
int bpp;
int refresh;
bool rb;
bool interlace;
bool cvt;
bool margins;
enum drm_connector_force force;
/* currently active master for this node. Protected by master_mutex */
struct drm_master *master;
struct drm_mode_group mode_group;
};
 
 
962,18 → 901,23
*/
struct drm_device {
struct list_head legacy_dev_list;/**< list of devices per driver for stealth attach cleanup */
char *devname; /**< For /proc/interrupts */
int if_version; /**< Highest interface version set */
 
struct device *dev; /**< Device structure of bus-device */
struct drm_driver *driver; /**< DRM driver managing the device */
void *dev_private; /**< DRM driver private data */
struct drm_minor *primary; /**< Primary node */
atomic_t unplugged; /**< Flag whether dev is dead */
/** \name Locks */
/*@{ */
spinlock_t count_lock; /**< For inuse, drm_device::open_count, drm_device::buf_use */
struct mutex struct_mutex; /**< For others */
struct mutex master_mutex; /**< For drm_minor::master and drm_file::is_master */
/*@} */
 
/** \name Usage Counters */
/*@{ */
int open_count; /**< Outstanding files open */
int open_count; /**< Outstanding files open, protected by drm_global_mutex. */
spinlock_t buf_lock; /**< For drm_device::buf_use and a few other things. */
int buf_use; /**< Buffers in use -- cannot alloc */
atomic_t buf_alloc; /**< Buffer allocation in progress */
/*@} */
1003,6 → 947,8
/** \name Context support */
/*@{ */
bool irq_enabled; /**< True if irq handler is enabled */
int irq;
 
__volatile__ long context_flag; /**< Context swapping flag */
int last_context; /**< Last current context */
/*@} */
1018,7 → 964,12
*/
bool vblank_disable_allowed;
 
/* array of size num_crtcs */
struct drm_vblank_crtc *vblank;
 
spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */
spinlock_t vbl_lock;
 
u32 max_vblank_count; /**< size of vblank counter register */
 
/**
1031,21 → 982,10
 
// struct drm_agp_head *agp; /**< AGP data */
 
struct device *dev; /**< Device structure */
struct pci_dev *pdev; /**< PCI device structure */
int pci_vendor; /**< PCI vendor id */
int pci_device; /**< PCI device id */
 
unsigned int num_crtcs; /**< Number of CRTCs on this device */
void *dev_private; /**< device private data */
struct address_space *dev_mapping;
// struct drm_sigdata sigdata; /**< For block_all_signals */
// sigset_t sigmask;
 
struct drm_driver *driver;
// struct drm_local_map *agp_buffer_map;
// unsigned int agp_buffer_token;
// struct drm_minor *control; /**< Control node for card */
struct drm_minor *primary; /**< render type primary screen head */
 
struct drm_mode_config mode_config; /**< Current mode config */
 
1056,8 → 996,6
struct drm_vma_offset_manager *vma_offset_manager;
/*@} */
int switch_power_state;
 
atomic_t unplugged; /* device has been unplugged or gone away */
};
 
#define DRM_SWITCH_POWER_ON 0
1071,11 → 1009,6
return ((dev->driver->driver_features & feature) ? 1 : 0);
}
 
static inline int drm_dev_to_irq(struct drm_device *dev)
{
return dev->pdev->irq;
}
 
static inline void drm_device_set_unplugged(struct drm_device *dev)
{
smp_wmb();
1089,10 → 1022,6
return ret;
}
 
static inline bool drm_modeset_is_locked(struct drm_device *dev)
{
return mutex_is_locked(&dev->mode_config.mutex);
}
 
/******************************************************************/
/** \name Internal function definitions */
1104,11 → 1033,11
extern long drm_compat_ioctl(struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_lastclose(struct drm_device *dev);
extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
 
/* Device support (drm_fops.h) */
extern struct mutex drm_global_mutex;
extern int drm_open(struct inode *inode, struct file *filp);
extern int drm_stub_open(struct inode *inode, struct file *filp);
extern ssize_t drm_read(struct file *filp, char __user *buffer,
size_t count, loff_t *offset);
extern int drm_release(struct inode *inode, struct file *filp);
1146,29 → 1075,6
extern int drm_noop(struct drm_device *dev, void *data,
struct drm_file *file_priv);
 
/* Context IOCTL support (drm_context.h) */
extern int drm_resctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_addctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_getctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_switchctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_newctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_rmctx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
 
extern int drm_ctxbitmap_init(struct drm_device *dev);
extern void drm_ctxbitmap_cleanup(struct drm_device *dev);
extern void drm_ctxbitmap_free(struct drm_device *dev, int ctx_handle);
 
extern int drm_setsareactx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_getsareactx(struct drm_device *dev, void *data,
struct drm_file *file_priv);
 
/* Authentication IOCTL support (drm_auth.h) */
extern int drm_getmagic(struct drm_device *dev, void *data,
struct drm_file *file_priv);
1179,7 → 1085,7
/* Cache management (drm_cache.c) */
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
void drm_clflush_sg(struct sg_table *st);
void drm_clflush_virt_range(char *addr, unsigned long length);
void drm_clflush_virt_range(void *addr, unsigned long length);
 
/* Locking IOCTL support (drm_lock.h) */
extern int drm_lock(struct drm_device *dev, void *data,
1232,7 → 1138,7
/* IRQ support (drm_irq.h) */
extern int drm_control(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_irq_install(struct drm_device *dev);
extern int drm_irq_install(struct drm_device *dev, int irq);
extern int drm_irq_uninstall(struct drm_device *dev);
 
extern int drm_vblank_init(struct drm_device *dev, int num_crtcs);
1246,8 → 1152,14
extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
extern int drm_vblank_get(struct drm_device *dev, int crtc);
extern void drm_vblank_put(struct drm_device *dev, int crtc);
extern int drm_crtc_vblank_get(struct drm_crtc *crtc);
extern void drm_crtc_vblank_put(struct drm_crtc *crtc);
extern void drm_vblank_off(struct drm_device *dev, int crtc);
extern void drm_vblank_on(struct drm_device *dev, int crtc);
extern void drm_crtc_vblank_off(struct drm_crtc *crtc);
extern void drm_crtc_vblank_on(struct drm_crtc *crtc);
extern void drm_vblank_cleanup(struct drm_device *dev);
 
extern u32 drm_get_last_vbltimestamp(struct drm_device *dev, int crtc,
struct timeval *tvblank, unsigned flags);
extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
1259,21 → 1171,7
extern void drm_calc_timestamping_constants(struct drm_crtc *crtc,
const struct drm_display_mode *mode);
 
extern bool
drm_mode_parse_command_line_for_connector(const char *mode_option,
struct drm_connector *connector,
struct drm_cmdline_mode *mode);
 
extern struct drm_display_mode *
drm_mode_create_from_cmdline_mode(struct drm_device *dev,
struct drm_cmdline_mode *cmd);
 
extern int drm_display_mode_from_videomode(const struct videomode *vm,
struct drm_display_mode *dmode);
extern int of_get_drm_display_mode(struct device_node *np,
struct drm_display_mode *dmode,
int index);
 
/* Modesetting support */
extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
1294,7 → 1192,6
extern void drm_put_dev(struct drm_device *dev);
extern void drm_unplug_dev(struct drm_device *dev);
extern unsigned int drm_debug;
extern unsigned int drm_rnodes;
 
#if 0
extern unsigned int drm_vblank_offdelay;
1302,12 → 1199,9
extern unsigned int drm_timestamp_monotonic;
 
extern struct class *drm_class;
extern struct dentry *drm_debugfs_root;
 
extern struct idr drm_minors_idr;
 
extern struct drm_local_map *drm_getsarea(struct drm_device *dev);
 
#endif
/* Debugfs support */
#if defined(CONFIG_DEBUG_FS)
extern int drm_debugfs_init(struct drm_minor *minor, int minor_id,
1318,6 → 1212,8
extern int drm_debugfs_remove_files(const struct drm_info_list *files,
int count, struct drm_minor *minor);
extern int drm_debugfs_cleanup(struct drm_minor *minor);
extern int drm_debugfs_connector_add(struct drm_connector *connector);
extern void drm_debugfs_connector_remove(struct drm_connector *connector);
#else
static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
struct dentry *root)
1342,6 → 1238,15
{
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)
{
}
 
#endif
 
/* Info file support */
1368,7 → 1273,6
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
 
extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
size_t align);
1380,9 → 1284,8
struct drm_sysfs_class;
extern struct class *drm_sysfs_create(struct module *owner, char *name);
extern void drm_sysfs_destroy(void);
extern int drm_sysfs_device_add(struct drm_minor *minor);
extern struct device *drm_sysfs_minor_alloc(struct drm_minor *minor);
extern void drm_sysfs_hotplug_event(struct drm_device *dev);
extern void drm_sysfs_device_remove(struct drm_minor *minor);
extern int drm_sysfs_connector_add(struct drm_connector *connector);
extern void drm_sysfs_connector_remove(struct drm_connector *connector);
#endif
1443,7 → 1346,7
int drm_gem_create_mmap_offset(struct drm_gem_object *obj);
int drm_gem_create_mmap_offset_size(struct drm_gem_object *obj, size_t size);
 
struct page **drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask);
struct page **drm_gem_get_pages(struct drm_gem_object *obj);
void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages,
bool dirty, bool accessed);
 
1477,7 → 1380,7
{
}
 
//#include <drm/drm_mem_util.h>
#include <drm/drm_mem_util.h>
 
extern int drm_fill_in_dev(struct drm_device *dev,
const struct pci_device_id *ent,
1486,10 → 1389,13
/*@}*/
 
 
 
#if 0
extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);
extern int drm_get_pci_dev(struct pci_dev *pdev,
const struct pci_device_id *ent,
struct drm_driver *driver);
#endif
 
#define DRM_PCIE_SPEED_25 1
#define DRM_PCIE_SPEED_50 2