Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
84b1fd10
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
84b1fd10
编写于
7月 11, 2007
作者:
D
Dave Airlie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo. Signed-off-by:
N
Dave Airlie
<
airlied@linux.ie
>
上级
c60ce623
变更
42
隐藏空白更改
内联
并排
Showing
42 changed file
with
432 addition
and
432 deletion
+432
-432
drivers/char/drm/ati_pcigart.c
drivers/char/drm/ati_pcigart.c
+2
-2
drivers/char/drm/drmP.h
drivers/char/drm/drmP.h
+68
-68
drivers/char/drm/drm_agpsupport.c
drivers/char/drm/drm_agpsupport.c
+26
-26
drivers/char/drm/drm_auth.c
drivers/char/drm/drm_auth.c
+9
-9
drivers/char/drm/drm_bufs.c
drivers/char/drm/drm_bufs.c
+28
-28
drivers/char/drm/drm_context.c
drivers/char/drm/drm_context.c
+18
-18
drivers/char/drm/drm_dma.c
drivers/char/drm/drm_dma.c
+4
-4
drivers/char/drm/drm_drawable.c
drivers/char/drm/drm_drawable.c
+1
-1
drivers/char/drm/drm_drv.c
drivers/char/drm/drm_drv.c
+8
-8
drivers/char/drm/drm_fops.c
drivers/char/drm/drm_fops.c
+11
-11
drivers/char/drm/drm_ioctl.c
drivers/char/drm/drm_ioctl.c
+12
-12
drivers/char/drm/drm_irq.c
drivers/char/drm/drm_irq.c
+11
-11
drivers/char/drm/drm_lock.c
drivers/char/drm/drm_lock.c
+4
-4
drivers/char/drm/drm_memory.c
drivers/char/drm/drm_memory.c
+3
-3
drivers/char/drm/drm_os_linux.h
drivers/char/drm/drm_os_linux.h
+2
-2
drivers/char/drm/drm_pci.c
drivers/char/drm/drm_pci.c
+3
-3
drivers/char/drm/drm_proc.c
drivers/char/drm/drm_proc.c
+13
-13
drivers/char/drm/drm_scatter.c
drivers/char/drm/drm_scatter.c
+4
-4
drivers/char/drm/drm_stub.c
drivers/char/drm/drm_stub.c
+10
-10
drivers/char/drm/drm_sysfs.c
drivers/char/drm/drm_sysfs.c
+2
-2
drivers/char/drm/drm_vm.c
drivers/char/drm/drm_vm.c
+20
-20
drivers/char/drm/i915_dma.c
drivers/char/drm/i915_dma.c
+16
-16
drivers/char/drm/i915_drv.h
drivers/char/drm/i915_drv.h
+11
-11
drivers/char/drm/i915_irq.c
drivers/char/drm/i915_irq.c
+11
-11
drivers/char/drm/i915_mem.c
drivers/char/drm/i915_mem.c
+2
-2
drivers/char/drm/r300_cmdbuf.c
drivers/char/drm/r300_cmdbuf.c
+3
-3
drivers/char/drm/radeon_cp.c
drivers/char/drm/radeon_cp.c
+12
-12
drivers/char/drm/radeon_drv.h
drivers/char/drm/radeon_drv.h
+16
-16
drivers/char/drm/radeon_irq.c
drivers/char/drm/radeon_irq.c
+12
-12
drivers/char/drm/radeon_state.c
drivers/char/drm/radeon_state.c
+31
-31
drivers/char/drm/sis_drv.c
drivers/char/drm/sis_drv.c
+2
-2
drivers/char/drm/sis_drv.h
drivers/char/drm/sis_drv.h
+3
-3
drivers/char/drm/sis_mm.c
drivers/char/drm/sis_mm.c
+5
-5
drivers/char/drm/via_dma.c
drivers/char/drm/via_dma.c
+5
-5
drivers/char/drm/via_dmablit.c
drivers/char/drm/via_dmablit.c
+10
-10
drivers/char/drm/via_dmablit.h
drivers/char/drm/via_dmablit.h
+1
-1
drivers/char/drm/via_drv.h
drivers/char/drm/via_drv.h
+15
-15
drivers/char/drm/via_irq.c
drivers/char/drm/via_irq.c
+6
-6
drivers/char/drm/via_map.c
drivers/char/drm/via_map.c
+4
-4
drivers/char/drm/via_mm.c
drivers/char/drm/via_mm.c
+2
-2
drivers/char/drm/via_verifier.c
drivers/char/drm/via_verifier.c
+3
-3
drivers/char/drm/via_verifier.h
drivers/char/drm/via_verifier.h
+3
-3
未找到文件。
drivers/char/drm/ati_pcigart.c
浏览文件 @
84b1fd10
...
...
@@ -73,7 +73,7 @@ static void drm_ati_free_pcigart_table(void *address, int order)
free_pages
((
unsigned
long
)
address
,
order
);
}
int
drm_ati_pcigart_cleanup
(
drm_device_t
*
dev
,
drm_ati_pcigart_info
*
gart_info
)
int
drm_ati_pcigart_cleanup
(
struct
drm_device
*
dev
,
drm_ati_pcigart_info
*
gart_info
)
{
drm_sg_mem_t
*
entry
=
dev
->
sg
;
unsigned
long
pages
;
...
...
@@ -122,7 +122,7 @@ int drm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info)
}
EXPORT_SYMBOL
(
drm_ati_pcigart_cleanup
);
int
drm_ati_pcigart_init
(
drm_device_t
*
dev
,
drm_ati_pcigart_info
*
gart_info
)
int
drm_ati_pcigart_init
(
struct
drm_device
*
dev
,
drm_ati_pcigart_info
*
gart_info
)
{
drm_sg_mem_t
*
entry
=
dev
->
sg
;
void
*
address
=
NULL
;
...
...
drivers/char/drm/drmP.h
浏览文件 @
84b1fd10
...
...
@@ -366,7 +366,7 @@ typedef struct drm_buf_entry {
}
drm_buf_entry_t
;
/** File private data */
typedef
struct
drm_file
{
struct
drm_file
{
int
authenticated
;
int
master
;
int
minor
;
...
...
@@ -379,7 +379,7 @@ typedef struct drm_file {
int
remove_auth_on_close
;
unsigned
long
lock_count
;
void
*
driver_priv
;
}
drm_file_t
;
};
/** Wait queue */
typedef
struct
drm_queue
{
...
...
@@ -498,7 +498,7 @@ typedef struct drm_map drm_local_map_t;
typedef
struct
drm_ctx_list
{
struct
list_head
head
;
/**< list head */
drm_context_t
handle
;
/**< context handle */
drm_file_t
*
tag
;
/**< associated fd private data */
struct
drm_file
*
tag
;
/**< associated fd private data */
}
drm_ctx_list_t
;
typedef
struct
drm_vbl_sig
{
...
...
@@ -553,21 +553,21 @@ struct drm_device;
struct
drm_driver
{
int
(
*
load
)
(
struct
drm_device
*
,
unsigned
long
flags
);
int
(
*
firstopen
)
(
struct
drm_device
*
);
int
(
*
open
)
(
struct
drm_device
*
,
drm_file_t
*
);
int
(
*
open
)
(
struct
drm_device
*
,
struct
drm_file
*
);
void
(
*
preclose
)
(
struct
drm_device
*
,
struct
file
*
filp
);
void
(
*
postclose
)
(
struct
drm_device
*
,
drm_file_t
*
);
void
(
*
postclose
)
(
struct
drm_device
*
,
struct
drm_file
*
);
void
(
*
lastclose
)
(
struct
drm_device
*
);
int
(
*
unload
)
(
struct
drm_device
*
);
int
(
*
dma_ioctl
)
(
DRM_IOCTL_ARGS
);
void
(
*
dma_ready
)
(
struct
drm_device
*
);
int
(
*
dma_quiescent
)
(
struct
drm_device
*
);
int
(
*
context_ctor
)
(
struct
drm_device
*
dev
,
int
context
);
int
(
*
context_dtor
)
(
struct
drm_device
*
dev
,
int
context
);
int
(
*
kernel_context_switch
)
(
struct
drm_device
*
dev
,
int
old
,
int
(
*
context_ctor
)
(
struct
drm_device
*
dev
,
int
context
);
int
(
*
context_dtor
)
(
struct
drm_device
*
dev
,
int
context
);
int
(
*
kernel_context_switch
)
(
struct
drm_device
*
dev
,
int
old
,
int
new
);
void
(
*
kernel_context_switch_unlock
)
(
struct
drm_device
*
dev
);
int
(
*
vblank_wait
)
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
int
(
*
vblank_wait2
)
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
void
(
*
kernel_context_switch_unlock
)
(
struct
drm_device
*
dev
);
int
(
*
vblank_wait
)
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
int
(
*
vblank_wait2
)
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
int
(
*
dri_library_name
)
(
struct
drm_device
*
dev
,
char
*
buf
);
/**
...
...
@@ -581,22 +581,22 @@ struct drm_driver {
* card is absolutely \b not AGP (return of 0), absolutely \b is AGP
* (return of 1), or may or may not be AGP (return of 2).
*/
int
(
*
device_is_agp
)
(
struct
drm_device
*
dev
);
int
(
*
device_is_agp
)
(
struct
drm_device
*
dev
);
/* these have to be filled in */
irqreturn_t
(
*
irq_handler
)
(
DRM_IRQ_ARGS
);
void
(
*
irq_preinstall
)
(
struct
drm_device
*
dev
);
void
(
*
irq_postinstall
)
(
struct
drm_device
*
dev
);
void
(
*
irq_uninstall
)
(
struct
drm_device
*
dev
);
void
(
*
reclaim_buffers
)
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
void
(
*
irq_preinstall
)
(
struct
drm_device
*
dev
);
void
(
*
irq_postinstall
)
(
struct
drm_device
*
dev
);
void
(
*
irq_uninstall
)
(
struct
drm_device
*
dev
);
void
(
*
reclaim_buffers
)
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
void
(
*
reclaim_buffers_locked
)
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
void
(
*
reclaim_buffers_idlelocked
)
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
unsigned
long
(
*
get_map_ofs
)
(
struct
drm_map
*
map
);
unsigned
long
(
*
get_reg_ofs
)
(
struct
drm_device
*
dev
);
void
(
*
set_version
)
(
struct
drm_device
*
dev
,
unsigned
long
(
*
get_reg_ofs
)
(
struct
drm_device
*
dev
);
void
(
*
set_version
)
(
struct
drm_device
*
dev
,
struct
drm_set_version
*
sv
);
int
major
;
...
...
@@ -619,19 +619,19 @@ struct drm_driver {
* that may contain multiple heads. Embed one per head of these in the
* private drm_device structure.
*/
typedef
struct
drm_head
{
struct
drm_head
{
int
minor
;
/**< Minor device number */
struct
drm_device
*
dev
;
struct
proc_dir_entry
*
dev_root
;
/**< proc directory entry */
dev_t
device
;
/**< Device number for mknod */
struct
class_device
*
dev_class
;
}
drm_head_t
;
};
/**
* DRM device structure. This structure represent a complete card that
* may contain multiple heads.
*/
typedef
struct
drm_device
{
struct
drm_device
{
char
*
unique
;
/**< Unique identifier: e.g., busid */
int
unique_len
;
/**< Length of unique field */
char
*
devname
;
/**< For /proc/interrupts */
...
...
@@ -749,7 +749,7 @@ typedef struct drm_device {
struct
drm_driver
*
driver
;
drm_local_map_t
*
agp_buffer_map
;
unsigned
int
agp_buffer_token
;
drm_head_t
primary
;
/**< primary screen head */
struct
drm_head
primary
;
/**< primary screen head */
/** \name Drawable information */
/*@{ */
...
...
@@ -759,7 +759,7 @@ typedef struct drm_device {
unsigned
int
drw_info_length
;
struct
drm_drawable_info
**
drw_info
;
/*@} */
}
drm_device_t
;
};
static
__inline__
int
drm_core_check_feature
(
struct
drm_device
*
dev
,
int
feature
)
...
...
@@ -831,7 +831,7 @@ extern int drm_ioctl(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
long
drm_compat_ioctl
(
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_lastclose
(
drm_device_t
*
dev
);
extern
int
drm_lastclose
(
struct
drm_device
*
dev
);
/* Device support (drm_fops.h) */
extern
int
drm_open
(
struct
inode
*
inode
,
struct
file
*
filp
);
...
...
@@ -850,7 +850,7 @@ extern int drm_mem_info(char *buf, char **start, off_t offset,
int
request
,
int
*
eof
,
void
*
data
);
extern
void
*
drm_realloc
(
void
*
oldpt
,
size_t
oldsize
,
size_t
size
,
int
area
);
extern
DRM_AGP_MEM
*
drm_alloc_agp
(
drm_device_t
*
dev
,
int
pages
,
u32
type
);
extern
DRM_AGP_MEM
*
drm_alloc_agp
(
struct
drm_device
*
dev
,
int
pages
,
u32
type
);
extern
int
drm_free_agp
(
DRM_AGP_MEM
*
handle
,
int
pages
);
extern
int
drm_bind_agp
(
DRM_AGP_MEM
*
handle
,
unsigned
int
start
);
extern
int
drm_unbind_agp
(
DRM_AGP_MEM
*
handle
);
...
...
@@ -889,9 +889,9 @@ extern int drm_newctx(struct inode *inode, struct file *filp,
extern
int
drm_rmctx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_ctxbitmap_init
(
drm_device_t
*
dev
);
extern
void
drm_ctxbitmap_cleanup
(
drm_device_t
*
dev
);
extern
void
drm_ctxbitmap_free
(
drm_device_t
*
dev
,
int
ctx_handle
);
extern
int
drm_ctxbitmap_init
(
struct
drm_device
*
dev
);
extern
void
drm_ctxbitmap_cleanup
(
struct
drm_device
*
dev
);
extern
void
drm_ctxbitmap_free
(
struct
drm_device
*
dev
,
int
ctx_handle
);
extern
int
drm_setsareactx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
...
...
@@ -905,7 +905,7 @@ extern int drm_rmdraw(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_update_drawable_info
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
struct
drm_drawable_info
*
drm_get_drawable_info
(
drm_device_t
*
dev
,
extern
struct
drm_drawable_info
*
drm_get_drawable_info
(
struct
drm_device
*
dev
,
drm_drawable_t
id
);
/* Authentication IOCTL support (drm_auth.h) */
...
...
@@ -933,15 +933,15 @@ extern int drm_i_have_hw_lock(struct file *filp);
extern
int
drm_kernel_take_hw_lock
(
struct
file
*
filp
);
/* Buffer management support (drm_bufs.h) */
extern
int
drm_addbufs_agp
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
);
extern
int
drm_addbufs_pci
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
);
extern
int
drm_addmap
(
drm_device_t
*
dev
,
unsigned
int
offset
,
extern
int
drm_addbufs_agp
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
);
extern
int
drm_addbufs_pci
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
);
extern
int
drm_addmap
(
struct
drm_device
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
enum
drm_map_type
type
,
enum
drm_map_flags
flags
,
drm_local_map_t
**
map_ptr
);
extern
int
drm_addmap_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_rmmap
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
);
extern
int
drm_rmmap_locked
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
);
extern
int
drm_rmmap
(
struct
drm_device
*
dev
,
drm_local_map_t
*
map
);
extern
int
drm_rmmap_locked
(
struct
drm_device
*
dev
,
drm_local_map_t
*
map
);
extern
int
drm_rmmap_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
...
...
@@ -956,56 +956,56 @@ extern int drm_freebufs(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_mapbufs
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
unsigned
long
drm_get_resource_start
(
drm_device_t
*
dev
,
extern
unsigned
long
drm_get_resource_start
(
struct
drm_device
*
dev
,
unsigned
int
resource
);
extern
unsigned
long
drm_get_resource_len
(
drm_device_t
*
dev
,
extern
unsigned
long
drm_get_resource_len
(
struct
drm_device
*
dev
,
unsigned
int
resource
);
/* DMA support (drm_dma.h) */
extern
int
drm_dma_setup
(
drm_device_t
*
dev
);
extern
void
drm_dma_takedown
(
drm_device_t
*
dev
);
extern
void
drm_free_buffer
(
drm_device_t
*
dev
,
drm_buf_t
*
buf
);
extern
void
drm_core_reclaim_buffers
(
drm_device_t
*
dev
,
struct
file
*
filp
);
extern
int
drm_dma_setup
(
struct
drm_device
*
dev
);
extern
void
drm_dma_takedown
(
struct
drm_device
*
dev
);
extern
void
drm_free_buffer
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
);
extern
void
drm_core_reclaim_buffers
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
/* IRQ support (drm_irq.h) */
extern
int
drm_control
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
irqreturn_t
drm_irq_handler
(
DRM_IRQ_ARGS
);
extern
int
drm_irq_uninstall
(
drm_device_t
*
dev
);
extern
void
drm_driver_irq_preinstall
(
drm_device_t
*
dev
);
extern
void
drm_driver_irq_postinstall
(
drm_device_t
*
dev
);
extern
void
drm_driver_irq_uninstall
(
drm_device_t
*
dev
);
extern
int
drm_irq_uninstall
(
struct
drm_device
*
dev
);
extern
void
drm_driver_irq_preinstall
(
struct
drm_device
*
dev
);
extern
void
drm_driver_irq_postinstall
(
struct
drm_device
*
dev
);
extern
void
drm_driver_irq_uninstall
(
struct
drm_device
*
dev
);
extern
int
drm_wait_vblank
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
vbl_seq
);
extern
void
drm_vbl_send_signals
(
drm_device_t
*
dev
);
extern
void
drm_locked_tasklet
(
drm_device_t
*
dev
,
void
(
*
func
)(
drm_device_t
*
));
extern
int
drm_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
vbl_seq
);
extern
void
drm_vbl_send_signals
(
struct
drm_device
*
dev
);
extern
void
drm_locked_tasklet
(
struct
drm_device
*
dev
,
void
(
*
func
)(
struct
drm_device
*
));
/* AGP/GART support (drm_agpsupport.h) */
extern
drm_agp_head_t
*
drm_agp_init
(
drm_device_t
*
dev
);
extern
int
drm_agp_acquire
(
drm_device_t
*
dev
);
extern
drm_agp_head_t
*
drm_agp_init
(
struct
drm_device
*
dev
);
extern
int
drm_agp_acquire
(
struct
drm_device
*
dev
);
extern
int
drm_agp_acquire_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_release
(
drm_device_t
*
dev
);
extern
int
drm_agp_release
(
struct
drm_device
*
dev
);
extern
int
drm_agp_release_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_enable
(
drm_device_t
*
dev
,
struct
drm_agp_mode
mode
);
extern
int
drm_agp_enable
(
struct
drm_device
*
dev
,
struct
drm_agp_mode
mode
);
extern
int
drm_agp_enable_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_info
(
drm_device_t
*
dev
,
struct
drm_agp_info
*
info
);
extern
int
drm_agp_info
(
struct
drm_device
*
dev
,
struct
drm_agp_info
*
info
);
extern
int
drm_agp_info_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_alloc
(
drm_device_t
*
dev
,
struct
drm_agp_buffer
*
request
);
extern
int
drm_agp_alloc
(
struct
drm_device
*
dev
,
struct
drm_agp_buffer
*
request
);
extern
int
drm_agp_alloc_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_free
(
drm_device_t
*
dev
,
struct
drm_agp_buffer
*
request
);
extern
int
drm_agp_free
(
struct
drm_device
*
dev
,
struct
drm_agp_buffer
*
request
);
extern
int
drm_agp_free_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_unbind
(
drm_device_t
*
dev
,
struct
drm_agp_binding
*
request
);
extern
int
drm_agp_unbind
(
struct
drm_device
*
dev
,
struct
drm_agp_binding
*
request
);
extern
int
drm_agp_unbind_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
int
drm_agp_bind
(
drm_device_t
*
dev
,
struct
drm_agp_binding
*
request
);
extern
int
drm_agp_bind
(
struct
drm_device
*
dev
,
struct
drm_agp_binding
*
request
);
extern
int
drm_agp_bind_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
extern
DRM_AGP_MEM
*
drm_agp_allocate_memory
(
struct
agp_bridge_data
*
bridge
,
...
...
@@ -1017,18 +1017,18 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
/* Stub support (drm_stub.h) */
extern
int
drm_get_dev
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
,
struct
drm_driver
*
driver
);
extern
int
drm_put_dev
(
drm_device_t
*
dev
);
extern
int
drm_put_head
(
drm_head_t
*
head
);
extern
int
drm_put_dev
(
struct
drm_device
*
dev
);
extern
int
drm_put_head
(
struct
drm_head
*
head
);
extern
unsigned
int
drm_debug
;
extern
unsigned
int
drm_cards_limit
;
extern
drm_head_t
**
drm_heads
;
extern
struct
drm_head
**
drm_heads
;
extern
struct
class
*
drm_class
;
extern
struct
proc_dir_entry
*
drm_proc_root
;
extern
drm_local_map_t
*
drm_getsarea
(
struct
drm_device
*
dev
);
/* Proc support (drm_proc.h) */
extern
int
drm_proc_init
(
drm_device_t
*
dev
,
extern
int
drm_proc_init
(
struct
drm_device
*
dev
,
int
minor
,
struct
proc_dir_entry
*
root
,
struct
proc_dir_entry
**
dev_root
);
...
...
@@ -1044,21 +1044,21 @@ extern int drm_sg_free(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
);
/* ATI PCIGART support (ati_pcigart.h) */
extern
int
drm_ati_pcigart_init
(
drm_device_t
*
dev
,
extern
int
drm_ati_pcigart_init
(
struct
drm_device
*
dev
,
drm_ati_pcigart_info
*
gart_info
);
extern
int
drm_ati_pcigart_cleanup
(
drm_device_t
*
dev
,
extern
int
drm_ati_pcigart_cleanup
(
struct
drm_device
*
dev
,
drm_ati_pcigart_info
*
gart_info
);
extern
drm_dma_handle_t
*
drm_pci_alloc
(
drm_device_t
*
dev
,
size_t
size
,
extern
drm_dma_handle_t
*
drm_pci_alloc
(
struct
drm_device
*
dev
,
size_t
size
,
size_t
align
,
dma_addr_t
maxaddr
);
extern
void
__drm_pci_free
(
drm_device_t
*
dev
,
drm_dma_handle_t
*
dmah
);
extern
void
drm_pci_free
(
drm_device_t
*
dev
,
drm_dma_handle_t
*
dmah
);
extern
void
__drm_pci_free
(
struct
drm_device
*
dev
,
drm_dma_handle_t
*
dmah
);
extern
void
drm_pci_free
(
struct
drm_device
*
dev
,
drm_dma_handle_t
*
dmah
);
/* sysfs support (drm_sysfs.c) */
extern
struct
class
*
drm_sysfs_create
(
struct
module
*
owner
,
char
*
name
);
extern
void
drm_sysfs_destroy
(
struct
class
*
cs
);
extern
struct
class_device
*
drm_sysfs_device_add
(
struct
class
*
cs
,
drm_head_t
*
head
);
struct
drm_head
*
head
);
extern
void
drm_sysfs_device_remove
(
struct
class_device
*
class_dev
);
/*
...
...
@@ -1090,7 +1090,7 @@ static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev,
return
NULL
;
}
static
__inline__
int
drm_device_is_agp
(
drm_device_t
*
dev
)
static
__inline__
int
drm_device_is_agp
(
struct
drm_device
*
dev
)
{
if
(
dev
->
driver
->
device_is_agp
!=
NULL
)
{
int
err
=
(
*
dev
->
driver
->
device_is_agp
)
(
dev
);
...
...
@@ -1103,7 +1103,7 @@ static __inline__ int drm_device_is_agp(drm_device_t * dev)
return
pci_find_capability
(
dev
->
pdev
,
PCI_CAP_ID_AGP
);
}
static
__inline__
int
drm_device_is_pcie
(
drm_device_t
*
dev
)
static
__inline__
int
drm_device_is_pcie
(
struct
drm_device
*
dev
)
{
return
pci_find_capability
(
dev
->
pdev
,
PCI_CAP_ID_EXP
);
}
...
...
drivers/char/drm/drm_agpsupport.c
浏览文件 @
84b1fd10
...
...
@@ -48,7 +48,7 @@
* Verifies the AGP device has been initialized and acquired and fills in the
* drm_agp_info structure with the information in drm_agp_head::agp_info.
*/
int
drm_agp_info
(
drm_device_t
*
dev
,
struct
drm_agp_info
*
info
)
int
drm_agp_info
(
struct
drm_device
*
dev
,
struct
drm_agp_info
*
info
)
{
DRM_AGP_KERN
*
kern
;
...
...
@@ -74,8 +74,8 @@ EXPORT_SYMBOL(drm_agp_info);
int
drm_agp_info_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_info
info
;
int
err
;
...
...
@@ -97,7 +97,7 @@ int drm_agp_info_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device hasn't been acquired before and calls
* \c agp_backend_acquire.
*/
int
drm_agp_acquire
(
drm_device_t
*
dev
)
int
drm_agp_acquire
(
struct
drm_device
*
dev
)
{
if
(
!
dev
->
agp
)
return
-
ENODEV
;
...
...
@@ -126,9 +126,9 @@ EXPORT_SYMBOL(drm_agp_acquire);
int
drm_agp_acquire_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
struct
drm_file
*
priv
=
filp
->
private_data
;
return
drm_agp_acquire
((
drm_device_t
*
)
priv
->
head
->
dev
);
return
drm_agp_acquire
((
struct
drm_device
*
)
priv
->
head
->
dev
);
}
/**
...
...
@@ -139,7 +139,7 @@ int drm_agp_acquire_ioctl(struct inode *inode, struct file *filp,
*
* Verifies the AGP device has been acquired and calls \c agp_backend_release.
*/
int
drm_agp_release
(
drm_device_t
*
dev
)
int
drm_agp_release
(
struct
drm_device
*
dev
)
{
if
(
!
dev
->
agp
||
!
dev
->
agp
->
acquired
)
return
-
EINVAL
;
...
...
@@ -152,8 +152,8 @@ EXPORT_SYMBOL(drm_agp_release);
int
drm_agp_release_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
return
drm_agp_release
(
dev
);
}
...
...
@@ -168,7 +168,7 @@ int drm_agp_release_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device has been acquired but not enabled, and calls
* \c agp_enable.
*/
int
drm_agp_enable
(
drm_device_t
*
dev
,
struct
drm_agp_mode
mode
)
int
drm_agp_enable
(
struct
drm_device
*
dev
,
struct
drm_agp_mode
mode
)
{
if
(
!
dev
->
agp
||
!
dev
->
agp
->
acquired
)
return
-
EINVAL
;
...
...
@@ -185,8 +185,8 @@ EXPORT_SYMBOL(drm_agp_enable);
int
drm_agp_enable_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_mode
mode
;
if
(
copy_from_user
(
&
mode
,
(
struct
drm_agp_mode
__user
*
)
arg
,
sizeof
(
mode
)))
...
...
@@ -207,7 +207,7 @@ int drm_agp_enable_ioctl(struct inode *inode, struct file *filp,
* Verifies the AGP device is present and has been acquired, allocates the
* memory via alloc_agp() and creates a drm_agp_mem entry for it.
*/
int
drm_agp_alloc
(
drm_device_t
*
dev
,
struct
drm_agp_buffer
*
request
)
int
drm_agp_alloc
(
struct
drm_device
*
dev
,
struct
drm_agp_buffer
*
request
)
{
drm_agp_mem_t
*
entry
;
DRM_AGP_MEM
*
memory
;
...
...
@@ -244,8 +244,8 @@ EXPORT_SYMBOL(drm_agp_alloc);
int
drm_agp_alloc_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_buffer
request
;
struct
drm_agp_buffer
__user
*
argp
=
(
void
__user
*
)
arg
;
int
err
;
...
...
@@ -281,7 +281,7 @@ int drm_agp_alloc_ioctl(struct inode *inode, struct file *filp,
*
* Walks through drm_agp_head::memory until finding a matching handle.
*/
static
drm_agp_mem_t
*
drm_agp_lookup_entry
(
drm_device_t
*
dev
,
static
drm_agp_mem_t
*
drm_agp_lookup_entry
(
struct
drm_device
*
dev
,
unsigned
long
handle
)
{
drm_agp_mem_t
*
entry
;
...
...
@@ -305,7 +305,7 @@ static drm_agp_mem_t *drm_agp_lookup_entry(drm_device_t * dev,
* Verifies the AGP device is present and acquired, looks-up the AGP memory
* entry and passes it to the unbind_agp() function.
*/
int
drm_agp_unbind
(
drm_device_t
*
dev
,
struct
drm_agp_binding
*
request
)
int
drm_agp_unbind
(
struct
drm_device
*
dev
,
struct
drm_agp_binding
*
request
)
{
drm_agp_mem_t
*
entry
;
int
ret
;
...
...
@@ -326,8 +326,8 @@ EXPORT_SYMBOL(drm_agp_unbind);
int
drm_agp_unbind_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_binding
request
;
if
(
copy_from_user
...
...
@@ -350,7 +350,7 @@ int drm_agp_unbind_ioctl(struct inode *inode, struct file *filp,
* is currently bound into the GATT. Looks-up the AGP memory entry and passes
* it to bind_agp() function.
*/
int
drm_agp_bind
(
drm_device_t
*
dev
,
struct
drm_agp_binding
*
request
)
int
drm_agp_bind
(
struct
drm_device
*
dev
,
struct
drm_agp_binding
*
request
)
{
drm_agp_mem_t
*
entry
;
int
retcode
;
...
...
@@ -375,8 +375,8 @@ EXPORT_SYMBOL(drm_agp_bind);
int
drm_agp_bind_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_binding
request
;
if
(
copy_from_user
...
...
@@ -400,7 +400,7 @@ int drm_agp_bind_ioctl(struct inode *inode, struct file *filp,
* unbind_agp(). Frees it via free_agp() as well as the entry itself
* and unlinks from the doubly linked list it's inserted in.
*/
int
drm_agp_free
(
drm_device_t
*
dev
,
struct
drm_agp_buffer
*
request
)
int
drm_agp_free
(
struct
drm_device
*
dev
,
struct
drm_agp_buffer
*
request
)
{
drm_agp_mem_t
*
entry
;
...
...
@@ -422,8 +422,8 @@ EXPORT_SYMBOL(drm_agp_free);
int
drm_agp_free_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_agp_buffer
request
;
if
(
copy_from_user
...
...
@@ -442,7 +442,7 @@ int drm_agp_free_ioctl(struct inode *inode, struct file *filp,
* via the inter_module_* functions. Creates and initializes a drm_agp_head
* structure.
*/
drm_agp_head_t
*
drm_agp_init
(
drm_device_t
*
dev
)
drm_agp_head_t
*
drm_agp_init
(
struct
drm_device
*
dev
)
{
drm_agp_head_t
*
head
=
NULL
;
...
...
drivers/char/drm/drm_auth.c
浏览文件 @
84b1fd10
...
...
@@ -45,9 +45,9 @@
* the one with matching magic number, while holding the drm_device::struct_mutex
* lock.
*/
static
drm_file_t
*
drm_find_file
(
drm_device_t
*
dev
,
drm_magic_t
magic
)
static
struct
drm_file
*
drm_find_file
(
struct
drm_device
*
dev
,
drm_magic_t
magic
)
{
drm_file_t
*
retval
=
NULL
;
struct
drm_file
*
retval
=
NULL
;
drm_magic_entry_t
*
pt
;
drm_hash_item_t
*
hash
;
...
...
@@ -71,7 +71,7 @@ static drm_file_t *drm_find_file(drm_device_t * dev, drm_magic_t magic)
* associated the magic number hash key in drm_device::magiclist, while holding
* the drm_device::struct_mutex lock.
*/
static
int
drm_add_magic
(
drm_device_t
*
dev
,
drm_file_t
*
priv
,
static
int
drm_add_magic
(
struct
drm_device
*
dev
,
struct
drm_file
*
priv
,
drm_magic_t
magic
)
{
drm_magic_entry_t
*
entry
;
...
...
@@ -102,7 +102,7 @@ static int drm_add_magic(drm_device_t * dev, drm_file_t * priv,
* Searches and unlinks the entry in drm_device::magiclist with the magic
* number hash key, while holding the drm_device::struct_mutex lock.
*/
static
int
drm_remove_magic
(
drm_device_t
*
dev
,
drm_magic_t
magic
)
static
int
drm_remove_magic
(
struct
drm_device
*
dev
,
drm_magic_t
magic
)
{
drm_magic_entry_t
*
pt
;
drm_hash_item_t
*
hash
;
...
...
@@ -142,8 +142,8 @@ int drm_getmagic(struct inode *inode, struct file *filp,
{
static
drm_magic_t
sequence
=
0
;
static
DEFINE_SPINLOCK
(
lock
);
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_auth
auth
;
/* Find unique magic */
...
...
@@ -181,10 +181,10 @@ int drm_getmagic(struct inode *inode, struct file *filp,
int
drm_authmagic
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_auth
auth
;
drm_file_t
*
file
;
struct
drm_file
*
file
;
if
(
copy_from_user
(
&
auth
,
(
struct
drm_auth
__user
*
)
arg
,
sizeof
(
auth
)))
return
-
EFAULT
;
...
...
drivers/char/drm/drm_bufs.c
浏览文件 @
84b1fd10
...
...
@@ -36,20 +36,20 @@
#include <linux/vmalloc.h>
#include "drmP.h"
unsigned
long
drm_get_resource_start
(
drm_device_t
*
dev
,
unsigned
int
resource
)
unsigned
long
drm_get_resource_start
(
struct
drm_device
*
dev
,
unsigned
int
resource
)
{
return
pci_resource_start
(
dev
->
pdev
,
resource
);
}
EXPORT_SYMBOL
(
drm_get_resource_start
);
unsigned
long
drm_get_resource_len
(
drm_device_t
*
dev
,
unsigned
int
resource
)
unsigned
long
drm_get_resource_len
(
struct
drm_device
*
dev
,
unsigned
int
resource
)
{
return
pci_resource_len
(
dev
->
pdev
,
resource
);
}
EXPORT_SYMBOL
(
drm_get_resource_len
);
static
drm_map_list_t
*
drm_find_matching_map
(
drm_device_t
*
dev
,
static
drm_map_list_t
*
drm_find_matching_map
(
struct
drm_device
*
dev
,
drm_local_map_t
*
map
)
{
drm_map_list_t
*
entry
;
...
...
@@ -64,7 +64,7 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev,
return
NULL
;
}
static
int
drm_map_handle
(
drm_device_t
*
dev
,
drm_hash_item_t
*
hash
,
static
int
drm_map_handle
(
struct
drm_device
*
dev
,
drm_hash_item_t
*
hash
,
unsigned
long
user_token
,
int
hashed_handle
)
{
int
use_hashed_handle
;
...
...
@@ -101,7 +101,7 @@ static int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
* type. Adds the map to the map list drm_device::maplist. Adds MTRR's where
* applicable and if supported by the kernel.
*/
static
int
drm_addmap_core
(
drm_device_t
*
dev
,
unsigned
int
offset
,
static
int
drm_addmap_core
(
struct
drm_device
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
enum
drm_map_type
type
,
enum
drm_map_flags
flags
,
drm_map_list_t
**
maplist
)
{
...
...
@@ -310,7 +310,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
return
0
;
}
int
drm_addmap
(
drm_device_t
*
dev
,
unsigned
int
offset
,
int
drm_addmap
(
struct
drm_device
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
enum
drm_map_type
type
,
enum
drm_map_flags
flags
,
drm_local_map_t
**
map_ptr
)
{
...
...
@@ -328,8 +328,8 @@ EXPORT_SYMBOL(drm_addmap);
int
drm_addmap_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_map
map
;
drm_map_list_t
*
maplist
;
struct
drm_map
__user
*
argp
=
(
void
__user
*
)
arg
;
...
...
@@ -376,7 +376,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
*
* \sa drm_addmap
*/
int
drm_rmmap_locked
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
)
int
drm_rmmap_locked
(
struct
drm_device
*
dev
,
drm_local_map_t
*
map
)
{
drm_map_list_t
*
r_list
=
NULL
,
*
list_t
;
drm_dma_handle_t
dmah
;
...
...
@@ -426,7 +426,7 @@ int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map)
return
0
;
}
int
drm_rmmap
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
)
int
drm_rmmap
(
struct
drm_device
*
dev
,
drm_local_map_t
*
map
)
{
int
ret
;
...
...
@@ -449,8 +449,8 @@ int drm_rmmap(drm_device_t *dev, drm_local_map_t *map)
int
drm_rmmap_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_map
request
;
drm_local_map_t
*
map
=
NULL
;
drm_map_list_t
*
r_list
;
...
...
@@ -504,7 +504,7 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
*
* Frees any pages and buffers associated with the given entry.
*/
static
void
drm_cleanup_buf_error
(
drm_device_t
*
dev
,
drm_buf_entry_t
*
entry
)
static
void
drm_cleanup_buf_error
(
struct
drm_device
*
dev
,
drm_buf_entry_t
*
entry
)
{
int
i
;
...
...
@@ -541,7 +541,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry)
/**
* Add AGP buffers for DMA transfers.
*
* \param dev
drm_device_t
to which the buffers are to be added.
* \param dev
struct drm_device
to which the buffers are to be added.
* \param request pointer to a struct drm_buf_desc describing the request.
* \return zero on success or a negative number on failure.
*
...
...
@@ -549,7 +549,7 @@ static void drm_cleanup_buf_error(drm_device_t * dev, drm_buf_entry_t * entry)
* reallocates the buffer list of the same size order to accommodate the new
* buffers.
*/
int
drm_addbufs_agp
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
)
int
drm_addbufs_agp
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_entry_t
*
entry
;
...
...
@@ -719,7 +719,7 @@ int drm_addbufs_agp(drm_device_t * dev, struct drm_buf_desc * request)
EXPORT_SYMBOL
(
drm_addbufs_agp
);
#endif
/* __OS_HAS_AGP */
int
drm_addbufs_pci
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
)
int
drm_addbufs_pci
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
int
count
;
...
...
@@ -945,7 +945,7 @@ int drm_addbufs_pci(drm_device_t * dev, struct drm_buf_desc * request)
}
EXPORT_SYMBOL
(
drm_addbufs_pci
);
static
int
drm_addbufs_sg
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
)
static
int
drm_addbufs_sg
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_entry_t
*
entry
;
...
...
@@ -1107,7 +1107,7 @@ static int drm_addbufs_sg(drm_device_t * dev, struct drm_buf_desc * request)
return
0
;
}
static
int
drm_addbufs_fb
(
drm_device_t
*
dev
,
struct
drm_buf_desc
*
request
)
static
int
drm_addbufs_fb
(
struct
drm_device
*
dev
,
struct
drm_buf_desc
*
request
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_entry_t
*
entry
;
...
...
@@ -1286,8 +1286,8 @@ int drm_addbufs(struct inode *inode, struct file *filp,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
drm_buf_desc
request
;
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
int
ret
;
if
(
!
drm_core_check_feature
(
dev
,
DRIVER_HAVE_DMA
))
...
...
@@ -1337,8 +1337,8 @@ int drm_addbufs(struct inode *inode, struct file *filp,
int
drm_infobufs
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
struct
drm_buf_info
request
;
struct
drm_buf_info
__user
*
argp
=
(
void
__user
*
)
arg
;
...
...
@@ -1425,8 +1425,8 @@ int drm_infobufs(struct inode *inode, struct file *filp,
int
drm_markbufs
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
struct
drm_buf_desc
request
;
int
order
;
...
...
@@ -1475,8 +1475,8 @@ int drm_markbufs(struct inode *inode, struct file *filp,
int
drm_freebufs
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
struct
drm_buf_free
request
;
int
i
;
...
...
@@ -1531,8 +1531,8 @@ int drm_freebufs(struct inode *inode, struct file *filp,
int
drm_mapbufs
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
struct
drm_buf_map
__user
*
argp
=
(
void
__user
*
)
arg
;
int
retcode
=
0
;
...
...
drivers/char/drm/drm_context.c
浏览文件 @
84b1fd10
...
...
@@ -56,7 +56,7 @@
* in drm_device::context_sareas, while holding the drm_device::struct_mutex
* lock.
*/
void
drm_ctxbitmap_free
(
drm_device_t
*
dev
,
int
ctx_handle
)
void
drm_ctxbitmap_free
(
struct
drm_device
*
dev
,
int
ctx_handle
)
{
if
(
ctx_handle
<
0
)
goto
failed
;
...
...
@@ -85,7 +85,7 @@ void drm_ctxbitmap_free(drm_device_t * dev, int ctx_handle)
* drm_device::context_sareas to accommodate the new entry while holding the
* drm_device::struct_mutex lock.
*/
static
int
drm_ctxbitmap_next
(
drm_device_t
*
dev
)
static
int
drm_ctxbitmap_next
(
struct
drm_device
*
dev
)
{
int
bit
;
...
...
@@ -147,7 +147,7 @@ static int drm_ctxbitmap_next(drm_device_t * dev)
* Allocates and initialize drm_device::ctx_bitmap and drm_device::context_sareas, while holding
* the drm_device::struct_mutex lock.
*/
int
drm_ctxbitmap_init
(
drm_device_t
*
dev
)
int
drm_ctxbitmap_init
(
struct
drm_device
*
dev
)
{
int
i
;
int
temp
;
...
...
@@ -180,7 +180,7 @@ int drm_ctxbitmap_init(drm_device_t * dev)
* Frees drm_device::ctx_bitmap and drm_device::context_sareas, while holding
* the drm_device::struct_mutex lock.
*/
void
drm_ctxbitmap_cleanup
(
drm_device_t
*
dev
)
void
drm_ctxbitmap_cleanup
(
struct
drm_device
*
dev
)
{
mutex_lock
(
&
dev
->
struct_mutex
);
if
(
dev
->
context_sareas
)
...
...
@@ -212,8 +212,8 @@ void drm_ctxbitmap_cleanup(drm_device_t * dev)
int
drm_getsareactx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_ctx_priv_map
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_ctx_priv_map
request
;
struct
drm_map
*
map
;
...
...
@@ -263,8 +263,8 @@ int drm_getsareactx(struct inode *inode, struct file *filp,
int
drm_setsareactx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_ctx_priv_map
request
;
struct
drm_map
*
map
=
NULL
;
drm_map_list_t
*
r_list
=
NULL
;
...
...
@@ -313,7 +313,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
*
* Attempt to set drm_device::context_flag.
*/
static
int
drm_context_switch
(
drm_device_t
*
dev
,
int
old
,
int
new
)
static
int
drm_context_switch
(
struct
drm_device
*
dev
,
int
old
,
int
new
)
{
if
(
test_and_set_bit
(
0
,
&
dev
->
context_flag
))
{
DRM_ERROR
(
"Reentering -- FIXME
\n
"
);
...
...
@@ -341,7 +341,7 @@ static int drm_context_switch(drm_device_t * dev, int old, int new)
* hardware lock is held, clears the drm_device::context_flag and wakes up
* drm_device::context_wait.
*/
static
int
drm_context_switch_complete
(
drm_device_t
*
dev
,
int
new
)
static
int
drm_context_switch_complete
(
struct
drm_device
*
dev
,
int
new
)
{
dev
->
last_context
=
new
;
/* PRE/POST: This is the _only_ writer. */
dev
->
last_switch
=
jiffies
;
...
...
@@ -408,8 +408,8 @@ int drm_resctx(struct inode *inode, struct file *filp,
int
drm_addctx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_ctx_list_t
*
ctx_entry
;
struct
drm_ctx
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_ctx
ctx
;
...
...
@@ -504,8 +504,8 @@ int drm_getctx(struct inode *inode, struct file *filp,
int
drm_switchctx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_ctx
ctx
;
if
(
copy_from_user
(
&
ctx
,
(
struct
drm_ctx
__user
*
)
arg
,
sizeof
(
ctx
)))
...
...
@@ -529,8 +529,8 @@ int drm_switchctx(struct inode *inode, struct file *filp,
int
drm_newctx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_ctx
ctx
;
if
(
copy_from_user
(
&
ctx
,
(
struct
drm_ctx
__user
*
)
arg
,
sizeof
(
ctx
)))
...
...
@@ -556,8 +556,8 @@ int drm_newctx(struct inode *inode, struct file *filp,
int
drm_rmctx
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_ctx
ctx
;
if
(
copy_from_user
(
&
ctx
,
(
struct
drm_ctx
__user
*
)
arg
,
sizeof
(
ctx
)))
...
...
drivers/char/drm/drm_dma.c
浏览文件 @
84b1fd10
...
...
@@ -43,7 +43,7 @@
*
* Allocate and initialize a drm_device_dma structure.
*/
int
drm_dma_setup
(
drm_device_t
*
dev
)
int
drm_dma_setup
(
struct
drm_device
*
dev
)
{
int
i
;
...
...
@@ -67,7 +67,7 @@ int drm_dma_setup(drm_device_t * dev)
* Free all pages associated with DMA buffers, the buffers and pages lists, and
* finally the drm_device::dma structure itself.
*/
void
drm_dma_takedown
(
drm_device_t
*
dev
)
void
drm_dma_takedown
(
struct
drm_device
*
dev
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
int
i
,
j
;
...
...
@@ -129,7 +129,7 @@ void drm_dma_takedown(drm_device_t * dev)
*
* Resets the fields of \p buf.
*/
void
drm_free_buffer
(
drm_device_t
*
dev
,
drm_buf_t
*
buf
)
void
drm_free_buffer
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
)
{
if
(
!
buf
)
return
;
...
...
@@ -152,7 +152,7 @@ void drm_free_buffer(drm_device_t * dev, drm_buf_t * buf)
*
* Frees each buffer associated with \p filp not already on the hardware.
*/
void
drm_core_reclaim_buffers
(
drm_device_t
*
dev
,
struct
file
*
filp
)
void
drm_core_reclaim_buffers
(
struct
drm_device
*
dev
,
struct
file
*
filp
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
int
i
;
...
...
drivers/char/drm/drm_drawable.c
浏览文件 @
84b1fd10
...
...
@@ -322,7 +322,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) {
/**
* Caller must hold the drawable spinlock!
*/
struct
drm_drawable_info
*
drm_get_drawable_info
(
drm_device_t
*
dev
,
drm_drawable_t
id
)
{
struct
drm_drawable_info
*
drm_get_drawable_info
(
struct
drm_device
*
dev
,
drm_drawable_t
id
)
{
u32
*
bitfield
=
dev
->
drw_bitfield
;
unsigned
int
idx
,
shift
;
...
...
drivers/char/drm/drm_drv.c
浏览文件 @
84b1fd10
...
...
@@ -129,7 +129,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
*
* \sa drm_device
*/
int
drm_lastclose
(
drm_device_t
*
dev
)
int
drm_lastclose
(
struct
drm_device
*
dev
)
{
drm_magic_entry_t
*
pt
,
*
next
;
drm_map_list_t
*
r_list
,
*
list_t
;
...
...
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(drm_init);
*
* \sa drm_init
*/
static
void
drm_cleanup
(
drm_device_t
*
dev
)
static
void
drm_cleanup
(
struct
drm_device
*
dev
)
{
DRM_DEBUG
(
"
\n
"
);
...
...
@@ -330,8 +330,8 @@ static void drm_cleanup(drm_device_t * dev)
void
drm_exit
(
struct
drm_driver
*
driver
)
{
int
i
;
drm_device_t
*
dev
=
NULL
;
drm_head_t
*
head
;
struct
drm_device
*
dev
=
NULL
;
struct
drm_head
*
head
;
DRM_DEBUG
(
"
\n
"
);
...
...
@@ -430,8 +430,8 @@ module_exit(drm_core_exit);
static
int
drm_version
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_version
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_version
version
;
int
len
;
...
...
@@ -466,8 +466,8 @@ static int drm_version(struct inode *inode, struct file *filp,
int
drm_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_ioctl_desc_t
*
ioctl
;
drm_ioctl_t
*
func
;
unsigned
int
nr
=
DRM_IOCTL_NR
(
cmd
);
...
...
drivers/char/drm/drm_fops.c
浏览文件 @
84b1fd10
...
...
@@ -39,9 +39,9 @@
#include <linux/poll.h>
static
int
drm_open_helper
(
struct
inode
*
inode
,
struct
file
*
filp
,
drm_device_t
*
dev
);
struct
drm_device
*
dev
);
static
int
drm_setup
(
drm_device_t
*
dev
)
static
int
drm_setup
(
struct
drm_device
*
dev
)
{
drm_local_map_t
*
map
;
int
i
;
...
...
@@ -128,7 +128,7 @@ static int drm_setup(drm_device_t * dev)
*/
int
drm_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
drm_device_t
*
dev
=
NULL
;
struct
drm_device
*
dev
=
NULL
;
int
minor
=
iminor
(
inode
);
int
retcode
=
0
;
...
...
@@ -167,7 +167,7 @@ EXPORT_SYMBOL(drm_open);
*/
int
drm_stub_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
drm_device_t
*
dev
=
NULL
;
struct
drm_device
*
dev
=
NULL
;
int
minor
=
iminor
(
inode
);
int
err
=
-
ENODEV
;
const
struct
file_operations
*
old_fops
;
...
...
@@ -223,10 +223,10 @@ static int drm_cpu_valid(void)
* filp and add it into the double linked list in \p dev.
*/
static
int
drm_open_helper
(
struct
inode
*
inode
,
struct
file
*
filp
,
drm_device_t
*
dev
)
struct
drm_device
*
dev
)
{
int
minor
=
iminor
(
inode
);
drm_file_t
*
priv
;
struct
drm_file
*
priv
;
int
ret
;
if
(
filp
->
f_flags
&
O_EXCL
)
...
...
@@ -295,8 +295,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
/** No-op. */
int
drm_fasync
(
int
fd
,
struct
file
*
filp
,
int
on
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
int
retcode
;
DRM_DEBUG
(
"fd = %d, device = 0x%lx
\n
"
,
fd
,
...
...
@@ -322,8 +322,8 @@ EXPORT_SYMBOL(drm_fasync);
*/
int
drm_release
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
;
int
retcode
=
0
;
lock_kernel
();
...
...
@@ -422,7 +422,7 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock
(
&
dev
->
struct_mutex
);
if
(
priv
->
remove_auth_on_close
==
1
)
{
drm_file_t
*
temp
;
struct
drm_file
*
temp
;
list_for_each_entry
(
temp
,
&
dev
->
filelist
,
lhead
)
temp
->
authenticated
=
0
;
...
...
drivers/char/drm/drm_ioctl.c
浏览文件 @
84b1fd10
...
...
@@ -52,8 +52,8 @@
int
drm_getunique
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_unique
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_unique
u
;
...
...
@@ -86,8 +86,8 @@ int drm_getunique(struct inode *inode, struct file *filp,
int
drm_setunique
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_unique
u
;
int
domain
,
bus
,
slot
,
func
,
ret
;
...
...
@@ -136,7 +136,7 @@ int drm_setunique(struct inode *inode, struct file *filp,
return
0
;
}
static
int
drm_set_busid
(
drm_device_t
*
dev
)
static
int
drm_set_busid
(
struct
drm_device
*
dev
)
{
int
len
;
...
...
@@ -184,8 +184,8 @@ static int drm_set_busid(drm_device_t * dev)
int
drm_getmap
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_map
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_map
map
;
drm_map_list_t
*
r_list
=
NULL
;
...
...
@@ -245,11 +245,11 @@ int drm_getmap(struct inode *inode, struct file *filp,
int
drm_getclient
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_client
__user
*
argp
=
(
struct
drm_client
__user
*
)
arg
;
struct
drm_client
client
;
drm_file_t
*
pt
;
struct
drm_file
*
pt
;
int
idx
;
int
i
;
...
...
@@ -294,8 +294,8 @@ int drm_getclient(struct inode *inode, struct file *filp,
int
drm_getstats
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_stats
stats
;
int
i
;
...
...
drivers/char/drm/drm_irq.c
浏览文件 @
84b1fd10
...
...
@@ -53,8 +53,8 @@
int
drm_irq_by_busid
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_irq_busid
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_irq_busid
p
;
...
...
@@ -87,7 +87,7 @@ int drm_irq_by_busid(struct inode *inode, struct file *filp,
* \c drm_driver_irq_preinstall() and \c drm_driver_irq_postinstall() functions
* before and after the installation.
*/
static
int
drm_irq_install
(
drm_device_t
*
dev
)
static
int
drm_irq_install
(
struct
drm_device
*
dev
)
{
int
ret
;
unsigned
long
sh_flags
=
0
;
...
...
@@ -155,7 +155,7 @@ static int drm_irq_install(drm_device_t * dev)
*
* Calls the driver's \c drm_driver_irq_uninstall() function, and stops the irq.
*/
int
drm_irq_uninstall
(
drm_device_t
*
dev
)
int
drm_irq_uninstall
(
struct
drm_device
*
dev
)
{
int
irq_enabled
;
...
...
@@ -197,8 +197,8 @@ EXPORT_SYMBOL(drm_irq_uninstall);
int
drm_control
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_control
ctl
;
/* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */
...
...
@@ -244,8 +244,8 @@ int drm_control(struct inode *inode, struct file *filp,
*/
int
drm_wait_vblank
(
DRM_IOCTL_ARGS
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
union
drm_wait_vblank
__user
*
argp
=
(
void
__user
*
)
data
;
union
drm_wait_vblank
vblwait
;
struct
timeval
now
;
...
...
@@ -371,7 +371,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
*
* If a signal is not requested, then calls vblank_wait().
*/
void
drm_vbl_send_signals
(
drm_device_t
*
dev
)
void
drm_vbl_send_signals
(
struct
drm_device
*
dev
)
{
unsigned
long
flags
;
int
i
;
...
...
@@ -416,7 +416,7 @@ EXPORT_SYMBOL(drm_vbl_send_signals);
*/
static
void
drm_locked_tasklet_func
(
unsigned
long
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
unsigned
long
irqflags
;
spin_lock_irqsave
(
&
dev
->
tasklet_lock
,
irqflags
);
...
...
@@ -453,7 +453,7 @@ static void drm_locked_tasklet_func(unsigned long data)
* context, it must not make any assumptions about this. Also, the HW lock will
* be held with the kernel context or any client context.
*/
void
drm_locked_tasklet
(
drm_device_t
*
dev
,
void
(
*
func
)(
drm_device_t
*
))
void
drm_locked_tasklet
(
struct
drm_device
*
dev
,
void
(
*
func
)(
struct
drm_device
*
))
{
unsigned
long
irqflags
;
static
DECLARE_TASKLET
(
drm_tasklet
,
drm_locked_tasklet_func
,
0
);
...
...
drivers/char/drm/drm_lock.c
浏览文件 @
84b1fd10
...
...
@@ -51,8 +51,8 @@ static int drm_notifier(void *priv);
int
drm_lock
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
DECLARE_WAITQUEUE
(
entry
,
current
);
struct
drm_lock
lock
;
int
ret
=
0
;
...
...
@@ -152,8 +152,8 @@ int drm_lock(struct inode *inode, struct file *filp,
int
drm_unlock
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_lock
lock
;
unsigned
long
irqflags
;
...
...
drivers/char/drm/drm_memory.c
浏览文件 @
84b1fd10
...
...
@@ -80,7 +80,7 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area)
#if __OS_HAS_AGP
static
void
*
agp_remap
(
unsigned
long
offset
,
unsigned
long
size
,
drm_device_t
*
dev
)
struct
drm_device
*
dev
)
{
unsigned
long
*
phys_addr_map
,
i
,
num_pages
=
PAGE_ALIGN
(
size
)
/
PAGE_SIZE
;
...
...
@@ -123,7 +123,7 @@ static void *agp_remap(unsigned long offset, unsigned long size,
}
/** Wrapper around agp_allocate_memory() */
DRM_AGP_MEM
*
drm_alloc_agp
(
drm_device_t
*
dev
,
int
pages
,
u32
type
)
DRM_AGP_MEM
*
drm_alloc_agp
(
struct
drm_device
*
dev
,
int
pages
,
u32
type
)
{
return
drm_agp_allocate_memory
(
dev
->
agp
->
bridge
,
pages
,
type
);
}
...
...
@@ -148,7 +148,7 @@ int drm_unbind_agp(DRM_AGP_MEM * handle)
#else
/* __OS_HAS_AGP */
static
inline
void
*
agp_remap
(
unsigned
long
offset
,
unsigned
long
size
,
drm_device_t
*
dev
)
struct
drm_device
*
dev
)
{
return
NULL
;
}
...
...
drivers/char/drm/drm_os_linux.h
浏览文件 @
84b1fd10
...
...
@@ -34,8 +34,8 @@
/** Read/write memory barrier */
#define DRM_MEMORYBARRIER() mb()
/** DRM device local declaration */
#define DRM_DEVICE
drm_file_t
*priv = filp->private_data; \
drm_device_t
*dev = priv->head->dev
#define DRM_DEVICE
struct drm_file
*priv = filp->private_data; \
struct drm_device
*dev = priv->head->dev
/** IRQ handler arguments and return type and values */
#define DRM_IRQ_ARGS int irq, void *arg
...
...
drivers/char/drm/drm_pci.c
浏览文件 @
84b1fd10
...
...
@@ -47,7 +47,7 @@
/**
* \brief Allocate a PCI consistent memory block, for DMA.
*/
drm_dma_handle_t
*
drm_pci_alloc
(
drm_device_t
*
dev
,
size_t
size
,
size_t
align
,
drm_dma_handle_t
*
drm_pci_alloc
(
struct
drm_device
*
dev
,
size_t
size
,
size_t
align
,
dma_addr_t
maxaddr
)
{
drm_dma_handle_t
*
dmah
;
...
...
@@ -126,7 +126,7 @@ EXPORT_SYMBOL(drm_pci_alloc);
*
* This function is for internal use in the Linux-specific DRM core code.
*/
void
__drm_pci_free
(
drm_device_t
*
dev
,
drm_dma_handle_t
*
dmah
)
void
__drm_pci_free
(
struct
drm_device
*
dev
,
drm_dma_handle_t
*
dmah
)
{
#if 1
unsigned
long
addr
;
...
...
@@ -172,7 +172,7 @@ void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t * dmah)
/**
* \brief Free a PCI consistent memory block
*/
void
drm_pci_free
(
drm_device_t
*
dev
,
drm_dma_handle_t
*
dmah
)
void
drm_pci_free
(
struct
drm_device
*
dev
,
drm_dma_handle_t
*
dmah
)
{
__drm_pci_free
(
dev
,
dmah
);
kfree
(
dmah
);
...
...
drivers/char/drm/drm_proc.c
浏览文件 @
84b1fd10
...
...
@@ -87,7 +87,7 @@ static struct drm_proc_list {
* "/proc/dri/%minor%/", and each entry in proc_list as
* "/proc/dri/%minor%/%name%".
*/
int
drm_proc_init
(
drm_device_t
*
dev
,
int
minor
,
int
drm_proc_init
(
struct
drm_device
*
dev
,
int
minor
,
struct
proc_dir_entry
*
root
,
struct
proc_dir_entry
**
dev_root
)
{
struct
proc_dir_entry
*
ent
;
...
...
@@ -163,7 +163,7 @@ int drm_proc_cleanup(int minor, struct proc_dir_entry *root,
static
int
drm_name_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
if
(
offset
>
DRM_PROC_LIMIT
)
{
...
...
@@ -205,7 +205,7 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
static
int
drm__vm_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
struct
drm_map
*
map
;
drm_map_list_t
*
r_list
;
...
...
@@ -261,7 +261,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
static
int
drm_vm_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
@@ -284,7 +284,7 @@ static int drm_vm_info(char *buf, char **start, off_t offset, int request,
static
int
drm__queues_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
int
i
;
drm_queue_t
*
q
;
...
...
@@ -334,7 +334,7 @@ static int drm__queues_info(char *buf, char **start, off_t offset,
static
int
drm_queues_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
@@ -357,7 +357,7 @@ static int drm_queues_info(char *buf, char **start, off_t offset, int request,
static
int
drm__bufs_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
int
i
;
...
...
@@ -406,7 +406,7 @@ static int drm__bufs_info(char *buf, char **start, off_t offset, int request,
static
int
drm_bufs_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
@@ -429,9 +429,9 @@ static int drm_bufs_info(char *buf, char **start, off_t offset, int request,
static
int
drm__clients_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
drm_file_t
*
priv
;
struct
drm_file
*
priv
;
if
(
offset
>
DRM_PROC_LIMIT
)
{
*
eof
=
1
;
...
...
@@ -462,7 +462,7 @@ static int drm__clients_info(char *buf, char **start, off_t offset,
static
int
drm_clients_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
@@ -476,7 +476,7 @@ static int drm_clients_info(char *buf, char **start, off_t offset,
static
int
drm__vma_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
len
=
0
;
drm_vma_entry_t
*
pt
;
struct
vm_area_struct
*
vma
;
...
...
@@ -535,7 +535,7 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request,
static
int
drm_vma_info
(
char
*
buf
,
char
**
start
,
off_t
offset
,
int
request
,
int
*
eof
,
void
*
data
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
data
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
data
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
drivers/char/drm/drm_scatter.c
浏览文件 @
84b1fd10
...
...
@@ -65,8 +65,8 @@ void drm_sg_cleanup(drm_sg_mem_t * entry)
int
drm_sg_alloc
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_scatter_gather
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_scatter_gather
request
;
drm_sg_mem_t
*
entry
;
...
...
@@ -201,8 +201,8 @@ int drm_sg_alloc(struct inode *inode, struct file *filp,
int
drm_sg_free
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_scatter_gather
request
;
drm_sg_mem_t
*
entry
;
...
...
drivers/char/drm/drm_stub.c
浏览文件 @
84b1fd10
...
...
@@ -49,11 +49,11 @@ MODULE_PARM_DESC(debug, "Enable debug output");
module_param_named
(
cards_limit
,
drm_cards_limit
,
int
,
0444
);
module_param_named
(
debug
,
drm_debug
,
int
,
0600
);
drm_head_t
**
drm_heads
;
struct
drm_head
**
drm_heads
;
struct
class
*
drm_class
;
struct
proc_dir_entry
*
drm_proc_root
;
static
int
drm_fill_in_dev
(
drm_device_t
*
dev
,
struct
pci_dev
*
pdev
,
static
int
drm_fill_in_dev
(
struct
drm_device
*
dev
,
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
,
struct
drm_driver
*
driver
)
{
...
...
@@ -143,9 +143,9 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
* create the proc init entry via proc_init(). This routines assigns
* minor numbers to secondary heads of multi-headed cards
*/
static
int
drm_get_head
(
drm_device_t
*
dev
,
drm_head_t
*
head
)
static
int
drm_get_head
(
struct
drm_device
*
dev
,
struct
drm_head
*
head
)
{
drm_head_t
**
heads
=
drm_heads
;
struct
drm_head
**
heads
=
drm_heads
;
int
ret
;
int
minor
;
...
...
@@ -154,7 +154,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
for
(
minor
=
0
;
minor
<
drm_cards_limit
;
minor
++
,
heads
++
)
{
if
(
!*
heads
)
{
*
head
=
(
drm_head_t
)
{
*
head
=
(
struct
drm_head
)
{
.
dev
=
dev
,.
device
=
MKDEV
(
DRM_MAJOR
,
minor
),.
minor
=
minor
,};
...
...
@@ -184,7 +184,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
err_g2:
drm_proc_cleanup
(
minor
,
drm_proc_root
,
head
->
dev_root
);
err_g1:
*
head
=
(
drm_head_t
)
{
*
head
=
(
struct
drm_head
)
{
.
dev
=
NULL
};
return
ret
;
}
...
...
@@ -203,7 +203,7 @@ static int drm_get_head(drm_device_t * dev, drm_head_t * head)
int
drm_get_dev
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
,
struct
drm_driver
*
driver
)
{
drm_device_t
*
dev
;
struct
drm_device
*
dev
;
int
ret
;
DRM_DEBUG
(
"
\n
"
);
...
...
@@ -246,7 +246,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
* "drm" data, otherwise unregisters the "drm" data, frees the dev list and
* unregisters the character device.
*/
int
drm_put_dev
(
drm_device_t
*
dev
)
int
drm_put_dev
(
struct
drm_device
*
dev
)
{
DRM_DEBUG
(
"release primary %s
\n
"
,
dev
->
driver
->
pci_driver
.
name
);
...
...
@@ -274,7 +274,7 @@ int drm_put_dev(drm_device_t * dev)
* last minor released.
*
*/
int
drm_put_head
(
drm_head_t
*
head
)
int
drm_put_head
(
struct
drm_head
*
head
)
{
int
minor
=
head
->
minor
;
...
...
@@ -283,7 +283,7 @@ int drm_put_head(drm_head_t * head)
drm_proc_cleanup
(
minor
,
drm_proc_root
,
head
->
dev_root
);
drm_sysfs_device_remove
(
head
->
dev_class
);
*
head
=
(
drm_head_t
)
{.
dev
=
NULL
};
*
head
=
(
struct
drm_head
)
{.
dev
=
NULL
};
drm_heads
[
minor
]
=
NULL
;
...
...
drivers/char/drm/drm_sysfs.c
浏览文件 @
84b1fd10
...
...
@@ -80,7 +80,7 @@ void drm_sysfs_destroy(struct class *class)
static
ssize_t
show_dri
(
struct
class_device
*
class_device
,
char
*
buf
)
{
drm_device_t
*
dev
=
((
drm_head_t
*
)
class_get_devdata
(
class_device
))
->
dev
;
struct
drm_device
*
dev
=
((
struct
drm_head
*
)
class_get_devdata
(
class_device
))
->
dev
;
if
(
dev
->
driver
->
dri_library_name
)
return
dev
->
driver
->
dri_library_name
(
dev
,
buf
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"%s
\n
"
,
dev
->
driver
->
pci_driver
.
name
);
...
...
@@ -104,7 +104,7 @@ static struct class_device_attribute class_device_attrs[] = {
* Note: the struct class passed to this function must have previously been
* created with a call to drm_sysfs_create().
*/
struct
class_device
*
drm_sysfs_device_add
(
struct
class
*
cs
,
drm_head_t
*
head
)
struct
class_device
*
drm_sysfs_device_add
(
struct
class
*
cs
,
struct
drm_head
*
head
)
{
struct
class_device
*
class_dev
;
int
i
,
j
,
err
;
...
...
drivers/char/drm/drm_vm.c
浏览文件 @
84b1fd10
...
...
@@ -79,8 +79,8 @@ static pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma)
static
__inline__
struct
page
*
drm_do_vm_nopage
(
struct
vm_area_struct
*
vma
,
unsigned
long
address
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_map
*
map
=
NULL
;
drm_map_list_t
*
r_list
;
drm_hash_item_t
*
hash
;
...
...
@@ -194,8 +194,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,
*/
static
void
drm_vm_shm_close
(
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_vma_entry_t
*
pt
,
*
temp
;
struct
drm_map
*
map
;
drm_map_list_t
*
r_list
;
...
...
@@ -274,8 +274,8 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
static
__inline__
struct
page
*
drm_do_vm_dma_nopage
(
struct
vm_area_struct
*
vma
,
unsigned
long
address
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
unsigned
long
offset
;
unsigned
long
page_nr
;
...
...
@@ -311,8 +311,8 @@ static __inline__ struct page *drm_do_vm_sg_nopage(struct vm_area_struct *vma,
unsigned
long
address
)
{
struct
drm_map
*
map
=
(
struct
drm_map
*
)
vma
->
vm_private_data
;
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_sg_mem_t
*
entry
=
dev
->
sg
;
unsigned
long
offset
;
unsigned
long
map_offset
;
...
...
@@ -405,8 +405,8 @@ static struct vm_operations_struct drm_vm_sg_ops = {
*/
static
void
drm_vm_open_locked
(
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_vma_entry_t
*
vma_entry
;
DRM_DEBUG
(
"0x%08lx,0x%08lx
\n
"
,
...
...
@@ -423,8 +423,8 @@ static void drm_vm_open_locked(struct vm_area_struct *vma)
static
void
drm_vm_open
(
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
mutex_lock
(
&
dev
->
struct_mutex
);
drm_vm_open_locked
(
vma
);
...
...
@@ -441,8 +441,8 @@ static void drm_vm_open(struct vm_area_struct *vma)
*/
static
void
drm_vm_close
(
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
vma
->
vm_file
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
vma
->
vm_file
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
drm_vma_entry_t
*
pt
,
*
temp
;
DRM_DEBUG
(
"0x%08lx,0x%08lx
\n
"
,
...
...
@@ -472,8 +472,8 @@ static void drm_vm_close(struct vm_area_struct *vma)
*/
static
int
drm_mmap_dma
(
struct
file
*
filp
,
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
;
drm_device_dma_t
*
dma
;
unsigned
long
length
=
vma
->
vm_end
-
vma
->
vm_start
;
...
...
@@ -545,8 +545,8 @@ EXPORT_SYMBOL(drm_core_get_reg_ofs);
*/
static
int
drm_mmap_locked
(
struct
file
*
filp
,
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
struct
drm_map
*
map
=
NULL
;
unsigned
long
offset
=
0
;
drm_hash_item_t
*
hash
;
...
...
@@ -663,8 +663,8 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
int
drm_mmap
(
struct
file
*
filp
,
struct
vm_area_struct
*
vma
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
struct
drm_file
*
priv
=
filp
->
private_data
;
struct
drm_device
*
dev
=
priv
->
head
->
dev
;
int
ret
;
mutex_lock
(
&
dev
->
struct_mutex
);
...
...
drivers/char/drm/i915_dma.c
浏览文件 @
84b1fd10
...
...
@@ -47,7 +47,7 @@
* the head pointer changes, so that EBUSY only happens if the ring
* actually stalls for (eg) 3 seconds.
*/
int
i915_wait_ring
(
drm_device_t
*
dev
,
int
n
,
const
char
*
caller
)
int
i915_wait_ring
(
struct
drm_device
*
dev
,
int
n
,
const
char
*
caller
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_i915_ring_buffer_t
*
ring
=
&
(
dev_priv
->
ring
);
...
...
@@ -73,7 +73,7 @@ int i915_wait_ring(drm_device_t * dev, int n, const char *caller)
return
DRM_ERR
(
EBUSY
);
}
void
i915_kernel_lost_context
(
drm_device_t
*
dev
)
void
i915_kernel_lost_context
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_i915_ring_buffer_t
*
ring
=
&
(
dev_priv
->
ring
);
...
...
@@ -88,7 +88,7 @@ void i915_kernel_lost_context(drm_device_t * dev)
dev_priv
->
sarea_priv
->
perf_boxes
|=
I915_BOX_RING_EMPTY
;
}
static
int
i915_dma_cleanup
(
drm_device_t
*
dev
)
static
int
i915_dma_cleanup
(
struct
drm_device
*
dev
)
{
/* Make sure interrupts are disabled here because the uninstall ioctl
* may not have been called from userspace and after dev_private
...
...
@@ -126,7 +126,7 @@ static int i915_dma_cleanup(drm_device_t * dev)
return
0
;
}
static
int
i915_initialize
(
drm_device_t
*
dev
,
static
int
i915_initialize
(
struct
drm_device
*
dev
,
drm_i915_private_t
*
dev_priv
,
drm_i915_init_t
*
init
)
{
...
...
@@ -211,7 +211,7 @@ static int i915_initialize(drm_device_t * dev,
return
0
;
}
static
int
i915_dma_resume
(
drm_device_t
*
dev
)
static
int
i915_dma_resume
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
...
...
@@ -357,7 +357,7 @@ static int validate_cmd(int cmd)
return
ret
;
}
static
int
i915_emit_cmds
(
drm_device_t
*
dev
,
int
__user
*
buffer
,
int
dwords
)
static
int
i915_emit_cmds
(
struct
drm_device
*
dev
,
int
__user
*
buffer
,
int
dwords
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
int
i
;
...
...
@@ -396,7 +396,7 @@ static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords)
return
0
;
}
static
int
i915_emit_box
(
drm_device_t
*
dev
,
static
int
i915_emit_box
(
struct
drm_device
*
dev
,
struct
drm_clip_rect
__user
*
boxes
,
int
i
,
int
DR1
,
int
DR4
)
{
...
...
@@ -439,7 +439,7 @@ static int i915_emit_box(drm_device_t * dev,
* emit. For now, do it in both places:
*/
static
void
i915_emit_breadcrumb
(
drm_device_t
*
dev
)
static
void
i915_emit_breadcrumb
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
RING_LOCALS
;
...
...
@@ -457,7 +457,7 @@ static void i915_emit_breadcrumb(drm_device_t *dev)
ADVANCE_LP_RING
();
}
static
int
i915_dispatch_cmdbuffer
(
drm_device_t
*
dev
,
static
int
i915_dispatch_cmdbuffer
(
struct
drm_device
*
dev
,
drm_i915_cmdbuffer_t
*
cmd
)
{
int
nbox
=
cmd
->
num_cliprects
;
...
...
@@ -489,7 +489,7 @@ static int i915_dispatch_cmdbuffer(drm_device_t * dev,
return
0
;
}
static
int
i915_dispatch_batchbuffer
(
drm_device_t
*
dev
,
static
int
i915_dispatch_batchbuffer
(
struct
drm_device
*
dev
,
drm_i915_batchbuffer_t
*
batch
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -535,7 +535,7 @@ static int i915_dispatch_batchbuffer(drm_device_t * dev,
return
0
;
}
static
int
i915_dispatch_flip
(
drm_device_t
*
dev
)
static
int
i915_dispatch_flip
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
RING_LOCALS
;
...
...
@@ -583,7 +583,7 @@ static int i915_dispatch_flip(drm_device_t * dev)
return
0
;
}
static
int
i915_quiescent
(
drm_device_t
*
dev
)
static
int
i915_quiescent
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -792,7 +792,7 @@ static int i915_set_status_page(DRM_IOCTL_ARGS)
return
0
;
}
int
i915_driver_load
(
drm_device_t
*
dev
,
unsigned
long
flags
)
int
i915_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
flags
)
{
/* i915 has 4 more counters */
dev
->
counters
+=
4
;
...
...
@@ -804,7 +804,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
return
0
;
}
void
i915_driver_lastclose
(
drm_device_t
*
dev
)
void
i915_driver_lastclose
(
struct
drm_device
*
dev
)
{
if
(
dev
->
dev_private
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -813,7 +813,7 @@ void i915_driver_lastclose(drm_device_t * dev)
i915_dma_cleanup
(
dev
);
}
void
i915_driver_preclose
(
drm_device_t
*
dev
,
DRMFILE
filp
)
void
i915_driver_preclose
(
struct
drm_device
*
dev
,
DRMFILE
filp
)
{
if
(
dev
->
dev_private
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -854,7 +854,7 @@ int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
* \returns
* A value of 1 is always retured to indictate every i9x5 is AGP.
*/
int
i915_driver_device_is_agp
(
drm_device_t
*
dev
)
int
i915_driver_device_is_agp
(
struct
drm_device
*
dev
)
{
return
1
;
}
drivers/char/drm/i915_drv.h
浏览文件 @
84b1fd10
...
...
@@ -120,11 +120,11 @@ extern drm_ioctl_desc_t i915_ioctls[];
extern
int
i915_max_ioctl
;
/* i915_dma.c */
extern
void
i915_kernel_lost_context
(
drm_device_t
*
dev
);
extern
void
i915_kernel_lost_context
(
struct
drm_device
*
dev
);
extern
int
i915_driver_load
(
struct
drm_device
*
,
unsigned
long
flags
);
extern
void
i915_driver_lastclose
(
drm_device_t
*
dev
);
extern
void
i915_driver_preclose
(
drm_device_t
*
dev
,
DRMFILE
filp
);
extern
int
i915_driver_device_is_agp
(
drm_device_t
*
dev
);
extern
void
i915_driver_lastclose
(
struct
drm_device
*
dev
);
extern
void
i915_driver_preclose
(
struct
drm_device
*
dev
,
DRMFILE
filp
);
extern
int
i915_driver_device_is_agp
(
struct
drm_device
*
dev
);
extern
long
i915_compat_ioctl
(
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
...
...
@@ -132,12 +132,12 @@ extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
extern
int
i915_irq_emit
(
DRM_IOCTL_ARGS
);
extern
int
i915_irq_wait
(
DRM_IOCTL_ARGS
);
extern
int
i915_driver_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
);
extern
int
i915_driver_vblank_wait2
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
);
extern
int
i915_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
extern
int
i915_driver_vblank_wait2
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
extern
irqreturn_t
i915_driver_irq_handler
(
DRM_IRQ_ARGS
);
extern
void
i915_driver_irq_preinstall
(
drm_device_t
*
dev
);
extern
void
i915_driver_irq_postinstall
(
drm_device_t
*
dev
);
extern
void
i915_driver_irq_uninstall
(
drm_device_t
*
dev
);
extern
void
i915_driver_irq_preinstall
(
struct
drm_device
*
dev
);
extern
void
i915_driver_irq_postinstall
(
struct
drm_device
*
dev
);
extern
void
i915_driver_irq_uninstall
(
struct
drm_device
*
dev
);
extern
int
i915_vblank_pipe_set
(
DRM_IOCTL_ARGS
);
extern
int
i915_vblank_pipe_get
(
DRM_IOCTL_ARGS
);
extern
int
i915_vblank_swap
(
DRM_IOCTL_ARGS
);
...
...
@@ -148,7 +148,7 @@ extern int i915_mem_free(DRM_IOCTL_ARGS);
extern
int
i915_mem_init_heap
(
DRM_IOCTL_ARGS
);
extern
int
i915_mem_destroy_heap
(
DRM_IOCTL_ARGS
);
extern
void
i915_mem_takedown
(
struct
mem_block
**
heap
);
extern
void
i915_mem_release
(
drm_device_t
*
dev
,
extern
void
i915_mem_release
(
struct
drm_device
*
dev
,
DRMFILE
filp
,
struct
mem_block
*
heap
);
#define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, (reg))
...
...
@@ -188,7 +188,7 @@ extern void i915_mem_release(drm_device_t * dev,
I915_WRITE(LP_RING + RING_TAIL, outring); \
} while(0)
extern
int
i915_wait_ring
(
drm_device_t
*
dev
,
int
n
,
const
char
*
caller
);
extern
int
i915_wait_ring
(
struct
drm_device
*
dev
,
int
n
,
const
char
*
caller
);
#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23))
#define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23))
...
...
drivers/char/drm/i915_irq.c
浏览文件 @
84b1fd10
...
...
@@ -42,7 +42,7 @@
*
* This function will be called with the HW lock held.
*/
static
void
i915_vblank_tasklet
(
drm_device_t
*
dev
)
static
void
i915_vblank_tasklet
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
unsigned
long
irqflags
;
...
...
@@ -211,7 +211,7 @@ static void i915_vblank_tasklet(drm_device_t *dev)
irqreturn_t
i915_driver_irq_handler
(
DRM_IRQ_ARGS
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
arg
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
arg
;
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
u16
temp
;
...
...
@@ -257,7 +257,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
return
IRQ_HANDLED
;
}
static
int
i915_emit_irq
(
drm_device_t
*
dev
)
static
int
i915_emit_irq
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
RING_LOCALS
;
...
...
@@ -283,7 +283,7 @@ static int i915_emit_irq(drm_device_t * dev)
return
dev_priv
->
counter
;
}
static
int
i915_wait_irq
(
drm_device_t
*
dev
,
int
irq_nr
)
static
int
i915_wait_irq
(
struct
drm_device
*
dev
,
int
irq_nr
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
int
ret
=
0
;
...
...
@@ -309,7 +309,7 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr)
return
ret
;
}
static
int
i915_driver_vblank_do_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
,
static
int
i915_driver_vblank_do_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
,
atomic_t
*
counter
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -331,12 +331,12 @@ static int i915_driver_vblank_do_wait(drm_device_t *dev, unsigned int *sequence,
}
int
i915_driver_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
)
int
i915_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
)
{
return
i915_driver_vblank_do_wait
(
dev
,
sequence
,
&
dev
->
vbl_received
);
}
int
i915_driver_vblank_wait2
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
)
int
i915_driver_vblank_wait2
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
)
{
return
i915_driver_vblank_do_wait
(
dev
,
sequence
,
&
dev
->
vbl_received2
);
}
...
...
@@ -389,7 +389,7 @@ int i915_irq_wait(DRM_IOCTL_ARGS)
return
i915_wait_irq
(
dev
,
irqwait
.
irq_seq
);
}
static
void
i915_enable_interrupt
(
drm_device_t
*
dev
)
static
void
i915_enable_interrupt
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
u16
flag
;
...
...
@@ -569,7 +569,7 @@ int i915_vblank_swap(DRM_IOCTL_ARGS)
/* drm_dma.h hooks
*/
void
i915_driver_irq_preinstall
(
drm_device_t
*
dev
)
void
i915_driver_irq_preinstall
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
...
...
@@ -578,7 +578,7 @@ void i915_driver_irq_preinstall(drm_device_t * dev)
I915_WRITE16
(
I915REG_INT_ENABLE_R
,
0x0
);
}
void
i915_driver_irq_postinstall
(
drm_device_t
*
dev
)
void
i915_driver_irq_postinstall
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
...
...
@@ -592,7 +592,7 @@ void i915_driver_irq_postinstall(drm_device_t * dev)
DRM_INIT_WAITQUEUE
(
&
dev_priv
->
irq_queue
);
}
void
i915_driver_irq_uninstall
(
drm_device_t
*
dev
)
void
i915_driver_irq_uninstall
(
struct
drm_device
*
dev
)
{
drm_i915_private_t
*
dev_priv
=
(
drm_i915_private_t
*
)
dev
->
dev_private
;
u16
temp
;
...
...
drivers/char/drm/i915_mem.c
浏览文件 @
84b1fd10
...
...
@@ -43,7 +43,7 @@
* block to allocate, and the ring is drained prior to allocations --
* in other words allocation is expensive.
*/
static
void
mark_block
(
drm_device_t
*
dev
,
struct
mem_block
*
p
,
int
in_use
)
static
void
mark_block
(
struct
drm_device
*
dev
,
struct
mem_block
*
p
,
int
in_use
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_i915_sarea_t
*
sarea_priv
=
dev_priv
->
sarea_priv
;
...
...
@@ -208,7 +208,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
/* Free all blocks associated with the releasing file.
*/
void
i915_mem_release
(
drm_device_t
*
dev
,
DRMFILE
filp
,
struct
mem_block
*
heap
)
void
i915_mem_release
(
struct
drm_device
*
dev
,
DRMFILE
filp
,
struct
mem_block
*
heap
)
{
struct
mem_block
*
p
;
...
...
drivers/char/drm/r300_cmdbuf.c
浏览文件 @
84b1fd10
...
...
@@ -706,7 +706,7 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv)
* The actual age emit is done by r300_do_cp_cmdbuf, which is why you must
* be careful about how this function is called.
*/
static
void
r300_discard_buffer
(
drm_device_t
*
dev
,
drm_buf_t
*
buf
)
static
void
r300_discard_buffer
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_radeon_buf_priv_t
*
buf_priv
=
buf
->
dev_private
;
...
...
@@ -779,9 +779,9 @@ static int r300_scratch(drm_radeon_private_t *dev_priv,
* commands on the DMA ring buffer.
* Called by the ioctl handler function radeon_cp_cmdbuf.
*/
int
r300_do_cp_cmdbuf
(
drm_device_t
*
dev
,
int
r300_do_cp_cmdbuf
(
struct
drm_device
*
dev
,
DRMFILE
filp
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
drivers/char/drm/radeon_cp.c
浏览文件 @
84b1fd10
...
...
@@ -36,7 +36,7 @@
#define RADEON_FIFO_DEBUG 0
static
int
radeon_do_cleanup_cp
(
drm_device_t
*
dev
);
static
int
radeon_do_cleanup_cp
(
struct
drm_device
*
dev
);
/* CP microcode (from ATI) */
static
const
u32
R200_cp_microcode
[][
2
]
=
{
...
...
@@ -816,7 +816,7 @@ static const u32 R300_cp_microcode[][2] = {
{
0000000000
,
0000000000
},
};
static
int
RADEON_READ_PLL
(
drm_device_t
*
dev
,
int
addr
)
static
int
RADEON_READ_PLL
(
struct
drm_device
*
dev
,
int
addr
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -1066,7 +1066,7 @@ static void radeon_do_cp_stop(drm_radeon_private_t * dev_priv)
/* Reset the engine. This will stop the CP if it is running.
*/
static
int
radeon_do_engine_reset
(
drm_device_t
*
dev
)
static
int
radeon_do_engine_reset
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
u32
clock_cntl_index
,
mclk_cntl
,
rbbm_soft_reset
;
...
...
@@ -1122,7 +1122,7 @@ static int radeon_do_engine_reset(drm_device_t * dev)
return
0
;
}
static
void
radeon_cp_init_ring_buffer
(
drm_device_t
*
dev
,
static
void
radeon_cp_init_ring_buffer
(
struct
drm_device
*
dev
,
drm_radeon_private_t
*
dev_priv
)
{
u32
ring_start
,
cur_read_ptr
;
...
...
@@ -1384,7 +1384,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
}
}
static
int
radeon_do_init_cp
(
drm_device_t
*
dev
,
drm_radeon_init_t
*
init
)
static
int
radeon_do_init_cp
(
struct
drm_device
*
dev
,
drm_radeon_init_t
*
init
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -1735,7 +1735,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
return
0
;
}
static
int
radeon_do_cleanup_cp
(
drm_device_t
*
dev
)
static
int
radeon_do_cleanup_cp
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
DRM_DEBUG
(
"
\n
"
);
...
...
@@ -1791,7 +1791,7 @@ static int radeon_do_cleanup_cp(drm_device_t * dev)
*
* Charl P. Botha <http://cpbotha.net>
*/
static
int
radeon_do_resume_cp
(
drm_device_t
*
dev
)
static
int
radeon_do_resume_cp
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -1918,7 +1918,7 @@ int radeon_cp_stop(DRM_IOCTL_ARGS)
return
0
;
}
void
radeon_do_release
(
drm_device_t
*
dev
)
void
radeon_do_release
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
int
i
,
ret
;
...
...
@@ -2046,7 +2046,7 @@ int radeon_fullscreen(DRM_IOCTL_ARGS)
* they can't get the lock.
*/
drm_buf_t
*
radeon_freelist_get
(
drm_device_t
*
dev
)
drm_buf_t
*
radeon_freelist_get
(
struct
drm_device
*
dev
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -2086,7 +2086,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev)
}
#if 0
drm_buf_t *radeon_freelist_get(
drm_device_t
* dev)
drm_buf_t *radeon_freelist_get(
struct drm_device
* dev)
{
drm_device_dma_t *dma = dev->dma;
drm_radeon_private_t *dev_priv = dev->dev_private;
...
...
@@ -2120,7 +2120,7 @@ drm_buf_t *radeon_freelist_get(drm_device_t * dev)
}
#endif
void
radeon_freelist_reset
(
drm_device_t
*
dev
)
void
radeon_freelist_reset
(
struct
drm_device
*
dev
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -2170,7 +2170,7 @@ int radeon_wait_ring(drm_radeon_private_t * dev_priv, int n)
return
DRM_ERR
(
EBUSY
);
}
static
int
radeon_cp_get_buffers
(
DRMFILE
filp
,
drm_device_t
*
dev
,
static
int
radeon_cp_get_buffers
(
DRMFILE
filp
,
struct
drm_device
*
dev
,
struct
drm_dma
*
d
)
{
int
i
;
...
...
drivers/char/drm/radeon_drv.h
浏览文件 @
84b1fd10
...
...
@@ -336,8 +336,8 @@ extern int radeon_engine_reset(DRM_IOCTL_ARGS);
extern
int
radeon_fullscreen
(
DRM_IOCTL_ARGS
);
extern
int
radeon_cp_buffers
(
DRM_IOCTL_ARGS
);
extern
void
radeon_freelist_reset
(
drm_device_t
*
dev
);
extern
drm_buf_t
*
radeon_freelist_get
(
drm_device_t
*
dev
);
extern
void
radeon_freelist_reset
(
struct
drm_device
*
dev
);
extern
drm_buf_t
*
radeon_freelist_get
(
struct
drm_device
*
dev
);
extern
int
radeon_wait_ring
(
drm_radeon_private_t
*
dev_priv
,
int
n
);
...
...
@@ -357,33 +357,33 @@ extern void radeon_mem_release(DRMFILE filp, struct mem_block *heap);
extern
int
radeon_irq_emit
(
DRM_IOCTL_ARGS
);
extern
int
radeon_irq_wait
(
DRM_IOCTL_ARGS
);
extern
void
radeon_do_release
(
drm_device_t
*
dev
);
extern
int
radeon_driver_vblank_wait
(
drm_device_t
*
dev
,
extern
void
radeon_do_release
(
struct
drm_device
*
dev
);
extern
int
radeon_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
extern
int
radeon_driver_vblank_wait2
(
drm_device_t
*
dev
,
extern
int
radeon_driver_vblank_wait2
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
extern
irqreturn_t
radeon_driver_irq_handler
(
DRM_IRQ_ARGS
);
extern
void
radeon_driver_irq_preinstall
(
drm_device_t
*
dev
);
extern
void
radeon_driver_irq_postinstall
(
drm_device_t
*
dev
);
extern
void
radeon_driver_irq_uninstall
(
drm_device_t
*
dev
);
extern
int
radeon_vblank_crtc_get
(
drm_device_t
*
dev
);
extern
int
radeon_vblank_crtc_set
(
drm_device_t
*
dev
,
int64_t
value
);
extern
void
radeon_driver_irq_preinstall
(
struct
drm_device
*
dev
);
extern
void
radeon_driver_irq_postinstall
(
struct
drm_device
*
dev
);
extern
void
radeon_driver_irq_uninstall
(
struct
drm_device
*
dev
);
extern
int
radeon_vblank_crtc_get
(
struct
drm_device
*
dev
);
extern
int
radeon_vblank_crtc_set
(
struct
drm_device
*
dev
,
int64_t
value
);
extern
int
radeon_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
flags
);
extern
int
radeon_driver_unload
(
struct
drm_device
*
dev
);
extern
int
radeon_driver_firstopen
(
struct
drm_device
*
dev
);
extern
void
radeon_driver_preclose
(
drm_device_t
*
dev
,
DRMFILE
filp
);
extern
void
radeon_driver_postclose
(
drm_device_t
*
dev
,
drm_file_t
*
filp
);
extern
void
radeon_driver_lastclose
(
drm_device_t
*
dev
);
extern
int
radeon_driver_open
(
drm_device_t
*
dev
,
drm_file_t
*
filp_priv
);
extern
void
radeon_driver_preclose
(
struct
drm_device
*
dev
,
DRMFILE
filp
);
extern
void
radeon_driver_postclose
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp
);
extern
void
radeon_driver_lastclose
(
struct
drm_device
*
dev
);
extern
int
radeon_driver_open
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp_priv
);
extern
long
radeon_compat_ioctl
(
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
);
/* r300_cmdbuf.c */
extern
void
r300_init_reg_flags
(
void
);
extern
int
r300_do_cp_cmdbuf
(
drm_device_t
*
dev
,
DRMFILE
filp
,
drm_file_t
*
filp_priv
,
extern
int
r300_do_cp_cmdbuf
(
struct
drm_device
*
dev
,
DRMFILE
filp
,
struct
drm_file
*
filp_priv
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
);
/* Flags for stats.boxes
...
...
drivers/char/drm/radeon_irq.c
浏览文件 @
84b1fd10
...
...
@@ -64,7 +64,7 @@ static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv,
irqreturn_t
radeon_driver_irq_handler
(
DRM_IRQ_ARGS
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
arg
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
arg
;
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
u32
stat
;
...
...
@@ -109,7 +109,7 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS)
return
IRQ_HANDLED
;
}
static
int
radeon_emit_irq
(
drm_device_t
*
dev
)
static
int
radeon_emit_irq
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
unsigned
int
ret
;
...
...
@@ -127,7 +127,7 @@ static int radeon_emit_irq(drm_device_t * dev)
return
ret
;
}
static
int
radeon_wait_irq
(
drm_device_t
*
dev
,
int
swi_nr
)
static
int
radeon_wait_irq
(
struct
drm_device
*
dev
,
int
swi_nr
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
...
...
@@ -144,7 +144,7 @@ static int radeon_wait_irq(drm_device_t * dev, int swi_nr)
return
ret
;
}
int
radeon_driver_vblank_do_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
,
int
radeon_driver_vblank_do_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
,
int
crtc
)
{
drm_radeon_private_t
*
dev_priv
=
...
...
@@ -184,12 +184,12 @@ int radeon_driver_vblank_do_wait(drm_device_t * dev, unsigned int *sequence,
return
ret
;
}
int
radeon_driver_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
)
int
radeon_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
)
{
return
radeon_driver_vblank_do_wait
(
dev
,
sequence
,
DRM_RADEON_VBLANK_CRTC1
);
}
int
radeon_driver_vblank_wait2
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
)
int
radeon_driver_vblank_wait2
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
)
{
return
radeon_driver_vblank_do_wait
(
dev
,
sequence
,
DRM_RADEON_VBLANK_CRTC2
);
}
...
...
@@ -242,7 +242,7 @@ int radeon_irq_wait(DRM_IOCTL_ARGS)
return
radeon_wait_irq
(
dev
,
irqwait
.
irq_seq
);
}
static
void
radeon_enable_interrupt
(
drm_device_t
*
dev
)
static
void
radeon_enable_interrupt
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
...
...
@@ -259,7 +259,7 @@ static void radeon_enable_interrupt(drm_device_t *dev)
/* drm_dma.h hooks
*/
void
radeon_driver_irq_preinstall
(
drm_device_t
*
dev
)
void
radeon_driver_irq_preinstall
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
...
...
@@ -273,7 +273,7 @@ void radeon_driver_irq_preinstall(drm_device_t * dev)
RADEON_CRTC2_VBLANK_STAT
));
}
void
radeon_driver_irq_postinstall
(
drm_device_t
*
dev
)
void
radeon_driver_irq_postinstall
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
...
...
@@ -284,7 +284,7 @@ void radeon_driver_irq_postinstall(drm_device_t * dev)
radeon_enable_interrupt
(
dev
);
}
void
radeon_driver_irq_uninstall
(
drm_device_t
*
dev
)
void
radeon_driver_irq_uninstall
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
...
...
@@ -298,7 +298,7 @@ void radeon_driver_irq_uninstall(drm_device_t * dev)
}
int
radeon_vblank_crtc_get
(
drm_device_t
*
dev
)
int
radeon_vblank_crtc_get
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
u32
flag
;
...
...
@@ -315,7 +315,7 @@ int radeon_vblank_crtc_get(drm_device_t *dev)
return
value
;
}
int
radeon_vblank_crtc_set
(
drm_device_t
*
dev
,
int64_t
value
)
int
radeon_vblank_crtc_set
(
struct
drm_device
*
dev
,
int64_t
value
)
{
drm_radeon_private_t
*
dev_priv
=
(
drm_radeon_private_t
*
)
dev
->
dev_private
;
if
(
value
&
~
(
DRM_RADEON_VBLANK_CRTC1
|
DRM_RADEON_VBLANK_CRTC2
))
{
...
...
drivers/char/drm/radeon_state.c
浏览文件 @
84b1fd10
...
...
@@ -39,7 +39,7 @@
static
__inline__
int
radeon_check_and_fixup_offset
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
u32
*
offset
)
{
u64
off
=
*
offset
;
...
...
@@ -90,7 +90,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
static
__inline__
int
radeon_check_and_fixup_packets
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
int
id
,
u32
*
data
)
{
switch
(
id
)
{
...
...
@@ -264,7 +264,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
static
__inline__
int
radeon_check_and_fixup_packet3
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
,
unsigned
int
*
cmdsz
)
...
...
@@ -439,7 +439,7 @@ static __inline__ void radeon_emit_clip_rect(drm_radeon_private_t * dev_priv,
/* Emit 1.1 state
*/
static
int
radeon_emit_state
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
drm_radeon_context_regs_t
*
ctx
,
drm_radeon_texture_regs_t
*
tex
,
unsigned
int
dirty
)
...
...
@@ -608,7 +608,7 @@ static int radeon_emit_state(drm_radeon_private_t * dev_priv,
/* Emit 1.2 state
*/
static
int
radeon_emit_state2
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
drm_radeon_state_t
*
state
)
{
RING_LOCALS
;
...
...
@@ -844,7 +844,7 @@ static void radeon_cp_performance_boxes(drm_radeon_private_t * dev_priv)
* CP command dispatch functions
*/
static
void
radeon_cp_dispatch_clear
(
drm_device_t
*
dev
,
static
void
radeon_cp_dispatch_clear
(
struct
drm_device
*
dev
,
drm_radeon_clear_t
*
clear
,
drm_radeon_clear_rect_t
*
depth_boxes
)
{
...
...
@@ -1335,7 +1335,7 @@ static void radeon_cp_dispatch_clear(drm_device_t * dev,
ADVANCE_RING
();
}
static
void
radeon_cp_dispatch_swap
(
drm_device_t
*
dev
)
static
void
radeon_cp_dispatch_swap
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_radeon_sarea_t
*
sarea_priv
=
dev_priv
->
sarea_priv
;
...
...
@@ -1412,7 +1412,7 @@ static void radeon_cp_dispatch_swap(drm_device_t * dev)
ADVANCE_RING
();
}
static
void
radeon_cp_dispatch_flip
(
drm_device_t
*
dev
)
static
void
radeon_cp_dispatch_flip
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_sarea_t
*
sarea
=
(
drm_sarea_t
*
)
dev_priv
->
sarea
->
handle
;
...
...
@@ -1491,7 +1491,7 @@ typedef struct {
unsigned
int
vc_format
;
}
drm_radeon_tcl_prim_t
;
static
void
radeon_cp_dispatch_vertex
(
drm_device_t
*
dev
,
static
void
radeon_cp_dispatch_vertex
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
,
drm_radeon_tcl_prim_t
*
prim
)
{
...
...
@@ -1537,7 +1537,7 @@ static void radeon_cp_dispatch_vertex(drm_device_t * dev,
}
while
(
i
<
nbox
);
}
static
void
radeon_cp_discard_buffer
(
drm_device_t
*
dev
,
drm_buf_t
*
buf
)
static
void
radeon_cp_discard_buffer
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_radeon_buf_priv_t
*
buf_priv
=
buf
->
dev_private
;
...
...
@@ -1554,7 +1554,7 @@ static void radeon_cp_discard_buffer(drm_device_t * dev, drm_buf_t * buf)
buf
->
used
=
0
;
}
static
void
radeon_cp_dispatch_indirect
(
drm_device_t
*
dev
,
static
void
radeon_cp_dispatch_indirect
(
struct
drm_device
*
dev
,
drm_buf_t
*
buf
,
int
start
,
int
end
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -1588,7 +1588,7 @@ static void radeon_cp_dispatch_indirect(drm_device_t * dev,
}
}
static
void
radeon_cp_dispatch_indices
(
drm_device_t
*
dev
,
static
void
radeon_cp_dispatch_indices
(
struct
drm_device
*
dev
,
drm_buf_t
*
elt_buf
,
drm_radeon_tcl_prim_t
*
prim
)
{
...
...
@@ -1647,12 +1647,12 @@ static void radeon_cp_dispatch_indices(drm_device_t * dev,
#define RADEON_MAX_TEXTURE_SIZE RADEON_BUFFER_SIZE
static
int
radeon_cp_dispatch_texture
(
DRMFILE
filp
,
drm_device_t
*
dev
,
struct
drm_device
*
dev
,
drm_radeon_texture_t
*
tex
,
drm_radeon_tex_image_t
*
image
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_buf_t
*
buf
;
u32
format
;
u32
*
buffer
;
...
...
@@ -1881,7 +1881,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp,
return
0
;
}
static
void
radeon_cp_dispatch_stipple
(
drm_device_t
*
dev
,
u32
*
stipple
)
static
void
radeon_cp_dispatch_stipple
(
struct
drm_device
*
dev
,
u32
*
stipple
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
int
i
;
...
...
@@ -2134,7 +2134,7 @@ static int radeon_cp_clear(DRM_IOCTL_ARGS)
/* Not sure why this isn't set all the time:
*/
static
int
radeon_do_init_pageflip
(
drm_device_t
*
dev
)
static
int
radeon_do_init_pageflip
(
struct
drm_device
*
dev
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
RING_LOCALS
;
...
...
@@ -2206,7 +2206,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
{
DRM_DEVICE
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_radeon_sarea_t
*
sarea_priv
=
dev_priv
->
sarea_priv
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_t
*
buf
;
...
...
@@ -2289,7 +2289,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
{
DRM_DEVICE
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_radeon_sarea_t
*
sarea_priv
=
dev_priv
->
sarea_priv
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_t
*
buf
;
...
...
@@ -2507,7 +2507,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
{
DRM_DEVICE
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_radeon_sarea_t
*
sarea_priv
=
dev_priv
->
sarea_priv
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_t
*
buf
;
...
...
@@ -2603,7 +2603,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
}
static
int
radeon_emit_packets
(
drm_radeon_private_t
*
dev_priv
,
drm_file_t
*
filp_priv
,
struct
drm_file
*
filp_priv
,
drm_radeon_cmd_header_t
header
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
)
{
...
...
@@ -2728,8 +2728,8 @@ static __inline__ int radeon_emit_veclinear(drm_radeon_private_t *dev_priv,
return
0
;
}
static
int
radeon_emit_packet3
(
drm_device_t
*
dev
,
drm_file_t
*
filp_priv
,
static
int
radeon_emit_packet3
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp_priv
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -2754,8 +2754,8 @@ static int radeon_emit_packet3(drm_device_t * dev,
return
0
;
}
static
int
radeon_emit_packet3_cliprect
(
drm_device_t
*
dev
,
drm_file_t
*
filp_priv
,
static
int
radeon_emit_packet3_cliprect
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp_priv
,
drm_radeon_kcmd_buffer_t
*
cmdbuf
,
int
orig_nbox
)
{
...
...
@@ -2816,7 +2816,7 @@ static int radeon_emit_packet3_cliprect(drm_device_t *dev,
return
0
;
}
static
int
radeon_emit_wait
(
drm_device_t
*
dev
,
int
flags
)
static
int
radeon_emit_wait
(
struct
drm_device
*
dev
,
int
flags
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
RING_LOCALS
;
...
...
@@ -2849,7 +2849,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS)
{
DRM_DEVICE
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_t
*
buf
=
NULL
;
int
idx
;
...
...
@@ -3105,7 +3105,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS)
{
DRM_DEVICE
;
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
filp_priv
;
struct
drm_file
*
filp_priv
;
drm_radeon_setparam_t
sp
;
struct
drm_radeon_driver_file_fields
*
radeon_priv
;
...
...
@@ -3162,7 +3162,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS)
*
* DRM infrastructure takes care of reclaiming dma buffers.
*/
void
radeon_driver_preclose
(
drm_device_t
*
dev
,
DRMFILE
filp
)
void
radeon_driver_preclose
(
struct
drm_device
*
dev
,
DRMFILE
filp
)
{
if
(
dev
->
dev_private
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -3173,7 +3173,7 @@ void radeon_driver_preclose(drm_device_t * dev, DRMFILE filp)
}
}
void
radeon_driver_lastclose
(
drm_device_t
*
dev
)
void
radeon_driver_lastclose
(
struct
drm_device
*
dev
)
{
if
(
dev
->
dev_private
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -3186,7 +3186,7 @@ void radeon_driver_lastclose(drm_device_t * dev)
radeon_do_release
(
dev
);
}
int
radeon_driver_open
(
drm_device_t
*
dev
,
drm_file_t
*
filp_priv
)
int
radeon_driver_open
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp_priv
)
{
drm_radeon_private_t
*
dev_priv
=
dev
->
dev_private
;
struct
drm_radeon_driver_file_fields
*
radeon_priv
;
...
...
@@ -3208,7 +3208,7 @@ int radeon_driver_open(drm_device_t * dev, drm_file_t * filp_priv)
return
0
;
}
void
radeon_driver_postclose
(
drm_device_t
*
dev
,
drm_file_t
*
filp_priv
)
void
radeon_driver_postclose
(
struct
drm_device
*
dev
,
struct
drm_file
*
filp_priv
)
{
struct
drm_radeon_driver_file_fields
*
radeon_priv
=
filp_priv
->
driver_priv
;
...
...
drivers/char/drm/sis_drv.c
浏览文件 @
84b1fd10
...
...
@@ -35,7 +35,7 @@ static struct pci_device_id pciidlist[] = {
sisdrv_PCI_IDS
};
static
int
sis_driver_load
(
drm_device_t
*
dev
,
unsigned
long
chipset
)
static
int
sis_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
chipset
)
{
drm_sis_private_t
*
dev_priv
;
int
ret
;
...
...
@@ -54,7 +54,7 @@ static int sis_driver_load(drm_device_t *dev, unsigned long chipset)
return
ret
;
}
static
int
sis_driver_unload
(
drm_device_t
*
dev
)
static
int
sis_driver_unload
(
struct
drm_device
*
dev
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
drivers/char/drm/sis_drv.h
浏览文件 @
84b1fd10
...
...
@@ -61,9 +61,9 @@ typedef struct drm_sis_private {
unsigned
long
agp_offset
;
}
drm_sis_private_t
;
extern
int
sis_idle
(
drm_device_t
*
dev
);
extern
void
sis_reclaim_buffers_locked
(
drm_device_t
*
dev
,
struct
file
*
filp
);
extern
void
sis_lastclose
(
drm_device_t
*
dev
);
extern
int
sis_idle
(
struct
drm_device
*
dev
);
extern
void
sis_reclaim_buffers_locked
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
extern
void
sis_lastclose
(
struct
drm_device
*
dev
);
extern
drm_ioctl_desc_t
sis_ioctls
[];
extern
int
sis_max_ioctl
;
...
...
drivers/char/drm/sis_mm.c
浏览文件 @
84b1fd10
...
...
@@ -123,7 +123,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS)
return
0
;
}
static
int
sis_drm_alloc
(
drm_device_t
*
dev
,
drm_file_t
*
priv
,
static
int
sis_drm_alloc
(
struct
drm_device
*
dev
,
struct
drm_file
*
priv
,
unsigned
long
data
,
int
pool
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -229,7 +229,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
return
sis_drm_alloc
(
dev
,
priv
,
data
,
AGP_TYPE
);
}
static
drm_local_map_t
*
sis_reg_init
(
drm_device_t
*
dev
)
static
drm_local_map_t
*
sis_reg_init
(
struct
drm_device
*
dev
)
{
drm_map_list_t
*
entry
;
drm_local_map_t
*
map
;
...
...
@@ -245,7 +245,7 @@ static drm_local_map_t *sis_reg_init(drm_device_t *dev)
return
NULL
;
}
int
sis_idle
(
drm_device_t
*
dev
)
int
sis_idle
(
struct
drm_device
*
dev
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
uint32_t
idle_reg
;
...
...
@@ -314,10 +314,10 @@ void sis_lastclose(struct drm_device *dev)
mutex_unlock
(
&
dev
->
struct_mutex
);
}
void
sis_reclaim_buffers_locked
(
drm_device_t
*
dev
,
struct
file
*
filp
)
void
sis_reclaim_buffers_locked
(
struct
drm_device
*
dev
,
struct
file
*
filp
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
priv
=
filp
->
private_data
;
struct
drm_file
*
priv
=
filp
->
private_data
;
mutex_lock
(
&
dev
->
struct_mutex
);
if
(
drm_sman_owner_clean
(
&
dev_priv
->
sman
,
(
unsigned
long
)
priv
))
{
...
...
drivers/char/drm/via_dma.c
浏览文件 @
84b1fd10
...
...
@@ -151,7 +151,7 @@ static inline uint32_t *via_check_dma(drm_via_private_t * dev_priv,
return
(
uint32_t
*
)
(
dev_priv
->
dma_ptr
+
dev_priv
->
dma_low
);
}
int
via_dma_cleanup
(
drm_device_t
*
dev
)
int
via_dma_cleanup
(
struct
drm_device
*
dev
)
{
if
(
dev
->
dev_private
)
{
drm_via_private_t
*
dev_priv
=
...
...
@@ -169,7 +169,7 @@ int via_dma_cleanup(drm_device_t * dev)
return
0
;
}
static
int
via_initialize
(
drm_device_t
*
dev
,
static
int
via_initialize
(
struct
drm_device
*
dev
,
drm_via_private_t
*
dev_priv
,
drm_via_dma_init_t
*
init
)
{
...
...
@@ -262,7 +262,7 @@ static int via_dma_init(DRM_IOCTL_ARGS)
return
retcode
;
}
static
int
via_dispatch_cmdbuffer
(
drm_device_t
*
dev
,
drm_via_cmdbuffer_t
*
cmd
)
static
int
via_dispatch_cmdbuffer
(
struct
drm_device
*
dev
,
drm_via_cmdbuffer_t
*
cmd
)
{
drm_via_private_t
*
dev_priv
;
uint32_t
*
vb
;
...
...
@@ -316,7 +316,7 @@ static int via_dispatch_cmdbuffer(drm_device_t * dev, drm_via_cmdbuffer_t * cmd)
return
0
;
}
int
via_driver_dma_quiescent
(
drm_device_t
*
dev
)
int
via_driver_dma_quiescent
(
struct
drm_device
*
dev
)
{
drm_via_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -356,7 +356,7 @@ static int via_cmdbuffer(DRM_IOCTL_ARGS)
return
0
;
}
static
int
via_dispatch_pci_cmdbuffer
(
drm_device_t
*
dev
,
static
int
via_dispatch_pci_cmdbuffer
(
struct
drm_device
*
dev
,
drm_via_cmdbuffer_t
*
cmd
)
{
drm_via_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
drivers/char/drm/via_dmablit.c
浏览文件 @
84b1fd10
...
...
@@ -207,7 +207,7 @@ via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg)
*/
static
void
via_fire_dmablit
(
drm_device_t
*
dev
,
drm_via_sg_info_t
*
vsg
,
int
engine
)
via_fire_dmablit
(
struct
drm_device
*
dev
,
drm_via_sg_info_t
*
vsg
,
int
engine
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -289,7 +289,7 @@ via_alloc_desc_pages(drm_via_sg_info_t *vsg)
}
static
void
via_abort_dmablit
(
drm_device_t
*
dev
,
int
engine
)
via_abort_dmablit
(
struct
drm_device
*
dev
,
int
engine
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -297,7 +297,7 @@ via_abort_dmablit(drm_device_t *dev, int engine)
}
static
void
via_dmablit_engine_off
(
drm_device_t
*
dev
,
int
engine
)
via_dmablit_engine_off
(
struct
drm_device
*
dev
,
int
engine
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -314,7 +314,7 @@ via_dmablit_engine_off(drm_device_t *dev, int engine)
*/
void
via_dmablit_handler
(
drm_device_t
*
dev
,
int
engine
,
int
from_irq
)
via_dmablit_handler
(
struct
drm_device
*
dev
,
int
engine
,
int
from_irq
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
drm_via_blitq_t
*
blitq
=
dev_priv
->
blit_queues
+
engine
;
...
...
@@ -433,7 +433,7 @@ via_dmablit_active(drm_via_blitq_t *blitq, int engine, uint32_t handle, wait_que
*/
static
int
via_dmablit_sync
(
drm_device_t
*
dev
,
uint32_t
handle
,
int
engine
)
via_dmablit_sync
(
struct
drm_device
*
dev
,
uint32_t
handle
,
int
engine
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -466,7 +466,7 @@ static void
via_dmablit_timer
(
unsigned
long
data
)
{
drm_via_blitq_t
*
blitq
=
(
drm_via_blitq_t
*
)
data
;
drm_device_t
*
dev
=
blitq
->
dev
;
struct
drm_device
*
dev
=
blitq
->
dev
;
int
engine
=
(
int
)
(
blitq
-
((
drm_via_private_t
*
)
dev
->
dev_private
)
->
blit_queues
);
...
...
@@ -502,7 +502,7 @@ static void
via_dmablit_workqueue
(
struct
work_struct
*
work
)
{
drm_via_blitq_t
*
blitq
=
container_of
(
work
,
drm_via_blitq_t
,
wq
);
drm_device_t
*
dev
=
blitq
->
dev
;
struct
drm_device
*
dev
=
blitq
->
dev
;
unsigned
long
irqsave
;
drm_via_sg_info_t
*
cur_sg
;
int
cur_released
;
...
...
@@ -545,7 +545,7 @@ via_dmablit_workqueue(struct work_struct *work)
void
via_init_dmablit
(
drm_device_t
*
dev
)
via_init_dmablit
(
struct
drm_device
*
dev
)
{
int
i
,
j
;
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -582,7 +582,7 @@ via_init_dmablit(drm_device_t *dev)
static
int
via_build_sg_info
(
drm_device_t
*
dev
,
drm_via_sg_info_t
*
vsg
,
drm_via_dmablit_t
*
xfer
)
via_build_sg_info
(
struct
drm_device
*
dev
,
drm_via_sg_info_t
*
vsg
,
drm_via_dmablit_t
*
xfer
)
{
int
draw
=
xfer
->
to_fb
;
int
ret
=
0
;
...
...
@@ -730,7 +730,7 @@ via_dmablit_release_slot(drm_via_blitq_t *blitq)
static
int
via_dmablit
(
drm_device_t
*
dev
,
drm_via_dmablit_t
*
xfer
)
via_dmablit
(
struct
drm_device
*
dev
,
drm_via_dmablit_t
*
xfer
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
drm_via_sg_info_t
*
vsg
;
...
...
drivers/char/drm/via_dmablit.h
浏览文件 @
84b1fd10
...
...
@@ -59,7 +59,7 @@ typedef struct _drm_via_sg_info {
}
drm_via_sg_info_t
;
typedef
struct
_drm_via_blitq
{
drm_device_t
*
dev
;
struct
drm_device
*
dev
;
uint32_t
cur_blit_handle
;
uint32_t
done_blit_handle
;
unsigned
serviced
;
...
...
drivers/char/drm/via_drv.h
浏览文件 @
84b1fd10
...
...
@@ -123,31 +123,31 @@ extern int via_wait_irq(DRM_IOCTL_ARGS);
extern
int
via_dma_blit_sync
(
DRM_IOCTL_ARGS
);
extern
int
via_dma_blit
(
DRM_IOCTL_ARGS
);
extern
int
via_driver_load
(
drm_device_t
*
dev
,
unsigned
long
chipset
);
extern
int
via_driver_unload
(
drm_device_t
*
dev
);
extern
int
via_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
chipset
);
extern
int
via_driver_unload
(
struct
drm_device
*
dev
);
extern
int
via_init_context
(
drm_device_t
*
dev
,
int
context
);
extern
int
via_final_context
(
drm_device_t
*
dev
,
int
context
);
extern
int
via_init_context
(
struct
drm_device
*
dev
,
int
context
);
extern
int
via_final_context
(
struct
drm_device
*
dev
,
int
context
);
extern
int
via_do_cleanup_map
(
drm_device_t
*
dev
);
extern
int
via_driver_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
);
extern
int
via_do_cleanup_map
(
struct
drm_device
*
dev
);
extern
int
via_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
);
extern
irqreturn_t
via_driver_irq_handler
(
DRM_IRQ_ARGS
);
extern
void
via_driver_irq_preinstall
(
drm_device_t
*
dev
);
extern
void
via_driver_irq_postinstall
(
drm_device_t
*
dev
);
extern
void
via_driver_irq_uninstall
(
drm_device_t
*
dev
);
extern
void
via_driver_irq_preinstall
(
struct
drm_device
*
dev
);
extern
void
via_driver_irq_postinstall
(
struct
drm_device
*
dev
);
extern
void
via_driver_irq_uninstall
(
struct
drm_device
*
dev
);
extern
int
via_dma_cleanup
(
drm_device_t
*
dev
);
extern
int
via_dma_cleanup
(
struct
drm_device
*
dev
);
extern
void
via_init_command_verifier
(
void
);
extern
int
via_driver_dma_quiescent
(
drm_device_t
*
dev
);
extern
int
via_driver_dma_quiescent
(
struct
drm_device
*
dev
);
extern
void
via_init_futex
(
drm_via_private_t
*
dev_priv
);
extern
void
via_cleanup_futex
(
drm_via_private_t
*
dev_priv
);
extern
void
via_release_futex
(
drm_via_private_t
*
dev_priv
,
int
context
);
extern
void
via_reclaim_buffers_locked
(
drm_device_t
*
dev
,
struct
file
*
filp
);
extern
void
via_lastclose
(
drm_device_t
*
dev
);
extern
void
via_reclaim_buffers_locked
(
struct
drm_device
*
dev
,
struct
file
*
filp
);
extern
void
via_lastclose
(
struct
drm_device
*
dev
);
extern
void
via_dmablit_handler
(
drm_device_t
*
dev
,
int
engine
,
int
from_irq
);
extern
void
via_init_dmablit
(
drm_device_t
*
dev
);
extern
void
via_dmablit_handler
(
struct
drm_device
*
dev
,
int
engine
,
int
from_irq
);
extern
void
via_init_dmablit
(
struct
drm_device
*
dev
);
#endif
drivers/char/drm/via_irq.c
浏览文件 @
84b1fd10
...
...
@@ -98,7 +98,7 @@ static unsigned time_diff(struct timeval *now, struct timeval *then)
irqreturn_t
via_driver_irq_handler
(
DRM_IRQ_ARGS
)
{
drm_device_t
*
dev
=
(
drm_device_t
*
)
arg
;
struct
drm_device
*
dev
=
(
struct
drm_device
*
)
arg
;
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
u32
status
;
int
handled
=
0
;
...
...
@@ -163,7 +163,7 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t * dev_priv)
}
}
int
via_driver_vblank_wait
(
drm_device_t
*
dev
,
unsigned
int
*
sequence
)
int
via_driver_vblank_wait
(
struct
drm_device
*
dev
,
unsigned
int
*
sequence
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
unsigned
int
cur_vblank
;
...
...
@@ -191,7 +191,7 @@ int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
}
static
int
via_driver_irq_wait
(
drm_device_t
*
dev
,
unsigned
int
irq
,
int
force_sequence
,
via_driver_irq_wait
(
struct
drm_device
*
dev
,
unsigned
int
irq
,
int
force_sequence
,
unsigned
int
*
sequence
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -244,7 +244,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence,
* drm_dma.h hooks
*/
void
via_driver_irq_preinstall
(
drm_device_t
*
dev
)
void
via_driver_irq_preinstall
(
struct
drm_device
*
dev
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
u32
status
;
...
...
@@ -293,7 +293,7 @@ void via_driver_irq_preinstall(drm_device_t * dev)
}
}
void
via_driver_irq_postinstall
(
drm_device_t
*
dev
)
void
via_driver_irq_postinstall
(
struct
drm_device
*
dev
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
u32
status
;
...
...
@@ -312,7 +312,7 @@ void via_driver_irq_postinstall(drm_device_t * dev)
}
}
void
via_driver_irq_uninstall
(
drm_device_t
*
dev
)
void
via_driver_irq_uninstall
(
struct
drm_device
*
dev
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
u32
status
;
...
...
drivers/char/drm/via_map.c
浏览文件 @
84b1fd10
...
...
@@ -25,7 +25,7 @@
#include "via_drm.h"
#include "via_drv.h"
static
int
via_do_init_map
(
drm_device_t
*
dev
,
drm_via_init_t
*
init
)
static
int
via_do_init_map
(
struct
drm_device
*
dev
,
drm_via_init_t
*
init
)
{
drm_via_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -68,7 +68,7 @@ static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
return
0
;
}
int
via_do_cleanup_map
(
drm_device_t
*
dev
)
int
via_do_cleanup_map
(
struct
drm_device
*
dev
)
{
via_dma_cleanup
(
dev
);
...
...
@@ -95,7 +95,7 @@ int via_map_init(DRM_IOCTL_ARGS)
return
-
EINVAL
;
}
int
via_driver_load
(
drm_device_t
*
dev
,
unsigned
long
chipset
)
int
via_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
chipset
)
{
drm_via_private_t
*
dev_priv
;
int
ret
=
0
;
...
...
@@ -115,7 +115,7 @@ int via_driver_load(drm_device_t *dev, unsigned long chipset)
return
ret
;
}
int
via_driver_unload
(
drm_device_t
*
dev
)
int
via_driver_unload
(
struct
drm_device
*
dev
)
{
drm_via_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
drivers/char/drm/via_mm.c
浏览文件 @
84b1fd10
...
...
@@ -188,10 +188,10 @@ int via_mem_free(DRM_IOCTL_ARGS)
}
void
via_reclaim_buffers_locked
(
drm_device_t
*
dev
,
struct
file
*
filp
)
void
via_reclaim_buffers_locked
(
struct
drm_device
*
dev
,
struct
file
*
filp
)
{
drm_via_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_file_t
*
priv
=
filp
->
private_data
;
struct
drm_file
*
priv
=
filp
->
private_data
;
mutex_lock
(
&
dev
->
struct_mutex
);
if
(
drm_sman_owner_clean
(
&
dev_priv
->
sman
,
(
unsigned
long
)
priv
))
{
...
...
drivers/char/drm/via_verifier.c
浏览文件 @
84b1fd10
...
...
@@ -252,7 +252,7 @@ eat_words(const uint32_t ** buf, const uint32_t * buf_end, unsigned num_words)
static
__inline__
drm_local_map_t
*
via_drm_lookup_agp_map
(
drm_via_state_t
*
seq
,
unsigned
long
offset
,
unsigned
long
size
,
drm_device_t
*
dev
)
struct
drm_device
*
dev
)
{
drm_map_list_t
*
r_list
;
drm_local_map_t
*
map
=
seq
->
map_cache
;
...
...
@@ -962,7 +962,7 @@ via_parse_vheader6(drm_via_private_t * dev_priv, uint32_t const **buffer,
int
via_verify_command_stream
(
const
uint32_t
*
buf
,
unsigned
int
size
,
drm_device_t
*
dev
,
int
agp
)
struct
drm_device
*
dev
,
int
agp
)
{
drm_via_private_t
*
dev_priv
=
(
drm_via_private_t
*
)
dev
->
dev_private
;
...
...
@@ -1037,7 +1037,7 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size,
}
int
via_parse_command_stream
(
drm_device_t
*
dev
,
const
uint32_t
*
buf
,
via_parse_command_stream
(
struct
drm_device
*
dev
,
const
uint32_t
*
buf
,
unsigned
int
size
)
{
...
...
drivers/char/drm/via_verifier.h
浏览文件 @
84b1fd10
...
...
@@ -47,7 +47,7 @@ typedef struct {
drm_via_sequence_t
unfinished
;
int
agp_texture
;
int
multitex
;
drm_device_t
*
dev
;
struct
drm_device
*
dev
;
drm_local_map_t
*
map_cache
;
uint32_t
vertex_count
;
int
agp
;
...
...
@@ -55,8 +55,8 @@ typedef struct {
}
drm_via_state_t
;
extern
int
via_verify_command_stream
(
const
uint32_t
*
buf
,
unsigned
int
size
,
drm_device_t
*
dev
,
int
agp
);
extern
int
via_parse_command_stream
(
drm_device_t
*
dev
,
const
uint32_t
*
buf
,
struct
drm_device
*
dev
,
int
agp
);
extern
int
via_parse_command_stream
(
struct
drm_device
*
dev
,
const
uint32_t
*
buf
,
unsigned
int
size
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录