Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
da509d7a
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,发现更多精彩内容 >>
提交
da509d7a
编写于
5月 26, 2007
作者:
D
Dave Airlie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm: remove DRM_GETSAREA and replace with drm_getsarea function
Signed-off-by:
N
Dave Airlie
<
airlied@linux.ie
>
上级
bd1b331f
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
22 addition
and
26 deletion
+22
-26
drivers/char/drm/drmP.h
drivers/char/drm/drmP.h
+2
-0
drivers/char/drm/drm_drv.c
drivers/char/drm/drm_drv.c
+14
-0
drivers/char/drm/drm_os_linux.h
drivers/char/drm/drm_os_linux.h
+0
-18
drivers/char/drm/i915_dma.c
drivers/char/drm/i915_dma.c
+1
-1
drivers/char/drm/mga_dma.c
drivers/char/drm/mga_dma.c
+1
-2
drivers/char/drm/r128_cce.c
drivers/char/drm/r128_cce.c
+1
-2
drivers/char/drm/radeon_cp.c
drivers/char/drm/radeon_cp.c
+1
-1
drivers/char/drm/savage_bci.c
drivers/char/drm/savage_bci.c
+1
-1
drivers/char/drm/via_map.c
drivers/char/drm/via_map.c
+1
-1
未找到文件。
drivers/char/drm/drmP.h
浏览文件 @
da509d7a
...
...
@@ -1024,6 +1024,8 @@ extern drm_head_t **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
,
int
minor
,
...
...
drivers/char/drm/drm_drv.c
浏览文件 @
da509d7a
...
...
@@ -517,3 +517,17 @@ int drm_ioctl(struct inode *inode, struct file *filp,
}
EXPORT_SYMBOL
(
drm_ioctl
);
drm_local_map_t
*
drm_getsarea
(
struct
drm_device
*
dev
)
{
drm_map_list_t
*
entry
;
list_for_each_entry
(
entry
,
&
dev
->
maplist
->
head
,
head
)
{
if
(
entry
->
map
&&
entry
->
map
->
type
==
_DRM_SHM
&&
(
entry
->
map
->
flags
&
_DRM_CONTAINS_LOCK
))
{
return
entry
->
map
;
}
}
return
NULL
;
}
EXPORT_SYMBOL
(
drm_getsarea
);
drivers/char/drm/drm_os_linux.h
浏览文件 @
da509d7a
...
...
@@ -96,24 +96,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
#define DRM_GET_PRIV_WITH_RETURN(_priv, _filp) _priv = _filp->private_data
/**
* Get the pointer to the SAREA.
*
* Searches the SAREA on the mapping lists and points drm_device::sarea to it.
*/
#define DRM_GETSAREA() \
do { \
drm_map_list_t *entry; \
list_for_each_entry( entry, &dev->maplist, head ) { \
if ( entry->map && \
entry->map->type == _DRM_SHM && \
(entry->map->flags & _DRM_CONTAINS_LOCK) ) { \
dev_priv->sarea = entry->map; \
break; \
} \
} \
} while (0)
#define DRM_HZ HZ
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
...
...
drivers/char/drm/i915_dma.c
浏览文件 @
da509d7a
...
...
@@ -132,7 +132,7 @@ static int i915_initialize(drm_device_t * dev,
{
memset
(
dev_priv
,
0
,
sizeof
(
drm_i915_private_t
));
DRM_GETSAREA
(
);
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"can not find sarea!
\n
"
);
dev
->
dev_private
=
(
void
*
)
dev_priv
;
...
...
drivers/char/drm/mga_dma.c
浏览文件 @
da509d7a
...
...
@@ -823,8 +823,7 @@ static int mga_do_init_dma(drm_device_t * dev, drm_mga_init_t * init)
dev_priv
->
texture_offset
=
init
->
texture_offset
[
0
];
dev_priv
->
texture_size
=
init
->
texture_size
[
0
];
DRM_GETSAREA
();
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"failed to find sarea!
\n
"
);
return
DRM_ERR
(
EINVAL
);
...
...
drivers/char/drm/r128_cce.c
浏览文件 @
da509d7a
...
...
@@ -456,8 +456,7 @@ static int r128_do_init_cce(drm_device_t * dev, drm_r128_init_t * init)
dev_priv
->
span_pitch_offset_c
=
(((
dev_priv
->
depth_pitch
/
8
)
<<
21
)
|
(
dev_priv
->
span_offset
>>
5
));
DRM_GETSAREA
();
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"could not find sarea!
\n
"
);
dev
->
dev_private
=
(
void
*
)
dev_priv
;
...
...
drivers/char/drm/radeon_cp.c
浏览文件 @
da509d7a
...
...
@@ -1501,13 +1501,13 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
RADEON_ROUND_MODE_TRUNC
|
RADEON_ROUND_PREC_8TH_PIX
);
DRM_GETSAREA
();
dev_priv
->
ring_offset
=
init
->
ring_offset
;
dev_priv
->
ring_rptr_offset
=
init
->
ring_rptr_offset
;
dev_priv
->
buffers_offset
=
init
->
buffers_offset
;
dev_priv
->
gart_textures_offset
=
init
->
gart_textures_offset
;
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"could not find sarea!
\n
"
);
radeon_do_cleanup_cp
(
dev
);
...
...
drivers/char/drm/savage_bci.c
浏览文件 @
da509d7a
...
...
@@ -711,7 +711,7 @@ static int savage_do_init_bci(drm_device_t * dev, drm_savage_init_t * init)
dev_priv
->
texture_offset
=
init
->
texture_offset
;
dev_priv
->
texture_size
=
init
->
texture_size
;
DRM_GETSAREA
(
);
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"could not find sarea!
\n
"
);
savage_do_cleanup_bci
(
dev
);
...
...
drivers/char/drm/via_map.c
浏览文件 @
da509d7a
...
...
@@ -31,7 +31,7 @@ static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
DRM_DEBUG
(
"%s
\n
"
,
__FUNCTION__
);
DRM_GETSAREA
(
);
dev_priv
->
sarea
=
drm_getsarea
(
dev
);
if
(
!
dev_priv
->
sarea
)
{
DRM_ERROR
(
"could not find sarea!
\n
"
);
dev
->
dev_private
=
(
void
*
)
dev_priv
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录