Subversion Repositories Kolibri OS

Rev

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

Rev 3763 Rev 4065
Line 386... Line 386...
386
	struct drm_buf **wp;			/**< Write pointer */
386
	struct drm_buf **wp;			/**< Write pointer */
387
	struct drm_buf **end;		/**< End pointer */
387
	struct drm_buf **end;		/**< End pointer */
388
	spinlock_t read_lock;
388
	spinlock_t read_lock;
389
	spinlock_t write_lock;
389
	spinlock_t write_lock;
390
};
390
};
-
 
391
#endif
Line 391... Line 392...
391
 
392
 
392
struct drm_freelist {
393
struct drm_freelist {
393
	int initialized;	       /**< Freelist in use */
394
	int initialized;	       /**< Freelist in use */
394
	atomic_t count;		       /**< Number of free buffers */
395
	atomic_t count;		       /**< Number of free buffers */
Line 398... Line 399...
398
	int low_mark;		       /**< Low water mark */
399
	int low_mark;		       /**< Low water mark */
399
	int high_mark;		       /**< High water mark */
400
	int high_mark;		       /**< High water mark */
400
	atomic_t wfh;		       /**< If waiting for high mark */
401
	atomic_t wfh;		       /**< If waiting for high mark */
401
	spinlock_t lock;
402
	spinlock_t lock;
402
};
403
};
403
#endif
-
 
Line 404... Line 404...
404
 
404
 
405
typedef struct drm_dma_handle {
405
typedef struct drm_dma_handle {
406
	dma_addr_t busaddr;
406
	dma_addr_t busaddr;
407
	void *vaddr;
407
	void *vaddr;
408
	size_t size;
408
	size_t size;
Line 409... Line -...
409
} drm_dma_handle_t;
-
 
410
 
409
} drm_dma_handle_t;
411
#if 0
410
 
412
/**
411
/**
413
 * Buffer entry.  There is one of this for each buffer size order.
412
 * Buffer entry.  There is one of this for each buffer size order.
414
 */
413
 */
Line 436... Line 435...
436
/* initial implementaton using a linked list - todo hashtab */
435
/* initial implementaton using a linked list - todo hashtab */
437
struct drm_prime_file_private {
436
struct drm_prime_file_private {
438
	struct list_head head;
437
	struct list_head head;
439
	struct mutex lock;
438
	struct mutex lock;
440
};
439
};
441
#endif
-
 
Line 442... Line 440...
442
 
440
 
443
/** File private data */
441
/** File private data */
444
struct drm_file {
442
struct drm_file {
445
	struct list_head lhead;
443
	struct list_head lhead;
Line 1025... Line 1023...
1025
 * debugfs node structure. This structure represents a debugfs file.
1023
 * debugfs node structure. This structure represents a debugfs file.
1026
 */
1024
 */
1027
struct drm_info_node {
1025
struct drm_info_node {
1028
	struct list_head list;
1026
	struct list_head list;
1029
	struct drm_minor *minor;
1027
	struct drm_minor *minor;
1030
	struct drm_info_list *info_ent;
1028
	const struct drm_info_list *info_ent;
1031
	struct dentry *dent;
1029
	struct dentry *dent;
1032
};
1030
};
Line 1033... Line 1031...
1033
 
1031
 
1034
/**
1032
/**
Line 1224... Line 1222...
1224
	return dev->pdev->irq;
1222
	return dev->pdev->irq;
1225
}
1223
}
Line 1226... Line 1224...
1226
 
1224
 
Line 1227... Line -...
1227
#if 0
-
 
1228
 
-
 
1229
#ifdef __alpha__
-
 
1230
#define drm_get_pci_domain(dev) dev->hose->index
-
 
1231
#else
-
 
1232
#define drm_get_pci_domain(dev) 0
-
 
1233
#endif
1225
#if 0
1234
 
1226
 
1235
#if __OS_HAS_AGP
1227
#if __OS_HAS_AGP
1236
static inline int drm_core_has_AGP(struct drm_device *dev)
1228
static inline int drm_core_has_AGP(struct drm_device *dev)
1237
{
1229
{
Line 1244... Line 1236...
1244
#if __OS_HAS_MTRR
1236
#if __OS_HAS_MTRR
1245
static inline int drm_core_has_MTRR(struct drm_device *dev)
1237
static inline int drm_core_has_MTRR(struct drm_device *dev)
1246
{
1238
{
1247
	return drm_core_check_feature(dev, DRIVER_USE_MTRR);
1239
	return drm_core_check_feature(dev, DRIVER_USE_MTRR);
1248
}
1240
}
1249
 
-
 
1250
#define DRM_MTRR_WC		MTRR_TYPE_WRCOMB
-
 
1251
 
-
 
1252
static inline int drm_mtrr_add(unsigned long offset, unsigned long size,
-
 
1253
			       unsigned int flags)
-
 
1254
{
-
 
1255
	return mtrr_add(offset, size, flags, 1);
-
 
1256
}
-
 
1257
 
-
 
1258
static inline int drm_mtrr_del(int handle, unsigned long offset,
-
 
1259
			       unsigned long size, unsigned int flags)
-
 
1260
{
-
 
1261
	return mtrr_del(handle, offset, size);
-
 
1262
}
-
 
1263
 
-
 
1264
#else
1241
#else
1265
#define drm_core_has_MTRR(dev) (0)
1242
#define drm_core_has_MTRR(dev) (0)
-
 
1243
#endif
Line -... Line 1244...
-
 
1244
 
-
 
1245
static inline void drm_device_set_unplugged(struct drm_device *dev)
-
 
1246
{
1266
 
1247
	smp_wmb();
-
 
1248
	atomic_set(&dev->unplugged, 1);
Line 1267... Line 1249...
1267
#define DRM_MTRR_WC		0
1249
}
1268
 
-
 
1269
static inline int drm_mtrr_add(unsigned long offset, unsigned long size,
1250
 
-
 
1251
static inline int drm_device_is_unplugged(struct drm_device *dev)
-
 
1252
{
1270
			       unsigned int flags)
1253
	int ret = atomic_read(&dev->unplugged);
1271
{
1254
	smp_rmb();
Line 1272... Line 1255...
1272
	return 0;
1255
	return ret;
1273
}
-
 
1274
 
1256
}
1275
static inline int drm_mtrr_del(int handle, unsigned long offset,
1257
 
1276
			       unsigned long size, unsigned int flags)
1258
static inline bool drm_modeset_is_locked(struct drm_device *dev)
1277
{
-
 
Line 1278... Line 1259...
1278
	return 0;
1259
{
1279
}
1260
	return mutex_is_locked(&dev->mode_config.mutex);
1280
#endif
1261
}
Line 1526... Line 1507...
1526
extern struct idr drm_minors_idr;
1507
extern struct idr drm_minors_idr;
Line 1527... Line 1508...
1527
 
1508
 
Line 1528... Line 1509...
1528
extern struct drm_local_map *drm_getsarea(struct drm_device *dev);
1509
extern struct drm_local_map *drm_getsarea(struct drm_device *dev);
1529
 
1510
 
1530
				/* Proc support (drm_proc.h) */
-
 
1531
extern int drm_proc_init(struct drm_minor *minor, int minor_id,
1511
				/* Proc support (drm_proc.h) */
Line 1532... Line 1512...
1532
			 struct proc_dir_entry *root);
1512
extern int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root);
1533
extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root);
1513
extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root);
1534
 
1514