Merge branch 'linus' into tracing/urgent
Conflicts: kernel/trace/trace_kprobe.c Merge reason: resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#ifndef __ACPI_HEST_H
|
||||
#define __ACPI_HEST_H
|
||||
|
||||
#include <linux/pci.h>
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
extern int acpi_hest_firmware_first_pci(struct pci_dev *pci);
|
||||
#else
|
||||
static inline int acpi_hest_firmware_first_pci(struct pci_dev *pci) { return 0; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20090903
|
||||
#define ACPI_CA_VERSION 0x20091112
|
||||
|
||||
#include "actypes.h"
|
||||
#include "actbl.h"
|
||||
@@ -154,7 +154,8 @@ acpi_status
|
||||
acpi_walk_namespace(acpi_object_type type,
|
||||
acpi_handle start_object,
|
||||
u32 max_depth,
|
||||
acpi_walk_callback user_function,
|
||||
acpi_walk_callback pre_order_visit,
|
||||
acpi_walk_callback post_order_visit,
|
||||
void *context, void **return_value);
|
||||
|
||||
acpi_status
|
||||
|
||||
@@ -295,6 +295,7 @@ static inline void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx
|
||||
void acpi_processor_ppc_init(void);
|
||||
void acpi_processor_ppc_exit(void);
|
||||
int acpi_processor_ppc_has_changed(struct acpi_processor *pr);
|
||||
extern int acpi_processor_get_bios_limit(int cpu, unsigned int *limit);
|
||||
#else
|
||||
static inline void acpi_processor_ppc_init(void)
|
||||
{
|
||||
@@ -316,6 +317,11 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CPU_FREQ */
|
||||
|
||||
/* in processor_throttling.c */
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
|
||||
located on an ext2 file system */
|
||||
#define O_ACCMODE 00000003
|
||||
#define O_RDONLY 00000000
|
||||
#define O_WRONLY 00000001
|
||||
@@ -27,8 +25,8 @@
|
||||
#ifndef O_NONBLOCK
|
||||
#define O_NONBLOCK 00004000
|
||||
#endif
|
||||
#ifndef O_SYNC
|
||||
#define O_SYNC 00010000
|
||||
#ifndef O_DSYNC
|
||||
#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
|
||||
#endif
|
||||
#ifndef FASYNC
|
||||
#define FASYNC 00020000 /* fcntl, for BSD compatibility */
|
||||
@@ -51,6 +49,25 @@
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 02000000 /* set close_on_exec */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Before Linux 2.6.32 only O_DSYNC semantics were implemented, but using
|
||||
* the O_SYNC flag. We continue to use the existing numerical value
|
||||
* for O_DSYNC semantics now, but using the correct symbolic name for it.
|
||||
* This new value is used to request true Posix O_SYNC semantics. It is
|
||||
* defined in this strange way to make sure applications compiled against
|
||||
* new headers get at least O_DSYNC semantics on older kernels.
|
||||
*
|
||||
* This has the nice side-effect that we can simply test for O_DSYNC
|
||||
* wherever we do not care if O_DSYNC or O_SYNC is used.
|
||||
*
|
||||
* Note: __O_SYNC must never be used directly.
|
||||
*/
|
||||
#ifndef O_SYNC
|
||||
#define __O_SYNC 04000000
|
||||
#define O_SYNC (__O_SYNC|O_DSYNC)
|
||||
#endif
|
||||
|
||||
#ifndef O_NDELAY
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,7 @@ static inline int gpio_is_valid(int number)
|
||||
return ((unsigned)number) < ARCH_NR_GPIOS;
|
||||
}
|
||||
|
||||
struct device;
|
||||
struct seq_file;
|
||||
struct module;
|
||||
|
||||
@@ -181,6 +182,8 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
|
||||
|
||||
#ifndef CONFIG_GPIO_SYSFS
|
||||
|
||||
struct device;
|
||||
|
||||
/* sysfs support is only available with gpiolib, where it's optional */
|
||||
|
||||
static inline int gpio_export(unsigned gpio, bool direction_may_change)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#elif defined(CONFIG_SPARSEMEM_VMEMMAP)
|
||||
|
||||
/* memmap is virtually contigious. */
|
||||
/* memmap is virtually contiguous. */
|
||||
#define __pfn_to_page(pfn) (vmemmap + (pfn))
|
||||
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
|
||||
|
||||
|
||||
@@ -622,16 +622,20 @@ __SYSCALL(__NR_move_pages, sys_move_pages)
|
||||
__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo)
|
||||
#define __NR_perf_event_open 241
|
||||
__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
|
||||
#define __NR_accept4 242
|
||||
__SYSCALL(__NR_accept4, sys_accept4)
|
||||
#define __NR_recvmmsg 243
|
||||
__SYSCALL(__NR_recvmmsg, sys_recvmmsg)
|
||||
|
||||
#undef __NR_syscalls
|
||||
#define __NR_syscalls 242
|
||||
#define __NR_syscalls 244
|
||||
|
||||
/*
|
||||
* All syscalls below here should go away really,
|
||||
* these are provided for both review and as a porting
|
||||
* help for the C library version.
|
||||
*
|
||||
* Last chance: are any of these important enought to
|
||||
* Last chance: are any of these important enough to
|
||||
* enable by default?
|
||||
*/
|
||||
#ifdef __ARCH_WANT_SYSCALL_NO_AT
|
||||
@@ -802,7 +806,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
|
||||
#define __NR_statfs __NR3264_statfs
|
||||
#define __NR_fstatfs __NR3264_fstatfs
|
||||
#define __NR_truncate __NR3264_truncate
|
||||
#define __NR_ftruncate __NR3264_truncate
|
||||
#define __NR_ftruncate __NR3264_ftruncate
|
||||
#define __NR_lseek __NR3264_lseek
|
||||
#define __NR_sendfile __NR3264_sendfile
|
||||
#define __NR_newfstatat __NR3264_fstatat
|
||||
@@ -818,7 +822,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
|
||||
#define __NR_statfs64 __NR3264_statfs
|
||||
#define __NR_fstatfs64 __NR3264_fstatfs
|
||||
#define __NR_truncate64 __NR3264_truncate
|
||||
#define __NR_ftruncate64 __NR3264_truncate
|
||||
#define __NR_ftruncate64 __NR3264_ftruncate
|
||||
#define __NR_llseek __NR3264_lseek
|
||||
#define __NR_sendfile64 __NR3264_sendfile
|
||||
#define __NR_fstatat64 __NR3264_fstatat
|
||||
|
||||
@@ -8,3 +8,4 @@ unifdef-y += radeon_drm.h
|
||||
unifdef-y += sis_drm.h
|
||||
unifdef-y += savage_drm.h
|
||||
unifdef-y += via_drm.h
|
||||
unifdef-y += nouveau_drm.h
|
||||
|
||||
+54
-13
@@ -36,17 +36,27 @@
|
||||
#ifndef _DRM_H_
|
||||
#define _DRM_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/ioctl.h> /* For _IO* macros */
|
||||
#define DRM_IOCTL_NR(n) _IOC_NR(n)
|
||||
#define DRM_IOC_VOID _IOC_NONE
|
||||
#define DRM_IOC_READ _IOC_READ
|
||||
#define DRM_IOC_WRITE _IOC_WRITE
|
||||
#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
|
||||
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
|
||||
#if defined(__linux__)
|
||||
|
||||
#define DRM_MAJOR 226
|
||||
#define DRM_MAX_MINOR 15
|
||||
#include <linux/types.h>
|
||||
#include <asm/ioctl.h>
|
||||
typedef unsigned int drm_handle_t;
|
||||
|
||||
#else /* One of the BSDs */
|
||||
|
||||
#include <sys/ioccom.h>
|
||||
#include <sys/types.h>
|
||||
typedef int8_t __s8;
|
||||
typedef uint8_t __u8;
|
||||
typedef int16_t __s16;
|
||||
typedef uint16_t __u16;
|
||||
typedef int32_t __s32;
|
||||
typedef uint32_t __u32;
|
||||
typedef int64_t __s64;
|
||||
typedef uint64_t __u64;
|
||||
typedef unsigned long drm_handle_t;
|
||||
|
||||
#endif
|
||||
|
||||
#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
|
||||
#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
|
||||
@@ -59,7 +69,6 @@
|
||||
#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
|
||||
#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
|
||||
|
||||
typedef unsigned int drm_handle_t;
|
||||
typedef unsigned int drm_context_t;
|
||||
typedef unsigned int drm_drawable_t;
|
||||
typedef unsigned int drm_magic_t;
|
||||
@@ -454,6 +463,7 @@ struct drm_irq_busid {
|
||||
enum drm_vblank_seq_type {
|
||||
_DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
|
||||
_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
|
||||
_DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
|
||||
_DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
|
||||
_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
|
||||
_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
|
||||
@@ -461,8 +471,8 @@ enum drm_vblank_seq_type {
|
||||
};
|
||||
|
||||
#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
|
||||
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \
|
||||
_DRM_VBLANK_NEXTONMISS)
|
||||
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
|
||||
_DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
|
||||
|
||||
struct drm_wait_vblank_request {
|
||||
enum drm_vblank_seq_type type;
|
||||
@@ -686,6 +696,8 @@ struct drm_gem_open {
|
||||
#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
|
||||
#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
|
||||
#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
|
||||
#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
|
||||
#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
|
||||
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
@@ -698,6 +710,35 @@ struct drm_gem_open {
|
||||
#define DRM_COMMAND_BASE 0x40
|
||||
#define DRM_COMMAND_END 0xA0
|
||||
|
||||
/**
|
||||
* Header for events written back to userspace on the drm fd. The
|
||||
* type defines the type of event, the length specifies the total
|
||||
* length of the event (including the header), and user_data is
|
||||
* typically a 64 bit value passed with the ioctl that triggered the
|
||||
* event. A read on the drm fd will always only return complete
|
||||
* events, that is, if for example the read buffer is 100 bytes, and
|
||||
* there are two 64 byte events pending, only one will be returned.
|
||||
*
|
||||
* Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and
|
||||
* up are chipset specific.
|
||||
*/
|
||||
struct drm_event {
|
||||
__u32 type;
|
||||
__u32 length;
|
||||
};
|
||||
|
||||
#define DRM_EVENT_VBLANK 0x01
|
||||
#define DRM_EVENT_FLIP_COMPLETE 0x02
|
||||
|
||||
struct drm_event_vblank {
|
||||
struct drm_event base;
|
||||
__u64 user_data;
|
||||
__u32 tv_sec;
|
||||
__u32 tv_usec;
|
||||
__u32 sequence;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/* typedef area */
|
||||
#ifndef __KERNEL__
|
||||
typedef struct drm_clip_rect drm_clip_rect_t;
|
||||
|
||||
+55
-36
@@ -245,16 +245,6 @@ extern void drm_ut_debug_printk(unsigned int request_level,
|
||||
|
||||
#endif
|
||||
|
||||
#define DRM_PROC_LIMIT (PAGE_SIZE-80)
|
||||
|
||||
#define DRM_PROC_PRINT(fmt, arg...) \
|
||||
len += sprintf(&buf[len], fmt , ##arg); \
|
||||
if (len > DRM_PROC_LIMIT) { *eof = 1; return len - offset; }
|
||||
|
||||
#define DRM_PROC_PRINT_RET(ret, fmt, arg...) \
|
||||
len += sprintf(&buf[len], fmt , ##arg); \
|
||||
if (len > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; }
|
||||
|
||||
/*@}*/
|
||||
|
||||
/***********************************************************************/
|
||||
@@ -265,19 +255,8 @@ extern void drm_ut_debug_printk(unsigned int request_level,
|
||||
|
||||
#define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1))
|
||||
#define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x))
|
||||
#define DRM_WAITCOUNT(dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist)
|
||||
|
||||
#define DRM_IF_VERSION(maj, min) (maj << 16 | min)
|
||||
/**
|
||||
* Get the private SAREA mapping.
|
||||
*
|
||||
* \param _dev DRM device.
|
||||
* \param _ctx context number.
|
||||
* \param _map output mapping.
|
||||
*/
|
||||
#define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do { \
|
||||
(_map) = (_dev)->context_sareas[_ctx]; \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* Test that the hardware lock is held by the caller, returning otherwise.
|
||||
@@ -296,18 +275,6 @@ do { \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Copy and IOCTL return string to user space
|
||||
*/
|
||||
#define DRM_COPY( name, value ) \
|
||||
len = strlen( value ); \
|
||||
if ( len > name##_len ) len = name##_len; \
|
||||
name##_len = strlen( value ); \
|
||||
if ( len && name ) { \
|
||||
if ( copy_to_user( name, value, len ) ) \
|
||||
return -EFAULT; \
|
||||
}
|
||||
|
||||
/**
|
||||
* Ioctl function type.
|
||||
*
|
||||
@@ -322,6 +289,9 @@ typedef int drm_ioctl_t(struct drm_device *dev, void *data,
|
||||
typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
#define DRM_IOCTL_NR(n) _IOC_NR(n)
|
||||
#define DRM_MAJOR 226
|
||||
|
||||
#define DRM_AUTH 0x1
|
||||
#define DRM_MASTER 0x2
|
||||
#define DRM_ROOT_ONLY 0x4
|
||||
@@ -426,6 +396,14 @@ struct drm_buf_entry {
|
||||
struct drm_freelist freelist;
|
||||
};
|
||||
|
||||
/* Event queued up for userspace to read */
|
||||
struct drm_pending_event {
|
||||
struct drm_event *event;
|
||||
struct list_head link;
|
||||
struct drm_file *file_priv;
|
||||
void (*destroy)(struct drm_pending_event *event);
|
||||
};
|
||||
|
||||
/** File private data */
|
||||
struct drm_file {
|
||||
int authenticated;
|
||||
@@ -449,6 +427,10 @@ struct drm_file {
|
||||
struct drm_master *master; /* master this node is currently associated with
|
||||
N.B. not always minor->master */
|
||||
struct list_head fbs;
|
||||
|
||||
wait_queue_head_t event_wait;
|
||||
struct list_head event_list;
|
||||
int event_space;
|
||||
};
|
||||
|
||||
/** Wait queue */
|
||||
@@ -795,6 +777,15 @@ struct drm_driver {
|
||||
/* 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 (*proc_init)(struct drm_minor *minor);
|
||||
void (*proc_cleanup)(struct drm_minor *minor);
|
||||
@@ -900,6 +891,12 @@ struct drm_minor {
|
||||
struct drm_mode_group mode_group;
|
||||
};
|
||||
|
||||
struct drm_pending_vblank_event {
|
||||
struct drm_pending_event base;
|
||||
int pipe;
|
||||
struct drm_event_vblank event;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM device structure. This structure represent a complete card that
|
||||
* may contain multiple heads.
|
||||
@@ -999,6 +996,12 @@ struct drm_device {
|
||||
|
||||
u32 max_vblank_count; /**< size of vblank counter register */
|
||||
|
||||
/**
|
||||
* List of events
|
||||
*/
|
||||
struct list_head vblank_event_list;
|
||||
spinlock_t event_lock;
|
||||
|
||||
/*@} */
|
||||
cycles_t ctx_start;
|
||||
cycles_t lck_start;
|
||||
@@ -1135,6 +1138,8 @@ extern int drm_lastclose(struct drm_device *dev);
|
||||
extern int drm_open(struct inode *inode, struct file *filp);
|
||||
extern int drm_stub_open(struct inode *inode, struct file *filp);
|
||||
extern int drm_fasync(int fd, struct file *filp, int on);
|
||||
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);
|
||||
|
||||
/* Mapping support (drm_vm.h) */
|
||||
@@ -1295,6 +1300,7 @@ extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
|
||||
extern void 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 void drm_vblank_off(struct drm_device *dev, int crtc);
|
||||
extern void drm_vblank_cleanup(struct drm_device *dev);
|
||||
/* Modesetting support */
|
||||
extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
|
||||
@@ -1519,16 +1525,29 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map)
|
||||
|
||||
static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
|
||||
{
|
||||
if (size * nmemb <= PAGE_SIZE)
|
||||
return kcalloc(nmemb, size, GFP_KERNEL);
|
||||
|
||||
if (size != 0 && nmemb > ULONG_MAX / size)
|
||||
return NULL;
|
||||
|
||||
if (size * nmemb <= PAGE_SIZE)
|
||||
return kcalloc(nmemb, size, GFP_KERNEL);
|
||||
|
||||
return __vmalloc(size * nmemb,
|
||||
GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
|
||||
}
|
||||
|
||||
/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
|
||||
static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
|
||||
{
|
||||
if (size != 0 && nmemb > ULONG_MAX / size)
|
||||
return NULL;
|
||||
|
||||
if (size * nmemb <= PAGE_SIZE)
|
||||
return kmalloc(nmemb * size, GFP_KERNEL);
|
||||
|
||||
return __vmalloc(size * nmemb,
|
||||
GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
|
||||
}
|
||||
|
||||
static __inline void drm_free_large(void *ptr)
|
||||
{
|
||||
if (!is_vmalloc_addr(ptr))
|
||||
|
||||
+42
-5
@@ -123,7 +123,7 @@ struct drm_display_mode {
|
||||
int type;
|
||||
|
||||
/* Proposed mode values */
|
||||
int clock;
|
||||
int clock; /* in kHz */
|
||||
int hdisplay;
|
||||
int hsync_start;
|
||||
int hsync_end;
|
||||
@@ -164,8 +164,8 @@ struct drm_display_mode {
|
||||
int *private;
|
||||
int private_flags;
|
||||
|
||||
int vrefresh;
|
||||
float hsync;
|
||||
int vrefresh; /* in Hz */
|
||||
int hsync; /* in kHz */
|
||||
};
|
||||
|
||||
enum drm_connector_status {
|
||||
@@ -242,6 +242,21 @@ struct drm_framebuffer_funcs {
|
||||
int (*create_handle)(struct drm_framebuffer *fb,
|
||||
struct drm_file *file_priv,
|
||||
unsigned int *handle);
|
||||
/**
|
||||
* Optinal callback for the dirty fb ioctl.
|
||||
*
|
||||
* Userspace can notify the driver via this callback
|
||||
* that a area of the framebuffer has changed and should
|
||||
* be flushed to the display hardware.
|
||||
*
|
||||
* See documentation in drm_mode.h for the struct
|
||||
* drm_mode_fb_dirty_cmd for more information as all
|
||||
* the semantics and arguments have a one to one mapping
|
||||
* on this function.
|
||||
*/
|
||||
int (*dirty)(struct drm_framebuffer *framebuffer, unsigned flags,
|
||||
unsigned color, struct drm_clip_rect *clips,
|
||||
unsigned num_clips);
|
||||
};
|
||||
|
||||
struct drm_framebuffer {
|
||||
@@ -256,7 +271,7 @@ struct drm_framebuffer {
|
||||
unsigned int depth;
|
||||
int bits_per_pixel;
|
||||
int flags;
|
||||
void *fbdev;
|
||||
struct fb_info *fbdev;
|
||||
u32 pseudo_palette[17];
|
||||
struct list_head filp_head;
|
||||
/* if you are using the helper */
|
||||
@@ -290,6 +305,7 @@ struct drm_property {
|
||||
struct drm_crtc;
|
||||
struct drm_connector;
|
||||
struct drm_encoder;
|
||||
struct drm_pending_vblank_event;
|
||||
|
||||
/**
|
||||
* drm_crtc_funcs - control CRTCs for a given device
|
||||
@@ -333,6 +349,19 @@ struct drm_crtc_funcs {
|
||||
void (*destroy)(struct drm_crtc *crtc);
|
||||
|
||||
int (*set_config)(struct drm_mode_set *set);
|
||||
|
||||
/*
|
||||
* Flip to the given framebuffer. This implements the page
|
||||
* flip ioctl descibed in drm_mode.h, specifically, the
|
||||
* implementation must return immediately and block all
|
||||
* rendering to the current fb until the flip has completed.
|
||||
* If userspace set the event flag in the ioctl, the event
|
||||
* argument will point to an event to send back when the flip
|
||||
* completes, otherwise it will be NULL.
|
||||
*/
|
||||
int (*page_flip)(struct drm_crtc *crtc,
|
||||
struct drm_framebuffer *fb,
|
||||
struct drm_pending_vblank_event *event);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -596,6 +625,7 @@ struct drm_mode_config {
|
||||
/* Optional properties */
|
||||
struct drm_property *scaling_mode_property;
|
||||
struct drm_property *dithering_mode_property;
|
||||
struct drm_property *dirty_info_property;
|
||||
};
|
||||
|
||||
#define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
|
||||
@@ -667,6 +697,7 @@ extern void drm_mode_validate_size(struct drm_device *dev,
|
||||
extern void drm_mode_prune_invalid(struct drm_device *dev,
|
||||
struct list_head *mode_list, bool verbose);
|
||||
extern void drm_mode_sort(struct list_head *mode_list);
|
||||
extern int drm_mode_hsync(struct drm_display_mode *mode);
|
||||
extern int drm_mode_vrefresh(struct drm_display_mode *mode);
|
||||
extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
|
||||
int adjust_flags);
|
||||
@@ -703,6 +734,7 @@ extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats
|
||||
char *formats[]);
|
||||
extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
|
||||
extern int drm_mode_create_dithering_property(struct drm_device *dev);
|
||||
extern int drm_mode_create_dirty_info_property(struct drm_device *dev);
|
||||
extern char *drm_get_encoder_name(struct drm_encoder *encoder);
|
||||
|
||||
extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
|
||||
@@ -711,7 +743,8 @@ extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
|
||||
struct drm_encoder *encoder);
|
||||
extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
|
||||
int gamma_size);
|
||||
extern void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type);
|
||||
extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
|
||||
uint32_t id, uint32_t type);
|
||||
/* IOCTLs */
|
||||
extern int drm_mode_getresources(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
@@ -730,6 +763,8 @@ extern int drm_mode_rmfb(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern int drm_mode_getfb(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern int drm_mode_addmode_ioctl(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
|
||||
@@ -756,6 +791,8 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
|
||||
extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern bool drm_detect_hdmi_monitor(struct edid *edid);
|
||||
extern int drm_mode_page_flip_ioctl(struct drm_device *dev,
|
||||
void *data, struct drm_file *file_priv);
|
||||
extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
|
||||
int hdisplay, int vdisplay, int vrefresh,
|
||||
bool reduced, bool interlaced, bool margins);
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
* Copyright © 2008 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_DP_HELPER_H_
|
||||
#define _DRM_DP_HELPER_H_
|
||||
|
||||
/* From the VESA DisplayPort spec */
|
||||
|
||||
#define AUX_NATIVE_WRITE 0x8
|
||||
#define AUX_NATIVE_READ 0x9
|
||||
#define AUX_I2C_WRITE 0x0
|
||||
#define AUX_I2C_READ 0x1
|
||||
#define AUX_I2C_STATUS 0x2
|
||||
#define AUX_I2C_MOT 0x4
|
||||
|
||||
#define AUX_NATIVE_REPLY_ACK (0x0 << 4)
|
||||
#define AUX_NATIVE_REPLY_NACK (0x1 << 4)
|
||||
#define AUX_NATIVE_REPLY_DEFER (0x2 << 4)
|
||||
#define AUX_NATIVE_REPLY_MASK (0x3 << 4)
|
||||
|
||||
#define AUX_I2C_REPLY_ACK (0x0 << 6)
|
||||
#define AUX_I2C_REPLY_NACK (0x1 << 6)
|
||||
#define AUX_I2C_REPLY_DEFER (0x2 << 6)
|
||||
#define AUX_I2C_REPLY_MASK (0x3 << 6)
|
||||
|
||||
/* AUX CH addresses */
|
||||
/* DPCD */
|
||||
#define DP_DPCD_REV 0x000
|
||||
|
||||
#define DP_MAX_LINK_RATE 0x001
|
||||
|
||||
#define DP_MAX_LANE_COUNT 0x002
|
||||
# define DP_MAX_LANE_COUNT_MASK 0x1f
|
||||
# define DP_ENHANCED_FRAME_CAP (1 << 7)
|
||||
|
||||
#define DP_MAX_DOWNSPREAD 0x003
|
||||
# define DP_NO_AUX_HANDSHAKE_LINK_TRAINING (1 << 6)
|
||||
|
||||
#define DP_NORP 0x004
|
||||
|
||||
#define DP_DOWNSTREAMPORT_PRESENT 0x005
|
||||
# define DP_DWN_STRM_PORT_PRESENT (1 << 0)
|
||||
# define DP_DWN_STRM_PORT_TYPE_MASK 0x06
|
||||
/* 00b = DisplayPort */
|
||||
/* 01b = Analog */
|
||||
/* 10b = TMDS or HDMI */
|
||||
/* 11b = Other */
|
||||
# define DP_FORMAT_CONVERSION (1 << 3)
|
||||
|
||||
#define DP_MAIN_LINK_CHANNEL_CODING 0x006
|
||||
|
||||
/* link configuration */
|
||||
#define DP_LINK_BW_SET 0x100
|
||||
# define DP_LINK_BW_1_62 0x06
|
||||
# define DP_LINK_BW_2_7 0x0a
|
||||
|
||||
#define DP_LANE_COUNT_SET 0x101
|
||||
# define DP_LANE_COUNT_MASK 0x0f
|
||||
# define DP_LANE_COUNT_ENHANCED_FRAME_EN (1 << 7)
|
||||
|
||||
#define DP_TRAINING_PATTERN_SET 0x102
|
||||
# define DP_TRAINING_PATTERN_DISABLE 0
|
||||
# define DP_TRAINING_PATTERN_1 1
|
||||
# define DP_TRAINING_PATTERN_2 2
|
||||
# define DP_TRAINING_PATTERN_MASK 0x3
|
||||
|
||||
# define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2)
|
||||
# define DP_LINK_QUAL_PATTERN_D10_2 (1 << 2)
|
||||
# define DP_LINK_QUAL_PATTERN_ERROR_RATE (2 << 2)
|
||||
# define DP_LINK_QUAL_PATTERN_PRBS7 (3 << 2)
|
||||
# define DP_LINK_QUAL_PATTERN_MASK (3 << 2)
|
||||
|
||||
# define DP_RECOVERED_CLOCK_OUT_EN (1 << 4)
|
||||
# define DP_LINK_SCRAMBLING_DISABLE (1 << 5)
|
||||
|
||||
# define DP_SYMBOL_ERROR_COUNT_BOTH (0 << 6)
|
||||
# define DP_SYMBOL_ERROR_COUNT_DISPARITY (1 << 6)
|
||||
# define DP_SYMBOL_ERROR_COUNT_SYMBOL (2 << 6)
|
||||
# define DP_SYMBOL_ERROR_COUNT_MASK (3 << 6)
|
||||
|
||||
#define DP_TRAINING_LANE0_SET 0x103
|
||||
#define DP_TRAINING_LANE1_SET 0x104
|
||||
#define DP_TRAINING_LANE2_SET 0x105
|
||||
#define DP_TRAINING_LANE3_SET 0x106
|
||||
|
||||
# define DP_TRAIN_VOLTAGE_SWING_MASK 0x3
|
||||
# define DP_TRAIN_VOLTAGE_SWING_SHIFT 0
|
||||
# define DP_TRAIN_MAX_SWING_REACHED (1 << 2)
|
||||
# define DP_TRAIN_VOLTAGE_SWING_400 (0 << 0)
|
||||
# define DP_TRAIN_VOLTAGE_SWING_600 (1 << 0)
|
||||
# define DP_TRAIN_VOLTAGE_SWING_800 (2 << 0)
|
||||
# define DP_TRAIN_VOLTAGE_SWING_1200 (3 << 0)
|
||||
|
||||
# define DP_TRAIN_PRE_EMPHASIS_MASK (3 << 3)
|
||||
# define DP_TRAIN_PRE_EMPHASIS_0 (0 << 3)
|
||||
# define DP_TRAIN_PRE_EMPHASIS_3_5 (1 << 3)
|
||||
# define DP_TRAIN_PRE_EMPHASIS_6 (2 << 3)
|
||||
# define DP_TRAIN_PRE_EMPHASIS_9_5 (3 << 3)
|
||||
|
||||
# define DP_TRAIN_PRE_EMPHASIS_SHIFT 3
|
||||
# define DP_TRAIN_MAX_PRE_EMPHASIS_REACHED (1 << 5)
|
||||
|
||||
#define DP_DOWNSPREAD_CTRL 0x107
|
||||
# define DP_SPREAD_AMP_0_5 (1 << 4)
|
||||
|
||||
#define DP_MAIN_LINK_CHANNEL_CODING_SET 0x108
|
||||
# define DP_SET_ANSI_8B10B (1 << 0)
|
||||
|
||||
#define DP_LANE0_1_STATUS 0x202
|
||||
#define DP_LANE2_3_STATUS 0x203
|
||||
# define DP_LANE_CR_DONE (1 << 0)
|
||||
# define DP_LANE_CHANNEL_EQ_DONE (1 << 1)
|
||||
# define DP_LANE_SYMBOL_LOCKED (1 << 2)
|
||||
|
||||
#define DP_CHANNEL_EQ_BITS (DP_LANE_CR_DONE | \
|
||||
DP_LANE_CHANNEL_EQ_DONE | \
|
||||
DP_LANE_SYMBOL_LOCKED)
|
||||
|
||||
#define DP_LANE_ALIGN_STATUS_UPDATED 0x204
|
||||
|
||||
#define DP_INTERLANE_ALIGN_DONE (1 << 0)
|
||||
#define DP_DOWNSTREAM_PORT_STATUS_CHANGED (1 << 6)
|
||||
#define DP_LINK_STATUS_UPDATED (1 << 7)
|
||||
|
||||
#define DP_SINK_STATUS 0x205
|
||||
|
||||
#define DP_RECEIVE_PORT_0_STATUS (1 << 0)
|
||||
#define DP_RECEIVE_PORT_1_STATUS (1 << 1)
|
||||
|
||||
#define DP_ADJUST_REQUEST_LANE0_1 0x206
|
||||
#define DP_ADJUST_REQUEST_LANE2_3 0x207
|
||||
# define DP_ADJUST_VOLTAGE_SWING_LANE0_MASK 0x03
|
||||
# define DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT 0
|
||||
# define DP_ADJUST_PRE_EMPHASIS_LANE0_MASK 0x0c
|
||||
# define DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT 2
|
||||
# define DP_ADJUST_VOLTAGE_SWING_LANE1_MASK 0x30
|
||||
# define DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT 4
|
||||
# define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0
|
||||
# define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6
|
||||
|
||||
#define DP_SET_POWER 0x600
|
||||
# define DP_SET_POWER_D0 0x1
|
||||
# define DP_SET_POWER_D3 0x2
|
||||
|
||||
#define MODE_I2C_START 1
|
||||
#define MODE_I2C_WRITE 2
|
||||
#define MODE_I2C_READ 4
|
||||
#define MODE_I2C_STOP 8
|
||||
|
||||
struct i2c_algo_dp_aux_data {
|
||||
bool running;
|
||||
u16 address;
|
||||
int (*aux_ch) (struct i2c_adapter *adapter,
|
||||
int mode, uint8_t write_byte,
|
||||
uint8_t *read_byte);
|
||||
};
|
||||
|
||||
int
|
||||
i2c_dp_aux_add_bus(struct i2c_adapter *adapter);
|
||||
|
||||
#endif /* _DRM_DP_HELPER_H_ */
|
||||
@@ -106,6 +106,10 @@ struct detailed_data_color_point {
|
||||
u8 wpindex2[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct cvt_timing {
|
||||
u8 code[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct detailed_non_pixel {
|
||||
u8 pad1;
|
||||
u8 type; /* ff=serial, fe=string, fd=monitor range, fc=monitor name
|
||||
@@ -117,9 +121,13 @@ struct detailed_non_pixel {
|
||||
struct detailed_data_monitor_range range;
|
||||
struct detailed_data_wpindex color;
|
||||
struct std_timing timings[5];
|
||||
struct cvt_timing cvt[4];
|
||||
} data;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define EDID_DETAIL_EST_TIMINGS 0xf7
|
||||
#define EDID_DETAIL_CVT_3BYTE 0xf8
|
||||
#define EDID_DETAIL_COLOR_MGMT_DATA 0xf9
|
||||
#define EDID_DETAIL_STD_MODES 0xfa
|
||||
#define EDID_DETAIL_MONITOR_CPDATA 0xfb
|
||||
#define EDID_DETAIL_MONITOR_NAME 0xfc
|
||||
|
||||
@@ -66,6 +66,13 @@ extern struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
int atomic);
|
||||
extern struct drm_mm_node *drm_mm_get_block_range_generic(
|
||||
struct drm_mm_node *node,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
unsigned long start,
|
||||
unsigned long end,
|
||||
int atomic);
|
||||
static inline struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent,
|
||||
unsigned long size,
|
||||
unsigned alignment)
|
||||
@@ -78,11 +85,38 @@ static inline struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *pa
|
||||
{
|
||||
return drm_mm_get_block_generic(parent, size, alignment, 1);
|
||||
}
|
||||
static inline struct drm_mm_node *drm_mm_get_block_range(
|
||||
struct drm_mm_node *parent,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
return drm_mm_get_block_range_generic(parent, size, alignment,
|
||||
start, end, 0);
|
||||
}
|
||||
static inline struct drm_mm_node *drm_mm_get_block_atomic_range(
|
||||
struct drm_mm_node *parent,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
return drm_mm_get_block_range_generic(parent, size, alignment,
|
||||
start, end, 1);
|
||||
}
|
||||
extern void drm_mm_put_block(struct drm_mm_node *cur);
|
||||
extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
int best_match);
|
||||
extern struct drm_mm_node *drm_mm_search_free_in_range(
|
||||
const struct drm_mm *mm,
|
||||
unsigned long size,
|
||||
unsigned alignment,
|
||||
unsigned long start,
|
||||
unsigned long end,
|
||||
int best_match);
|
||||
extern int drm_mm_init(struct drm_mm *mm, unsigned long start,
|
||||
unsigned long size);
|
||||
extern void drm_mm_takedown(struct drm_mm *mm);
|
||||
@@ -99,6 +133,7 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block)
|
||||
return block->mm;
|
||||
}
|
||||
|
||||
extern void drm_mm_debug_table(struct drm_mm *mm, const char *prefix);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm);
|
||||
#endif
|
||||
|
||||
+77
-3
@@ -27,9 +27,6 @@
|
||||
#ifndef _DRM_MODE_H
|
||||
#define _DRM_MODE_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define DRM_DISPLAY_INFO_LEN 32
|
||||
#define DRM_CONNECTOR_NAME_LEN 32
|
||||
#define DRM_DISPLAY_MODE_LEN 32
|
||||
@@ -78,6 +75,11 @@
|
||||
#define DRM_MODE_DITHERING_OFF 0
|
||||
#define DRM_MODE_DITHERING_ON 1
|
||||
|
||||
/* Dirty info options */
|
||||
#define DRM_MODE_DIRTY_OFF 0
|
||||
#define DRM_MODE_DIRTY_ON 1
|
||||
#define DRM_MODE_DIRTY_ANNOTATE 2
|
||||
|
||||
struct drm_mode_modeinfo {
|
||||
__u32 clock;
|
||||
__u16 hdisplay, hsync_start, hsync_end, htotal, hskew;
|
||||
@@ -225,6 +227,45 @@ struct drm_mode_fb_cmd {
|
||||
__u32 handle;
|
||||
};
|
||||
|
||||
#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
|
||||
#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
|
||||
#define DRM_MODE_FB_DIRTY_FLAGS 0x03
|
||||
|
||||
/*
|
||||
* Mark a region of a framebuffer as dirty.
|
||||
*
|
||||
* Some hardware does not automatically update display contents
|
||||
* as a hardware or software draw to a framebuffer. This ioctl
|
||||
* allows userspace to tell the kernel and the hardware what
|
||||
* regions of the framebuffer have changed.
|
||||
*
|
||||
* The kernel or hardware is free to update more then just the
|
||||
* region specified by the clip rects. The kernel or hardware
|
||||
* may also delay and/or coalesce several calls to dirty into a
|
||||
* single update.
|
||||
*
|
||||
* Userspace may annotate the updates, the annotates are a
|
||||
* promise made by the caller that the change is either a copy
|
||||
* of pixels or a fill of a single color in the region specified.
|
||||
*
|
||||
* If the DRM_MODE_FB_DIRTY_ANNOTATE_COPY flag is given then
|
||||
* the number of updated regions are half of num_clips given,
|
||||
* where the clip rects are paired in src and dst. The width and
|
||||
* height of each one of the pairs must match.
|
||||
*
|
||||
* If the DRM_MODE_FB_DIRTY_ANNOTATE_FILL flag is given the caller
|
||||
* promises that the region specified of the clip rects is filled
|
||||
* completely with a single color as given in the color argument.
|
||||
*/
|
||||
|
||||
struct drm_mode_fb_dirty_cmd {
|
||||
__u32 fb_id;
|
||||
__u32 flags;
|
||||
__u32 color;
|
||||
__u32 num_clips;
|
||||
__u64 clips_ptr;
|
||||
};
|
||||
|
||||
struct drm_mode_mode_cmd {
|
||||
__u32 connector_id;
|
||||
struct drm_mode_modeinfo mode;
|
||||
@@ -268,4 +309,37 @@ struct drm_mode_crtc_lut {
|
||||
__u64 blue;
|
||||
};
|
||||
|
||||
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
|
||||
#define DRM_MODE_PAGE_FLIP_FLAGS DRM_MODE_PAGE_FLIP_EVENT
|
||||
|
||||
/*
|
||||
* Request a page flip on the specified crtc.
|
||||
*
|
||||
* This ioctl will ask KMS to schedule a page flip for the specified
|
||||
* crtc. Once any pending rendering targeting the specified fb (as of
|
||||
* ioctl time) has completed, the crtc will be reprogrammed to display
|
||||
* that fb after the next vertical refresh. The ioctl returns
|
||||
* immediately, but subsequent rendering to the current fb will block
|
||||
* in the execbuffer ioctl until the page flip happens. If a page
|
||||
* flip is already pending as the ioctl is called, EBUSY will be
|
||||
* returned.
|
||||
*
|
||||
* The ioctl supports one flag, DRM_MODE_PAGE_FLIP_EVENT, which will
|
||||
* request that drm sends back a vblank event (see drm.h: struct
|
||||
* drm_event_vblank) when the page flip is done. The user_data field
|
||||
* passed in with this ioctl will be returned as the user_data field
|
||||
* in the vblank event struct.
|
||||
*
|
||||
* The reserved field must be zero until we figure out something
|
||||
* clever to use it for.
|
||||
*/
|
||||
|
||||
struct drm_mode_crtc_page_flip {
|
||||
__u32 crtc_id;
|
||||
__u32 fb_id;
|
||||
__u32 flags;
|
||||
__u32 reserved;
|
||||
__u64 user_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -123,5 +123,5 @@ do { \
|
||||
remove_wait_queue(&(queue), &entry); \
|
||||
} while (0)
|
||||
|
||||
#define DRM_WAKEUP( queue ) wake_up_interruptible( queue )
|
||||
#define DRM_WAKEUP( queue ) wake_up( queue )
|
||||
#define DRM_INIT_WAITQUEUE( queue ) init_waitqueue_head( queue )
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Francisco Jerez.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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 (including the
|
||||
* next paragraph) 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 OWNER(S) AND/OR ITS SUPPLIERS 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DRM_I2C_CH7006_H__
|
||||
#define __DRM_I2C_CH7006_H__
|
||||
|
||||
/**
|
||||
* struct ch7006_encoder_params
|
||||
*
|
||||
* Describes how the ch7006 is wired up with the GPU. It should be
|
||||
* used as the @params parameter of its @set_config method.
|
||||
*
|
||||
* See "http://www.chrontel.com/pdf/7006.pdf" for their precise
|
||||
* meaning.
|
||||
*/
|
||||
struct ch7006_encoder_params {
|
||||
enum {
|
||||
CH7006_FORMAT_RGB16 = 0,
|
||||
CH7006_FORMAT_YCrCb24m16,
|
||||
CH7006_FORMAT_RGB24m16,
|
||||
CH7006_FORMAT_RGB15,
|
||||
CH7006_FORMAT_RGB24m12C,
|
||||
CH7006_FORMAT_RGB24m12I,
|
||||
CH7006_FORMAT_RGB24m8,
|
||||
CH7006_FORMAT_RGB16m8,
|
||||
CH7006_FORMAT_RGB15m8,
|
||||
CH7006_FORMAT_YCrCb24m8,
|
||||
} input_format;
|
||||
|
||||
enum {
|
||||
CH7006_CLOCK_SLAVE = 0,
|
||||
CH7006_CLOCK_MASTER,
|
||||
} clock_mode;
|
||||
|
||||
enum {
|
||||
CH7006_CLOCK_EDGE_NEG = 0,
|
||||
CH7006_CLOCK_EDGE_POS,
|
||||
} clock_edge;
|
||||
|
||||
int xcm, pcm;
|
||||
|
||||
enum {
|
||||
CH7006_SYNC_SLAVE = 0,
|
||||
CH7006_SYNC_MASTER,
|
||||
} sync_direction;
|
||||
|
||||
enum {
|
||||
CH7006_SYNC_SEPARATED = 0,
|
||||
CH7006_SYNC_EMBEDDED,
|
||||
} sync_encoding;
|
||||
|
||||
enum {
|
||||
CH7006_POUT_1_8V = 0,
|
||||
CH7006_POUT_3_3V,
|
||||
} pout_level;
|
||||
|
||||
enum {
|
||||
CH7006_ACTIVE_HSYNC = 0,
|
||||
CH7006_ACTIVE_DSTART,
|
||||
} active_detect;
|
||||
};
|
||||
|
||||
#endif
|
||||
+75
-3
@@ -27,11 +27,11 @@
|
||||
#ifndef _I915_DRM_H_
|
||||
#define _I915_DRM_H_
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
/* Please note that modifications to all structs defined here are
|
||||
* subject to backwards-compatibility constraints.
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
#include "drm.h"
|
||||
|
||||
/* Each region is a minimum of 16k, and there are at most 255 of them.
|
||||
*/
|
||||
@@ -186,6 +186,8 @@ typedef struct _drm_i915_sarea {
|
||||
#define DRM_I915_GEM_MMAP_GTT 0x24
|
||||
#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25
|
||||
#define DRM_I915_GEM_MADVISE 0x26
|
||||
#define DRM_I915_OVERLAY_PUT_IMAGE 0x27
|
||||
#define DRM_I915_OVERLAY_ATTRS 0x28
|
||||
|
||||
#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
|
||||
#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
|
||||
@@ -221,8 +223,10 @@ typedef struct _drm_i915_sarea {
|
||||
#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
|
||||
#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
|
||||
#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
|
||||
#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id)
|
||||
#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id)
|
||||
#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise)
|
||||
#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_IOCTL_I915_OVERLAY_ATTRS, struct drm_intel_overlay_put_image)
|
||||
#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)
|
||||
|
||||
/* Allow drivers to submit batchbuffers directly to hardware, relying
|
||||
* on the security mechanisms provided by hardware.
|
||||
@@ -266,6 +270,8 @@ typedef struct drm_i915_irq_wait {
|
||||
#define I915_PARAM_CHIPSET_ID 4
|
||||
#define I915_PARAM_HAS_GEM 5
|
||||
#define I915_PARAM_NUM_FENCES_AVAIL 6
|
||||
#define I915_PARAM_HAS_OVERLAY 7
|
||||
#define I915_PARAM_HAS_PAGEFLIPPING 8
|
||||
|
||||
typedef struct drm_i915_getparam {
|
||||
int param;
|
||||
@@ -686,4 +692,70 @@ struct drm_i915_gem_madvise {
|
||||
__u32 retained;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define I915_OVERLAY_TYPE_MASK 0xff
|
||||
#define I915_OVERLAY_YUV_PLANAR 0x01
|
||||
#define I915_OVERLAY_YUV_PACKED 0x02
|
||||
#define I915_OVERLAY_RGB 0x03
|
||||
|
||||
#define I915_OVERLAY_DEPTH_MASK 0xff00
|
||||
#define I915_OVERLAY_RGB24 0x1000
|
||||
#define I915_OVERLAY_RGB16 0x2000
|
||||
#define I915_OVERLAY_RGB15 0x3000
|
||||
#define I915_OVERLAY_YUV422 0x0100
|
||||
#define I915_OVERLAY_YUV411 0x0200
|
||||
#define I915_OVERLAY_YUV420 0x0300
|
||||
#define I915_OVERLAY_YUV410 0x0400
|
||||
|
||||
#define I915_OVERLAY_SWAP_MASK 0xff0000
|
||||
#define I915_OVERLAY_NO_SWAP 0x000000
|
||||
#define I915_OVERLAY_UV_SWAP 0x010000
|
||||
#define I915_OVERLAY_Y_SWAP 0x020000
|
||||
#define I915_OVERLAY_Y_AND_UV_SWAP 0x030000
|
||||
|
||||
#define I915_OVERLAY_FLAGS_MASK 0xff000000
|
||||
#define I915_OVERLAY_ENABLE 0x01000000
|
||||
|
||||
struct drm_intel_overlay_put_image {
|
||||
/* various flags and src format description */
|
||||
__u32 flags;
|
||||
/* source picture description */
|
||||
__u32 bo_handle;
|
||||
/* stride values and offsets are in bytes, buffer relative */
|
||||
__u16 stride_Y; /* stride for packed formats */
|
||||
__u16 stride_UV;
|
||||
__u32 offset_Y; /* offset for packet formats */
|
||||
__u32 offset_U;
|
||||
__u32 offset_V;
|
||||
/* in pixels */
|
||||
__u16 src_width;
|
||||
__u16 src_height;
|
||||
/* to compensate the scaling factors for partially covered surfaces */
|
||||
__u16 src_scan_width;
|
||||
__u16 src_scan_height;
|
||||
/* output crtc description */
|
||||
__u32 crtc_id;
|
||||
__u16 dst_x;
|
||||
__u16 dst_y;
|
||||
__u16 dst_width;
|
||||
__u16 dst_height;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define I915_OVERLAY_UPDATE_ATTRS (1<<0)
|
||||
#define I915_OVERLAY_UPDATE_GAMMA (1<<1)
|
||||
struct drm_intel_overlay_attrs {
|
||||
__u32 flags;
|
||||
__u32 color_key;
|
||||
__s32 brightness;
|
||||
__u32 contrast;
|
||||
__u32 saturation;
|
||||
__u32 gamma0;
|
||||
__u32 gamma1;
|
||||
__u32 gamma2;
|
||||
__u32 gamma3;
|
||||
__u32 gamma4;
|
||||
__u32 gamma5;
|
||||
};
|
||||
|
||||
#endif /* _I915_DRM_H_ */
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#ifndef __MGA_DRM_H__
|
||||
#define __MGA_DRM_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include "drm.h"
|
||||
|
||||
/* WARNING: If you change any of these defines, make sure to change the
|
||||
* defines in the Xserver file (mga_sarea.h)
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* Copyright 2005 Stephane Marchesin.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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 (including the next
|
||||
* paragraph) 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
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#ifndef __NOUVEAU_DRM_H__
|
||||
#define __NOUVEAU_DRM_H__
|
||||
|
||||
#define NOUVEAU_DRM_HEADER_PATCHLEVEL 15
|
||||
|
||||
struct drm_nouveau_channel_alloc {
|
||||
uint32_t fb_ctxdma_handle;
|
||||
uint32_t tt_ctxdma_handle;
|
||||
|
||||
int channel;
|
||||
|
||||
/* Notifier memory */
|
||||
uint32_t notifier_handle;
|
||||
|
||||
/* DRM-enforced subchannel assignments */
|
||||
struct {
|
||||
uint32_t handle;
|
||||
uint32_t grclass;
|
||||
} subchan[8];
|
||||
uint32_t nr_subchan;
|
||||
};
|
||||
|
||||
struct drm_nouveau_channel_free {
|
||||
int channel;
|
||||
};
|
||||
|
||||
struct drm_nouveau_grobj_alloc {
|
||||
int channel;
|
||||
uint32_t handle;
|
||||
int class;
|
||||
};
|
||||
|
||||
struct drm_nouveau_notifierobj_alloc {
|
||||
uint32_t channel;
|
||||
uint32_t handle;
|
||||
uint32_t size;
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gpuobj_free {
|
||||
int channel;
|
||||
uint32_t handle;
|
||||
};
|
||||
|
||||
/* FIXME : maybe unify {GET,SET}PARAMs */
|
||||
#define NOUVEAU_GETPARAM_PCI_VENDOR 3
|
||||
#define NOUVEAU_GETPARAM_PCI_DEVICE 4
|
||||
#define NOUVEAU_GETPARAM_BUS_TYPE 5
|
||||
#define NOUVEAU_GETPARAM_FB_PHYSICAL 6
|
||||
#define NOUVEAU_GETPARAM_AGP_PHYSICAL 7
|
||||
#define NOUVEAU_GETPARAM_FB_SIZE 8
|
||||
#define NOUVEAU_GETPARAM_AGP_SIZE 9
|
||||
#define NOUVEAU_GETPARAM_PCI_PHYSICAL 10
|
||||
#define NOUVEAU_GETPARAM_CHIPSET_ID 11
|
||||
#define NOUVEAU_GETPARAM_VM_VRAM_BASE 12
|
||||
struct drm_nouveau_getparam {
|
||||
uint64_t param;
|
||||
uint64_t value;
|
||||
};
|
||||
|
||||
struct drm_nouveau_setparam {
|
||||
uint64_t param;
|
||||
uint64_t value;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
|
||||
#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
|
||||
#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
|
||||
#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
|
||||
|
||||
struct drm_nouveau_gem_info {
|
||||
uint32_t handle;
|
||||
uint32_t domain;
|
||||
uint64_t size;
|
||||
uint64_t offset;
|
||||
uint64_t map_handle;
|
||||
uint32_t tile_mode;
|
||||
uint32_t tile_flags;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_new {
|
||||
struct drm_nouveau_gem_info info;
|
||||
uint32_t channel_hint;
|
||||
uint32_t align;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_pushbuf_bo {
|
||||
uint64_t user_priv;
|
||||
uint32_t handle;
|
||||
uint32_t read_domains;
|
||||
uint32_t write_domains;
|
||||
uint32_t valid_domains;
|
||||
uint32_t presumed_ok;
|
||||
uint32_t presumed_domain;
|
||||
uint64_t presumed_offset;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_RELOC_LOW (1 << 0)
|
||||
#define NOUVEAU_GEM_RELOC_HIGH (1 << 1)
|
||||
#define NOUVEAU_GEM_RELOC_OR (1 << 2)
|
||||
struct drm_nouveau_gem_pushbuf_reloc {
|
||||
uint32_t bo_index;
|
||||
uint32_t reloc_index;
|
||||
uint32_t flags;
|
||||
uint32_t data;
|
||||
uint32_t vor;
|
||||
uint32_t tor;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_MAX_BUFFERS 1024
|
||||
#define NOUVEAU_GEM_MAX_RELOCS 1024
|
||||
|
||||
struct drm_nouveau_gem_pushbuf {
|
||||
uint32_t channel;
|
||||
uint32_t nr_dwords;
|
||||
uint32_t nr_buffers;
|
||||
uint32_t nr_relocs;
|
||||
uint64_t dwords;
|
||||
uint64_t buffers;
|
||||
uint64_t relocs;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_pushbuf_call {
|
||||
uint32_t channel;
|
||||
uint32_t handle;
|
||||
uint32_t offset;
|
||||
uint32_t nr_buffers;
|
||||
uint32_t nr_relocs;
|
||||
uint32_t nr_dwords;
|
||||
uint64_t buffers;
|
||||
uint64_t relocs;
|
||||
uint32_t suffix0;
|
||||
uint32_t suffix1;
|
||||
/* below only accessed for CALL2 */
|
||||
uint64_t vram_available;
|
||||
uint64_t gart_available;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_pin {
|
||||
uint32_t handle;
|
||||
uint32_t domain;
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_unpin {
|
||||
uint32_t handle;
|
||||
};
|
||||
|
||||
#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001
|
||||
#define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002
|
||||
#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004
|
||||
struct drm_nouveau_gem_cpu_prep {
|
||||
uint32_t handle;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_cpu_fini {
|
||||
uint32_t handle;
|
||||
};
|
||||
|
||||
struct drm_nouveau_gem_tile {
|
||||
uint32_t handle;
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
uint32_t tile_mode;
|
||||
uint32_t tile_flags;
|
||||
};
|
||||
|
||||
enum nouveau_bus_type {
|
||||
NV_AGP = 0,
|
||||
NV_PCI = 1,
|
||||
NV_PCIE = 2,
|
||||
};
|
||||
|
||||
struct drm_nouveau_sarea {
|
||||
};
|
||||
|
||||
#define DRM_NOUVEAU_CARD_INIT 0x00
|
||||
#define DRM_NOUVEAU_GETPARAM 0x01
|
||||
#define DRM_NOUVEAU_SETPARAM 0x02
|
||||
#define DRM_NOUVEAU_CHANNEL_ALLOC 0x03
|
||||
#define DRM_NOUVEAU_CHANNEL_FREE 0x04
|
||||
#define DRM_NOUVEAU_GROBJ_ALLOC 0x05
|
||||
#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x06
|
||||
#define DRM_NOUVEAU_GPUOBJ_FREE 0x07
|
||||
#define DRM_NOUVEAU_GEM_NEW 0x40
|
||||
#define DRM_NOUVEAU_GEM_PUSHBUF 0x41
|
||||
#define DRM_NOUVEAU_GEM_PUSHBUF_CALL 0x42
|
||||
#define DRM_NOUVEAU_GEM_PIN 0x43 /* !KMS only */
|
||||
#define DRM_NOUVEAU_GEM_UNPIN 0x44 /* !KMS only */
|
||||
#define DRM_NOUVEAU_GEM_CPU_PREP 0x45
|
||||
#define DRM_NOUVEAU_GEM_CPU_FINI 0x46
|
||||
#define DRM_NOUVEAU_GEM_INFO 0x47
|
||||
#define DRM_NOUVEAU_GEM_PUSHBUF_CALL2 0x48
|
||||
|
||||
#endif /* __NOUVEAU_DRM_H__ */
|
||||
@@ -33,7 +33,7 @@
|
||||
#ifndef __RADEON_DRM_H__
|
||||
#define __RADEON_DRM_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include "drm.h"
|
||||
|
||||
/* WARNING: If you change any of these defines, make sure to change the
|
||||
* defines in the X server file (radeon_sarea.h)
|
||||
|
||||
@@ -44,6 +44,29 @@ struct ttm_bo_device;
|
||||
|
||||
struct drm_mm_node;
|
||||
|
||||
|
||||
/**
|
||||
* struct ttm_placement
|
||||
*
|
||||
* @fpfn: first valid page frame number to put the object
|
||||
* @lpfn: last valid page frame number to put the object
|
||||
* @num_placement: number of prefered placements
|
||||
* @placement: prefered placements
|
||||
* @num_busy_placement: number of prefered placements when need to evict buffer
|
||||
* @busy_placement: prefered placements when need to evict buffer
|
||||
*
|
||||
* Structure indicating the placement you request for an object.
|
||||
*/
|
||||
struct ttm_placement {
|
||||
unsigned fpfn;
|
||||
unsigned lpfn;
|
||||
unsigned num_placement;
|
||||
const uint32_t *placement;
|
||||
unsigned num_busy_placement;
|
||||
const uint32_t *busy_placement;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct ttm_mem_reg
|
||||
*
|
||||
@@ -109,10 +132,6 @@ struct ttm_tt;
|
||||
* the object is destroyed.
|
||||
* @event_queue: Queue for processes waiting on buffer object status change.
|
||||
* @lock: spinlock protecting mostly synchronization members.
|
||||
* @proposed_placement: Proposed placement for the buffer. Changed only by the
|
||||
* creator prior to validation as opposed to bo->mem.proposed_flags which is
|
||||
* changed by the implementation prior to a buffer move if it wants to outsmart
|
||||
* the buffer creator / user. This latter happens, for example, at eviction.
|
||||
* @mem: structure describing current placement.
|
||||
* @persistant_swap_storage: Usually the swap storage is deleted for buffers
|
||||
* pinned in physical memory. If this behaviour is not desired, this member
|
||||
@@ -177,7 +196,6 @@ struct ttm_buffer_object {
|
||||
* Members protected by the bo::reserved lock.
|
||||
*/
|
||||
|
||||
uint32_t proposed_placement;
|
||||
struct ttm_mem_reg mem;
|
||||
struct file *persistant_swap_storage;
|
||||
struct ttm_tt *ttm;
|
||||
@@ -285,29 +303,30 @@ ttm_bo_reference(struct ttm_buffer_object *bo)
|
||||
* Note: It might be necessary to block validations before the
|
||||
* wait by reserving the buffer.
|
||||
* Returns -EBUSY if no_wait is true and the buffer is busy.
|
||||
* Returns -ERESTART if interrupted by a signal.
|
||||
* Returns -ERESTARTSYS if interrupted by a signal.
|
||||
*/
|
||||
extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy,
|
||||
bool interruptible, bool no_wait);
|
||||
/**
|
||||
* ttm_buffer_object_validate
|
||||
* ttm_bo_validate
|
||||
*
|
||||
* @bo: The buffer object.
|
||||
* @proposed_placement: Proposed_placement for the buffer object.
|
||||
* @placement: Proposed placement for the buffer object.
|
||||
* @interruptible: Sleep interruptible if sleeping.
|
||||
* @no_wait: Return immediately if the buffer is busy.
|
||||
*
|
||||
* Changes placement and caching policy of the buffer object
|
||||
* according to bo::proposed_flags.
|
||||
* according proposed placement.
|
||||
* Returns
|
||||
* -EINVAL on invalid proposed_flags.
|
||||
* -EINVAL on invalid proposed placement.
|
||||
* -ENOMEM on out-of-memory condition.
|
||||
* -EBUSY if no_wait is true and buffer busy.
|
||||
* -ERESTART if interrupted by a signal.
|
||||
* -ERESTARTSYS if interrupted by a signal.
|
||||
*/
|
||||
extern int ttm_buffer_object_validate(struct ttm_buffer_object *bo,
|
||||
uint32_t proposed_placement,
|
||||
bool interruptible, bool no_wait);
|
||||
extern int ttm_bo_validate(struct ttm_buffer_object *bo,
|
||||
struct ttm_placement *placement,
|
||||
bool interruptible, bool no_wait);
|
||||
|
||||
/**
|
||||
* ttm_bo_unref
|
||||
*
|
||||
@@ -328,7 +347,7 @@ extern void ttm_bo_unref(struct ttm_buffer_object **bo);
|
||||
* waiting for buffer idle. This lock is recursive.
|
||||
* Returns
|
||||
* -EBUSY if the buffer is busy and no_wait is true.
|
||||
* -ERESTART if interrupted by a signal.
|
||||
* -ERESTARTSYS if interrupted by a signal.
|
||||
*/
|
||||
|
||||
extern int
|
||||
@@ -343,7 +362,7 @@ ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait);
|
||||
extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo);
|
||||
|
||||
/**
|
||||
* ttm_buffer_object_init
|
||||
* ttm_bo_init
|
||||
*
|
||||
* @bdev: Pointer to a ttm_bo_device struct.
|
||||
* @bo: Pointer to a ttm_buffer_object to be initialized.
|
||||
@@ -371,20 +390,20 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo);
|
||||
* Returns
|
||||
* -ENOMEM: Out of memory.
|
||||
* -EINVAL: Invalid placement flags.
|
||||
* -ERESTART: Interrupted by signal while sleeping waiting for resources.
|
||||
* -ERESTARTSYS: Interrupted by signal while sleeping waiting for resources.
|
||||
*/
|
||||
|
||||
extern int ttm_buffer_object_init(struct ttm_bo_device *bdev,
|
||||
struct ttm_buffer_object *bo,
|
||||
unsigned long size,
|
||||
enum ttm_bo_type type,
|
||||
uint32_t flags,
|
||||
uint32_t page_alignment,
|
||||
unsigned long buffer_start,
|
||||
bool interrubtible,
|
||||
struct file *persistant_swap_storage,
|
||||
size_t acc_size,
|
||||
void (*destroy) (struct ttm_buffer_object *));
|
||||
extern int ttm_bo_init(struct ttm_bo_device *bdev,
|
||||
struct ttm_buffer_object *bo,
|
||||
unsigned long size,
|
||||
enum ttm_bo_type type,
|
||||
struct ttm_placement *placement,
|
||||
uint32_t page_alignment,
|
||||
unsigned long buffer_start,
|
||||
bool interrubtible,
|
||||
struct file *persistant_swap_storage,
|
||||
size_t acc_size,
|
||||
void (*destroy) (struct ttm_buffer_object *));
|
||||
/**
|
||||
* ttm_bo_synccpu_object_init
|
||||
*
|
||||
@@ -405,47 +424,43 @@ extern int ttm_buffer_object_init(struct ttm_bo_device *bdev,
|
||||
* GEM user interface.
|
||||
* @p_bo: On successful completion *p_bo points to the created object.
|
||||
*
|
||||
* This function allocates a ttm_buffer_object, and then calls
|
||||
* ttm_buffer_object_init on that object.
|
||||
* The destroy function is set to kfree().
|
||||
* This function allocates a ttm_buffer_object, and then calls ttm_bo_init
|
||||
* on that object. The destroy function is set to kfree().
|
||||
* Returns
|
||||
* -ENOMEM: Out of memory.
|
||||
* -EINVAL: Invalid placement flags.
|
||||
* -ERESTART: Interrupted by signal while waiting for resources.
|
||||
* -ERESTARTSYS: Interrupted by signal while waiting for resources.
|
||||
*/
|
||||
|
||||
extern int ttm_buffer_object_create(struct ttm_bo_device *bdev,
|
||||
unsigned long size,
|
||||
enum ttm_bo_type type,
|
||||
uint32_t flags,
|
||||
uint32_t page_alignment,
|
||||
unsigned long buffer_start,
|
||||
bool interruptible,
|
||||
struct file *persistant_swap_storage,
|
||||
struct ttm_buffer_object **p_bo);
|
||||
extern int ttm_bo_create(struct ttm_bo_device *bdev,
|
||||
unsigned long size,
|
||||
enum ttm_bo_type type,
|
||||
struct ttm_placement *placement,
|
||||
uint32_t page_alignment,
|
||||
unsigned long buffer_start,
|
||||
bool interruptible,
|
||||
struct file *persistant_swap_storage,
|
||||
struct ttm_buffer_object **p_bo);
|
||||
|
||||
/**
|
||||
* ttm_bo_check_placement
|
||||
*
|
||||
* @bo: the buffer object.
|
||||
* @set_flags: placement flags to set.
|
||||
* @clr_flags: placement flags to clear.
|
||||
* @bo: the buffer object.
|
||||
* @placement: placements
|
||||
*
|
||||
* Performs minimal validity checking on an intended change of
|
||||
* placement flags.
|
||||
* Returns
|
||||
* -EINVAL: Intended change is invalid or not allowed.
|
||||
*/
|
||||
|
||||
extern int ttm_bo_check_placement(struct ttm_buffer_object *bo,
|
||||
uint32_t set_flags, uint32_t clr_flags);
|
||||
struct ttm_placement *placement);
|
||||
|
||||
/**
|
||||
* ttm_bo_init_mm
|
||||
*
|
||||
* @bdev: Pointer to a ttm_bo_device struct.
|
||||
* @mem_type: The memory type.
|
||||
* @p_offset: offset for managed area in pages.
|
||||
* @p_size: size managed area in pages.
|
||||
*
|
||||
* Initialize a manager for a given memory type.
|
||||
@@ -458,7 +473,7 @@ extern int ttm_bo_check_placement(struct ttm_buffer_object *bo,
|
||||
*/
|
||||
|
||||
extern int ttm_bo_init_mm(struct ttm_bo_device *bdev, unsigned type,
|
||||
unsigned long p_offset, unsigned long p_size);
|
||||
unsigned long p_size);
|
||||
/**
|
||||
* ttm_bo_clean_mm
|
||||
*
|
||||
@@ -503,7 +518,7 @@ extern int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type);
|
||||
*
|
||||
* Returns:
|
||||
* -EINVAL: Invalid or uninitialized memory type.
|
||||
* -ERESTART: The call was interrupted by a signal while waiting to
|
||||
* -ERESTARTSYS: The call was interrupted by a signal while waiting to
|
||||
* evict a buffer.
|
||||
*/
|
||||
|
||||
@@ -606,7 +621,7 @@ extern int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma,
|
||||
* be called from the fops::read and fops::write method.
|
||||
* Returns:
|
||||
* See man (2) write, man(2) read. In particular,
|
||||
* the function may return -EINTR if
|
||||
* the function may return -ERESTARTSYS if
|
||||
* interrupted by a signal.
|
||||
*/
|
||||
|
||||
|
||||
@@ -242,12 +242,6 @@ struct ttm_mem_type_manager {
|
||||
/**
|
||||
* struct ttm_bo_driver
|
||||
*
|
||||
* @mem_type_prio: Priority array of memory types to place a buffer object in
|
||||
* if it fits without evicting buffers from any of these memory types.
|
||||
* @mem_busy_prio: Priority array of memory types to place a buffer object in
|
||||
* if it needs to evict buffers to make room.
|
||||
* @num_mem_type_prio: Number of elements in the @mem_type_prio array.
|
||||
* @num_mem_busy_prio: Number of elements in the @num_mem_busy_prio array.
|
||||
* @create_ttm_backend_entry: Callback to create a struct ttm_backend.
|
||||
* @invalidate_caches: Callback to invalidate read caches when a buffer object
|
||||
* has been evicted.
|
||||
@@ -265,11 +259,6 @@ struct ttm_mem_type_manager {
|
||||
*/
|
||||
|
||||
struct ttm_bo_driver {
|
||||
const uint32_t *mem_type_prio;
|
||||
const uint32_t *mem_busy_prio;
|
||||
uint32_t num_mem_type_prio;
|
||||
uint32_t num_mem_busy_prio;
|
||||
|
||||
/**
|
||||
* struct ttm_bo_driver member create_ttm_backend_entry
|
||||
*
|
||||
@@ -306,7 +295,8 @@ struct ttm_bo_driver {
|
||||
* finished, they'll end up in bo->mem.flags
|
||||
*/
|
||||
|
||||
uint32_t(*evict_flags) (struct ttm_buffer_object *bo);
|
||||
void(*evict_flags) (struct ttm_buffer_object *bo,
|
||||
struct ttm_placement *placement);
|
||||
/**
|
||||
* struct ttm_bo_driver member move:
|
||||
*
|
||||
@@ -544,6 +534,15 @@ extern int ttm_tt_set_user(struct ttm_tt *ttm,
|
||||
*/
|
||||
extern int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem);
|
||||
|
||||
/**
|
||||
* ttm_tt_populate:
|
||||
*
|
||||
* @ttm: The struct ttm_tt to contain the backing pages.
|
||||
*
|
||||
* Add backing pages to all of @ttm
|
||||
*/
|
||||
extern int ttm_tt_populate(struct ttm_tt *ttm);
|
||||
|
||||
/**
|
||||
* ttm_ttm_destroy:
|
||||
*
|
||||
@@ -639,12 +638,12 @@ extern bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev,
|
||||
* -EBUSY: No space available (only if no_wait == 1).
|
||||
* -ENOMEM: Could not allocate memory for the buffer object, either due to
|
||||
* fragmentation or concurrent allocators.
|
||||
* -ERESTART: An interruptible sleep was interrupted by a signal.
|
||||
* -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
|
||||
*/
|
||||
extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||
uint32_t proposed_placement,
|
||||
struct ttm_mem_reg *mem,
|
||||
bool interruptible, bool no_wait);
|
||||
struct ttm_placement *placement,
|
||||
struct ttm_mem_reg *mem,
|
||||
bool interruptible, bool no_wait);
|
||||
/**
|
||||
* ttm_bo_wait_for_cpu
|
||||
*
|
||||
@@ -654,7 +653,7 @@ extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||
* Wait until a buffer object is no longer sync'ed for CPU access.
|
||||
* Returns:
|
||||
* -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1).
|
||||
* -ERESTART: An interruptible sleep was interrupted by a signal.
|
||||
* -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
|
||||
*/
|
||||
|
||||
extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait);
|
||||
@@ -758,7 +757,7 @@ extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
|
||||
* -EAGAIN: The reservation may cause a deadlock.
|
||||
* Release all buffer reservations, wait for @bo to become unreserved and
|
||||
* try again. (only if use_sequence == 1).
|
||||
* -ERESTART: A wait for the buffer to become unreserved was interrupted by
|
||||
* -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
|
||||
* a signal. Release all buffer reservations and return to user-space.
|
||||
*/
|
||||
extern int ttm_bo_reserve(struct ttm_buffer_object *bo,
|
||||
@@ -799,7 +798,7 @@ extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo,
|
||||
*
|
||||
* Returns:
|
||||
* -EBUSY: If no_wait == 1 and the buffer is already reserved.
|
||||
* -ERESTART: If interruptible == 1 and the process received a signal
|
||||
* -ERESTARTSYS: If interruptible == 1 and the process received a signal
|
||||
* while sleeping.
|
||||
*/
|
||||
extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo,
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 (including the
|
||||
* next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
/*
|
||||
* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
||||
*/
|
||||
|
||||
#ifndef _TTM_EXECBUF_UTIL_H_
|
||||
#define _TTM_EXECBUF_UTIL_H_
|
||||
|
||||
#include "ttm/ttm_bo_api.h"
|
||||
#include <linux/list.h>
|
||||
|
||||
/**
|
||||
* struct ttm_validate_buffer
|
||||
*
|
||||
* @head: list head for thread-private list.
|
||||
* @bo: refcounted buffer object pointer.
|
||||
* @new_sync_obj_arg: New sync_obj_arg for @bo, to be used once
|
||||
* adding a new sync object.
|
||||
* @reservied: Indicates whether @bo has been reserved for validation.
|
||||
*/
|
||||
|
||||
struct ttm_validate_buffer {
|
||||
struct list_head head;
|
||||
struct ttm_buffer_object *bo;
|
||||
void *new_sync_obj_arg;
|
||||
bool reserved;
|
||||
};
|
||||
|
||||
/**
|
||||
* function ttm_eu_backoff_reservation
|
||||
*
|
||||
* @list: thread private list of ttm_validate_buffer structs.
|
||||
*
|
||||
* Undoes all buffer validation reservations for bos pointed to by
|
||||
* the list entries.
|
||||
*/
|
||||
|
||||
extern void ttm_eu_backoff_reservation(struct list_head *list);
|
||||
|
||||
/**
|
||||
* function ttm_eu_reserve_buffers
|
||||
*
|
||||
* @list: thread private list of ttm_validate_buffer structs.
|
||||
* @val_seq: A unique sequence number.
|
||||
*
|
||||
* Tries to reserve bos pointed to by the list entries for validation.
|
||||
* If the function returns 0, all buffers are marked as "unfenced",
|
||||
* taken off the lru lists and are not synced for write CPU usage.
|
||||
*
|
||||
* If the function detects a deadlock due to multiple threads trying to
|
||||
* reserve the same buffers in reverse order, all threads except one will
|
||||
* back off and retry. This function may sleep while waiting for
|
||||
* CPU write reservations to be cleared, and for other threads to
|
||||
* unreserve their buffers.
|
||||
*
|
||||
* This function may return -ERESTART or -EAGAIN if the calling process
|
||||
* receives a signal while waiting. In that case, no buffers on the list
|
||||
* will be reserved upon return.
|
||||
*
|
||||
* Buffers reserved by this function should be unreserved by
|
||||
* a call to either ttm_eu_backoff_reservation() or
|
||||
* ttm_eu_fence_buffer_objects() when command submission is complete or
|
||||
* has failed.
|
||||
*/
|
||||
|
||||
extern int ttm_eu_reserve_buffers(struct list_head *list, uint32_t val_seq);
|
||||
|
||||
/**
|
||||
* function ttm_eu_fence_buffer_objects.
|
||||
*
|
||||
* @list: thread private list of ttm_validate_buffer structs.
|
||||
* @sync_obj: The new sync object for the buffers.
|
||||
*
|
||||
* This function should be called when command submission is complete, and
|
||||
* it will add a new sync object to bos pointed to by entries on @list.
|
||||
* It also unreserves all buffers, putting them on lru lists.
|
||||
*
|
||||
*/
|
||||
|
||||
extern void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,247 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (c) 2007-2009 VMware, Inc., Palo Alto, CA., USA
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 (including the
|
||||
* next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
/*
|
||||
* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
||||
*/
|
||||
|
||||
/** @file ttm_lock.h
|
||||
* This file implements a simple replacement for the buffer manager use
|
||||
* of the DRM heavyweight hardware lock.
|
||||
* The lock is a read-write lock. Taking it in read mode and write mode
|
||||
* is relatively fast, and intended for in-kernel use only.
|
||||
*
|
||||
* The vt mode is used only when there is a need to block all
|
||||
* user-space processes from validating buffers.
|
||||
* It's allowed to leave kernel space with the vt lock held.
|
||||
* If a user-space process dies while having the vt-lock,
|
||||
* it will be released during the file descriptor release. The vt lock
|
||||
* excludes write lock and read lock.
|
||||
*
|
||||
* The suspend mode is used to lock out all TTM users when preparing for
|
||||
* and executing suspend operations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TTM_LOCK_H_
|
||||
#define _TTM_LOCK_H_
|
||||
|
||||
#include "ttm/ttm_object.h"
|
||||
#include <linux/wait.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
/**
|
||||
* struct ttm_lock
|
||||
*
|
||||
* @base: ttm base object used solely to release the lock if the client
|
||||
* holding the lock dies.
|
||||
* @queue: Queue for processes waiting for lock change-of-status.
|
||||
* @lock: Spinlock protecting some lock members.
|
||||
* @rw: Read-write lock counter. Protected by @lock.
|
||||
* @flags: Lock state. Protected by @lock.
|
||||
* @kill_takers: Boolean whether to kill takers of the lock.
|
||||
* @signal: Signal to send when kill_takers is true.
|
||||
*/
|
||||
|
||||
struct ttm_lock {
|
||||
struct ttm_base_object base;
|
||||
wait_queue_head_t queue;
|
||||
spinlock_t lock;
|
||||
int32_t rw;
|
||||
uint32_t flags;
|
||||
bool kill_takers;
|
||||
int signal;
|
||||
struct ttm_object_file *vt_holder;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* ttm_lock_init
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* Initializes the lock.
|
||||
*/
|
||||
extern void ttm_lock_init(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_read_unlock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Releases a read lock.
|
||||
*/
|
||||
extern void ttm_read_unlock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_read_lock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @interruptible: Interruptible sleeping while waiting for a lock.
|
||||
*
|
||||
* Takes the lock in read mode.
|
||||
* Returns:
|
||||
* -ERESTARTSYS If interrupted by a signal and interruptible is true.
|
||||
*/
|
||||
extern int ttm_read_lock(struct ttm_lock *lock, bool interruptible);
|
||||
|
||||
/**
|
||||
* ttm_read_trylock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @interruptible: Interruptible sleeping while waiting for a lock.
|
||||
*
|
||||
* Tries to take the lock in read mode. If the lock is already held
|
||||
* in write mode, the function will return -EBUSY. If the lock is held
|
||||
* in vt or suspend mode, the function will sleep until these modes
|
||||
* are unlocked.
|
||||
*
|
||||
* Returns:
|
||||
* -EBUSY The lock was already held in write mode.
|
||||
* -ERESTARTSYS If interrupted by a signal and interruptible is true.
|
||||
*/
|
||||
extern int ttm_read_trylock(struct ttm_lock *lock, bool interruptible);
|
||||
|
||||
/**
|
||||
* ttm_write_unlock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Releases a write lock.
|
||||
*/
|
||||
extern void ttm_write_unlock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_write_lock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @interruptible: Interruptible sleeping while waiting for a lock.
|
||||
*
|
||||
* Takes the lock in write mode.
|
||||
* Returns:
|
||||
* -ERESTARTSYS If interrupted by a signal and interruptible is true.
|
||||
*/
|
||||
extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
|
||||
|
||||
/**
|
||||
* ttm_lock_downgrade
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Downgrades a write lock to a read lock.
|
||||
*/
|
||||
extern void ttm_lock_downgrade(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_suspend_lock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Takes the lock in suspend mode. Excludes read and write mode.
|
||||
*/
|
||||
extern void ttm_suspend_lock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_suspend_unlock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Releases a suspend lock
|
||||
*/
|
||||
extern void ttm_suspend_unlock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_vt_lock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @interruptible: Interruptible sleeping while waiting for a lock.
|
||||
* @tfile: Pointer to a struct ttm_object_file to register the lock with.
|
||||
*
|
||||
* Takes the lock in vt mode.
|
||||
* Returns:
|
||||
* -ERESTARTSYS If interrupted by a signal and interruptible is true.
|
||||
* -ENOMEM: Out of memory when locking.
|
||||
*/
|
||||
extern int ttm_vt_lock(struct ttm_lock *lock, bool interruptible,
|
||||
struct ttm_object_file *tfile);
|
||||
|
||||
/**
|
||||
* ttm_vt_unlock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Releases a vt lock.
|
||||
* Returns:
|
||||
* -EINVAL If the lock was not held.
|
||||
*/
|
||||
extern int ttm_vt_unlock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_write_unlock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
*
|
||||
* Releases a write lock.
|
||||
*/
|
||||
extern void ttm_write_unlock(struct ttm_lock *lock);
|
||||
|
||||
/**
|
||||
* ttm_write_lock
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @interruptible: Interruptible sleeping while waiting for a lock.
|
||||
*
|
||||
* Takes the lock in write mode.
|
||||
* Returns:
|
||||
* -ERESTARTSYS If interrupted by a signal and interruptible is true.
|
||||
*/
|
||||
extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
|
||||
|
||||
/**
|
||||
* ttm_lock_set_kill
|
||||
*
|
||||
* @lock: Pointer to a struct ttm_lock
|
||||
* @val: Boolean whether to kill processes taking the lock.
|
||||
* @signal: Signal to send to the process taking the lock.
|
||||
*
|
||||
* The kill-when-taking-lock functionality is used to kill processes that keep
|
||||
* on using the TTM functionality when its resources has been taken down, for
|
||||
* example when the X server exits. A typical sequence would look like this:
|
||||
* - X server takes lock in write mode.
|
||||
* - ttm_lock_set_kill() is called with @val set to true.
|
||||
* - As part of X server exit, TTM resources are taken down.
|
||||
* - X server releases the lock on file release.
|
||||
* - Another dri client wants to render, takes the lock and is killed.
|
||||
*
|
||||
*/
|
||||
static inline void ttm_lock_set_kill(struct ttm_lock *lock, bool val,
|
||||
int signal)
|
||||
{
|
||||
lock->kill_takers = val;
|
||||
if (val)
|
||||
lock->signal = signal;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
/**
|
||||
* struct ttm_mem_shrink - callback to shrink TTM memory usage.
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 (including the
|
||||
* next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
/*
|
||||
* Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
||||
*/
|
||||
/** @file ttm_object.h
|
||||
*
|
||||
* Base- and reference object implementation for the various
|
||||
* ttm objects. Implements reference counting, minimal security checks
|
||||
* and release on file close.
|
||||
*/
|
||||
|
||||
#ifndef _TTM_OBJECT_H_
|
||||
#define _TTM_OBJECT_H_
|
||||
|
||||
#include <linux/list.h>
|
||||
#include "drm_hashtab.h"
|
||||
#include <linux/kref.h>
|
||||
#include <ttm/ttm_memory.h>
|
||||
|
||||
/**
|
||||
* enum ttm_ref_type
|
||||
*
|
||||
* Describes what type of reference a ref object holds.
|
||||
*
|
||||
* TTM_REF_USAGE is a simple refcount on a base object.
|
||||
*
|
||||
* TTM_REF_SYNCCPU_READ is a SYNCCPU_READ reference on a
|
||||
* buffer object.
|
||||
*
|
||||
* TTM_REF_SYNCCPU_WRITE is a SYNCCPU_WRITE reference on a
|
||||
* buffer object.
|
||||
*
|
||||
*/
|
||||
|
||||
enum ttm_ref_type {
|
||||
TTM_REF_USAGE,
|
||||
TTM_REF_SYNCCPU_READ,
|
||||
TTM_REF_SYNCCPU_WRITE,
|
||||
TTM_REF_NUM
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ttm_object_type
|
||||
*
|
||||
* One entry per ttm object type.
|
||||
* Device-specific types should use the
|
||||
* ttm_driver_typex types.
|
||||
*/
|
||||
|
||||
enum ttm_object_type {
|
||||
ttm_fence_type,
|
||||
ttm_buffer_type,
|
||||
ttm_lock_type,
|
||||
ttm_driver_type0 = 256,
|
||||
ttm_driver_type1
|
||||
};
|
||||
|
||||
struct ttm_object_file;
|
||||
struct ttm_object_device;
|
||||
|
||||
/**
|
||||
* struct ttm_base_object
|
||||
*
|
||||
* @hash: hash entry for the per-device object hash.
|
||||
* @type: derived type this object is base class for.
|
||||
* @shareable: Other ttm_object_files can access this object.
|
||||
*
|
||||
* @tfile: Pointer to ttm_object_file of the creator.
|
||||
* NULL if the object was not created by a user request.
|
||||
* (kernel object).
|
||||
*
|
||||
* @refcount: Number of references to this object, not
|
||||
* including the hash entry. A reference to a base object can
|
||||
* only be held by a ref object.
|
||||
*
|
||||
* @refcount_release: A function to be called when there are
|
||||
* no more references to this object. This function should
|
||||
* destroy the object (or make sure destruction eventually happens),
|
||||
* and when it is called, the object has
|
||||
* already been taken out of the per-device hash. The parameter
|
||||
* "base" should be set to NULL by the function.
|
||||
*
|
||||
* @ref_obj_release: A function to be called when a reference object
|
||||
* with another ttm_ref_type than TTM_REF_USAGE is deleted.
|
||||
* this function may, for example, release a lock held by a user-space
|
||||
* process.
|
||||
*
|
||||
* This struct is intended to be used as a base struct for objects that
|
||||
* are visible to user-space. It provides a global name, race-safe
|
||||
* access and refcounting, minimal access contol and hooks for unref actions.
|
||||
*/
|
||||
|
||||
struct ttm_base_object {
|
||||
struct drm_hash_item hash;
|
||||
enum ttm_object_type object_type;
|
||||
bool shareable;
|
||||
struct ttm_object_file *tfile;
|
||||
struct kref refcount;
|
||||
void (*refcount_release) (struct ttm_base_object **base);
|
||||
void (*ref_obj_release) (struct ttm_base_object *base,
|
||||
enum ttm_ref_type ref_type);
|
||||
};
|
||||
|
||||
/**
|
||||
* ttm_base_object_init
|
||||
*
|
||||
* @tfile: Pointer to a struct ttm_object_file.
|
||||
* @base: The struct ttm_base_object to initialize.
|
||||
* @shareable: This object is shareable with other applcations.
|
||||
* (different @tfile pointers.)
|
||||
* @type: The object type.
|
||||
* @refcount_release: See the struct ttm_base_object description.
|
||||
* @ref_obj_release: See the struct ttm_base_object description.
|
||||
*
|
||||
* Initializes a struct ttm_base_object.
|
||||
*/
|
||||
|
||||
extern int ttm_base_object_init(struct ttm_object_file *tfile,
|
||||
struct ttm_base_object *base,
|
||||
bool shareable,
|
||||
enum ttm_object_type type,
|
||||
void (*refcount_release) (struct ttm_base_object
|
||||
**),
|
||||
void (*ref_obj_release) (struct ttm_base_object
|
||||
*,
|
||||
enum ttm_ref_type
|
||||
ref_type));
|
||||
|
||||
/**
|
||||
* ttm_base_object_lookup
|
||||
*
|
||||
* @tfile: Pointer to a struct ttm_object_file.
|
||||
* @key: Hash key
|
||||
*
|
||||
* Looks up a struct ttm_base_object with the key @key.
|
||||
* Also verifies that the object is visible to the application, by
|
||||
* comparing the @tfile argument and checking the object shareable flag.
|
||||
*/
|
||||
|
||||
extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file
|
||||
*tfile, uint32_t key);
|
||||
|
||||
/**
|
||||
* ttm_base_object_unref
|
||||
*
|
||||
* @p_base: Pointer to a pointer referncing a struct ttm_base_object.
|
||||
*
|
||||
* Decrements the base object refcount and clears the pointer pointed to by
|
||||
* p_base.
|
||||
*/
|
||||
|
||||
extern void ttm_base_object_unref(struct ttm_base_object **p_base);
|
||||
|
||||
/**
|
||||
* ttm_ref_object_add.
|
||||
*
|
||||
* @tfile: A struct ttm_object_file representing the application owning the
|
||||
* ref_object.
|
||||
* @base: The base object to reference.
|
||||
* @ref_type: The type of reference.
|
||||
* @existed: Upon completion, indicates that an identical reference object
|
||||
* already existed, and the refcount was upped on that object instead.
|
||||
*
|
||||
* Adding a ref object to a base object is basically like referencing the
|
||||
* base object, but a user-space application holds the reference. When the
|
||||
* file corresponding to @tfile is closed, all its reference objects are
|
||||
* deleted. A reference object can have different types depending on what
|
||||
* it's intended for. It can be refcounting to prevent object destruction,
|
||||
* When user-space takes a lock, it can add a ref object to that lock to
|
||||
* make sure the lock is released if the application dies. A ref object
|
||||
* will hold a single reference on a base object.
|
||||
*/
|
||||
extern int ttm_ref_object_add(struct ttm_object_file *tfile,
|
||||
struct ttm_base_object *base,
|
||||
enum ttm_ref_type ref_type, bool *existed);
|
||||
/**
|
||||
* ttm_ref_object_base_unref
|
||||
*
|
||||
* @key: Key representing the base object.
|
||||
* @ref_type: Ref type of the ref object to be dereferenced.
|
||||
*
|
||||
* Unreference a ref object with type @ref_type
|
||||
* on the base object identified by @key. If there are no duplicate
|
||||
* references, the ref object will be destroyed and the base object
|
||||
* will be unreferenced.
|
||||
*/
|
||||
extern int ttm_ref_object_base_unref(struct ttm_object_file *tfile,
|
||||
unsigned long key,
|
||||
enum ttm_ref_type ref_type);
|
||||
|
||||
/**
|
||||
* ttm_object_file_init - initialize a struct ttm_object file
|
||||
*
|
||||
* @tdev: A struct ttm_object device this file is initialized on.
|
||||
* @hash_order: Order of the hash table used to hold the reference objects.
|
||||
*
|
||||
* This is typically called by the file_ops::open function.
|
||||
*/
|
||||
|
||||
extern struct ttm_object_file *ttm_object_file_init(struct ttm_object_device
|
||||
*tdev,
|
||||
unsigned int hash_order);
|
||||
|
||||
/**
|
||||
* ttm_object_file_release - release data held by a ttm_object_file
|
||||
*
|
||||
* @p_tfile: Pointer to pointer to the ttm_object_file object to release.
|
||||
* *p_tfile will be set to NULL by this function.
|
||||
*
|
||||
* Releases all data associated by a ttm_object_file.
|
||||
* Typically called from file_ops::release. The caller must
|
||||
* ensure that there are no concurrent users of tfile.
|
||||
*/
|
||||
|
||||
extern void ttm_object_file_release(struct ttm_object_file **p_tfile);
|
||||
|
||||
/**
|
||||
* ttm_object device init - initialize a struct ttm_object_device
|
||||
*
|
||||
* @hash_order: Order of hash table used to hash the base objects.
|
||||
*
|
||||
* This function is typically called on device initialization to prepare
|
||||
* data structures needed for ttm base and ref objects.
|
||||
*/
|
||||
|
||||
extern struct ttm_object_device *ttm_object_device_init
|
||||
(struct ttm_mem_global *mem_glob, unsigned int hash_order);
|
||||
|
||||
/**
|
||||
* ttm_object_device_release - release data held by a ttm_object_device
|
||||
*
|
||||
* @p_tdev: Pointer to pointer to the ttm_object_device object to release.
|
||||
* *p_tdev will be set to NULL by this function.
|
||||
*
|
||||
* Releases all data associated by a ttm_object_device.
|
||||
* Typically called from driver::unload before the destruction of the
|
||||
* device private data structure.
|
||||
*/
|
||||
|
||||
extern void ttm_object_device_release(struct ttm_object_device **p_tdev);
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef _VIA_DRM_H_
|
||||
#define _VIA_DRM_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#include "drm.h"
|
||||
|
||||
/* WARNING: These defines must be the same as what the Xserver uses.
|
||||
* if you change them, you must change the defines in the Xserver.
|
||||
|
||||
@@ -214,7 +214,6 @@ unifdef-y += futex.h
|
||||
unifdef-y += fs.h
|
||||
unifdef-y += gameport.h
|
||||
unifdef-y += generic_serial.h
|
||||
unifdef-y += hayesesp.h
|
||||
unifdef-y += hdlcdrv.h
|
||||
unifdef-y += hdlc.h
|
||||
unifdef-y += hdreg.h
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef __u32 DriverVer_type;
|
||||
#ifndef CCISS_CMD_H
|
||||
// This defines are duplicated in cciss_cmd.h in the driver directory
|
||||
|
||||
//general boundary defintions
|
||||
//general boundary definitions
|
||||
#define SENSEINFOBYTES 32//note that this value may vary between host implementations
|
||||
|
||||
//Command Status value
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* query vendor-specific element types
|
||||
*
|
||||
* accessing elements works by specifing type and unit of the element.
|
||||
* for eample, storage elements are addressed with type = CHET_ST and
|
||||
* for example, storage elements are addressed with type = CHET_ST and
|
||||
* unit = 0 .. cp_nslots-1
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,8 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
extern void unregister_cpu(struct cpu *cpu);
|
||||
extern ssize_t arch_cpu_probe(const char *, size_t);
|
||||
extern ssize_t arch_cpu_release(const char *, size_t);
|
||||
#endif
|
||||
struct notifier_block;
|
||||
|
||||
@@ -115,6 +117,19 @@ extern void put_online_cpus(void);
|
||||
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
|
||||
int cpu_down(unsigned int cpu);
|
||||
|
||||
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
|
||||
extern void cpu_hotplug_driver_lock(void);
|
||||
extern void cpu_hotplug_driver_unlock(void);
|
||||
#else
|
||||
static inline void cpu_hotplug_driver_lock(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void cpu_hotplug_driver_unlock(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
#define get_online_cpus() do { } while (0)
|
||||
|
||||
@@ -232,6 +232,7 @@ struct cpufreq_driver {
|
||||
/* optional */
|
||||
unsigned int (*getavg) (struct cpufreq_policy *policy,
|
||||
unsigned int cpu);
|
||||
int (*bios_limit) (int cpu, unsigned int *limit);
|
||||
|
||||
int (*exit) (struct cpufreq_policy *policy);
|
||||
int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg);
|
||||
|
||||
@@ -84,6 +84,7 @@ extern const struct cpumask *const cpu_active_mask;
|
||||
#define num_online_cpus() cpumask_weight(cpu_online_mask)
|
||||
#define num_possible_cpus() cpumask_weight(cpu_possible_mask)
|
||||
#define num_present_cpus() cpumask_weight(cpu_present_mask)
|
||||
#define num_active_cpus() cpumask_weight(cpu_active_mask)
|
||||
#define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask)
|
||||
#define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask)
|
||||
#define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask)
|
||||
@@ -92,6 +93,7 @@ extern const struct cpumask *const cpu_active_mask;
|
||||
#define num_online_cpus() 1
|
||||
#define num_possible_cpus() 1
|
||||
#define num_present_cpus() 1
|
||||
#define num_active_cpus() 1
|
||||
#define cpu_online(cpu) ((cpu) == 0)
|
||||
#define cpu_possible(cpu) ((cpu) == 0)
|
||||
#define cpu_present(cpu) ((cpu) == 0)
|
||||
|
||||
@@ -558,7 +558,7 @@ extern void wait_for_device_probe(void);
|
||||
#ifdef CONFIG_DEVTMPFS
|
||||
extern int devtmpfs_create_node(struct device *dev);
|
||||
extern int devtmpfs_delete_node(struct device *dev);
|
||||
extern int devtmpfs_mount(const char *mountpoint);
|
||||
extern int devtmpfs_mount(const char *mntdir);
|
||||
#else
|
||||
static inline int devtmpfs_create_node(struct device *dev) { return 0; }
|
||||
static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
* various request types above. The remaining 24-bits are currently
|
||||
* set to zero and are reserved for future use and compatibility concerns.
|
||||
*
|
||||
* User-space should always use DM_ULOG_REQUEST_TYPE to aquire the
|
||||
* User-space should always use DM_ULOG_REQUEST_TYPE to acquire the
|
||||
* request type from the 'request_type' field to maintain forward compatibility.
|
||||
*/
|
||||
#define DM_ULOG_REQUEST_MASK 0xFF
|
||||
|
||||
@@ -565,14 +565,14 @@ struct ext2_dir_entry_2 {
|
||||
* other bits are reserved for now.
|
||||
*/
|
||||
enum {
|
||||
EXT2_FT_UNKNOWN,
|
||||
EXT2_FT_REG_FILE,
|
||||
EXT2_FT_DIR,
|
||||
EXT2_FT_CHRDEV,
|
||||
EXT2_FT_BLKDEV,
|
||||
EXT2_FT_FIFO,
|
||||
EXT2_FT_SOCK,
|
||||
EXT2_FT_SYMLINK,
|
||||
EXT2_FT_UNKNOWN = 0,
|
||||
EXT2_FT_REG_FILE = 1,
|
||||
EXT2_FT_DIR = 2,
|
||||
EXT2_FT_CHRDEV = 3,
|
||||
EXT2_FT_BLKDEV = 4,
|
||||
EXT2_FT_FIFO = 5,
|
||||
EXT2_FT_SOCK = 6,
|
||||
EXT2_FT_SYMLINK = 7,
|
||||
EXT2_FT_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -918,6 +918,8 @@ extern void ext3_abort (struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_warning (struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_msg(struct super_block *, const char *, const char *, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void ext3_update_dynamic_rev (struct super_block *sb);
|
||||
|
||||
#define ext3_std_error(sb, errno) \
|
||||
|
||||
@@ -763,6 +763,7 @@ struct fb_tile_ops {
|
||||
* takes over; acceleration engine should be in a quiescent state */
|
||||
|
||||
/* hints */
|
||||
#define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */
|
||||
#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */
|
||||
#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/gfp.h>
|
||||
|
||||
#define FW_ACTION_NOHOTPLUG 0
|
||||
#define FW_ACTION_HOTPLUG 1
|
||||
@@ -38,7 +39,7 @@ int request_firmware(const struct firmware **fw, const char *name,
|
||||
struct device *device);
|
||||
int request_firmware_nowait(
|
||||
struct module *module, int uevent,
|
||||
const char *name, struct device *device, void *context,
|
||||
const char *name, struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context));
|
||||
|
||||
void release_firmware(const struct firmware *fw);
|
||||
@@ -51,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw,
|
||||
}
|
||||
static inline int request_firmware_nowait(
|
||||
struct module *module, int uevent,
|
||||
const char *name, struct device *device, void *context,
|
||||
const char *name, struct device *device, gfp_t gfp, void *context,
|
||||
void (*cont)(const struct firmware *fw, void *context))
|
||||
{
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2091,8 +2091,6 @@ extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
|
||||
extern int filemap_write_and_wait(struct address_space *mapping);
|
||||
extern int filemap_write_and_wait_range(struct address_space *mapping,
|
||||
loff_t lstart, loff_t lend);
|
||||
extern int wait_on_page_writeback_range(struct address_space *mapping,
|
||||
pgoff_t start, pgoff_t end);
|
||||
extern int __filemap_fdatawrite_range(struct address_space *mapping,
|
||||
loff_t start, loff_t end, int sync_mode);
|
||||
extern int filemap_fdatawrite_range(struct address_space *mapping,
|
||||
|
||||
@@ -74,7 +74,12 @@ struct spi_device;
|
||||
struct fsl_spi_platform_data {
|
||||
u32 initial_spmode; /* initial SPMODE value */
|
||||
s16 bus_num;
|
||||
bool qe_mode;
|
||||
unsigned int flags;
|
||||
#define SPI_QE_CPU_MODE (1 << 0) /* QE CPU ("PIO") mode */
|
||||
#define SPI_CPM_MODE (1 << 1) /* CPM/QE ("DMA") mode */
|
||||
#define SPI_CPM1 (1 << 2) /* SPI unit is in CPM1 block */
|
||||
#define SPI_CPM2 (1 << 3) /* SPI unit is in CPM2 block */
|
||||
#define SPI_QE (1 << 4) /* SPI unit is in QE block */
|
||||
/* board specific information */
|
||||
u16 max_chipselect;
|
||||
void (*cs_control)(struct spi_device *spi, bool on);
|
||||
@@ -90,6 +95,10 @@ struct mpc8xx_pcmcia_ops {
|
||||
* lead to a deep sleep (i.e. power removed from the core,
|
||||
* instead of just the clock).
|
||||
*/
|
||||
#if defined(CONFIG_PPC_83xx) && defined(CONFIG_SUSPEND)
|
||||
int fsl_deep_sleep(void);
|
||||
#else
|
||||
static inline int fsl_deep_sleep(void) { return 0; }
|
||||
#endif
|
||||
|
||||
#endif /* _FSL_DEVICE_H_ */
|
||||
|
||||
@@ -16,15 +16,23 @@
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/* The magic IOCTL value for this interface. */
|
||||
#define GIGASET_IOCTL 0x47
|
||||
|
||||
#define GIGVER_DRIVER 0
|
||||
#define GIGVER_COMPAT 1
|
||||
#define GIGVER_FWBASE 2
|
||||
/* enable/disable device control via character device (lock out ISDN subsys) */
|
||||
#define GIGASET_REDIR _IOWR(GIGASET_IOCTL, 0, int)
|
||||
|
||||
#define GIGASET_REDIR _IOWR (GIGASET_IOCTL, 0, int)
|
||||
#define GIGASET_CONFIG _IOWR (GIGASET_IOCTL, 1, int)
|
||||
#define GIGASET_BRKCHARS _IOW (GIGASET_IOCTL, 2, unsigned char[6]) //FIXME [6] okay?
|
||||
#define GIGASET_VERSION _IOWR (GIGASET_IOCTL, 3, unsigned[4])
|
||||
/* enable adapter configuration mode (M10x only) */
|
||||
#define GIGASET_CONFIG _IOWR(GIGASET_IOCTL, 1, int)
|
||||
|
||||
/* set break characters (M105 only) */
|
||||
#define GIGASET_BRKCHARS _IOW(GIGASET_IOCTL, 2, unsigned char[6])
|
||||
|
||||
/* get version information selected by arg[0] */
|
||||
#define GIGASET_VERSION _IOWR(GIGASET_IOCTL, 3, unsigned[4])
|
||||
/* values for GIGASET_VERSION arg[0] */
|
||||
#define GIGVER_DRIVER 0 /* get driver version */
|
||||
#define GIGVER_COMPAT 1 /* get interface compatibility version */
|
||||
#define GIGVER_FWBASE 2 /* get base station firmware version */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
#ifndef HAYESESP_H
|
||||
#define HAYESESP_H
|
||||
|
||||
struct hayes_esp_config {
|
||||
short flow_on;
|
||||
short flow_off;
|
||||
short rx_trigger;
|
||||
short tx_trigger;
|
||||
short pio_threshold;
|
||||
unsigned char rx_timeout;
|
||||
char dma_channel;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define ESP_DMA_CHANNEL 0
|
||||
#define ESP_RX_TRIGGER 768
|
||||
#define ESP_TX_TRIGGER 768
|
||||
#define ESP_FLOW_OFF 1016
|
||||
#define ESP_FLOW_ON 944
|
||||
#define ESP_RX_TMOUT 128
|
||||
#define ESP_PIO_THRESHOLD 32
|
||||
|
||||
#define ESP_IN_MAJOR 57 /* major dev # for dial in */
|
||||
#define ESP_OUT_MAJOR 58 /* major dev # for dial out */
|
||||
#define ESPC_SCALE 3
|
||||
#define UART_ESI_BASE 0x00
|
||||
#define UART_ESI_SID 0x01
|
||||
#define UART_ESI_RX 0x02
|
||||
#define UART_ESI_TX 0x02
|
||||
#define UART_ESI_CMD1 0x04
|
||||
#define UART_ESI_CMD2 0x05
|
||||
#define UART_ESI_STAT1 0x04
|
||||
#define UART_ESI_STAT2 0x05
|
||||
#define UART_ESI_RWS 0x07
|
||||
|
||||
#define UART_IER_DMA_TMOUT 0x80
|
||||
#define UART_IER_DMA_TC 0x08
|
||||
|
||||
#define ESI_SET_IRQ 0x04
|
||||
#define ESI_SET_DMA_TMOUT 0x05
|
||||
#define ESI_SET_SRV_MASK 0x06
|
||||
#define ESI_SET_ERR_MASK 0x07
|
||||
#define ESI_SET_FLOW_CNTL 0x08
|
||||
#define ESI_SET_FLOW_CHARS 0x09
|
||||
#define ESI_SET_FLOW_LVL 0x0a
|
||||
#define ESI_SET_TRIGGER 0x0b
|
||||
#define ESI_SET_RX_TIMEOUT 0x0c
|
||||
#define ESI_SET_FLOW_TMOUT 0x0d
|
||||
#define ESI_WRITE_UART 0x0e
|
||||
#define ESI_READ_UART 0x0f
|
||||
#define ESI_SET_MODE 0x10
|
||||
#define ESI_GET_ERR_STAT 0x12
|
||||
#define ESI_GET_UART_STAT 0x13
|
||||
#define ESI_GET_RX_AVAIL 0x14
|
||||
#define ESI_GET_TX_AVAIL 0x15
|
||||
#define ESI_START_DMA_RX 0x16
|
||||
#define ESI_START_DMA_TX 0x17
|
||||
#define ESI_ISSUE_BREAK 0x1a
|
||||
#define ESI_FLUSH_RX 0x1b
|
||||
#define ESI_FLUSH_TX 0x1c
|
||||
#define ESI_SET_BAUD 0x1d
|
||||
#define ESI_SET_ENH_IRQ 0x1f
|
||||
#define ESI_SET_REINTR 0x20
|
||||
#define ESI_SET_PRESCALAR 0x23
|
||||
#define ESI_NO_COMMAND 0xff
|
||||
|
||||
#define ESP_STAT_RX_TIMEOUT 0x01
|
||||
#define ESP_STAT_DMA_RX 0x02
|
||||
#define ESP_STAT_DMA_TX 0x04
|
||||
#define ESP_STAT_NEVER_DMA 0x08
|
||||
#define ESP_STAT_USE_PIO 0x10
|
||||
|
||||
#define ESP_MAGIC 0x53ee
|
||||
#define ESP_XMIT_SIZE 4096
|
||||
|
||||
struct esp_struct {
|
||||
int magic;
|
||||
struct tty_port port;
|
||||
spinlock_t lock;
|
||||
int io_port;
|
||||
int irq;
|
||||
int read_status_mask;
|
||||
int ignore_status_mask;
|
||||
int timeout;
|
||||
int stat_flags;
|
||||
int custom_divisor;
|
||||
int close_delay;
|
||||
unsigned short closing_wait;
|
||||
unsigned short closing_wait2;
|
||||
int IER; /* Interrupt Enable Register */
|
||||
int MCR; /* Modem control register */
|
||||
unsigned long last_active;
|
||||
int line;
|
||||
unsigned char *xmit_buf;
|
||||
int xmit_head;
|
||||
int xmit_tail;
|
||||
int xmit_cnt;
|
||||
wait_queue_head_t break_wait;
|
||||
struct async_icount icount; /* kernel counters for the 4 input interrupts */
|
||||
struct hayes_esp_config config; /* port configuration */
|
||||
struct esp_struct *next_port; /* For the linked list */
|
||||
};
|
||||
|
||||
struct esp_pio_buffer {
|
||||
unsigned char data[1024];
|
||||
struct esp_pio_buffer *next;
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
||||
#endif /* ESP_H */
|
||||
|
||||
@@ -312,6 +312,7 @@ struct hid_item {
|
||||
#define HID_QUIRK_MULTI_INPUT 0x00000040
|
||||
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
|
||||
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
|
||||
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
|
||||
|
||||
/*
|
||||
* This is the global environment of the parser. This information is
|
||||
|
||||
+9
-47
@@ -162,10 +162,11 @@ struct hrtimer_clock_base {
|
||||
* @expires_next: absolute time of the next event which was scheduled
|
||||
* via clock_set_next_event()
|
||||
* @hres_active: State of high resolution mode
|
||||
* @check_clocks: Indictator, when set evaluate time source and clock
|
||||
* event devices whether high resolution mode can be
|
||||
* activated.
|
||||
* @nr_events: Total number of timer interrupt events
|
||||
* @hang_detected: The last hrtimer interrupt detected a hang
|
||||
* @nr_events: Total number of hrtimer interrupt events
|
||||
* @nr_retries: Total number of hrtimer interrupt retries
|
||||
* @nr_hangs: Total number of hrtimer interrupt hangs
|
||||
* @max_hang_time: Maximum time spent in hrtimer_interrupt
|
||||
*/
|
||||
struct hrtimer_cpu_base {
|
||||
spinlock_t lock;
|
||||
@@ -173,7 +174,11 @@ struct hrtimer_cpu_base {
|
||||
#ifdef CONFIG_HIGH_RES_TIMERS
|
||||
ktime_t expires_next;
|
||||
int hres_active;
|
||||
int hang_detected;
|
||||
unsigned long nr_events;
|
||||
unsigned long nr_retries;
|
||||
unsigned long nr_hangs;
|
||||
ktime_t max_hang_time;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -435,47 +440,4 @@ extern u64 ktime_divns(const ktime_t kt, s64 div);
|
||||
/* Show pending timers: */
|
||||
extern void sysrq_timer_list_show(void);
|
||||
|
||||
/*
|
||||
* Timer-statistics info:
|
||||
*/
|
||||
#ifdef CONFIG_TIMER_STATS
|
||||
|
||||
extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
|
||||
void *timerf, char *comm,
|
||||
unsigned int timer_flag);
|
||||
|
||||
static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
|
||||
{
|
||||
if (likely(!timer_stats_active))
|
||||
return;
|
||||
timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
|
||||
timer->function, timer->start_comm, 0);
|
||||
}
|
||||
|
||||
extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
|
||||
void *addr);
|
||||
|
||||
static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
|
||||
{
|
||||
__timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
|
||||
}
|
||||
|
||||
static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer)
|
||||
{
|
||||
timer->start_site = NULL;
|
||||
}
|
||||
#else
|
||||
static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,19 +20,18 @@ enum {
|
||||
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
|
||||
/* As it's for in-kernel or ptrace use, we want it to be pinned */
|
||||
#define DEFINE_BREAKPOINT_ATTR(name) \
|
||||
struct perf_event_attr name = { \
|
||||
.type = PERF_TYPE_BREAKPOINT, \
|
||||
.size = sizeof(name), \
|
||||
.pinned = 1, \
|
||||
};
|
||||
|
||||
static inline void hw_breakpoint_init(struct perf_event_attr *attr)
|
||||
{
|
||||
memset(attr, 0, sizeof(*attr));
|
||||
|
||||
attr->type = PERF_TYPE_BREAKPOINT;
|
||||
attr->size = sizeof(*attr);
|
||||
/*
|
||||
* As it's for in-kernel or ptrace use, we want it to be pinned
|
||||
* and to call its callback every hits.
|
||||
*/
|
||||
attr->pinned = 1;
|
||||
attr->sample_period = 1;
|
||||
}
|
||||
|
||||
static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
|
||||
@@ -52,27 +51,24 @@ static inline int hw_breakpoint_len(struct perf_event *bp)
|
||||
|
||||
extern struct perf_event *
|
||||
register_user_hw_breakpoint(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
perf_overflow_handler_t triggered,
|
||||
struct task_struct *tsk);
|
||||
|
||||
/* FIXME: only change from the attr, and don't unregister */
|
||||
extern struct perf_event *
|
||||
modify_user_hw_breakpoint(struct perf_event *bp,
|
||||
struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
struct task_struct *tsk);
|
||||
extern int
|
||||
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr);
|
||||
|
||||
/*
|
||||
* Kernel breakpoints are not associated with any particular thread.
|
||||
*/
|
||||
extern struct perf_event *
|
||||
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
perf_overflow_handler_t triggered,
|
||||
int cpu);
|
||||
|
||||
extern struct perf_event **
|
||||
register_wide_hw_breakpoint(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered);
|
||||
perf_overflow_handler_t triggered);
|
||||
|
||||
extern int register_perf_hw_breakpoint(struct perf_event *bp);
|
||||
extern int __register_perf_hw_breakpoint(struct perf_event *bp);
|
||||
@@ -93,20 +89,18 @@ static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp)
|
||||
|
||||
static inline struct perf_event *
|
||||
register_user_hw_breakpoint(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
perf_overflow_handler_t triggered,
|
||||
struct task_struct *tsk) { return NULL; }
|
||||
static inline struct perf_event *
|
||||
static inline int
|
||||
modify_user_hw_breakpoint(struct perf_event *bp,
|
||||
struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
struct task_struct *tsk) { return NULL; }
|
||||
struct perf_event_attr *attr) { return NULL; }
|
||||
static inline struct perf_event *
|
||||
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered,
|
||||
perf_overflow_handler_t triggered,
|
||||
int cpu) { return NULL; }
|
||||
static inline struct perf_event **
|
||||
register_wide_hw_breakpoint(struct perf_event_attr *attr,
|
||||
perf_callback_t triggered) { return NULL; }
|
||||
perf_overflow_handler_t triggered) { return NULL; }
|
||||
static inline int
|
||||
register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; }
|
||||
static inline int
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ struct ide_io_ports {
|
||||
* Timeouts for various operations:
|
||||
*/
|
||||
enum {
|
||||
/* spec allows up to 20ms */
|
||||
WAIT_DRQ = HZ / 10, /* 100ms */
|
||||
/* spec allows up to 20ms, but CF cards and SSD drives need more */
|
||||
WAIT_DRQ = 1 * HZ, /* 1s */
|
||||
/* some laptops are very slow */
|
||||
WAIT_READY = 5 * HZ, /* 5s */
|
||||
/* should be less than 3ms (?), if all ATAPI CD is closed at boot */
|
||||
|
||||
@@ -137,8 +137,6 @@ extern struct ctl_table ether_table[];
|
||||
extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
|
||||
|
||||
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
#define MAC_BUF_SIZE 18
|
||||
#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE]
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ struct in6_flowlabel_req {
|
||||
#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
|
||||
#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
|
||||
|
||||
/* These defintions are obsolete */
|
||||
/* These definitions are obsolete */
|
||||
#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
|
||||
#define IPV6_PRIORITY_FILLER 0x0100
|
||||
#define IPV6_PRIORITY_UNATTENDED 0x0200
|
||||
|
||||
@@ -14,12 +14,19 @@
|
||||
|
||||
/**
|
||||
* struct input_polled_dev - simple polled input device
|
||||
* @private: private driver data
|
||||
* @flush: driver-supplied method that flushes device's state upon
|
||||
* opening (optional)
|
||||
* @private: private driver data.
|
||||
* @open: driver-supplied method that prepares device for polling
|
||||
* (enabled the device and maybe flushes device state).
|
||||
* @close: driver-supplied method that is called when device is no
|
||||
* longer being polled. Used to put device into low power mode.
|
||||
* @poll: driver-supplied method that polls the device and posts
|
||||
* input events (mandatory).
|
||||
* @poll_interval: specifies how often the poll() method shoudl be called.
|
||||
* @poll_interval: specifies how often the poll() method should be called.
|
||||
* Defaults to 500 msec unless overriden when registering the device.
|
||||
* @poll_interval_max: specifies upper bound for the poll interval.
|
||||
* Defaults to the initial value of @poll_interval.
|
||||
* @poll_interval_min: specifies lower bound for the poll interval.
|
||||
* Defaults to 0.
|
||||
* @input: input device structire associated with the polled device.
|
||||
* Must be properly initialized by the driver (id, name, phys, bits).
|
||||
*
|
||||
@@ -30,11 +37,16 @@
|
||||
struct input_polled_dev {
|
||||
void *private;
|
||||
|
||||
void (*flush)(struct input_polled_dev *dev);
|
||||
void (*open)(struct input_polled_dev *dev);
|
||||
void (*close)(struct input_polled_dev *dev);
|
||||
void (*poll)(struct input_polled_dev *dev);
|
||||
unsigned int poll_interval; /* msec */
|
||||
unsigned int poll_interval_max; /* msec */
|
||||
unsigned int poll_interval_min; /* msec */
|
||||
|
||||
struct input_dev *input;
|
||||
|
||||
/* private: */
|
||||
struct delayed_work work;
|
||||
};
|
||||
|
||||
|
||||
+10
-3
@@ -895,7 +895,7 @@ struct ff_periodic_effect {
|
||||
struct ff_envelope envelope;
|
||||
|
||||
__u32 custom_len;
|
||||
__s16 *custom_data;
|
||||
__s16 __user *custom_data;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1021,9 +1021,12 @@ struct ff_effect {
|
||||
* @keycodesize: size of elements in keycode table
|
||||
* @keycode: map of scancodes to keycodes for this device
|
||||
* @setkeycode: optional method to alter current keymap, used to implement
|
||||
* sparse keymaps. If not supplied default mechanism will be used
|
||||
* sparse keymaps. If not supplied default mechanism will be used.
|
||||
* The method is being called while holding event_lock and thus must
|
||||
* not sleep
|
||||
* @getkeycode: optional method to retrieve current keymap. If not supplied
|
||||
* default mechanism will be used
|
||||
* default mechanism will be used. The method is being called while
|
||||
* holding event_lock and thus must not sleep
|
||||
* @ff: force feedback structure associated with the device if device
|
||||
* supports force feedback effects
|
||||
* @repeat_key: stores key code of the last key pressed; used to implement
|
||||
@@ -1040,6 +1043,7 @@ struct ff_effect {
|
||||
* @absmin: minimum values for events coming from absolute axes
|
||||
* @absfuzz: describes noisiness for axes
|
||||
* @absflat: size of the center flat position (used by joydev)
|
||||
* @absres: resolution used for events coming form absolute axes
|
||||
* @open: this method is called when the very first user calls
|
||||
* input_open_device(). The driver must prepare the device
|
||||
* to start generating events (start polling thread,
|
||||
@@ -1294,6 +1298,9 @@ void input_unregister_device(struct input_dev *);
|
||||
int __must_check input_register_handler(struct input_handler *);
|
||||
void input_unregister_handler(struct input_handler *);
|
||||
|
||||
int input_handler_for_each_handle(struct input_handler *, void *data,
|
||||
int (*fn)(struct input_handle *, void *));
|
||||
|
||||
int input_register_handle(struct input_handle *);
|
||||
void input_unregister_handle(struct input_handle *);
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@ struct matrix_keymap_data {
|
||||
* @col_scan_delay_us: delay, measured in microseconds, that is
|
||||
* needed before we can keypad after activating column gpio
|
||||
* @debounce_ms: debounce interval in milliseconds
|
||||
* @active_low: gpio polarity
|
||||
* @wakeup: controls whether the device should be set up as wakeup
|
||||
* source
|
||||
*
|
||||
* This structure represents platform-specific data that use used by
|
||||
* matrix_keypad driver to perform proper initialization.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef __SH_KEYSC_H__
|
||||
#define __SH_KEYSC_H__
|
||||
|
||||
#define SH_KEYSC_MAXKEYS 30
|
||||
|
||||
struct sh_keysc_info {
|
||||
enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
|
||||
int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
|
||||
int delay;
|
||||
int kycr2_delay;
|
||||
int keycodes[SH_KEYSC_MAXKEYS];
|
||||
};
|
||||
|
||||
#endif /* __SH_KEYSC_H__ */
|
||||
@@ -0,0 +1,62 @@
|
||||
#ifndef _SPARSE_KEYMAP_H
|
||||
#define _SPARSE_KEYMAP_H
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Dmitry Torokhov
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define KE_END 0 /* Indicates end of keymap */
|
||||
#define KE_KEY 1 /* Ordinary key/button */
|
||||
#define KE_SW 2 /* Switch (predetermined value) */
|
||||
#define KE_VSW 3 /* Switch (value supplied at runtime) */
|
||||
#define KE_IGNORE 4 /* Known entry that should be ignored */
|
||||
#define KE_LAST KE_IGNORE
|
||||
|
||||
/**
|
||||
* struct key_entry - keymap entry for use in sparse keymap
|
||||
* @type: Type of the key entry (KE_KEY, KE_SW, KE_VSW, KE_END);
|
||||
* drivers are allowed to extend the list with their own
|
||||
* private definitions.
|
||||
* @code: Device-specific data identifying the button/switch
|
||||
* @keycode: KEY_* code assigned to a key/button
|
||||
* @sw.code: SW_* code assigned to a switch
|
||||
* @sw.value: Value that should be sent in an input even when KE_SW
|
||||
* switch is toggled. KE_VSW switches ignore this field and
|
||||
* expect driver to supply value for the event.
|
||||
*
|
||||
* This structure defines an entry in a sparse keymap used by some
|
||||
* input devices for which traditional table-based approach is not
|
||||
* suitable.
|
||||
*/
|
||||
struct key_entry {
|
||||
int type; /* See KE_* above */
|
||||
u32 code;
|
||||
union {
|
||||
u16 keycode; /* For KE_KEY */
|
||||
struct { /* For KE_SW, KE_VSW */
|
||||
u8 code;
|
||||
u8 value; /* For KE_SW, ignored by KE_VSW */
|
||||
} sw;
|
||||
};
|
||||
};
|
||||
|
||||
struct key_entry *sparse_keymap_entry_from_scancode(struct input_dev *dev,
|
||||
unsigned int code);
|
||||
struct key_entry *sparse_keymap_entry_from_keycode(struct input_dev *dev,
|
||||
unsigned int code);
|
||||
int sparse_keymap_setup(struct input_dev *dev,
|
||||
const struct key_entry *keymap,
|
||||
int (*setup)(struct input_dev *, struct key_entry *));
|
||||
void sparse_keymap_free(struct input_dev *dev);
|
||||
|
||||
void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *ke,
|
||||
unsigned int value, bool autorelease);
|
||||
|
||||
bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
|
||||
unsigned int value, bool autorelease);
|
||||
|
||||
#endif /* _SPARSE_KEYMAP_H */
|
||||
+1
-1
@@ -282,7 +282,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action);
|
||||
|
||||
/*
|
||||
* Built-in IRQ handlers for various IRQ types,
|
||||
* callable via desc->chip->handle_irq()
|
||||
* callable via desc->handle_irq()
|
||||
*/
|
||||
extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
|
||||
extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
#define FIRMWARE_LOADED 0x0001
|
||||
#define BOARD_ACTIVE 0x0002
|
||||
#define BOARD_INIT 0x0004
|
||||
|
||||
/* isi_port status bitmap */
|
||||
|
||||
|
||||
@@ -496,6 +496,7 @@ struct kvm_ioeventfd {
|
||||
#define KVM_CAP_VCPU_EVENTS 41
|
||||
#endif
|
||||
#define KVM_CAP_S390_PSW 42
|
||||
#define KVM_CAP_PPC_SEGSTATE 43
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
||||
@@ -1024,7 +1024,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
|
||||
extern int ata_scsi_slave_config(struct scsi_device *sdev);
|
||||
extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
|
||||
extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
|
||||
int queue_depth);
|
||||
int queue_depth, int reason);
|
||||
extern struct ata_device *ata_dev_pair(struct ata_device *adev);
|
||||
extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32);
|
||||
#define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff
|
||||
#define PCAP_MASK_ALL_INTERRUPT 0x01ffffff
|
||||
|
||||
/* registers acessible by both pcap ports */
|
||||
/* registers accessible by both pcap ports */
|
||||
#define PCAP_REG_ISR 0x0 /* Interrupt Status */
|
||||
#define PCAP_REG_MSR 0x1 /* Interrupt Mask */
|
||||
#define PCAP_REG_PSTAT 0x2 /* Processor Status */
|
||||
@@ -67,7 +67,7 @@ void pcap_set_ts_bits(struct pcap_chip *, u32);
|
||||
#define PCAP_REG_VENDOR_TEST1 0x1e
|
||||
#define PCAP_REG_VENDOR_TEST2 0x1f
|
||||
|
||||
/* registers acessible by pcap port 1 only (a1200, e2 & e6) */
|
||||
/* registers accessible by pcap port 1 only (a1200, e2 & e6) */
|
||||
#define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */
|
||||
#define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */
|
||||
#define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __SH_MOBILE_SDHI_H__
|
||||
#define __SH_MOBILE_SDHI_H__
|
||||
|
||||
struct sh_mobile_sdhi_info {
|
||||
void (*set_pwr)(struct platform_device *pdev, int state);
|
||||
};
|
||||
|
||||
#endif /* __SH_MOBILE_SDHI_H__ */
|
||||
@@ -174,6 +174,8 @@ void ubi_get_volume_info(struct ubi_volume_desc *desc,
|
||||
struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode);
|
||||
struct ubi_volume_desc *ubi_open_volume_nm(int ubi_num, const char *name,
|
||||
int mode);
|
||||
struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode);
|
||||
|
||||
int ubi_register_volume_notifier(struct notifier_block *nb,
|
||||
int ignore_existing);
|
||||
int ubi_unregister_volume_notifier(struct notifier_block *nb);
|
||||
|
||||
@@ -76,7 +76,6 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
|
||||
extern void release_open_intent(struct nameidata *);
|
||||
|
||||
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
||||
extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
|
||||
|
||||
extern int follow_down(struct path *);
|
||||
extern int follow_up(struct path *);
|
||||
|
||||
@@ -151,6 +151,8 @@ struct nilfs_super_root {
|
||||
#define NILFS_MOUNT_BARRIER 0x1000 /* Use block barriers */
|
||||
#define NILFS_MOUNT_STRICT_ORDER 0x2000 /* Apply strict in-order
|
||||
semantics also for data */
|
||||
#define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during
|
||||
mount-time recovery */
|
||||
|
||||
|
||||
/**
|
||||
@@ -402,6 +404,28 @@ struct nilfs_segment_summary {
|
||||
#define NILFS_SS_SYNDT 0x0008 /* includes data only updates */
|
||||
#define NILFS_SS_GC 0x0010 /* segment written for cleaner operation */
|
||||
|
||||
/**
|
||||
* struct nilfs_btree_node - B-tree node
|
||||
* @bn_flags: flags
|
||||
* @bn_level: level
|
||||
* @bn_nchildren: number of children
|
||||
* @bn_pad: padding
|
||||
*/
|
||||
struct nilfs_btree_node {
|
||||
__u8 bn_flags;
|
||||
__u8 bn_level;
|
||||
__le16 bn_nchildren;
|
||||
__le32 bn_pad;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define NILFS_BTREE_NODE_ROOT 0x01
|
||||
|
||||
/* level */
|
||||
#define NILFS_BTREE_LEVEL_DATA 0
|
||||
#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
|
||||
#define NILFS_BTREE_LEVEL_MAX 14
|
||||
|
||||
/**
|
||||
* struct nilfs_palloc_group_desc - block group descriptor
|
||||
* @pg_nfrees: number of free entries in block group
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
* File: include/linux/omapfb.h
|
||||
*
|
||||
* Framebuffer driver for TI OMAP boards
|
||||
*
|
||||
* Copyright (C) 2004 Nokia Corporation
|
||||
* Author: Imre Deak <imre.deak@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_OMAPFB_H__
|
||||
#define __LINUX_OMAPFB_H__
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* IOCTL commands. */
|
||||
|
||||
#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
|
||||
#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
|
||||
#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
|
||||
#define OMAP_IO(num) _IO('O', num)
|
||||
|
||||
#define OMAPFB_MIRROR OMAP_IOW(31, int)
|
||||
#define OMAPFB_SYNC_GFX OMAP_IO(37)
|
||||
#define OMAPFB_VSYNC OMAP_IO(38)
|
||||
#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
|
||||
#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
|
||||
#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
|
||||
#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
|
||||
#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
|
||||
#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
|
||||
#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
|
||||
#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
|
||||
#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
|
||||
#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
|
||||
#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
|
||||
#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
|
||||
#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
|
||||
#define OMAPFB_WAITFORVSYNC OMAP_IO(57)
|
||||
#define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read)
|
||||
#define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode)
|
||||
#define OMAPFB_WAITFORGO OMAP_IO(60)
|
||||
#define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info)
|
||||
#define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info)
|
||||
|
||||
#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
|
||||
#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
|
||||
#define OMAPFB_CAPS_PANEL_MASK 0xff000000
|
||||
|
||||
#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
|
||||
#define OMAPFB_CAPS_TEARSYNC 0x00002000
|
||||
#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
|
||||
#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
|
||||
#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
|
||||
#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
|
||||
#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
|
||||
#define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000
|
||||
#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
|
||||
|
||||
/* Values from DSP must map to lower 16-bits */
|
||||
#define OMAPFB_FORMAT_MASK 0x00ff
|
||||
#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
|
||||
#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
|
||||
#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
|
||||
#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
|
||||
#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
|
||||
|
||||
#define OMAPFB_MEMTYPE_SDRAM 0
|
||||
#define OMAPFB_MEMTYPE_SRAM 1
|
||||
#define OMAPFB_MEMTYPE_MAX 1
|
||||
|
||||
enum omapfb_color_format {
|
||||
OMAPFB_COLOR_RGB565 = 0,
|
||||
OMAPFB_COLOR_YUV422,
|
||||
OMAPFB_COLOR_YUV420,
|
||||
OMAPFB_COLOR_CLUT_8BPP,
|
||||
OMAPFB_COLOR_CLUT_4BPP,
|
||||
OMAPFB_COLOR_CLUT_2BPP,
|
||||
OMAPFB_COLOR_CLUT_1BPP,
|
||||
OMAPFB_COLOR_RGB444,
|
||||
OMAPFB_COLOR_YUY422,
|
||||
|
||||
OMAPFB_COLOR_ARGB16,
|
||||
OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */
|
||||
OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */
|
||||
OMAPFB_COLOR_ARGB32,
|
||||
OMAPFB_COLOR_RGBA32,
|
||||
OMAPFB_COLOR_RGBX32,
|
||||
};
|
||||
|
||||
struct omapfb_update_window {
|
||||
__u32 x, y;
|
||||
__u32 width, height;
|
||||
__u32 format;
|
||||
__u32 out_x, out_y;
|
||||
__u32 out_width, out_height;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
struct omapfb_update_window_old {
|
||||
__u32 x, y;
|
||||
__u32 width, height;
|
||||
__u32 format;
|
||||
};
|
||||
|
||||
enum omapfb_plane {
|
||||
OMAPFB_PLANE_GFX = 0,
|
||||
OMAPFB_PLANE_VID1,
|
||||
OMAPFB_PLANE_VID2,
|
||||
};
|
||||
|
||||
enum omapfb_channel_out {
|
||||
OMAPFB_CHANNEL_OUT_LCD = 0,
|
||||
OMAPFB_CHANNEL_OUT_DIGIT,
|
||||
};
|
||||
|
||||
struct omapfb_plane_info {
|
||||
__u32 pos_x;
|
||||
__u32 pos_y;
|
||||
__u8 enabled;
|
||||
__u8 channel_out;
|
||||
__u8 mirror;
|
||||
__u8 reserved1;
|
||||
__u32 out_width;
|
||||
__u32 out_height;
|
||||
__u32 reserved2[12];
|
||||
};
|
||||
|
||||
struct omapfb_mem_info {
|
||||
__u32 size;
|
||||
__u8 type;
|
||||
__u8 reserved[3];
|
||||
};
|
||||
|
||||
struct omapfb_caps {
|
||||
__u32 ctrl;
|
||||
__u32 plane_color;
|
||||
__u32 wnd_color;
|
||||
};
|
||||
|
||||
enum omapfb_color_key_type {
|
||||
OMAPFB_COLOR_KEY_DISABLED = 0,
|
||||
OMAPFB_COLOR_KEY_GFX_DST,
|
||||
OMAPFB_COLOR_KEY_VID_SRC,
|
||||
};
|
||||
|
||||
struct omapfb_color_key {
|
||||
__u8 channel_out;
|
||||
__u32 background;
|
||||
__u32 trans_key;
|
||||
__u8 key_type;
|
||||
};
|
||||
|
||||
enum omapfb_update_mode {
|
||||
OMAPFB_UPDATE_DISABLED = 0,
|
||||
OMAPFB_AUTO_UPDATE,
|
||||
OMAPFB_MANUAL_UPDATE
|
||||
};
|
||||
|
||||
struct omapfb_memory_read {
|
||||
__u16 x;
|
||||
__u16 y;
|
||||
__u16 w;
|
||||
__u16 h;
|
||||
size_t buffer_size;
|
||||
void __user *buffer;
|
||||
};
|
||||
|
||||
struct omapfb_ovl_colormode {
|
||||
__u8 overlay_idx;
|
||||
__u8 mode_idx;
|
||||
__u32 bits_per_pixel;
|
||||
__u32 nonstd;
|
||||
struct fb_bitfield red;
|
||||
struct fb_bitfield green;
|
||||
struct fb_bitfield blue;
|
||||
struct fb_bitfield transp;
|
||||
};
|
||||
|
||||
struct omapfb_vram_info {
|
||||
__u32 total;
|
||||
__u32 free;
|
||||
__u32 largest_free_block;
|
||||
__u32 reserved[5];
|
||||
};
|
||||
|
||||
struct omapfb_tearsync_info {
|
||||
__u8 enabled;
|
||||
__u8 reserved1[3];
|
||||
__u16 line;
|
||||
__u16 reserved2;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <plat/board.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
#define OMAPFB_PLANE_NUM 1
|
||||
#else
|
||||
#define OMAPFB_PLANE_NUM 3
|
||||
#endif
|
||||
|
||||
struct omapfb_mem_region {
|
||||
u32 paddr;
|
||||
void __iomem *vaddr;
|
||||
unsigned long size;
|
||||
u8 type; /* OMAPFB_PLANE_MEM_* */
|
||||
enum omapfb_color_format format;/* OMAPFB_COLOR_* */
|
||||
unsigned format_used:1; /* Must be set when format is set.
|
||||
* Needed b/c of the badly chosen 0
|
||||
* base for OMAPFB_COLOR_* values
|
||||
*/
|
||||
unsigned alloc:1; /* allocated by the driver */
|
||||
unsigned map:1; /* kernel mapped by the driver */
|
||||
};
|
||||
|
||||
struct omapfb_mem_desc {
|
||||
int region_cnt;
|
||||
struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
|
||||
};
|
||||
|
||||
struct omapfb_platform_data {
|
||||
struct omap_lcd_config lcd;
|
||||
struct omapfb_mem_desc mem_desc;
|
||||
void *ctrl_platform_data;
|
||||
};
|
||||
|
||||
/* in arch/arm/plat-omap/fb.c */
|
||||
extern void omapfb_set_platform_data(struct omapfb_platform_data *data);
|
||||
extern void omapfb_set_ctrl_platform_data(void *pdata);
|
||||
extern void omapfb_reserve_sdram(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __OMAPFB_H */
|
||||
+41
-1
@@ -218,6 +218,7 @@ struct pci_dev {
|
||||
unsigned int class; /* 3 bytes: (base,sub,prog-if) */
|
||||
u8 revision; /* PCI revision, low byte of class word */
|
||||
u8 hdr_type; /* PCI header type (`multi' flag masked out) */
|
||||
u8 pcie_cap; /* PCI-E capability offset */
|
||||
u8 pcie_type; /* PCI-E device/port type */
|
||||
u8 rom_base_reg; /* which config register controls the ROM */
|
||||
u8 pin; /* which interrupt pin this device uses */
|
||||
@@ -280,6 +281,7 @@ struct pci_dev {
|
||||
unsigned int is_virtfn:1;
|
||||
unsigned int reset_fn:1;
|
||||
unsigned int is_hotplug_bridge:1;
|
||||
unsigned int aer_firmware_first:1;
|
||||
pci_dev_flags_t dev_flags;
|
||||
atomic_t enable_cnt; /* pci_enable_device has been called */
|
||||
|
||||
@@ -635,7 +637,13 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
|
||||
unsigned int ss_vendor, unsigned int ss_device,
|
||||
struct pci_dev *from);
|
||||
struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
|
||||
struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn);
|
||||
struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus,
|
||||
unsigned int devfn);
|
||||
static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,
|
||||
unsigned int devfn)
|
||||
{
|
||||
return pci_get_domain_bus_and_slot(0, bus, devfn);
|
||||
}
|
||||
struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from);
|
||||
int pci_dev_present(const struct pci_device_id *ids);
|
||||
|
||||
@@ -701,6 +709,7 @@ void pci_disable_device(struct pci_dev *dev);
|
||||
void pci_set_master(struct pci_dev *dev);
|
||||
void pci_clear_master(struct pci_dev *dev);
|
||||
int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
|
||||
int pci_set_cacheline_size(struct pci_dev *dev);
|
||||
#define HAVE_PCI_SET_MWI
|
||||
int __must_check pci_set_mwi(struct pci_dev *dev);
|
||||
int pci_try_set_mwi(struct pci_dev *dev);
|
||||
@@ -1246,6 +1255,8 @@ extern int pci_pci_problems;
|
||||
|
||||
extern unsigned long pci_cardbus_io_size;
|
||||
extern unsigned long pci_cardbus_mem_size;
|
||||
extern u8 pci_dfl_cache_line_size;
|
||||
extern u8 pci_cache_line_size;
|
||||
|
||||
extern unsigned long pci_hotplug_io_size;
|
||||
extern unsigned long pci_hotplug_mem_size;
|
||||
@@ -1290,5 +1301,34 @@ extern void pci_hp_create_module_link(struct pci_slot *pci_slot);
|
||||
extern void pci_hp_remove_module_link(struct pci_slot *pci_slot);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* pci_pcie_cap - get the saved PCIe capability offset
|
||||
* @dev: PCI device
|
||||
*
|
||||
* PCIe capability offset is calculated at PCI device initialization
|
||||
* time and saved in the data structure. This function returns saved
|
||||
* PCIe capability offset. Using this instead of pci_find_capability()
|
||||
* reduces unnecessary search in the PCI configuration space. If you
|
||||
* need to calculate PCIe capability offset from raw device for some
|
||||
* reasons, please use pci_find_capability() instead.
|
||||
*/
|
||||
static inline int pci_pcie_cap(struct pci_dev *dev)
|
||||
{
|
||||
return dev->pcie_cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_is_pcie - check if the PCI device is PCI Express capable
|
||||
* @dev: PCI device
|
||||
*
|
||||
* Retrun true if the PCI device is PCI Express capable, false otherwise.
|
||||
*/
|
||||
static inline bool pci_is_pcie(struct pci_dev *dev)
|
||||
{
|
||||
return !!pci_pcie_cap(dev);
|
||||
}
|
||||
|
||||
void pci_request_acs(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
||||
@@ -1587,6 +1587,8 @@
|
||||
#define PCI_VENDOR_ID_COMPEX 0x11f6
|
||||
#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
|
||||
|
||||
#define PCI_VENDOR_ID_PMC_Sierra 0x11f8
|
||||
|
||||
#define PCI_VENDOR_ID_RP 0x11fe
|
||||
#define PCI_DEVICE_ID_RP32INTF 0x0001
|
||||
#define PCI_DEVICE_ID_RP8INTF 0x0002
|
||||
@@ -2293,6 +2295,20 @@
|
||||
#define PCI_DEVICE_ID_MPC8536 0x0051
|
||||
#define PCI_DEVICE_ID_P2020E 0x0070
|
||||
#define PCI_DEVICE_ID_P2020 0x0071
|
||||
#define PCI_DEVICE_ID_P2010E 0x0078
|
||||
#define PCI_DEVICE_ID_P2010 0x0079
|
||||
#define PCI_DEVICE_ID_P1020E 0x0100
|
||||
#define PCI_DEVICE_ID_P1020 0x0101
|
||||
#define PCI_DEVICE_ID_P1011E 0x0108
|
||||
#define PCI_DEVICE_ID_P1011 0x0109
|
||||
#define PCI_DEVICE_ID_P1022E 0x0110
|
||||
#define PCI_DEVICE_ID_P1022 0x0111
|
||||
#define PCI_DEVICE_ID_P1013E 0x0118
|
||||
#define PCI_DEVICE_ID_P1013 0x0119
|
||||
#define PCI_DEVICE_ID_P4080E 0x0400
|
||||
#define PCI_DEVICE_ID_P4080 0x0401
|
||||
#define PCI_DEVICE_ID_P4040E 0x0408
|
||||
#define PCI_DEVICE_ID_P4040 0x0409
|
||||
#define PCI_DEVICE_ID_MPC8641 0x7010
|
||||
#define PCI_DEVICE_ID_MPC8641D 0x7011
|
||||
#define PCI_DEVICE_ID_MPC8610 0x7018
|
||||
|
||||
@@ -365,6 +365,11 @@
|
||||
#define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */
|
||||
#define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */
|
||||
|
||||
/* PCI Bridge Subsystem ID registers */
|
||||
|
||||
#define PCI_SSVID_VENDOR_ID 4 /* PCI-Bridge subsystem vendor id register */
|
||||
#define PCI_SSVID_DEVICE_ID 6 /* PCI-Bridge subsystem device id register */
|
||||
|
||||
/* PCI Express capability registers */
|
||||
|
||||
#define PCI_EXP_FLAGS 2 /* Capabilities register */
|
||||
@@ -502,6 +507,7 @@
|
||||
#define PCI_EXT_CAP_ID_VC 2
|
||||
#define PCI_EXT_CAP_ID_DSN 3
|
||||
#define PCI_EXT_CAP_ID_PWR 4
|
||||
#define PCI_EXT_CAP_ID_ACS 13
|
||||
#define PCI_EXT_CAP_ID_ARI 14
|
||||
#define PCI_EXT_CAP_ID_ATS 15
|
||||
#define PCI_EXT_CAP_ID_SRIOV 16
|
||||
@@ -662,4 +668,16 @@
|
||||
#define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */
|
||||
#define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */
|
||||
|
||||
/* Access Control Service */
|
||||
#define PCI_ACS_CAP 0x04 /* ACS Capability Register */
|
||||
#define PCI_ACS_SV 0x01 /* Source Validation */
|
||||
#define PCI_ACS_TB 0x02 /* Translation Blocking */
|
||||
#define PCI_ACS_RR 0x04 /* P2P Request Redirect */
|
||||
#define PCI_ACS_CR 0x08 /* P2P Completion Redirect */
|
||||
#define PCI_ACS_UF 0x10 /* Upstream Forwarding */
|
||||
#define PCI_ACS_EC 0x20 /* P2P Egress Control */
|
||||
#define PCI_ACS_DT 0x40 /* Direct Translated P2P */
|
||||
#define PCI_ACS_CTRL 0x06 /* ACS Control Register */
|
||||
#define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */
|
||||
|
||||
#endif /* LINUX_PCI_REGS_H */
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
#define _PCIEPORT_IF_H_
|
||||
|
||||
/* Port Type */
|
||||
#define PCIE_RC_PORT 4 /* Root port of RC */
|
||||
#define PCIE_SW_UPSTREAM_PORT 5 /* Upstream port of Switch */
|
||||
#define PCIE_SW_DOWNSTREAM_PORT 6 /* Downstream port of Switch */
|
||||
#define PCIE_ANY_PORT 7
|
||||
#define PCIE_ANY_PORT (~0)
|
||||
|
||||
/* Service Type */
|
||||
#define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */
|
||||
@@ -25,17 +22,6 @@
|
||||
#define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */
|
||||
#define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT)
|
||||
|
||||
/* Root/Upstream/Downstream Port's Interrupt Mode */
|
||||
#define PCIE_PORT_NO_IRQ (-1)
|
||||
#define PCIE_PORT_INTx_MODE 0
|
||||
#define PCIE_PORT_MSI_MODE 1
|
||||
#define PCIE_PORT_MSIX_MODE 2
|
||||
|
||||
struct pcie_port_data {
|
||||
int port_type; /* Type of the port */
|
||||
int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
|
||||
};
|
||||
|
||||
struct pcie_device {
|
||||
int irq; /* Service IRQ/MSI/MSI-X Vector */
|
||||
struct pci_dev *port; /* Root/Upstream/Downstream Port */
|
||||
|
||||
+20
-21
@@ -18,10 +18,6 @@
|
||||
#include <linux/ioctl.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
#include <asm/hw_breakpoint.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* User-space ABI bits:
|
||||
*/
|
||||
@@ -215,12 +211,12 @@ struct perf_event_attr {
|
||||
__u32 wakeup_watermark; /* bytes before wakeup */
|
||||
};
|
||||
|
||||
union {
|
||||
struct { /* Hardware breakpoint info */
|
||||
__u64 bp_addr;
|
||||
__u32 bp_type;
|
||||
__u32 bp_len;
|
||||
};
|
||||
struct { /* Hardware breakpoint info */
|
||||
__u64 bp_addr;
|
||||
__u32 bp_type;
|
||||
__u32 bp_len;
|
||||
__u64 __bp_reserved_1;
|
||||
__u64 __bp_reserved_2;
|
||||
};
|
||||
|
||||
__u32 __reserved_2;
|
||||
@@ -451,6 +447,10 @@ enum perf_callchain_context {
|
||||
# include <asm/perf_event.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
#include <asm/hw_breakpoint.h>
|
||||
#endif
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/rculist.h>
|
||||
@@ -565,10 +565,12 @@ struct perf_pending_entry {
|
||||
void (*func)(struct perf_pending_entry *);
|
||||
};
|
||||
|
||||
typedef void (*perf_callback_t)(struct perf_event *, void *);
|
||||
|
||||
struct perf_sample_data;
|
||||
|
||||
typedef void (*perf_overflow_handler_t)(struct perf_event *, int,
|
||||
struct perf_sample_data *,
|
||||
struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* struct perf_event - performance event kernel representation:
|
||||
*/
|
||||
@@ -660,18 +662,12 @@ struct perf_event {
|
||||
struct pid_namespace *ns;
|
||||
u64 id;
|
||||
|
||||
void (*overflow_handler)(struct perf_event *event,
|
||||
int nmi, struct perf_sample_data *data,
|
||||
struct pt_regs *regs);
|
||||
perf_overflow_handler_t overflow_handler;
|
||||
|
||||
#ifdef CONFIG_EVENT_PROFILE
|
||||
struct event_filter *filter;
|
||||
#endif
|
||||
|
||||
perf_callback_t callback;
|
||||
|
||||
perf_callback_t event_callback;
|
||||
|
||||
#endif /* CONFIG_PERF_EVENTS */
|
||||
};
|
||||
|
||||
@@ -781,7 +777,7 @@ extern struct perf_event *
|
||||
perf_event_create_kernel_counter(struct perf_event_attr *attr,
|
||||
int cpu,
|
||||
pid_t pid,
|
||||
perf_callback_t callback);
|
||||
perf_overflow_handler_t callback);
|
||||
extern u64 perf_event_read_value(struct perf_event *event,
|
||||
u64 *enabled, u64 *running);
|
||||
|
||||
@@ -876,6 +872,8 @@ extern void perf_output_copy(struct perf_output_handle *handle,
|
||||
const void *buf, unsigned int len);
|
||||
extern int perf_swevent_get_recursion_context(void);
|
||||
extern void perf_swevent_put_recursion_context(int rctx);
|
||||
extern void perf_event_enable(struct perf_event *event);
|
||||
extern void perf_event_disable(struct perf_event *event);
|
||||
#else
|
||||
static inline void
|
||||
perf_event_task_sched_in(struct task_struct *task, int cpu) { }
|
||||
@@ -906,7 +904,8 @@ static inline void perf_event_fork(struct task_struct *tsk) { }
|
||||
static inline void perf_event_init(void) { }
|
||||
static inline int perf_swevent_get_recursion_context(void) { return -1; }
|
||||
static inline void perf_swevent_put_recursion_context(int rctx) { }
|
||||
|
||||
static inline void perf_event_enable(struct perf_event *event) { }
|
||||
static inline void perf_event_disable(struct perf_event *event) { }
|
||||
#endif
|
||||
|
||||
#define perf_output_put(handle, x) \
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/*
|
||||
* use drive write caching -- we need deferred error handling to be
|
||||
* able to sucessfully recover with this option (drive will return good
|
||||
* able to successfully recover with this option (drive will return good
|
||||
* status as soon as the cdb is validated).
|
||||
*/
|
||||
#if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
|
||||
|
||||
@@ -83,6 +83,8 @@ struct early_platform_driver {
|
||||
struct platform_driver *pdrv;
|
||||
struct list_head list;
|
||||
int requested_id;
|
||||
char *buffer;
|
||||
int bufsize;
|
||||
};
|
||||
|
||||
#define EARLY_PLATFORM_ID_UNSET -2
|
||||
@@ -102,21 +104,29 @@ extern int early_platform_driver_probe(char *class_str,
|
||||
int nr_probe, int user_only);
|
||||
extern void early_platform_cleanup(void);
|
||||
|
||||
#define early_platform_init(class_string, platdrv) \
|
||||
early_platform_init_buffer(class_string, platdrv, NULL, 0)
|
||||
|
||||
#ifndef MODULE
|
||||
#define early_platform_init(class_string, platform_driver) \
|
||||
#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
|
||||
static __initdata struct early_platform_driver early_driver = { \
|
||||
.class_str = class_string, \
|
||||
.pdrv = platform_driver, \
|
||||
.buffer = buf, \
|
||||
.bufsize = bufsiz, \
|
||||
.pdrv = platdrv, \
|
||||
.requested_id = EARLY_PLATFORM_ID_UNSET, \
|
||||
}; \
|
||||
static int __init early_platform_driver_setup_func(char *buf) \
|
||||
static int __init early_platform_driver_setup_func(char *buffer) \
|
||||
{ \
|
||||
return early_platform_driver_register(&early_driver, buf); \
|
||||
return early_platform_driver_register(&early_driver, buffer); \
|
||||
} \
|
||||
early_param(class_string, early_platform_driver_setup_func)
|
||||
#else /* MODULE */
|
||||
#define early_platform_init(class_string, platform_driver)
|
||||
#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
|
||||
static inline char *early_platform_driver_setup_func(void) \
|
||||
{ \
|
||||
return bufsiz ? buf : NULL; \
|
||||
}
|
||||
#endif /* MODULE */
|
||||
|
||||
#endif /* _PLATFORM_DEVICE_H_ */
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
/* Quota format type IDs */
|
||||
#define QFMT_VFS_OLD 1
|
||||
#define QFMT_VFS_V0 2
|
||||
#define QFMT_OCFS2 3
|
||||
#define QFMT_VFS_V1 4
|
||||
|
||||
/* Size of block in which space limits are passed through the quota
|
||||
* interface */
|
||||
@@ -334,7 +336,7 @@ struct quotactl_ops {
|
||||
|
||||
struct quota_format_type {
|
||||
int qf_fmt_id; /* Quota format id */
|
||||
struct quota_format_ops *qf_ops; /* Operations of format */
|
||||
const struct quota_format_ops *qf_ops; /* Operations of format */
|
||||
struct module *qf_owner; /* Module implementing quota format */
|
||||
struct quota_format_type *qf_next;
|
||||
};
|
||||
@@ -394,7 +396,7 @@ struct quota_info {
|
||||
struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */
|
||||
struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */
|
||||
struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */
|
||||
struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
|
||||
const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
|
||||
};
|
||||
|
||||
int register_quota_format(struct quota_format_type *fmt);
|
||||
|
||||
@@ -52,11 +52,63 @@
|
||||
#define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION
|
||||
#define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION
|
||||
|
||||
/* Locking primitives */
|
||||
/* Right now we are still falling back to (un)lock_kernel, but eventually that
|
||||
would evolve into real per-fs locks */
|
||||
#define reiserfs_write_lock( sb ) lock_kernel()
|
||||
#define reiserfs_write_unlock( sb ) unlock_kernel()
|
||||
/*
|
||||
* Locking primitives. The write lock is a per superblock
|
||||
* special mutex that has properties close to the Big Kernel Lock
|
||||
* which was used in the previous locking scheme.
|
||||
*/
|
||||
void reiserfs_write_lock(struct super_block *s);
|
||||
void reiserfs_write_unlock(struct super_block *s);
|
||||
int reiserfs_write_lock_once(struct super_block *s);
|
||||
void reiserfs_write_unlock_once(struct super_block *s, int lock_depth);
|
||||
|
||||
/*
|
||||
* Several mutexes depend on the write lock.
|
||||
* However sometimes we want to relax the write lock while we hold
|
||||
* these mutexes, according to the release/reacquire on schedule()
|
||||
* properties of the Bkl that were used.
|
||||
* Reiserfs performances and locking were based on this scheme.
|
||||
* Now that the write lock is a mutex and not the bkl anymore, doing so
|
||||
* may result in a deadlock:
|
||||
*
|
||||
* A acquire write_lock
|
||||
* A acquire j_commit_mutex
|
||||
* A release write_lock and wait for something
|
||||
* B acquire write_lock
|
||||
* B can't acquire j_commit_mutex and sleep
|
||||
* A can't acquire write lock anymore
|
||||
* deadlock
|
||||
*
|
||||
* What we do here is avoiding such deadlock by playing the same game
|
||||
* than the Bkl: if we can't acquire a mutex that depends on the write lock,
|
||||
* we release the write lock, wait a bit and then retry.
|
||||
*
|
||||
* The mutexes concerned by this hack are:
|
||||
* - The commit mutex of a journal list
|
||||
* - The flush mutex
|
||||
* - The journal lock
|
||||
* - The inode mutex
|
||||
*/
|
||||
static inline void reiserfs_mutex_lock_safe(struct mutex *m,
|
||||
struct super_block *s)
|
||||
{
|
||||
reiserfs_write_unlock(s);
|
||||
mutex_lock(m);
|
||||
reiserfs_write_lock(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* When we schedule, we usually want to also release the write lock,
|
||||
* according to the previous bkl based locking scheme of reiserfs.
|
||||
*/
|
||||
static inline void reiserfs_cond_resched(struct super_block *s)
|
||||
{
|
||||
if (need_resched()) {
|
||||
reiserfs_write_unlock(s);
|
||||
schedule();
|
||||
reiserfs_write_lock(s);
|
||||
}
|
||||
}
|
||||
|
||||
struct fid;
|
||||
|
||||
@@ -1329,7 +1381,11 @@ static inline loff_t max_reiserfs_offset(struct inode *inode)
|
||||
#define get_generation(s) atomic_read (&fs_generation(s))
|
||||
#define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
|
||||
#define __fs_changed(gen,s) (gen != get_generation (s))
|
||||
#define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);})
|
||||
#define fs_changed(gen,s) \
|
||||
({ \
|
||||
reiserfs_cond_resched(s); \
|
||||
__fs_changed(gen, s); \
|
||||
})
|
||||
|
||||
/***************************************************************************/
|
||||
/* FIXATE NODES */
|
||||
@@ -2258,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len);
|
||||
#define SPARE_SPACE 500
|
||||
|
||||
/* prototypes from ioctl.c */
|
||||
int reiserfs_ioctl(struct inode *inode, struct file *filp,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
||||
long reiserfs_compat_ioctl(struct file *filp,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
int reiserfs_unpack(struct inode *inode, struct file *filp);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/sched.h>
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -355,6 +357,13 @@ struct reiserfs_sb_info {
|
||||
struct reiserfs_journal *s_journal; /* pointer to journal information */
|
||||
unsigned short s_mount_state; /* reiserfs state (valid, invalid) */
|
||||
|
||||
/* Serialize writers access, replace the old bkl */
|
||||
struct mutex lock;
|
||||
/* Owner of the lock (can be recursive) */
|
||||
struct task_struct *lock_owner;
|
||||
/* Depth of the lock, start from -1 like the bkl */
|
||||
int lock_depth;
|
||||
|
||||
/* Comment? -Hans */
|
||||
void (*end_io_handler) (struct buffer_head *, int);
|
||||
hashf_t s_hash_function; /* pointer to function which is used
|
||||
@@ -408,6 +417,17 @@ struct reiserfs_sb_info {
|
||||
char *s_qf_names[MAXQUOTAS];
|
||||
int s_jquota_fmt;
|
||||
#endif
|
||||
#ifdef CONFIG_REISERFS_CHECK
|
||||
|
||||
struct tree_balance *cur_tb; /*
|
||||
* Detects whether more than one
|
||||
* copy of tb exists per superblock
|
||||
* as a means of checking whether
|
||||
* do_balance is executing concurrently
|
||||
* against another tree reader/writer
|
||||
* on a same mount point.
|
||||
*/
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Definitions of reiserfs on-disk properties: */
|
||||
|
||||
+15
-8
@@ -1102,7 +1102,7 @@ struct sched_class {
|
||||
|
||||
void (*set_curr_task) (struct rq *rq);
|
||||
void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
|
||||
void (*task_new) (struct rq *rq, struct task_struct *p);
|
||||
void (*task_fork) (struct task_struct *p);
|
||||
|
||||
void (*switched_from) (struct rq *this_rq, struct task_struct *task,
|
||||
int running);
|
||||
@@ -1111,7 +1111,8 @@ struct sched_class {
|
||||
void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
|
||||
int oldprio, int running);
|
||||
|
||||
unsigned int (*get_rr_interval) (struct task_struct *task);
|
||||
unsigned int (*get_rr_interval) (struct rq *rq,
|
||||
struct task_struct *task);
|
||||
|
||||
#ifdef CONFIG_FAIR_GROUP_SCHED
|
||||
void (*moved_group) (struct task_struct *p);
|
||||
@@ -1151,8 +1152,6 @@ struct sched_entity {
|
||||
u64 start_runtime;
|
||||
u64 avg_wakeup;
|
||||
|
||||
u64 avg_running;
|
||||
|
||||
#ifdef CONFIG_SCHEDSTATS
|
||||
u64 wait_start;
|
||||
u64 wait_max;
|
||||
@@ -1175,7 +1174,6 @@ struct sched_entity {
|
||||
u64 nr_failed_migrations_running;
|
||||
u64 nr_failed_migrations_hot;
|
||||
u64 nr_forced_migrations;
|
||||
u64 nr_forced2_migrations;
|
||||
|
||||
u64 nr_wakeups;
|
||||
u64 nr_wakeups_sync;
|
||||
@@ -1840,7 +1838,8 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
|
||||
extern int sched_clock_stable;
|
||||
#endif
|
||||
|
||||
extern unsigned long long sched_clock(void);
|
||||
/* ftrace calls sched_clock() directly */
|
||||
extern unsigned long long notrace sched_clock(void);
|
||||
|
||||
extern void sched_clock_init(void);
|
||||
extern u64 sched_clock_cpu(int cpu);
|
||||
@@ -1903,14 +1902,22 @@ extern unsigned int sysctl_sched_wakeup_granularity;
|
||||
extern unsigned int sysctl_sched_shares_ratelimit;
|
||||
extern unsigned int sysctl_sched_shares_thresh;
|
||||
extern unsigned int sysctl_sched_child_runs_first;
|
||||
|
||||
enum sched_tunable_scaling {
|
||||
SCHED_TUNABLESCALING_NONE,
|
||||
SCHED_TUNABLESCALING_LOG,
|
||||
SCHED_TUNABLESCALING_LINEAR,
|
||||
SCHED_TUNABLESCALING_END,
|
||||
};
|
||||
extern enum sched_tunable_scaling sysctl_sched_tunable_scaling;
|
||||
|
||||
#ifdef CONFIG_SCHED_DEBUG
|
||||
extern unsigned int sysctl_sched_features;
|
||||
extern unsigned int sysctl_sched_migration_cost;
|
||||
extern unsigned int sysctl_sched_nr_migrate;
|
||||
extern unsigned int sysctl_sched_time_avg;
|
||||
extern unsigned int sysctl_timer_migration;
|
||||
|
||||
int sched_nr_latency_handler(struct ctl_table *table, int write,
|
||||
int sched_proc_update_handler(struct ctl_table *table, int write,
|
||||
void __user *buffer, size_t *length,
|
||||
loff_t *ppos);
|
||||
#endif
|
||||
|
||||
@@ -216,10 +216,10 @@
|
||||
|
||||
#define UART_IIR_TOD 0x08 /* Character Timeout Indication Detected */
|
||||
|
||||
#define UART_FCR_PXAR1 0x00 /* receive FIFO treshold = 1 */
|
||||
#define UART_FCR_PXAR8 0x40 /* receive FIFO treshold = 8 */
|
||||
#define UART_FCR_PXAR16 0x80 /* receive FIFO treshold = 16 */
|
||||
#define UART_FCR_PXAR32 0xc0 /* receive FIFO treshold = 32 */
|
||||
#define UART_FCR_PXAR1 0x00 /* receive FIFO threshold = 1 */
|
||||
#define UART_FCR_PXAR8 0x40 /* receive FIFO threshold = 8 */
|
||||
#define UART_FCR_PXAR16 0x80 /* receive FIFO threshold = 16 */
|
||||
#define UART_FCR_PXAR32 0xc0 /* receive FIFO threshold = 32 */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -215,5 +215,6 @@ static inline void serio_unpin_driver(struct serio *serio)
|
||||
#define SERIO_INEXIO 0x37
|
||||
#define SERIO_TOUCHIT213 0x38
|
||||
#define SERIO_W8001 0x39
|
||||
#define SERIO_DYNAPRO 0x3a
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,10 +57,8 @@ struct intc_desc {
|
||||
struct intc_sense_reg *sense_regs;
|
||||
unsigned int nr_sense_regs;
|
||||
char *name;
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
struct intc_mask_reg *ack_regs;
|
||||
unsigned int nr_ack_regs;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
|
||||
@@ -73,7 +71,6 @@ struct intc_desc symbol __initdata = { \
|
||||
chipname, \
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
|
||||
#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
|
||||
mask_regs, prio_regs, sense_regs, ack_regs) \
|
||||
struct intc_desc symbol __initdata = { \
|
||||
@@ -83,9 +80,11 @@ struct intc_desc symbol __initdata = { \
|
||||
chipname, \
|
||||
_INTC_ARRAY(ack_regs), \
|
||||
}
|
||||
#endif
|
||||
|
||||
void __init register_intc_controller(struct intc_desc *desc);
|
||||
int intc_set_priority(unsigned int irq, unsigned int prio);
|
||||
|
||||
int reserve_irq_vector(unsigned int irq);
|
||||
void reserve_irq_legacy(void);
|
||||
|
||||
#endif /* __SH_INTC_H */
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* SuperH Pin Function Controller Support
|
||||
*
|
||||
* Copyright (c) 2008 Magnus Damm
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef __SH_PFC_H
|
||||
#define __SH_PFC_H
|
||||
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
typedef unsigned short pinmux_enum_t;
|
||||
typedef unsigned short pinmux_flag_t;
|
||||
|
||||
#define PINMUX_TYPE_NONE 0
|
||||
#define PINMUX_TYPE_FUNCTION 1
|
||||
#define PINMUX_TYPE_GPIO 2
|
||||
#define PINMUX_TYPE_OUTPUT 3
|
||||
#define PINMUX_TYPE_INPUT 4
|
||||
#define PINMUX_TYPE_INPUT_PULLUP 5
|
||||
#define PINMUX_TYPE_INPUT_PULLDOWN 6
|
||||
|
||||
#define PINMUX_FLAG_TYPE (0x7)
|
||||
#define PINMUX_FLAG_WANT_PULLUP (1 << 3)
|
||||
#define PINMUX_FLAG_WANT_PULLDOWN (1 << 4)
|
||||
|
||||
#define PINMUX_FLAG_DBIT_SHIFT 5
|
||||
#define PINMUX_FLAG_DBIT (0x1f << PINMUX_FLAG_DBIT_SHIFT)
|
||||
#define PINMUX_FLAG_DREG_SHIFT 10
|
||||
#define PINMUX_FLAG_DREG (0x3f << PINMUX_FLAG_DREG_SHIFT)
|
||||
|
||||
struct pinmux_gpio {
|
||||
pinmux_enum_t enum_id;
|
||||
pinmux_flag_t flags;
|
||||
};
|
||||
|
||||
#define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark }
|
||||
#define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0
|
||||
|
||||
struct pinmux_cfg_reg {
|
||||
unsigned long reg, reg_width, field_width;
|
||||
unsigned long *cnt;
|
||||
pinmux_enum_t *enum_ids;
|
||||
};
|
||||
|
||||
#define PINMUX_CFG_REG(name, r, r_width, f_width) \
|
||||
.reg = r, .reg_width = r_width, .field_width = f_width, \
|
||||
.cnt = (unsigned long [r_width / f_width]) {}, \
|
||||
.enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \
|
||||
|
||||
struct pinmux_data_reg {
|
||||
unsigned long reg, reg_width, reg_shadow;
|
||||
pinmux_enum_t *enum_ids;
|
||||
};
|
||||
|
||||
#define PINMUX_DATA_REG(name, r, r_width) \
|
||||
.reg = r, .reg_width = r_width, \
|
||||
.enum_ids = (pinmux_enum_t [r_width]) \
|
||||
|
||||
struct pinmux_range {
|
||||
pinmux_enum_t begin;
|
||||
pinmux_enum_t end;
|
||||
pinmux_enum_t force;
|
||||
};
|
||||
|
||||
struct pinmux_info {
|
||||
char *name;
|
||||
pinmux_enum_t reserved_id;
|
||||
struct pinmux_range data;
|
||||
struct pinmux_range input;
|
||||
struct pinmux_range input_pd;
|
||||
struct pinmux_range input_pu;
|
||||
struct pinmux_range output;
|
||||
struct pinmux_range mark;
|
||||
struct pinmux_range function;
|
||||
|
||||
unsigned first_gpio, last_gpio;
|
||||
|
||||
struct pinmux_gpio *gpios;
|
||||
struct pinmux_cfg_reg *cfg_regs;
|
||||
struct pinmux_data_reg *data_regs;
|
||||
|
||||
pinmux_enum_t *gpio_data;
|
||||
unsigned int gpio_data_size;
|
||||
|
||||
unsigned long *gpio_in_use;
|
||||
struct gpio_chip chip;
|
||||
};
|
||||
|
||||
int register_pinmux(struct pinmux_info *pip);
|
||||
|
||||
#endif /* __SH_PFC_H */
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#ifndef INCLUDE_MPC5200_SPI_H
|
||||
#define INCLUDE_MPC5200_SPI_H
|
||||
|
||||
extern void mpc52xx_spi_set_premessage_hook(struct spi_master *master,
|
||||
void (*hook)(struct spi_message *m,
|
||||
void *context),
|
||||
void *hook_context);
|
||||
|
||||
#endif
|
||||
@@ -15,7 +15,7 @@
|
||||
* Some hardware works well with requests at spi_transfer scope:
|
||||
*
|
||||
* - Drivers leveraging smarter hardware, with fifos or DMA; or for half
|
||||
* duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(),
|
||||
* duplex (MicroWire) controllers. Provide chipselect() and txrx_bufs(),
|
||||
* and custom setup()/cleanup() methods.
|
||||
*/
|
||||
|
||||
|
||||
@@ -832,4 +832,8 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
|
||||
asmlinkage long sys_perf_event_open(
|
||||
struct perf_event_attr __user *attr_uptr,
|
||||
pid_t pid, int cpu, int group_fd, unsigned long flags);
|
||||
|
||||
asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
unsigned long fd, unsigned long pgoff);
|
||||
#endif
|
||||
|
||||
@@ -89,8 +89,8 @@ enum
|
||||
KERN_VERSION=4, /* string: compile time info */
|
||||
KERN_SECUREMASK=5, /* struct: maximum rights mask */
|
||||
KERN_PROF=6, /* table: profiling information */
|
||||
KERN_NODENAME=7,
|
||||
KERN_DOMAINNAME=8,
|
||||
KERN_NODENAME=7, /* string: hostname */
|
||||
KERN_DOMAINNAME=8, /* string: domainname */
|
||||
|
||||
KERN_PANIC=15, /* int: panic timeout */
|
||||
KERN_REALROOTDEV=16, /* real root device to mount after initrd */
|
||||
@@ -102,8 +102,8 @@ enum
|
||||
KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */
|
||||
KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */
|
||||
KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */
|
||||
KERN_MODPROBE=28,
|
||||
KERN_SG_BIG_BUFF=29,
|
||||
KERN_MODPROBE=28, /* string: modprobe path */
|
||||
KERN_SG_BIG_BUFF=29, /* int: sg driver reserved buffer size */
|
||||
KERN_ACCT=30, /* BSD process accounting parameters */
|
||||
KERN_PPC_L2CR=31, /* l2cr register on PPC */
|
||||
|
||||
@@ -150,7 +150,7 @@ enum
|
||||
KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
|
||||
KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
|
||||
KERN_COMPAT_LOG=73, /* int: print compat layer messages */
|
||||
KERN_MAX_LOCK_DEPTH=74,
|
||||
KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */
|
||||
KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
|
||||
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
|
||||
};
|
||||
|
||||
+23
-2
@@ -190,9 +190,17 @@ struct tty_port_operations {
|
||||
/* Control the DTR line */
|
||||
void (*dtr_rts)(struct tty_port *port, int raise);
|
||||
/* Called when the last close completes or a hangup finishes
|
||||
IFF the port was initialized. Do not use to free resources */
|
||||
IFF the port was initialized. Do not use to free resources. Called
|
||||
under the port mutex to serialize against activate/shutdowns */
|
||||
void (*shutdown)(struct tty_port *port);
|
||||
void (*drop)(struct tty_port *port);
|
||||
/* Called under the port mutex from tty_port_open, serialized using
|
||||
the port mutex */
|
||||
/* FIXME: long term getting the tty argument *out* of this would be
|
||||
good for consoles */
|
||||
int (*activate)(struct tty_port *port, struct tty_struct *tty);
|
||||
/* Called on the final put of a port */
|
||||
void (*destruct)(struct tty_port *port);
|
||||
};
|
||||
|
||||
struct tty_port {
|
||||
@@ -206,12 +214,14 @@ struct tty_port {
|
||||
wait_queue_head_t delta_msr_wait; /* Modem status change */
|
||||
unsigned long flags; /* TTY flags ASY_*/
|
||||
struct mutex mutex; /* Locking */
|
||||
struct mutex buf_mutex; /* Buffer alloc lock */
|
||||
unsigned char *xmit_buf; /* Optional buffer */
|
||||
unsigned int close_delay; /* Close port delay */
|
||||
unsigned int closing_wait; /* Delay for output */
|
||||
int drain_delay; /* Set to zero if no pure time
|
||||
based drain is needed else
|
||||
set to size of fifo */
|
||||
struct kref kref; /* Ref counter */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -439,7 +449,7 @@ extern void initialize_tty_struct(struct tty_struct *tty,
|
||||
struct tty_driver *driver, int idx);
|
||||
extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
|
||||
int first_ok);
|
||||
extern void tty_release_dev(struct file *filp);
|
||||
extern int tty_release(struct inode *inode, struct file *filp);
|
||||
extern int tty_init_termios(struct tty_struct *tty);
|
||||
|
||||
extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty);
|
||||
@@ -454,6 +464,15 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay);
|
||||
extern void tty_port_init(struct tty_port *port);
|
||||
extern int tty_port_alloc_xmit_buf(struct tty_port *port);
|
||||
extern void tty_port_free_xmit_buf(struct tty_port *port);
|
||||
extern void tty_port_put(struct tty_port *port);
|
||||
|
||||
extern inline struct tty_port *tty_port_get(struct tty_port *port)
|
||||
{
|
||||
if (port)
|
||||
kref_get(&port->kref);
|
||||
return port;
|
||||
}
|
||||
|
||||
extern struct tty_struct *tty_port_tty_get(struct tty_port *port);
|
||||
extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty);
|
||||
extern int tty_port_carrier_raised(struct tty_port *port);
|
||||
@@ -467,6 +486,8 @@ extern int tty_port_close_start(struct tty_port *port,
|
||||
extern void tty_port_close_end(struct tty_port *port, struct tty_struct *tty);
|
||||
extern void tty_port_close(struct tty_port *port,
|
||||
struct tty_struct *tty, struct file *filp);
|
||||
extern int tty_port_open(struct tty_port *port,
|
||||
struct tty_struct *tty, struct file *filp);
|
||||
extern inline int tty_port_users(struct tty_port *port)
|
||||
{
|
||||
return port->count + port->blocked_open;
|
||||
|
||||
@@ -110,6 +110,10 @@ struct ucb1400 {
|
||||
struct platform_device *ucb1400_gpio;
|
||||
};
|
||||
|
||||
struct ucb1400_pdata {
|
||||
int irq;
|
||||
};
|
||||
|
||||
static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
|
||||
{
|
||||
return ac97->bus->ops->read(ac97, reg);
|
||||
|
||||
+15
-18
@@ -331,6 +331,7 @@ struct usb_bus {
|
||||
u8 otg_port; /* 0, or number of OTG/HNP port */
|
||||
unsigned is_b_host:1; /* true during some HNP roleswitches */
|
||||
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
|
||||
unsigned sg_tablesize; /* 0 or largest number of sg list entries */
|
||||
|
||||
int devnum_next; /* Next open device number in
|
||||
* round-robin allocation */
|
||||
@@ -428,11 +429,9 @@ struct usb_tt;
|
||||
* @last_busy: time of last use
|
||||
* @autosuspend_delay: in jiffies
|
||||
* @connect_time: time device was first connected
|
||||
* @auto_pm: autosuspend/resume in progress
|
||||
* @do_remote_wakeup: remote wakeup should be enabled
|
||||
* @reset_resume: needs reset instead of resume
|
||||
* @autosuspend_disabled: autosuspend disabled by the user
|
||||
* @autoresume_disabled: autoresume disabled by the user
|
||||
* @skip_sys_resume: skip the next system resume
|
||||
* @wusb_dev: if this is a Wireless USB device, link to the WUSB
|
||||
* specific data for the device.
|
||||
@@ -513,11 +512,9 @@ struct usb_device {
|
||||
int autosuspend_delay;
|
||||
unsigned long connect_time;
|
||||
|
||||
unsigned auto_pm:1;
|
||||
unsigned do_remote_wakeup:1;
|
||||
unsigned reset_resume:1;
|
||||
unsigned autosuspend_disabled:1;
|
||||
unsigned autoresume_disabled:1;
|
||||
unsigned skip_sys_resume:1;
|
||||
#endif
|
||||
struct wusb_dev *wusb_dev;
|
||||
@@ -543,22 +540,20 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
|
||||
|
||||
/* USB autosuspend and autoresume */
|
||||
#ifdef CONFIG_USB_SUSPEND
|
||||
extern int usb_autopm_set_interface(struct usb_interface *intf);
|
||||
extern int usb_autopm_get_interface(struct usb_interface *intf);
|
||||
extern void usb_autopm_put_interface(struct usb_interface *intf);
|
||||
extern int usb_autopm_get_interface_async(struct usb_interface *intf);
|
||||
extern void usb_autopm_put_interface_async(struct usb_interface *intf);
|
||||
|
||||
static inline void usb_autopm_enable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_get_interface_no_resume(
|
||||
struct usb_interface *intf)
|
||||
{
|
||||
atomic_set(&intf->pm_usage_cnt, 0);
|
||||
usb_autopm_set_interface(intf);
|
||||
atomic_inc(&intf->pm_usage_cnt);
|
||||
}
|
||||
|
||||
static inline void usb_autopm_disable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_put_interface_no_suspend(
|
||||
struct usb_interface *intf)
|
||||
{
|
||||
atomic_set(&intf->pm_usage_cnt, 1);
|
||||
usb_autopm_set_interface(intf);
|
||||
atomic_dec(&intf->pm_usage_cnt);
|
||||
}
|
||||
|
||||
static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
@@ -568,12 +563,8 @@ static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
|
||||
#else
|
||||
|
||||
static inline int usb_autopm_set_interface(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
static inline int usb_autopm_get_interface(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
static inline int usb_autopm_get_interface_async(struct usb_interface *intf)
|
||||
{ return 0; }
|
||||
|
||||
@@ -581,9 +572,11 @@ static inline void usb_autopm_put_interface(struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_put_interface_async(struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_enable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_get_interface_no_resume(
|
||||
struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_autopm_disable(struct usb_interface *intf)
|
||||
static inline void usb_autopm_put_interface_no_suspend(
|
||||
struct usb_interface *intf)
|
||||
{ }
|
||||
static inline void usb_mark_last_busy(struct usb_device *udev)
|
||||
{ }
|
||||
@@ -626,6 +619,10 @@ extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev,
|
||||
unsigned ifnum);
|
||||
extern struct usb_host_interface *usb_altnum_to_altsetting(
|
||||
const struct usb_interface *intf, unsigned int altnum);
|
||||
extern struct usb_host_interface *usb_find_alt_setting(
|
||||
struct usb_host_config *config,
|
||||
unsigned int iface_num,
|
||||
unsigned int alt_num);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -127,6 +127,7 @@ struct usb_function {
|
||||
/* private: */
|
||||
/* internals */
|
||||
struct list_head list;
|
||||
DECLARE_BITMAP(endpoints, 32);
|
||||
};
|
||||
|
||||
int usb_add_function(struct usb_configuration *, struct usb_function *);
|
||||
|
||||
+67
-1
@@ -33,6 +33,23 @@ enum usb_otg_state {
|
||||
OTG_STATE_A_VBUS_ERR,
|
||||
};
|
||||
|
||||
#define USB_OTG_PULLUP_ID (1 << 0)
|
||||
#define USB_OTG_PULLDOWN_DP (1 << 1)
|
||||
#define USB_OTG_PULLDOWN_DM (1 << 2)
|
||||
#define USB_OTG_EXT_VBUS_INDICATOR (1 << 3)
|
||||
#define USB_OTG_DRV_VBUS (1 << 4)
|
||||
#define USB_OTG_DRV_VBUS_EXT (1 << 5)
|
||||
|
||||
struct otg_transceiver;
|
||||
|
||||
/* for transceivers connected thru an ULPI interface, the user must
|
||||
* provide access ops
|
||||
*/
|
||||
struct otg_io_access_ops {
|
||||
int (*read)(struct otg_transceiver *otg, u32 reg);
|
||||
int (*write)(struct otg_transceiver *otg, u32 val, u32 reg);
|
||||
};
|
||||
|
||||
/*
|
||||
* the otg driver needs to interact with both device side and host side
|
||||
* usb controllers. it decides which controller is active at a given
|
||||
@@ -42,6 +59,7 @@ enum usb_otg_state {
|
||||
struct otg_transceiver {
|
||||
struct device *dev;
|
||||
const char *label;
|
||||
unsigned int flags;
|
||||
|
||||
u8 default_a;
|
||||
enum usb_otg_state state;
|
||||
@@ -49,10 +67,17 @@ struct otg_transceiver {
|
||||
struct usb_bus *host;
|
||||
struct usb_gadget *gadget;
|
||||
|
||||
struct otg_io_access_ops *io_ops;
|
||||
void __iomem *io_priv;
|
||||
|
||||
/* to pass extra port status to the root hub */
|
||||
u16 port_status;
|
||||
u16 port_change;
|
||||
|
||||
/* initialize/shutdown the OTG controller */
|
||||
int (*init)(struct otg_transceiver *otg);
|
||||
void (*shutdown)(struct otg_transceiver *otg);
|
||||
|
||||
/* bind/unbind the host controller */
|
||||
int (*set_host)(struct otg_transceiver *otg,
|
||||
struct usb_bus *host);
|
||||
@@ -65,6 +90,10 @@ struct otg_transceiver {
|
||||
int (*set_power)(struct otg_transceiver *otg,
|
||||
unsigned mA);
|
||||
|
||||
/* effective for A-peripheral, ignored for B devices */
|
||||
int (*set_vbus)(struct otg_transceiver *otg,
|
||||
bool enabled);
|
||||
|
||||
/* for non-OTG B devices: set transceiver into suspend mode */
|
||||
int (*set_suspend)(struct otg_transceiver *otg,
|
||||
int suspend);
|
||||
@@ -85,6 +114,38 @@ extern int otg_set_transceiver(struct otg_transceiver *);
|
||||
extern void usb_nop_xceiv_register(void);
|
||||
extern void usb_nop_xceiv_unregister(void);
|
||||
|
||||
/* helpers for direct access thru low-level io interface */
|
||||
static inline int otg_io_read(struct otg_transceiver *otg, u32 reg)
|
||||
{
|
||||
if (otg->io_ops && otg->io_ops->read)
|
||||
return otg->io_ops->read(otg, reg);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int otg_io_write(struct otg_transceiver *otg, u32 reg, u32 val)
|
||||
{
|
||||
if (otg->io_ops && otg->io_ops->write)
|
||||
return otg->io_ops->write(otg, reg, val);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int
|
||||
otg_init(struct otg_transceiver *otg)
|
||||
{
|
||||
if (otg->init)
|
||||
return otg->init(otg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
otg_shutdown(struct otg_transceiver *otg)
|
||||
{
|
||||
if (otg->shutdown)
|
||||
otg->shutdown(otg);
|
||||
}
|
||||
|
||||
/* for usb host and peripheral controller drivers */
|
||||
extern struct otg_transceiver *otg_get_transceiver(void);
|
||||
@@ -97,6 +158,12 @@ otg_start_hnp(struct otg_transceiver *otg)
|
||||
return otg->start_hnp(otg);
|
||||
}
|
||||
|
||||
/* Context: can sleep */
|
||||
static inline int
|
||||
otg_set_vbus(struct otg_transceiver *otg, bool enabled)
|
||||
{
|
||||
return otg->set_vbus(otg, enabled);
|
||||
}
|
||||
|
||||
/* for HCDs */
|
||||
static inline int
|
||||
@@ -105,7 +172,6 @@ otg_set_host(struct otg_transceiver *otg, struct usb_bus *host)
|
||||
return otg->set_host(otg, host);
|
||||
}
|
||||
|
||||
|
||||
/* for usb peripheral controller drivers */
|
||||
|
||||
/* Context: can sleep */
|
||||
|
||||
@@ -39,8 +39,6 @@ enum port_dev_state {
|
||||
* @serial: pointer back to the struct usb_serial owner of this port.
|
||||
* @port: pointer to the corresponding tty_port for this port.
|
||||
* @lock: spinlock to grab when updating portions of this structure.
|
||||
* @mutex: mutex used to synchronize serial_open() and serial_close()
|
||||
* access for this port.
|
||||
* @number: the number of the port (the minor number).
|
||||
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
|
||||
* @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
|
||||
@@ -77,7 +75,6 @@ struct usb_serial_port {
|
||||
struct usb_serial *serial;
|
||||
struct tty_port port;
|
||||
spinlock_t lock;
|
||||
struct mutex mutex;
|
||||
unsigned char number;
|
||||
|
||||
unsigned char *interrupt_in_buffer;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef __LINUX_USB_ULPI_H
|
||||
#define __LINUX_USB_ULPI_H
|
||||
|
||||
struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* __LINUX_USB_ULPI_H */
|
||||
@@ -74,7 +74,7 @@ enum {
|
||||
* WUSB defines that CHIDs, CDIDs and CKs are a 16 byte string of
|
||||
* data. In order to avoid confusion and enforce types, we wrap it.
|
||||
*
|
||||
* Make it packed, as we use it in some hw defintions.
|
||||
* Make it packed, as we use it in some hw definitions.
|
||||
*/
|
||||
struct wusb_ckhdid {
|
||||
u8 data[16];
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
US_FLAG(SANE_SENSE, 0x00008000) \
|
||||
/* Sane Sense (> 18 bytes) */ \
|
||||
US_FLAG(CAPACITY_OK, 0x00010000) \
|
||||
/* READ CAPACITY response is correct */
|
||||
/* READ CAPACITY response is correct */ \
|
||||
US_FLAG(BAD_SENSE, 0x00020000) \
|
||||
/* Bad Sense (never more than 18 bytes) */
|
||||
|
||||
#define US_FLAG(name, value) US_FL_##name = value ,
|
||||
enum { US_DO_ALL_FLAGS };
|
||||
|
||||
@@ -128,6 +128,29 @@ struct usbdevfs_hub_portinfo {
|
||||
#ifdef __KERNEL__
|
||||
#ifdef CONFIG_COMPAT
|
||||
#include <linux/compat.h>
|
||||
|
||||
struct usbdevfs_ctrltransfer32 {
|
||||
u8 bRequestType;
|
||||
u8 bRequest;
|
||||
u16 wValue;
|
||||
u16 wIndex;
|
||||
u16 wLength;
|
||||
u32 timeout; /* in milliseconds */
|
||||
compat_caddr_t data;
|
||||
};
|
||||
|
||||
struct usbdevfs_bulktransfer32 {
|
||||
compat_uint_t ep;
|
||||
compat_uint_t len;
|
||||
compat_uint_t timeout; /* in milliseconds */
|
||||
compat_caddr_t data;
|
||||
};
|
||||
|
||||
struct usbdevfs_disconnectsignal32 {
|
||||
compat_int_t signr;
|
||||
compat_caddr_t context;
|
||||
};
|
||||
|
||||
struct usbdevfs_urb32 {
|
||||
unsigned char type;
|
||||
unsigned char endpoint;
|
||||
@@ -153,7 +176,9 @@ struct usbdevfs_ioctl32 {
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
|
||||
#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
|
||||
#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
|
||||
#define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32)
|
||||
#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
|
||||
#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
|
||||
#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
|
||||
@@ -166,6 +191,7 @@ struct usbdevfs_ioctl32 {
|
||||
#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
|
||||
#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32)
|
||||
#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
|
||||
#define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32)
|
||||
#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
|
||||
#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
|
||||
#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
|
||||
|
||||
@@ -361,6 +361,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
|
||||
#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
|
||||
#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
|
||||
#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
|
||||
|
||||
/*
|
||||
* F O R M A T E N U M E R A T I O N
|
||||
@@ -490,7 +491,7 @@ struct v4l2_jpegcompression {
|
||||
* you do, leave them untouched.
|
||||
* Inluding less markers will make the
|
||||
* resulting code smaller, but there will
|
||||
* be fewer aplications which can read it.
|
||||
* be fewer applications which can read it.
|
||||
* The presence of the APP and COM marker
|
||||
* is influenced by APP_len and COM_len
|
||||
* ONLY, not by this property! */
|
||||
@@ -563,6 +564,7 @@ struct v4l2_framebuffer {
|
||||
#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
|
||||
#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
|
||||
#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
|
||||
#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080
|
||||
/* Flags for the 'flags' field. */
|
||||
#define V4L2_FBUF_FLAG_PRIMARY 0x0001
|
||||
#define V4L2_FBUF_FLAG_OVERLAY 0x0002
|
||||
@@ -570,6 +572,7 @@ struct v4l2_framebuffer {
|
||||
#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
|
||||
#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
|
||||
#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
|
||||
#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
|
||||
|
||||
struct v4l2_clip {
|
||||
struct v4l2_rect c;
|
||||
@@ -912,8 +915,10 @@ enum v4l2_colorfx {
|
||||
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
|
||||
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
|
||||
|
||||
#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36)
|
||||
|
||||
/* MPEG-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
|
||||
|
||||
+27
-11
@@ -25,6 +25,7 @@ typedef void (*work_func_t)(struct work_struct *work);
|
||||
struct work_struct {
|
||||
atomic_long_t data;
|
||||
#define WORK_STRUCT_PENDING 0 /* T if work item pending execution */
|
||||
#define WORK_STRUCT_STATIC 1 /* static initializer (debugobjects) */
|
||||
#define WORK_STRUCT_FLAG_MASK (3UL)
|
||||
#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK)
|
||||
struct list_head entry;
|
||||
@@ -35,6 +36,7 @@ struct work_struct {
|
||||
};
|
||||
|
||||
#define WORK_DATA_INIT() ATOMIC_LONG_INIT(0)
|
||||
#define WORK_DATA_STATIC_INIT() ATOMIC_LONG_INIT(2)
|
||||
|
||||
struct delayed_work {
|
||||
struct work_struct work;
|
||||
@@ -63,7 +65,7 @@ struct execute_work {
|
||||
#endif
|
||||
|
||||
#define __WORK_INITIALIZER(n, f) { \
|
||||
.data = WORK_DATA_INIT(), \
|
||||
.data = WORK_DATA_STATIC_INIT(), \
|
||||
.entry = { &(n).entry, &(n).entry }, \
|
||||
.func = (f), \
|
||||
__WORK_INIT_LOCKDEP_MAP(#n, &(n)) \
|
||||
@@ -91,6 +93,14 @@ struct execute_work {
|
||||
#define PREPARE_DELAYED_WORK(_work, _func) \
|
||||
PREPARE_WORK(&(_work)->work, (_func))
|
||||
|
||||
#ifdef CONFIG_DEBUG_OBJECTS_WORK
|
||||
extern void __init_work(struct work_struct *work, int onstack);
|
||||
extern void destroy_work_on_stack(struct work_struct *work);
|
||||
#else
|
||||
static inline void __init_work(struct work_struct *work, int onstack) { }
|
||||
static inline void destroy_work_on_stack(struct work_struct *work) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* initialize all of a work item in one go
|
||||
*
|
||||
@@ -99,24 +109,36 @@ struct execute_work {
|
||||
* to generate better code.
|
||||
*/
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
#define INIT_WORK(_work, _func) \
|
||||
#define __INIT_WORK(_work, _func, _onstack) \
|
||||
do { \
|
||||
static struct lock_class_key __key; \
|
||||
\
|
||||
__init_work((_work), _onstack); \
|
||||
(_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
|
||||
lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\
|
||||
INIT_LIST_HEAD(&(_work)->entry); \
|
||||
PREPARE_WORK((_work), (_func)); \
|
||||
} while (0)
|
||||
#else
|
||||
#define INIT_WORK(_work, _func) \
|
||||
#define __INIT_WORK(_work, _func, _onstack) \
|
||||
do { \
|
||||
__init_work((_work), _onstack); \
|
||||
(_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
|
||||
INIT_LIST_HEAD(&(_work)->entry); \
|
||||
PREPARE_WORK((_work), (_func)); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define INIT_WORK(_work, _func) \
|
||||
do { \
|
||||
__INIT_WORK((_work), (_func), 0); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
__INIT_WORK((_work), (_func), 1); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
@@ -125,22 +147,16 @@ struct execute_work {
|
||||
|
||||
#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
INIT_WORK_ON_STACK(&(_work)->work, (_func)); \
|
||||
init_timer_on_stack(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
|
||||
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
init_timer_deferrable(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
init_timer_on_stack(&(_work)->timer); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* work_pending - Find out whether a work item is currently pending
|
||||
* @work: The work item in question
|
||||
|
||||
@@ -84,6 +84,7 @@ enum cx25840_video_input {
|
||||
CX25840_NONE0_CH3 = 0x80000080,
|
||||
CX25840_NONE1_CH3 = 0x800000c0,
|
||||
CX25840_SVIDEO_ON = 0x80000100,
|
||||
CX25840_COMPONENT_ON = 0x80000200,
|
||||
};
|
||||
|
||||
enum cx25840_audio_input {
|
||||
|
||||
@@ -83,6 +83,8 @@ struct vpfe_subdev_info {
|
||||
struct vpfe_config {
|
||||
/* Number of sub devices connected to vpfe */
|
||||
int num_subdevs;
|
||||
/* i2c bus adapter no */
|
||||
int i2c_adapter_id;
|
||||
/* information about each subdev */
|
||||
struct vpfe_subdev_info *sub_devs;
|
||||
/* evm card info */
|
||||
|
||||
+31
-12
@@ -26,14 +26,16 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
extern int media_ir_debug; /* media_ir_debug level (0,1,2) */
|
||||
#define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \
|
||||
printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
|
||||
|
||||
#define IR_TYPE_RC5 1
|
||||
#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
|
||||
#define IR_TYPE_OTHER 99
|
||||
|
||||
#define IR_KEYTAB_TYPE u32
|
||||
#define IR_KEYTAB_SIZE 128 /* enougth for rc5, probably need more some day */
|
||||
|
||||
struct ir_scancode {
|
||||
u16 scancode;
|
||||
u32 keycode;
|
||||
@@ -42,11 +44,9 @@ struct ir_scancode {
|
||||
struct ir_scancode_table {
|
||||
struct ir_scancode *scan;
|
||||
int size;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \
|
||||
? tab[code] : KEY_RESERVED)
|
||||
|
||||
#define RC5_START(x) (((x)>>12)&3)
|
||||
#define RC5_TOGGLE(x) (((x)>>11)&1)
|
||||
#define RC5_ADDR(x) (((x)>>6)&31)
|
||||
@@ -55,11 +55,11 @@ struct ir_scancode_table {
|
||||
struct ir_input_state {
|
||||
/* configuration */
|
||||
int ir_type;
|
||||
IR_KEYTAB_TYPE ir_codes[IR_KEYTAB_SIZE];
|
||||
|
||||
struct ir_scancode_table keytable;
|
||||
|
||||
/* key info */
|
||||
u32 ir_raw; /* raw data */
|
||||
u32 ir_key; /* ir key code */
|
||||
u32 ir_key; /* ir scancode */
|
||||
u32 keycode; /* linux key code */
|
||||
int keypressed; /* current state */
|
||||
};
|
||||
@@ -102,20 +102,36 @@ struct card_ir {
|
||||
struct tasklet_struct tlet;
|
||||
};
|
||||
|
||||
void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
|
||||
/* Routines from ir-functions.c */
|
||||
|
||||
int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
|
||||
int ir_type, struct ir_scancode_table *ir_codes);
|
||||
void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
|
||||
void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
|
||||
u32 ir_key, u32 ir_raw);
|
||||
u32 ir_key);
|
||||
u32 ir_extract_bits(u32 data, u32 mask);
|
||||
int ir_dump_samples(u32 *samples, int count);
|
||||
int ir_decode_biphase(u32 *samples, int count, int low, int high);
|
||||
int ir_decode_pulsedistance(u32 *samples, int count, int low, int high);
|
||||
u32 ir_rc5_decode(unsigned int code);
|
||||
|
||||
void ir_rc5_timer_end(unsigned long data);
|
||||
void ir_rc5_timer_keyup(unsigned long data);
|
||||
|
||||
/* Keymaps to be used by other modules */
|
||||
/* Routines from ir-keytable.c */
|
||||
|
||||
u32 ir_g_keycode_from_table(struct input_dev *input_dev,
|
||||
u32 scancode);
|
||||
|
||||
int ir_set_keycode_table(struct input_dev *input_dev,
|
||||
struct ir_scancode_table *rc_tab);
|
||||
|
||||
int ir_roundup_tablesize(int n_elems);
|
||||
int ir_copy_table(struct ir_scancode_table *destin,
|
||||
const struct ir_scancode_table *origin);
|
||||
void ir_input_free(struct input_dev *input_dev);
|
||||
|
||||
/* scancode->keycode map tables from ir-keymaps.c */
|
||||
|
||||
extern struct ir_scancode_table ir_codes_empty_table;
|
||||
extern struct ir_scancode_table ir_codes_avermedia_table;
|
||||
@@ -150,6 +166,7 @@ extern struct ir_scancode_table ir_codes_rc5_tv_table;
|
||||
extern struct ir_scancode_table ir_codes_winfast_table;
|
||||
extern struct ir_scancode_table ir_codes_pinnacle_color_table;
|
||||
extern struct ir_scancode_table ir_codes_hauppauge_new_table;
|
||||
extern struct ir_scancode_table ir_codes_rc5_hauppauge_new_table;
|
||||
extern struct ir_scancode_table ir_codes_npgtech_table;
|
||||
extern struct ir_scancode_table ir_codes_norwood_table;
|
||||
extern struct ir_scancode_table ir_codes_proteus_2309_table;
|
||||
@@ -172,6 +189,8 @@ extern struct ir_scancode_table ir_codes_ati_tv_wonder_hd_600_table;
|
||||
extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table;
|
||||
extern struct ir_scancode_table ir_codes_kaiomy_table;
|
||||
extern struct ir_scancode_table ir_codes_dm1105_nec_table;
|
||||
extern struct ir_scancode_table ir_codes_tevii_nec_table;
|
||||
extern struct ir_scancode_table ir_codes_tbs_nec_table;
|
||||
extern struct ir_scancode_table ir_codes_evga_indtube_table;
|
||||
extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
|
||||
extern struct ir_scancode_table ir_codes_videomate_s350_table;
|
||||
|
||||
@@ -64,6 +64,7 @@ enum {
|
||||
V4L2_IDENT_OV9650 = 254,
|
||||
V4L2_IDENT_OV9655 = 255,
|
||||
V4L2_IDENT_SOI968 = 256,
|
||||
V4L2_IDENT_OV9640 = 257,
|
||||
|
||||
/* module saa7146: reserved range 300-309 */
|
||||
V4L2_IDENT_SAA7146 = 300,
|
||||
@@ -72,6 +73,7 @@ enum {
|
||||
V4L2_IDENT_CX23418_843 = 403, /* Integrated A/V Decoder on the '418 */
|
||||
V4L2_IDENT_CX23415 = 415,
|
||||
V4L2_IDENT_CX23416 = 416,
|
||||
V4L2_IDENT_CX23417 = 417,
|
||||
V4L2_IDENT_CX23418 = 418,
|
||||
|
||||
/* module au0828 */
|
||||
@@ -129,6 +131,9 @@ enum {
|
||||
V4L2_IDENT_SAA6752HS = 6752,
|
||||
V4L2_IDENT_SAA6752HS_AC3 = 6753,
|
||||
|
||||
/* modules tef6862: just ident 6862 */
|
||||
V4L2_IDENT_TEF6862 = 6862,
|
||||
|
||||
/* module adv7170: just ident 7170 */
|
||||
V4L2_IDENT_ADV7170 = 7170,
|
||||
|
||||
@@ -165,12 +170,27 @@ enum {
|
||||
/* module mt9v011, just ident 8243 */
|
||||
V4L2_IDENT_MT9V011 = 8243,
|
||||
|
||||
/* module cx23885 and cx25840 */
|
||||
V4L2_IDENT_CX23885 = 8850,
|
||||
V4L2_IDENT_CX23885_AV = 8851, /* Integrated A/V decoder */
|
||||
V4L2_IDENT_CX23887 = 8870,
|
||||
V4L2_IDENT_CX23887_AV = 8871, /* Integrated A/V decoder */
|
||||
V4L2_IDENT_CX23888 = 8880,
|
||||
V4L2_IDENT_CX23888_AV = 8881, /* Integrated A/V decoder */
|
||||
V4L2_IDENT_CX23888_IR = 8882, /* Integrated infrared controller */
|
||||
|
||||
/* module tw9910: just ident 9910 */
|
||||
V4L2_IDENT_TW9910 = 9910,
|
||||
|
||||
/* module sn9c20x: just ident 10000 */
|
||||
V4L2_IDENT_SN9C20X = 10000,
|
||||
|
||||
/* module cx231xx and cx25840 */
|
||||
V4L2_IDENT_CX2310X_AV = 23099, /* Integrated A/V decoder; not in '100 */
|
||||
V4L2_IDENT_CX23100 = 23100,
|
||||
V4L2_IDENT_CX23101 = 23101,
|
||||
V4L2_IDENT_CX23102 = 23102,
|
||||
|
||||
/* module msp3400: reserved range 34000-34999 and 44000-44999 */
|
||||
V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only
|
||||
use internally (tveeprom.c). */
|
||||
@@ -264,6 +284,9 @@ enum {
|
||||
|
||||
/* module m52790: just ident 52790 */
|
||||
V4L2_IDENT_M52790 = 52790,
|
||||
|
||||
/* Sharp RJ54N1CB0C, 0xCB0C = 51980 */
|
||||
V4L2_IDENT_RJ54N1CB0C = 51980,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user