/drivers/include/syscall.h |
---|
37,10 → 37,7 |
addr_t STDCALL AllocPage(void)__asm__("AllocPage"); |
addr_t STDCALL AllocPages(count_t count)__asm__("AllocPages"); |
void IMPORT __attribute__((regparm(1))) |
FreePage(addr_t page)__asm__("FreePage"); |
void* STDCALL CreateRingBuffer(size_t size, u32_t map)__asm__("CreateRingBuffer"); |
u32_t STDCALL RegService(char *name, srv_proc_t proc)__asm__("RegService"); |
54,9 → 51,6 |
addr_t IMPORT GetStackBase(void)__asm__("GetStackBase"); |
u32_t IMPORT GetPid(void)__asm__("GetPid"); |
u32 STDCALL TimerHs(u32 delay, u32 interval, |
void *fn, void *data)asm("TimerHs"); |
/////////////////////////////////////////////////////////////////////////////// |
void STDCALL SetMouseData(int btn, int x, int y, |
91,6 → 85,7 |
#define pciWriteLong(tag, reg, val) \ |
PciWrite32(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val)) |
/////////////////////////////////////////////////////////////////////////////// |
int dbg_open(char *path); |
130,14 → 125,6 |
__asm__ __volatile__ ("":::"ebx","ecx","edx","esi","edi"); |
}; |
static inline void DestroyEvent(evhandle_t evh) |
{ |
__asm__ __volatile__ ( |
"call *__imp__DestroyEvent" |
::"a"(evh.handle),"b"(evh.euid)); |
__asm__ __volatile__ ("":::"ebx","ecx","edx","esi","edi"); |
}; |
static inline u32_t GetEvent(kevent_t *ev) |
{ |
u32_t handle; |
188,7 → 175,7 |
__asm__ __volatile__ ( |
"call *__imp__GetPgAddr \n\t" |
:"=a" (retval) |
:"=eax" (retval) |
:"a" (mem) ); |
return retval; |
}; |
229,7 → 216,7 |
static inline void udelay(u32_t delay) |
{ |
if(!delay) delay++; |
delay*= 100; |
delay*= 500; |
while(delay--) |
{ |
311,7 → 298,7 |
( |
"pushl %%eax \n\t" |
"call *__imp__GetService" |
:"=a" (handle) |
:"=eax" (handle) |
:"a" (name) |
:"ebx","ecx","edx","esi", "edi" |
); |
430,7 → 417,7 |
static inline void __iomem *ioremap(uint32_t offset, size_t size) |
{ |
return (void __iomem*) MapIoMem(offset, size, PG_SW|PG_NOCACHE); |
return (void __iomem*) MapIoMem(offset, size, 3); |
} |
static inline void iounmap(void *addr) |
/drivers/include/drm/intel-gtt.h |
---|
File deleted |
/drivers/include/drm/drm_fourcc.h |
---|
File deleted |
/drivers/include/drm/drmP.hh |
---|
File deleted |
/drivers/include/drm/drmP.h |
---|
36,15 → 36,17 |
#define _DRM_P_H_ |
#ifdef __KERNEL__ |
#include <syscall.h> |
#ifdef __alpha__ |
/* add include of current.h so that "current" is defined |
* before static inline funcs in wait.h. Doing this so we |
* can build the DRM (part of PI DRI). 4/21/2000 S + B */ |
#include <asm/current.h> |
#endif /* __alpha__ */ |
#include <linux/module.h> |
#include <linux/kernel.h> |
#include <linux/errno.h> |
#include <errno-base.h> |
#include <linux/kref.h> |
#include <linux/spinlock.h> |
#include <linux/wait.h> |
//#include <linux/miscdevice.h> |
//#include <linux/fs.h> |
52,7 → 54,7 |
//#include <linux/init.h> |
//#include <linux/file.h> |
#include <linux/pci.h> |
#include <linux/jiffies.h> |
//#include <linux/jiffies.h> |
//#include <linux/smp_lock.h> /* For (un)lock_kernel */ |
//#include <linux/dma-mapping.h> |
//#include <linux/mm.h> |
120,16 → 122,17 |
printk("[" DRM_NAME ":%s] " fmt , __func__ , ##args); \ |
} while(0) |
#define DRM_DEBUG_DRIVER(fmt, args...) \ |
do { \ |
printk("[" DRM_NAME ":%s] " fmt , __func__ , ##args); \ |
} while (0) |
#define dev_err(dev, format, arg...) \ |
printk("Error %s " format, __func__ , ## arg) |
#define DRM_LOG_KMS(fmt, args...) \ |
do { \ |
printk("[" DRM_NAME "]" fmt, ##args); \ |
} while (0) |
#define dev_warn(dev, format, arg...) \ |
printk("Warning %s " format, __func__ , ## arg) |
#define dev_info(dev, format, arg...) \ |
printk("Info %s " format , __func__, ## arg) |
static inline int drm_sysfs_connector_add(struct drm_connector *connector) |
{ return 0; }; |
157,11 → 160,8 |
#define DRIVER_IRQ_VBL2 0x800 |
#define DRIVER_GEM 0x1000 |
#define DRIVER_MODESET 0x2000 |
#define DRIVER_USE_PLATFORM_DEVICE 0x4000 |
#define DRIVER_BUS_PCI 0x1 |
#define DRIVER_BUS_PLATFORM 0x2 |
#define DRIVER_BUS_USB 0x3 |
/***********************************************************************/ |
/** \name Begin the DRM... */ |
/*@{*/ |
396,7 → 396,6 |
atomic_t wfh; /**< If waiting for high mark */ |
spinlock_t lock; |
}; |
#endif |
typedef struct drm_dma_handle { |
dma_addr_t busaddr; |
404,7 → 403,6 |
size_t size; |
} drm_dma_handle_t; |
#if 0 |
/** |
* Buffer entry. There is one of this for each buffer size order. |
*/ |
556,9 → 554,7 |
struct drm_hw_lock *lock; |
}; |
#endif |
/** |
* Kernel side of a mapping |
*/ |
574,7 → 570,6 |
typedef struct drm_local_map drm_local_map_t; |
#if 0 |
/** |
* Mappings list |
*/ |
643,6 → 638,7 |
struct file *filp; |
/* Mapping info for this object */ |
// struct drm_map_list map_list; |
/** |
* Size of the object, in bytes. Immutable over the object's |
677,6 → 673,8 |
void *driver_private; |
}; |
#if 0 |
#include "drm_crtc.h" |
/* per-master structure */ |
695,17 → 693,15 |
/** \name Authentication */ |
/*@{ */ |
// struct drm_open_hash magiclist; |
// struct list_head magicfree; |
struct drm_open_hash magiclist; |
struct list_head magicfree; |
/*@} */ |
// struct drm_lock_data lock; /**< Information on hardware lock */ |
struct drm_lock_data lock; /**< Information on hardware lock */ |
void *driver_priv; /**< Private structure for driver to use */ |
}; |
#if 0 |
/* Size of ringbuffer for vblank timestamps. Just double-buffer |
* in initial implementation. |
*/ |
845,7 → 841,7 |
* Specifically, the timestamp in @vblank_time should correspond as |
* closely as possible to the time when the first video scanline of |
* the video frame after the end of VBLANK will start scanning out, |
* the time immediately after end of the VBLANK interval. If the |
* the time immmediately after end of the VBLANK interval. If the |
* @crtc is currently inside VBLANK, this will be a time in the future. |
* If the @crtc is currently scanning out a frame, this will be the |
* past start time of the current scanout. This is meant to adhere |
912,23 → 908,10 |
*/ |
int (*gem_init_object) (struct drm_gem_object *obj); |
void (*gem_free_object) (struct drm_gem_object *obj); |
int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); |
void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); |
/* vga arb irq handler */ |
void (*vgaarb_irq)(struct drm_device *dev, bool state); |
/* dumb alloc support */ |
int (*dumb_create)(struct drm_file *file_priv, |
struct drm_device *dev, |
struct drm_mode_create_dumb *args); |
int (*dumb_map_offset)(struct drm_file *file_priv, |
struct drm_device *dev, uint32_t handle, |
uint64_t *offset); |
int (*dumb_destroy)(struct drm_file *file_priv, |
struct drm_device *dev, |
uint32_t handle); |
/* Driver private ops for this object */ |
struct vm_operations_struct *gem_vm_ops; |
943,20 → 926,12 |
int dev_priv_size; |
struct drm_ioctl_desc *ioctls; |
int num_ioctls; |
const struct file_operations *fops; |
union { |
struct pci_driver *pci; |
struct platform_device *platform_device; |
struct usb_driver *usb; |
} kdriver; |
struct drm_bus *bus; |
struct file_operations fops; |
struct pci_driver pci_driver; |
/* List of devices hanging off this driver */ |
struct list_head device_list; |
}; |
#endif |
#define DRM_MINOR_UNASSIGNED 0 |
#define DRM_MINOR_LEGACY 1 |
#define DRM_MINOR_CONTROL 2 |
969,7 → 944,7 |
*/ |
struct drm_debugfs_list { |
const char *name; /** file name */ |
// int (*show)(struct seq_file*, void*); /** show callback */ |
int (*show)(struct seq_file*, void*); /** show callback */ |
u32 driver_features; /**< Required driver features for this entry */ |
}; |
989,7 → 964,7 |
*/ |
struct drm_info_list { |
const char *name; /** file name */ |
// int (*show)(struct seq_file*, void*); /** show callback */ |
int (*show)(struct seq_file*, void*); /** show callback */ |
u32 driver_features; /**< Required driver features for this entry */ |
void *data; |
}; |
1010,20 → 985,22 |
struct drm_minor { |
int index; /**< Minor device number */ |
int type; /**< Control or render */ |
// dev_t device; /**< Device number for mknod */ |
// struct device kdev; /**< Linux device */ |
dev_t device; /**< Device number for mknod */ |
struct device kdev; /**< Linux device */ |
struct drm_device *dev; |
// struct proc_dir_entry *proc_root; /**< proc directory entry */ |
// struct drm_info_node proc_nodes; |
// struct dentry *debugfs_root; |
// struct drm_info_node debugfs_nodes; |
struct proc_dir_entry *proc_root; /**< proc directory entry */ |
struct drm_info_node proc_nodes; |
struct dentry *debugfs_root; |
struct drm_info_node debugfs_nodes; |
struct drm_master *master; /* currently active master for this node */ |
// struct list_head master_list; |
// struct drm_mode_group mode_group; |
struct list_head master_list; |
struct drm_mode_group mode_group; |
}; |
#endif |
/* mode specified on the command line */ |
struct drm_cmdline_mode { |
bool specified; |
1172,7 → 1149,7 |
// struct drm_local_map *agp_buffer_map; |
// unsigned int agp_buffer_token; |
// struct drm_minor *control; /**< Control node for card */ |
struct drm_minor *primary; /**< render type primary screen head */ |
// struct drm_minor *primary; /**< render type primary screen head */ |
struct drm_mode_config mode_config; /**< Current mode config */ |
1189,12 → 1166,37 |
#define DRM_SWITCH_POWER_CHANGING 2 |
static __inline__ int drm_device_is_agp(struct drm_device *dev) |
{ |
return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); |
} |
static __inline__ int drm_device_is_pcie(struct drm_device *dev) |
{ |
return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); |
} |
#if 0 |
static inline int drm_dev_to_irq(struct drm_device *dev) |
{ |
return dev->pdev->irq; |
} |
#if 0 |
static __inline__ int drm_core_check_feature(struct drm_device *dev, |
int feature) |
{ |
return ((dev->driver->driver_features & feature) ? 1 : 0); |
} |
#ifdef __alpha__ |
#define drm_get_pci_domain(dev) dev->hose->index |
1342,7 → 1344,6 |
struct drm_file *file_priv); |
extern int drm_authmagic(struct drm_device *dev, void *data, |
struct drm_file *file_priv); |
extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic); |
/* Cache management (drm_cache.c) */ |
void drm_clflush_pages(struct page *pages[], unsigned long num_pages); |
1554,8 → 1555,6 |
static inline void drm_sysfs_connector_remove(struct drm_connector *connector) |
{ }; |
#endif |
/* Graphics Execution Manager library functions (drm_gem.c) */ |
int drm_gem_init(struct drm_device *dev); |
void drm_gem_destroy(struct drm_device *dev); |
1565,14 → 1564,11 |
size_t size); |
int drm_gem_object_init(struct drm_device *dev, |
struct drm_gem_object *obj, size_t size); |
int drm_gem_private_object_init(struct drm_device *dev, |
struct drm_gem_object *obj, size_t size); |
void drm_gem_object_handle_free(struct drm_gem_object *obj); |
void drm_gem_vm_open(struct vm_area_struct *vma); |
void drm_gem_vm_close(struct vm_area_struct *vma); |
int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
static inline void |
drm_gem_object_reference(struct drm_gem_object *obj) |
{ |
1582,21 → 1578,11 |
static inline void |
drm_gem_object_unreference(struct drm_gem_object *obj) |
{ |
if (obj != NULL) |
kref_put(&obj->refcount, drm_gem_object_free); |
} |
if (obj == NULL) |
return; |
#if 0 |
static inline void |
drm_gem_object_unreference_unlocked(struct drm_gem_object *obj) |
{ |
if (obj != NULL) { |
struct drm_device *dev = obj->dev; |
mutex_lock(&dev->struct_mutex); |
kref_put(&obj->refcount, drm_gem_object_free); |
mutex_unlock(&dev->struct_mutex); |
} |
} |
int drm_gem_handle_create(struct drm_file *file_priv, |
struct drm_gem_object *obj, |
1623,32 → 1609,10 |
* ref, in which case the object would disappear before we |
* checked for a name |
*/ |
if (atomic_dec_and_test(&obj->handle_count)) |
drm_gem_object_handle_free(obj); |
kref_put(&obj->handlecount, drm_gem_object_handle_free); |
drm_gem_object_unreference(obj); |
} |
static inline void |
drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj) |
{ |
if (obj == NULL) |
return; |
if (atomic_read(&obj->handle_count) == 0) |
return; |
/* |
* Must bump handle count first as this may be the last |
* ref, in which case the object would disappear before we |
* checked for a name |
*/ |
if (atomic_dec_and_test(&obj->handle_count)) |
drm_gem_object_handle_free(obj); |
drm_gem_object_unreference_unlocked(obj); |
} |
struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, |
struct drm_file *filp, |
u32 handle); |
1699,18 → 1663,11 |
vfree(ptr); |
} |
/*@}*/ |
#endif |
static __inline__ int drm_device_is_agp(struct drm_device *dev) |
{ |
return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); |
} |
static __inline__ int drm_device_is_pcie(struct drm_device *dev) |
{ |
return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); |
} |
#endif /* __KERNEL__ */ |
#endif |
/drivers/include/drm/drm_crtc.h |
---|
29,10 → 29,9 |
#include <linux/spinlock.h> |
#include <linux/types.h> |
#include <linux/idr.h> |
#include <linux/fb.h> |
#include <drm/drm_fourcc.h> |
struct drm_device; |
struct drm_mode_set; |
struct drm_framebuffer; |
45,7 → 44,6 |
#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 |
#define DRM_MODE_OBJECT_FB 0xfbfbfbfb |
#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb |
#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee |
struct drm_mode_object { |
uint32_t id; |
120,6 → 118,7 |
char name[DRM_DISPLAY_MODE_LEN]; |
int connector_count; |
enum drm_mode_status status; |
int type; |
239,8 → 238,7 |
struct list_head head; |
struct drm_mode_object base; |
const struct drm_framebuffer_funcs *funcs; |
unsigned int pitches[4]; |
unsigned int offsets[4]; |
unsigned int pitch; |
unsigned int width; |
unsigned int height; |
/* depth can be 15 or 16 */ |
247,7 → 245,6 |
unsigned int depth; |
int bits_per_pixel; |
int flags; |
uint32_t pixel_format; /* fourcc format */ |
struct list_head filp_head; |
/* if you are using the helper */ |
void *helper_private; |
281,7 → 278,6 |
struct drm_connector; |
struct drm_encoder; |
struct drm_pending_vblank_event; |
struct drm_plane; |
/** |
* drm_crtc_funcs - control CRTCs for a given device |
345,21 → 341,10 |
/** |
* drm_crtc - central CRTC control structure |
* @dev: parent DRM device |
* @head: list management |
* @base: base KMS object for ID tracking etc. |
* @enabled: is this CRTC enabled? |
* @mode: current mode timings |
* @hwmode: mode timings as programmed to hw regs |
* @x: x position on screen |
* @y: y position on screen |
* @funcs: CRTC control functions |
* @gamma_size: size of gamma ramp |
* @gamma_store: gamma ramp values |
* @framedur_ns: precise frame timing |
* @framedur_ns: precise line timing |
* @pixeldur_ns: precise pixel timing |
* @helper_private: mid-layer private data |
* |
* Each CRTC may have one or more connectors associated with it. This structure |
* allows the CRTC to be controlled. |
438,13 → 423,6 |
void (*force)(struct drm_connector *connector); |
}; |
/** |
* drm_encoder_funcs - encoder controls |
* @reset: reset state (e.g. at init or resume time) |
* @destroy: cleanup and free associated data |
* |
* Encoders sit between CRTCs and connectors. |
*/ |
struct drm_encoder_funcs { |
void (*reset)(struct drm_encoder *encoder); |
void (*destroy)(struct drm_encoder *encoder); |
453,22 → 431,10 |
#define DRM_CONNECTOR_MAX_UMODES 16 |
#define DRM_CONNECTOR_MAX_PROPERTY 16 |
#define DRM_CONNECTOR_LEN 32 |
#define DRM_CONNECTOR_MAX_ENCODER 3 |
#define DRM_CONNECTOR_MAX_ENCODER 2 |
/** |
* drm_encoder - central DRM encoder structure |
* @dev: parent DRM device |
* @head: list management |
* @base: base KMS object |
* @encoder_type: one of the %DRM_MODE_ENCODER_<foo> types in drm_mode.h |
* @possible_crtcs: bitmask of potential CRTC bindings |
* @possible_clones: bitmask of potential sibling encoders for cloning |
* @crtc: currently bound CRTC |
* @funcs: control functions |
* @helper_private: mid-layer private data |
* |
* CRTCs drive pixels to encoders, which convert them into signals |
* appropriate for a given connector or set of connectors. |
*/ |
struct drm_encoder { |
struct drm_device *dev; |
500,41 → 466,16 |
/* DACs should rarely do this without a lot of testing */ |
#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) |
#define MAX_ELD_BYTES 128 |
/** |
* drm_connector - central DRM connector control structure |
* @dev: parent DRM device |
* @kdev: kernel device for sysfs attributes |
* @attr: sysfs attributes |
* @head: list management |
* @base: base KMS object |
* @connector_type: one of the %DRM_MODE_CONNECTOR_<foo> types from drm_mode.h |
* @connector_type_id: index into connector type enum |
* @crtc: CRTC this connector is currently connected to, NULL if none |
* @interlace_allowed: can this connector handle interlaced modes? |
* @doublescan_allowed: can this connector handle doublescan? |
* @modes: modes available on this connector (from fill_modes() + user) |
* @status: one of the drm_connector_status enums (connected, not, or unknown) |
* @probed_modes: list of modes derived directly from the display |
* @display_info: information about attached display (e.g. from EDID) |
* @available_modes: modes available on this connector (from get_modes() + user) |
* @initial_x: initial x position for this connector |
* @initial_y: initial y position for this connector |
* @status: connector connected? |
* @funcs: connector control functions |
* @user_modes: user added mode list |
* @edid_blob_ptr: DRM property containing EDID if present |
* @property_ids: property tracking for this connector |
* @property_values: value pointers or data for properties |
* @polled: a %DRM_CONNECTOR_POLL_<foo> value for core driven polling |
* @dpms: current dpms state |
* @helper_private: mid-layer private data |
* @force: a %DRM_FORCE_<foo> state for forced mode sets |
* @encoder_ids: valid encoders for this connector |
* @encoder: encoder driving this connector, if any |
* @eld: EDID-like data, if present |
* @dvi_dual: dual link DVI, if found |
* @max_tmds_clock: max clock rate, if found |
* @latency_present: AV delay info from ELD, if found |
* @video_latency: video latency info from ELD, if found |
* @audio_latency: audio latency info from ELD, if found |
* @null_edid_counter: track sinks that give us all zeros for the EDID |
* |
* Each connector may be connected to one or more CRTCs, or may be clonable by |
* another connector if they can share a CRTC. Each connector also has a specific |
555,6 → 496,7 |
bool doublescan_allowed; |
struct list_head modes; /* list of modes on this connector */ |
int initial_x, initial_y; |
enum drm_connector_status status; |
/* these are modes added by probing with DDC or the BIOS */ |
578,84 → 520,14 |
/* forced on connector */ |
enum drm_connector_force force; |
uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
uint32_t force_encoder_id; |
struct drm_encoder *encoder; /* currently active encoder */ |
/* EDID bits */ |
uint8_t eld[MAX_ELD_BYTES]; |
bool dvi_dual; |
int max_tmds_clock; /* in MHz */ |
bool latency_present[2]; |
int video_latency[2]; /* [0]: progressive, [1]: interlaced */ |
int audio_latency[2]; |
int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */ |
}; |
/** |
* drm_plane_funcs - driver plane control functions |
* @update_plane: update the plane configuration |
* @disable_plane: shut down the plane |
* @destroy: clean up plane resources |
*/ |
struct drm_plane_funcs { |
int (*update_plane)(struct drm_plane *plane, |
struct drm_crtc *crtc, struct drm_framebuffer *fb, |
int crtc_x, int crtc_y, |
unsigned int crtc_w, unsigned int crtc_h, |
uint32_t src_x, uint32_t src_y, |
uint32_t src_w, uint32_t src_h); |
int (*disable_plane)(struct drm_plane *plane); |
void (*destroy)(struct drm_plane *plane); |
}; |
/** |
* drm_plane - central DRM plane control structure |
* @dev: DRM device this plane belongs to |
* @head: for list management |
* @base: base mode object |
* @possible_crtcs: pipes this plane can be bound to |
* @format_types: array of formats supported by this plane |
* @format_count: number of formats supported |
* @crtc: currently bound CRTC |
* @fb: currently bound fb |
* @gamma_size: size of gamma table |
* @gamma_store: gamma correction table |
* @enabled: enabled flag |
* @funcs: helper functions |
* @helper_private: storage for drver layer |
*/ |
struct drm_plane { |
struct drm_device *dev; |
struct list_head head; |
struct drm_mode_object base; |
uint32_t possible_crtcs; |
uint32_t *format_types; |
uint32_t format_count; |
struct drm_crtc *crtc; |
struct drm_framebuffer *fb; |
/* CRTC gamma size for reporting to userspace */ |
uint32_t gamma_size; |
uint16_t *gamma_store; |
bool enabled; |
const struct drm_plane_funcs *funcs; |
void *helper_private; |
}; |
/** |
* drm_mode_set - new values for a CRTC config change |
* @head: list management |
* @fb: framebuffer to use for new config |
* @crtc: CRTC whose configuration we're about to change |
* @mode: mode timings to use |
* @x: position of this CRTC relative to @fb |
* @y: position of this CRTC relative to @fb |
* @connectors: array of connectors to drive with this CRTC if possible |
* @num_connectors: size of @connectors array |
* struct drm_mode_set |
* |
* Represents a single crtc the connectors that it drives with what mode |
* and from which framebuffer it scans out from. |
677,33 → 549,13 |
}; |
/** |
* struct drm_mode_config_funcs - basic driver provided mode setting functions |
* @fb_create: create a new framebuffer object |
* @output_poll_changed: function to handle output configuration changes |
* |
* Some global (i.e. not per-CRTC, connector, etc) mode setting functions that |
* involve drivers. |
* struct drm_mode_config_funcs - configure CRTCs for a given screen layout |
*/ |
struct drm_mode_config_funcs { |
struct drm_framebuffer *(*fb_create)(struct drm_device *dev, |
struct drm_file *file_priv, |
struct drm_mode_fb_cmd2 *mode_cmd); |
struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd); |
void (*output_poll_changed)(struct drm_device *dev); |
}; |
/** |
* drm_mode_group - group of mode setting resources for potential sub-grouping |
* @num_crtcs: CRTC count |
* @num_encoders: encoder count |
* @num_connectors: connector count |
* @id_list: list of KMS object IDs in this group |
* |
* Currently this simply tracks the global mode setting state. But in the |
* future it could allow groups of objects to be set aside into independent |
* control groups for use by different user level processes (e.g. two X servers |
* running simultaneously on different heads, each with their own mode |
* configuration and freedom of mode setting). |
*/ |
struct drm_mode_group { |
uint32_t num_crtcs; |
uint32_t num_encoders; |
715,30 → 567,7 |
/** |
* drm_mode_config - Mode configuration control structure |
* @mutex: mutex protecting KMS related lists and structures |
* @idr_mutex: mutex for KMS ID allocation and management |
* @crtc_idr: main KMS ID tracking object |
* @num_fb: number of fbs available |
* @fb_list: list of framebuffers available |
* @num_connector: number of connectors on this device |
* @connector_list: list of connector objects |
* @num_encoder: number of encoders on this device |
* @encoder_list: list of encoder objects |
* @num_crtc: number of CRTCs on this device |
* @crtc_list: list of CRTC objects |
* @min_width: minimum pixel width on this device |
* @min_height: minimum pixel height on this device |
* @max_width: maximum pixel width on this device |
* @max_height: maximum pixel height on this device |
* @funcs: core driver provided mode setting functions |
* @fb_base: base address of the framebuffer |
* @poll_enabled: track polling status for this device |
* @output_poll_work: delayed work for polling in process context |
* @*_property: core property tracking |
* |
* Core mode resource tracking structure. All CRTC, encoders, and connectors |
* enumerated by the driver are added here, as are global properties. Some |
* global restrictions are also here, e.g. dimension restrictions. |
*/ |
struct drm_mode_config { |
struct mutex mutex; /* protects configuration (mode lists etc.) */ |
751,8 → 580,6 |
struct list_head connector_list; |
int num_encoder; |
struct list_head encoder_list; |
int num_plane; |
struct list_head plane_list; |
int num_crtc; |
struct list_head crtc_list; |
805,7 → 632,6 |
#define obj_to_fb(x) container_of(x, struct drm_framebuffer, base) |
#define obj_to_property(x) container_of(x, struct drm_property, base) |
#define obj_to_blob(x) container_of(x, struct drm_property_blob, base) |
#define obj_to_plane(x) container_of(x, struct drm_plane, base) |
extern void drm_crtc_init(struct drm_device *dev, |
825,14 → 651,6 |
const struct drm_encoder_funcs *funcs, |
int encoder_type); |
extern int drm_plane_init(struct drm_device *dev, |
struct drm_plane *plane, |
unsigned long possible_crtcs, |
const struct drm_plane_funcs *funcs, |
const uint32_t *formats, uint32_t format_count, |
bool priv); |
extern void drm_plane_cleanup(struct drm_plane *plane); |
extern void drm_encoder_cleanup(struct drm_encoder *encoder); |
extern char *drm_get_connector_name(struct drm_connector *connector); |
926,8 → 744,7 |
/* IOCTLs */ |
extern int drm_mode_getresources(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_getplane_res(struct drm_device *dev, void *data, |
struct drm_file *file_priv); |
extern int drm_mode_getcrtc(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_getconnector(struct drm_device *dev, |
934,17 → 751,10 |
void *data, struct drm_file *file_priv); |
extern int drm_mode_setcrtc(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_getplane(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_setplane(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_cursor_ioctl(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_addfb(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern int drm_mode_addfb2(struct drm_device *dev, |
void *data, struct drm_file *file_priv); |
extern uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth); |
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, |
/drivers/include/drm/drm_pciids.h |
---|
4,7 → 4,6 |
*/ |
#define radeon_PCI_IDS \ |
{0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
{0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
56,7 → 55,6 |
{0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
{0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
{0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \ |
{0x1002, 0x4C6E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \ |
{0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
{0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
{0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \ |
182,11 → 180,8 |
{0x1002, 0x6748, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6759, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x675B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x675D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x675F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6760, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6761, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
198,7 → 193,6 |
{0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
{0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
/drivers/include/drm/radeon_drm.h |
---|
550,7 → 550,6 |
#define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) |
#define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) |
#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) |
#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va) |
typedef struct drm_radeon_init { |
enum { |
873,40 → 872,9 |
uint64_t data_ptr; |
}; |
#define RADEON_VA_MAP 1 |
#define RADEON_VA_UNMAP 2 |
#define RADEON_VA_RESULT_OK 0 |
#define RADEON_VA_RESULT_ERROR 1 |
#define RADEON_VA_RESULT_VA_EXIST 2 |
#define RADEON_VM_PAGE_VALID (1 << 0) |
#define RADEON_VM_PAGE_READABLE (1 << 1) |
#define RADEON_VM_PAGE_WRITEABLE (1 << 2) |
#define RADEON_VM_PAGE_SYSTEM (1 << 3) |
#define RADEON_VM_PAGE_SNOOPED (1 << 4) |
struct drm_radeon_gem_va { |
uint32_t handle; |
uint32_t operation; |
uint32_t vm_id; |
uint32_t flags; |
uint64_t offset; |
}; |
#define RADEON_CHUNK_ID_RELOCS 0x01 |
#define RADEON_CHUNK_ID_IB 0x02 |
#define RADEON_CHUNK_ID_FLAGS 0x03 |
/* The first dword of RADEON_CHUNK_ID_FLAGS is a uint32 of these flags: */ |
#define RADEON_CS_KEEP_TILING_FLAGS 0x01 |
#define RADEON_CS_USE_VM 0x02 |
/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type */ |
#define RADEON_CS_RING_GFX 0 |
#define RADEON_CS_RING_COMPUTE 1 |
/* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */ |
/* 0 = normal, + = higher priority, - = lower priority */ |
struct drm_radeon_cs_chunk { |
uint32_t chunk_id; |
uint32_t length_dw; |
913,9 → 881,6 |
uint64_t chunk_data; |
}; |
/* drm_radeon_cs_reloc.flags */ |
#define RADEON_RELOC_DONT_SYNC 0x01 |
struct drm_radeon_cs_reloc { |
uint32_t handle; |
uint32_t read_domains; |
947,10 → 912,6 |
#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */ |
#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */ |
#define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */ |
/* virtual address start, va < start are reserved by the kernel */ |
#define RADEON_INFO_VA_START 0x0e |
/* maximum size of ib using the virtual memory cs */ |
#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f |
struct drm_radeon_info { |
uint32_t request; |
/drivers/include/drm/drm.h |
---|
702,9 → 702,6 |
#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) |
#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) |
#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) |
#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) |
#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) |
#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) |
*/ |
/drivers/include/drm/drm_crtc_helper.h |
---|
117,7 → 117,7 |
extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); |
extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, |
struct drm_mode_fb_cmd2 *mode_cmd); |
struct drm_mode_fb_cmd *mode_cmd); |
static inline void drm_crtc_helper_add(struct drm_crtc *crtc, |
const struct drm_crtc_helper_funcs *funcs) |
144,7 → 144,4 |
extern void drm_kms_helper_poll_disable(struct drm_device *dev); |
extern void drm_kms_helper_poll_enable(struct drm_device *dev); |
extern int drm_format_num_planes(uint32_t format); |
#endif |
/drivers/include/drm/drm_dp_helper.h |
---|
72,23 → 72,8 |
#define DP_MAIN_LINK_CHANNEL_CODING 0x006 |
#define DP_EDP_CONFIGURATION_CAP 0x00d |
#define DP_TRAINING_AUX_RD_INTERVAL 0x00e |
#define DP_PSR_SUPPORT 0x070 |
# define DP_PSR_IS_SUPPORTED 1 |
#define DP_PSR_CAPS 0x071 |
# define DP_PSR_NO_TRAIN_ON_EXIT 1 |
# define DP_PSR_SETUP_TIME_330 (0 << 1) |
# define DP_PSR_SETUP_TIME_275 (1 << 1) |
# define DP_PSR_SETUP_TIME_220 (2 << 1) |
# define DP_PSR_SETUP_TIME_165 (3 << 1) |
# define DP_PSR_SETUP_TIME_110 (4 << 1) |
# define DP_PSR_SETUP_TIME_55 (5 << 1) |
# define DP_PSR_SETUP_TIME_0 (6 << 1) |
# define DP_PSR_SETUP_TIME_MASK (7 << 1) |
# define DP_PSR_SETUP_TIME_SHIFT 1 |
/* link configuration */ |
#define DP_LINK_BW_SET 0x100 |
# define DP_LINK_BW_1_62 0x06 |
148,20 → 133,6 |
#define DP_MAIN_LINK_CHANNEL_CODING_SET 0x108 |
# define DP_SET_ANSI_8B10B (1 << 0) |
#define DP_PSR_EN_CFG 0x170 |
# define DP_PSR_ENABLE (1 << 0) |
# define DP_PSR_MAIN_LINK_ACTIVE (1 << 1) |
# define DP_PSR_CRC_VERIFICATION (1 << 2) |
# define DP_PSR_FRAME_CAPTURE (1 << 3) |
#define DP_DEVICE_SERVICE_IRQ_VECTOR 0x201 |
# define DP_REMOTE_CONTROL_COMMAND_PENDING (1 << 0) |
# define DP_AUTOMATED_TEST_REQUEST (1 << 1) |
# define DP_CP_IRQ (1 << 2) |
# define DP_SINK_SPECIFIC_IRQ (1 << 6) |
#define DP_EDP_CONFIGURATION_SET 0x10a |
#define DP_LANE0_1_STATUS 0x202 |
#define DP_LANE2_3_STATUS 0x203 |
# define DP_LANE_CR_DONE (1 << 0) |
194,45 → 165,10 |
# define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0 |
# define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6 |
#define DP_TEST_REQUEST 0x218 |
# define DP_TEST_LINK_TRAINING (1 << 0) |
# define DP_TEST_LINK_PATTERN (1 << 1) |
# define DP_TEST_LINK_EDID_READ (1 << 2) |
# define DP_TEST_LINK_PHY_TEST_PATTERN (1 << 3) /* DPCD >= 1.1 */ |
#define DP_TEST_LINK_RATE 0x219 |
# define DP_LINK_RATE_162 (0x6) |
# define DP_LINK_RATE_27 (0xa) |
#define DP_TEST_LANE_COUNT 0x220 |
#define DP_TEST_PATTERN 0x221 |
#define DP_TEST_RESPONSE 0x260 |
# define DP_TEST_ACK (1 << 0) |
# define DP_TEST_NAK (1 << 1) |
# define DP_TEST_EDID_CHECKSUM_WRITE (1 << 2) |
#define DP_SET_POWER 0x600 |
# define DP_SET_POWER_D0 0x1 |
# define DP_SET_POWER_D3 0x2 |
#define DP_PSR_ERROR_STATUS 0x2006 |
# define DP_PSR_LINK_CRC_ERROR (1 << 0) |
# define DP_PSR_RFB_STORAGE_ERROR (1 << 1) |
#define DP_PSR_ESI 0x2007 |
# define DP_PSR_CAPS_CHANGE (1 << 0) |
#define DP_PSR_STATUS 0x2008 |
# define DP_PSR_SINK_INACTIVE 0 |
# define DP_PSR_SINK_ACTIVE_SRC_SYNCED 1 |
# define DP_PSR_SINK_ACTIVE_RFB 2 |
# define DP_PSR_SINK_ACTIVE_SINK_SYNCED 3 |
# define DP_PSR_SINK_ACTIVE_RESYNC 4 |
# define DP_PSR_SINK_INTERNAL_ERROR 7 |
# define DP_PSR_SINK_STATE_MASK 0x07 |
#define MODE_I2C_START 1 |
#define MODE_I2C_WRITE 2 |
#define MODE_I2C_READ 4 |
/drivers/include/drm/drm_edid.h |
---|
230,13 → 230,4 |
#define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
struct drm_encoder; |
struct drm_connector; |
struct drm_display_mode; |
void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid); |
int drm_av_sync_delay(struct drm_connector *connector, |
struct drm_display_mode *mode); |
struct drm_connector *drm_select_eld(struct drm_encoder *encoder, |
struct drm_display_mode *mode); |
#endif /* __DRM_EDID_H__ */ |
/drivers/include/drm/drm_mode.h |
---|
120,49 → 120,11 |
struct drm_mode_modeinfo mode; |
}; |
#define DRM_MODE_PRESENT_TOP_FIELD (1<<0) |
#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) |
/* Planes blend with or override other bits on the CRTC */ |
struct drm_mode_set_plane { |
__u32 plane_id; |
__u32 crtc_id; |
__u32 fb_id; /* fb object contains surface format type */ |
__u32 flags; /* see above flags */ |
/* Signed dest location allows it to be partially off screen */ |
__s32 crtc_x, crtc_y; |
__u32 crtc_w, crtc_h; |
/* Source values are 16.16 fixed point */ |
__u32 src_x, src_y; |
__u32 src_h, src_w; |
}; |
struct drm_mode_get_plane { |
__u32 plane_id; |
__u32 crtc_id; |
__u32 fb_id; |
__u32 possible_crtcs; |
__u32 gamma_size; |
__u32 count_format_types; |
__u64 format_type_ptr; |
}; |
struct drm_mode_get_plane_res { |
__u64 plane_id_ptr; |
__u32 count_planes; |
}; |
#define DRM_MODE_ENCODER_NONE 0 |
#define DRM_MODE_ENCODER_DAC 1 |
#define DRM_MODE_ENCODER_TMDS 2 |
#define DRM_MODE_ENCODER_LVDS 3 |
#define DRM_MODE_ENCODER_TVDAC 4 |
#define DRM_MODE_ENCODER_VIRTUAL 5 |
struct drm_mode_get_encoder { |
__u32 encoder_id; |
200,7 → 162,6 |
#define DRM_MODE_CONNECTOR_HDMIB 12 |
#define DRM_MODE_CONNECTOR_TV 13 |
#define DRM_MODE_CONNECTOR_eDP 14 |
#define DRM_MODE_CONNECTOR_VIRTUAL 15 |
struct drm_mode_get_connector { |
268,39 → 229,10 |
__u32 handle; |
}; |
#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ |
struct drm_mode_fb_cmd2 { |
__u32 fb_id; |
__u32 width, height; |
__u32 pixel_format; /* fourcc code from drm_fourcc.h */ |
__u32 flags; /* see above flags */ |
/* |
* In case of planar formats, this ioctl allows up to 4 |
* buffer objects with offets and pitches per plane. |
* The pitch and offset order is dictated by the fourcc, |
* e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: |
* |
* YUV 4:2:0 image with a plane of 8 bit Y samples |
* followed by an interleaved U/V plane containing |
* 8 bit 2x2 subsampled colour difference samples. |
* |
* So it would consist of Y as offset[0] and UV as |
* offeset[1]. Note that offset[0] will generally |
* be 0. |
*/ |
__u32 handles[4]; |
__u32 pitches[4]; /* pitch for each plane */ |
__u32 offsets[4]; /* offset of each plane */ |
}; |
#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 |
#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 |
#define DRM_MODE_FB_DIRTY_FLAGS 0x03 |
#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 |
/* |
* Mark a region of a framebuffer as dirty. |
* |
/drivers/include/linux/wait.h |
---|
File deleted |
/drivers/include/linux/jiffies.h |
---|
File deleted |
/drivers/include/linux/pci.h |
---|
625,18 → 625,14 |
int enum_pci_devices(void); |
const struct pci_device_id* |
find_pci_device(pci_dev_t* pdev, const struct pci_device_id *idlist); |
struct pci_device_id* |
find_pci_device(pci_dev_t* pdev, struct pci_device_id *idlist); |
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); |
struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size); |
#define pci_name(x) "radeon" |
#endif //__PCI__H__ |
/drivers/include/linux/kernel.h |
---|
13,10 → 13,6 |
#include <linux/compiler.h> |
#include <linux/bitops.h> |
#include <linux/typecheck.h> |
#define __init |
#define USHRT_MAX ((u16)(~0U)) |
#define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
#define SHRT_MIN ((s16)(-SHRT_MAX - 1)) |
35,16 → 31,6 |
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
#define DIV_ROUND_CLOSEST(x, divisor)( \ |
{ \ |
typeof(divisor) __divisor = divisor; \ |
(((x) + ((__divisor) / 2)) / (__divisor)); \ |
} \ |
) |
/** |
* upper_32_bits - return bits 32-63 of a number |
* @n: the number we're accessing |
234,119 → 220,6 |
typecheck(unsigned long, b) && \ |
((long)(b) - (long)(a) < 0)) |
struct tvec_base; |
struct timer_list { |
struct list_head entry; |
unsigned long expires; |
void (*function)(unsigned long); |
unsigned long data; |
// struct tvec_base *base; |
}; |
struct timespec { |
long tv_sec; /* seconds */ |
long tv_nsec; /* nanoseconds */ |
}; |
#define build_mmio_read(name, size, type, reg, barrier) \ |
static inline type name(const volatile void __iomem *addr) \ |
{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
:"m" (*(volatile type __force *)addr) barrier); return ret; } |
#define build_mmio_write(name, size, type, reg, barrier) \ |
static inline void name(type val, volatile void __iomem *addr) \ |
{ asm volatile("mov" size " %0,%1": :reg (val), \ |
"m" (*(volatile type __force *)addr) barrier); } |
build_mmio_read(readb, "b", unsigned char, "=q", :"memory") |
build_mmio_read(readw, "w", unsigned short, "=r", :"memory") |
build_mmio_read(readl, "l", unsigned int, "=r", :"memory") |
build_mmio_read(__readb, "b", unsigned char, "=q", ) |
build_mmio_read(__readw, "w", unsigned short, "=r", ) |
build_mmio_read(__readl, "l", unsigned int, "=r", ) |
build_mmio_write(writeb, "b", unsigned char, "q", :"memory") |
build_mmio_write(writew, "w", unsigned short, "r", :"memory") |
build_mmio_write(writel, "l", unsigned int, "r", :"memory") |
build_mmio_write(__writeb, "b", unsigned char, "q", ) |
build_mmio_write(__writew, "w", unsigned short, "r", ) |
build_mmio_write(__writel, "l", unsigned int, "r", ) |
#define readb_relaxed(a) __readb(a) |
#define readw_relaxed(a) __readw(a) |
#define readl_relaxed(a) __readl(a) |
#define __raw_readb __readb |
#define __raw_readw __readw |
#define __raw_readl __readl |
#define __raw_writeb __writeb |
#define __raw_writew __writew |
#define __raw_writel __writel |
static inline __u64 readq(const volatile void __iomem *addr) |
{ |
const volatile u32 __iomem *p = addr; |
u32 low, high; |
low = readl(p); |
high = readl(p + 1); |
return low + ((u64)high << 32); |
} |
static inline void writeq(__u64 val, volatile void __iomem *addr) |
{ |
writel(val, addr); |
writel(val >> 32, addr+4); |
} |
#define mmiowb() barrier() |
#define dev_err(dev, format, arg...) \ |
printk("Error %s " format, __func__ , ## arg) |
#define dev_warn(dev, format, arg...) \ |
printk("Warning %s " format, __func__ , ## arg) |
#define dev_info(dev, format, arg...) \ |
printk("Info %s " format , __func__, ## arg) |
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
struct scatterlist { |
unsigned long page_link; |
unsigned int offset; |
unsigned int length; |
dma_addr_t dma_address; |
unsigned int dma_length; |
}; |
struct page |
{ |
unsigned int addr; |
}; |
struct vm_fault { |
unsigned int flags; /* FAULT_FLAG_xxx flags */ |
pgoff_t pgoff; /* Logical page offset based on vma */ |
void __user *virtual_address; /* Faulting virtual address */ |
struct page *page; /* ->fault handlers should return a |
* page here, unless VM_FAULT_NOPAGE |
* is set (which is also implied by |
* VM_FAULT_ERROR). |
*/ |
}; |
#endif |
/drivers/include/linux/bitmap.h |
---|
144,9 → 144,7 |
extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); |
extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); |
#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) |
#define BITMAP_LAST_WORD_MASK(nbits) \ |
( \ |
((nbits) % BITS_PER_LONG) ? \ |
/drivers/include/linux/i2c.h |
---|
280,6 → 280,9 |
/* Internal numbers to terminate lists */ |
#define I2C_CLIENT_END 0xfffeU |
/* The numbers to use to set I2C bus address */ |
#define ANY_I2C_BUS 0xffff |
/* Construct an I2C_CLIENT_END-terminated array of i2c addresses */ |
#define I2C_ADDRS(addr, addrs...) \ |
((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END }) |
286,7 → 289,6 |
#endif /* __KERNEL__ */ |
/** |
* struct i2c_msg - an I2C transaction segment beginning with START |
* @addr: Slave address, either seven or ten bits. When this is a ten |
/drivers/include/linux/lockdep.h |
---|
542,7 → 542,7 |
#endif |
#ifdef CONFIG_PROVE_RCU |
void lockdep_rcu_suspicious(const char *file, const int line, const char *s); |
extern void lockdep_rcu_dereference(const char *file, const int line); |
#endif |
#endif /* __LINUX_LOCKDEP_H */ |
/drivers/include/linux/pci_regs.h |
---|
663,26 → 663,6 |
#define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ |
#define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ |
/* Page Request Interface */ |
#define PCI_PRI_CAP 0x13 /* PRI capability ID */ |
#define PCI_PRI_CONTROL_OFF 0x04 /* Offset of control register */ |
#define PCI_PRI_STATUS_OFF 0x06 /* Offset of status register */ |
#define PCI_PRI_ENABLE 0x0001 /* Enable mask */ |
#define PCI_PRI_RESET 0x0002 /* Reset bit mask */ |
#define PCI_PRI_STATUS_RF 0x0001 /* Request Failure */ |
#define PCI_PRI_STATUS_UPRGI 0x0002 /* Unexpected PRG index */ |
#define PCI_PRI_STATUS_STOPPED 0x0100 /* PRI Stopped */ |
#define PCI_PRI_MAX_REQ_OFF 0x08 /* Cap offset for max reqs supported */ |
#define PCI_PRI_ALLOC_REQ_OFF 0x0c /* Cap offset for max reqs allowed */ |
/* PASID capability */ |
#define PCI_PASID_CAP 0x1b /* PASID capability ID */ |
#define PCI_PASID_CAP_OFF 0x04 /* PASID feature register */ |
#define PCI_PASID_CONTROL_OFF 0x06 /* PASID control register */ |
#define PCI_PASID_ENABLE 0x01 /* Enable/Supported bit */ |
#define PCI_PASID_EXEC 0x02 /* Exec permissions Enable/Supported */ |
#define PCI_PASID_PRIV 0x04 /* Priviledge Mode Enable/Support */ |
/* Single Root I/O Virtualization */ |
#define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ |
#define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ |
/drivers/include/linux/string.h |
---|
114,7 → 114,6 |
#ifndef __HAVE_ARCH_MEMCHR |
extern void * memchr(const void *,int,__kernel_size_t); |
#endif |
void *memchr_inv(const void *s, int c, size_t n); |
extern char *kstrdup(const char *s, gfp_t gfp); |
extern char *kstrndup(const char *s, size_t len, gfp_t gfp); |
/drivers/include/linux/types.h |
---|
246,7 → 246,7 |
typedef unsigned char u8_t; |
typedef unsigned short u16_t; |
typedef unsigned long u32_t; |
typedef unsigned int u32_t; |
typedef unsigned long long u64_t; |
typedef unsigned int addr_t; |
/drivers/include/linux/poison.h |
---|
40,12 → 40,6 |
#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ |
#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ |
#ifdef CONFIG_PHYS_ADDR_T_64BIT |
#define MEMBLOCK_INACTIVE 0x3a84fb0144c9e71bULL |
#else |
#define MEMBLOCK_INACTIVE 0x44c9e71bUL |
#endif |
#define SLUB_RED_INACTIVE 0xbb |
#define SLUB_RED_ACTIVE 0xcc |
/drivers/include/linux/ctype.h |
---|
52,13 → 52,4 |
#define tolower(c) __tolower(c) |
#define toupper(c) __toupper(c) |
/* |
* Fast implementation of tolower() for internal usage. Do not use in your |
* code. |
*/ |
static inline char _tolower(const char c) |
{ |
return c | 0x20; |
} |
#endif |
/drivers/include/linux/errno.h |
---|
111,6 → 111,4 |
#define ERFKILL 132 /* Operation not possible due to RF-kill */ |
#define ENOTSUPP 524 /* Operation is not supported */ |
#endif |
/drivers/include/ddk.h |
---|
10,7 → 10,7 |
#define OS_BASE 0x80000000 |
#define PG_SW 0x003 |
#define PG_NOCACHE 0x010 |
#define PG_NOCACHE 0x018 |
#define MANUAL_DESTROY 0x80000000 |