Subversion Repositories Kolibri OS

Rev

Rev 6936 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6936 Rev 7143
Line 43... Line 43...
43
#include 
43
#include 
44
#include 
44
#include 
45
#include 
45
#include 
46
#include 
46
#include 
47
#include 
47
#include 
48
 
-
 
49
#include 
-
 
50
#include 
48
#include 
51
#include 
49
#include 
52
#include 
50
#include 
53
#include 
51
#include 
Line 60... Line 58...
60
#include 
58
#include 
61
#include 
59
#include 
62
#include 
60
#include 
63
#include 
61
#include 
Line -... Line 62...
-
 
62
 
-
 
63
#include 
64
 
64
 
65
#include 
65
#include 
Line 66... Line 66...
66
#include 
66
#include 
67
 
67
 
Line 188... Line 188...
188
									\
188
									\
189
	if (__ratelimit(&_rs))						\
189
	if (__ratelimit(&_rs))						\
190
		drm_err(fmt, ##__VA_ARGS__);				\
190
		drm_err(fmt, ##__VA_ARGS__);				\
191
})
191
})
Line -... Line 192...
-
 
192
 
-
 
193
#if DRM_DEBUG_CODE
192
 
194
 
193
#define DRM_INFO(fmt, ...)				\
195
#define DRM_INFO(fmt, ...)				\
Line 194... Line 196...
194
	printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
196
	printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
195
 
197
 
Line 200... Line 202...
200
 * Debug output.
202
 * Debug output.
201
 *
203
 *
202
 * \param fmt printf() like format string.
204
 * \param fmt printf() like format string.
203
 * \param arg arguments
205
 * \param arg arguments
204
 */
206
 */
205
#if DRM_DEBUG_CODE
-
 
206
#define DRM_DEBUG(fmt, args...)						\
207
#define DRM_DEBUG(fmt, args...)						\
207
    do {                                                    \
208
    do {                                                    \
208
    printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args);  \
209
    printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args);  \
209
	} while (0)
210
	} while (0)
Line 228... Line 229...
228
	do {								\
229
	do {								\
229
		printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args);  \
230
		printk(KERN_INFO "[" DRM_NAME "] " fmt, ##args);  \
230
	} while (0)
231
	} while (0)
Line 231... Line 232...
231
 
232
 
-
 
233
#else
232
#else
234
#define DRM_INFO(fmt, ...)              do { } while (0)
233
#define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
235
#define DRM_DEBUG_DRIVER(fmt, args...)  do { } while (0)
234
#define DRM_DEBUG_KMS(fmt, args...)	do { } while (0)
236
#define DRM_DEBUG_KMS(fmt, args...)     do { } while (0)
235
#define DRM_DEBUG_PRIME(fmt, args...)	do { } while (0)
237
#define DRM_DEBUG_PRIME(fmt, args...)	do { } while (0)
236
#define DRM_DEBUG(fmt, arg...)		 do { } while (0)
238
#define DRM_DEBUG(fmt, arg...)          do { } while (0)
Line 291... Line 293...
291
 
293
 
292
/* Event queued up for userspace to read */
294
/* Event queued up for userspace to read */
293
struct drm_pending_event {
295
struct drm_pending_event {
294
	struct drm_event *event;
296
	struct drm_event *event;
-
 
297
	struct list_head link;
295
	struct list_head link;
298
	struct list_head pending_link;
296
	struct drm_file *file_priv;
299
	struct drm_file *file_priv;
297
	pid_t pid; /* pid of requester, no guarantee it's valid by the time
300
	pid_t pid; /* pid of requester, no guarantee it's valid by the time
298
		      we deliver the event, for tracing only */
301
		      we deliver the event, for tracing only */
299
	void (*destroy)(struct drm_pending_event *event);
302
	void (*destroy)(struct drm_pending_event *event);
Line 349... Line 352...
349
	/** User-created blob properties; this retains a reference on the
352
	/** User-created blob properties; this retains a reference on the
350
	 *  property. */
353
	 *  property. */
351
	struct list_head blobs;
354
	struct list_head blobs;
Line 352... Line 355...
352
 
355
 
-
 
356
	wait_queue_head_t event_wait;
353
	wait_queue_head_t event_wait;
357
	struct list_head pending_event_list;
354
	struct list_head event_list;
358
	struct list_head event_list;
-
 
359
	int event_space;
-
 
360
 
355
	int event_space;
361
	struct mutex event_read_lock;
Line 356... Line 362...
356
};
362
};
357
 
363
 
358
/**
364
/**
Line 799... Line 805...
799
		      unsigned int cmd, unsigned long arg);
805
		      unsigned int cmd, unsigned long arg);
800
extern long drm_compat_ioctl(struct file *filp,
806
extern long drm_compat_ioctl(struct file *filp,
801
			     unsigned int cmd, unsigned long arg);
807
			     unsigned int cmd, unsigned long arg);
802
extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
808
extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
Line 803... Line 809...
803
 
809
 
804
				/* Device support (drm_fops.h) */
810
/* File Operations (drm_fops.c) */
805
extern int drm_open(struct inode *inode, struct file *filp);
811
int drm_open(struct inode *inode, struct file *filp);
806
extern ssize_t drm_read(struct file *filp, char __user *buffer,
812
ssize_t drm_read(struct file *filp, char __user *buffer,
807
			size_t count, loff_t *offset);
813
		 size_t count, loff_t *offset);
808
extern int drm_release(struct inode *inode, struct file *filp);
814
int drm_release(struct inode *inode, struct file *filp);
809
extern int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv);
-
 
-
 
815
int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv);
-
 
816
unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
-
 
817
int drm_event_reserve_init_locked(struct drm_device *dev,
-
 
818
				  struct drm_file *file_priv,
810
 
819
				  struct drm_pending_event *p,
-
 
820
				  struct drm_event *e);
-
 
821
int drm_event_reserve_init(struct drm_device *dev,
-
 
822
			   struct drm_file *file_priv,
-
 
823
			   struct drm_pending_event *p,
-
 
824
			   struct drm_event *e);
-
 
825
void drm_event_cancel_free(struct drm_device *dev,
811
				/* Mapping support (drm_vm.h) */
826
			   struct drm_pending_event *p);
-
 
827
void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e);
Line 812... Line 828...
812
extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
828
void drm_send_event(struct drm_device *dev, struct drm_pending_event *e);
813
 
829
 
814
/* Misc. IOCTL support (drm_ioctl.c) */
830
/* Misc. IOCTL support (drm_ioctl.c) */
815
int drm_noop(struct drm_device *dev, void *data,
831
int drm_noop(struct drm_device *dev, void *data,