Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4279 → Rev 4292

/drivers/include/drm/drmP.h
740,7 → 740,10
void (*agp_destroy)(struct drm_device *dev);
 
};
#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
748,17 → 751,7
*/
struct drm_driver {
int (*load) (struct drm_device *, unsigned long flags);
int (*firstopen) (struct drm_device *);
int (*open) (struct drm_device *, struct drm_file *);
void (*preclose) (struct drm_device *, struct drm_file *file_priv);
void (*postclose) (struct drm_device *, struct drm_file *);
void (*lastclose) (struct drm_device *);
int (*unload) (struct drm_device *);
int (*suspend) (struct drm_device *, pm_message_t state);
int (*resume) (struct drm_device *);
int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
int (*dma_quiescent) (struct drm_device *);
int (*context_dtor) (struct drm_device *dev, int context);
 
/**
* get_vblank_counter - get raw hardware vblank counter
804,21 → 797,7
* interrupts will have to stay on to keep the count accurate.
*/
void (*disable_vblank) (struct drm_device *dev, int crtc);
 
/**
* Called by \c drm_device_is_agp. Typically used to determine if a
* card is really attached to AGP or not.
*
* \param dev DRM device handle
*
* \returns
* One of three values is returned depending on whether or not the
* card is absolutely \b not AGP (return of 0), absolutely \b is AGP
* (return of 1), or may or may not be AGP (return of 2).
*/
int (*device_is_agp) (struct drm_device *dev);
 
/**
* Called by vblank timestamping code.
*
* Return the current display scanout position from a crtc.
887,23 → 866,7
int (*irq_postinstall) (struct drm_device *dev);
void (*irq_uninstall) (struct drm_device *dev);
 
/* Master routines */
int (*master_create)(struct drm_device *dev, struct drm_master *master);
void (*master_destroy)(struct drm_device *dev, struct drm_master *master);
/**
* master_set is called whenever the minor master is set.
* master_drop is called whenever the minor master is dropped.
*/
 
int (*master_set)(struct drm_device *dev, struct drm_file *file_priv,
bool from_open);
void (*master_drop)(struct drm_device *dev, struct drm_file *file_priv,
bool from_release);
 
int (*debugfs_init)(struct drm_minor *minor);
void (*debugfs_cleanup)(struct drm_minor *minor);
 
/**
* Driver-specific constructor for drm_gem_objects, to set up
* obj->driver_private.
*
913,81 → 876,9
void (*gem_free_object) (struct drm_gem_object *obj);
int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
 
/* prime: */
/* export handle -> fd (see drm_gem_prime_handle_to_fd() helper) */
int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv,
uint32_t handle, uint32_t flags, int *prime_fd);
/* import fd -> handle (see drm_gem_prime_fd_to_handle() helper) */
int (*prime_fd_to_handle)(struct drm_device *dev, struct drm_file *file_priv,
int prime_fd, uint32_t *handle);
/* export GEM -> dmabuf */
struct dma_buf * (*gem_prime_export)(struct drm_device *dev,
struct drm_gem_object *obj, int flags);
/* import dmabuf -> GEM */
struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev,
struct dma_buf *dma_buf);
 
/* vga arb irq handler */
void (*vgaarb_irq)(struct drm_device *dev, bool state);
 
/* dumb alloc support */
int (*dumb_create)(struct drm_file *file_priv,
struct drm_device *dev,
struct drm_mode_create_dumb *args);
int (*dumb_map_offset)(struct drm_file *file_priv,
struct drm_device *dev, uint32_t handle,
uint64_t *offset);
int (*dumb_destroy)(struct drm_file *file_priv,
struct drm_device *dev,
uint32_t handle);
 
/* Driver private ops for this object */
const struct vm_operations_struct *gem_vm_ops;
 
int major;
int minor;
int patchlevel;
char *name;
char *desc;
char *date;
 
u32 driver_features;
int dev_priv_size;
const struct drm_ioctl_desc *ioctls;
int num_ioctls;
const struct file_operations *fops;
union {
struct pci_driver *pci;
struct platform_device *platform_device;
struct usb_driver *usb;
} kdriver;
struct drm_bus *bus;
 
/* List of devices hanging off this driver */
struct list_head device_list;
};
 
#endif
 
#define DRM_IRQ_ARGS int irq, void *arg
 
struct drm_driver {
int (*load) (struct drm_device *, unsigned long flags);
int (*open) (struct drm_device *, struct drm_file *);
 
irqreturn_t (*irq_handler) (DRM_IRQ_ARGS);
void (*irq_preinstall) (struct drm_device *dev);
int (*irq_postinstall) (struct drm_device *dev);
 
int (*gem_init_object) (struct drm_gem_object *obj);
void (*gem_free_object) (struct drm_gem_object *obj);
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;
};
 
 
#define DRM_MINOR_UNASSIGNED 0
#define DRM_MINOR_LEGACY 1
#define DRM_MINOR_CONTROL 2
/drivers/include/linux/kernel.h
283,7 → 283,10
(_timer)->handle = 0; \
} while (0)
 
int del_timer(struct timer_list *timer);
 
# define del_timer_sync(t) del_timer(t)
 
struct timespec {
long tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
290,6 → 293,11
};
 
 
#define mb() asm volatile("mfence" : : : "memory")
#define rmb() asm volatile("lfence" : : : "memory")
#define wmb() asm volatile("sfence" : : : "memory")
 
 
#define build_mmio_read(name, size, type, reg, barrier) \
static inline type name(const volatile void __iomem *addr) \
{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \
/drivers/include/linux/types.h
321,10 → 321,6
struct drm_file;
 
 
#define DRM_MEMORYBARRIER() __asm__ __volatile__("lock; addl $0,0(%esp)")
#define mb() __asm__ __volatile__("lock; addl $0,0(%esp)")
 
 
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
/drivers/include/linux/wait.h
1,11 → 1,13
#ifndef _LINUX_WAIT_H
#define _LINUX_WAIT_H
 
 
#include <linux/list.h>
#include <syscall.h>
 
typedef struct __wait_queue wait_queue_t;
typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key);
int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key);
 
typedef struct __wait_queue_head wait_queue_head_t;
 
21,6 → 23,10
spinlock_t lock;
struct list_head task_list;
};
static inline int waitqueue_active(wait_queue_head_t *q)
{
return !list_empty(&q->task_list);
}
 
static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
{
/drivers/include/syscall.h
522,8 → 522,6
::"S" (text));
};
 
#define rmb() asm volatile("lfence":::"memory")
 
static inline void *vzalloc(unsigned long size)
{
void *mem;