Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2ff7cfe9
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2ff7cfe9
编写于
9月 29, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
r128: switch compat ioctls to drm_ioctl_kernel()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
2a479aa8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
61 deletion
+48
-61
drivers/gpu/drm/r128/r128_drv.h
drivers/gpu/drm/r128/r128_drv.h
+4
-0
drivers/gpu/drm/r128/r128_ioc32.c
drivers/gpu/drm/r128/r128_ioc32.c
+41
-58
drivers/gpu/drm/r128/r128_state.c
drivers/gpu/drm/r128/r128_state.c
+3
-3
未找到文件。
drivers/gpu/drm/r128/r128_drv.h
浏览文件 @
2ff7cfe9
...
...
@@ -147,6 +147,10 @@ extern int r128_engine_reset(struct drm_device *dev, void *data, struct drm_file
extern
int
r128_fullscreen
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
);
extern
int
r128_cce_buffers
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
);
extern
int
r128_cce_stipple
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
);
extern
int
r128_cce_depth
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
);
extern
int
r128_getparam
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
);
extern
void
r128_freelist_reset
(
struct
drm_device
*
dev
);
extern
int
r128_wait_ring
(
drm_r128_private_t
*
dev_priv
,
int
n
);
...
...
drivers/gpu/drm/r128/r128_ioc32.c
浏览文件 @
2ff7cfe9
...
...
@@ -63,39 +63,36 @@ static int compat_r128_init(struct file *file, unsigned int cmd,
unsigned
long
arg
)
{
drm_r128_init32_t
init32
;
drm_r128_init_t
__user
*
init
;
drm_r128_init_t
init
;
if
(
copy_from_user
(
&
init32
,
(
void
__user
*
)
arg
,
sizeof
(
init32
)))
return
-
EFAULT
;
init
=
compat_alloc_user_space
(
sizeof
(
*
init
));
if
(
!
access_ok
(
VERIFY_WRITE
,
init
,
sizeof
(
*
init
))
||
__put_user
(
init32
.
func
,
&
init
->
func
)
||
__put_user
(
init32
.
sarea_priv_offset
,
&
init
->
sarea_priv_offset
)
||
__put_user
(
init32
.
is_pci
,
&
init
->
is_pci
)
||
__put_user
(
init32
.
cce_mode
,
&
init
->
cce_mode
)
||
__put_user
(
init32
.
cce_secure
,
&
init
->
cce_secure
)
||
__put_user
(
init32
.
ring_size
,
&
init
->
ring_size
)
||
__put_user
(
init32
.
usec_timeout
,
&
init
->
usec_timeout
)
||
__put_user
(
init32
.
fb_bpp
,
&
init
->
fb_bpp
)
||
__put_user
(
init32
.
front_offset
,
&
init
->
front_offset
)
||
__put_user
(
init32
.
front_pitch
,
&
init
->
front_pitch
)
||
__put_user
(
init32
.
back_offset
,
&
init
->
back_offset
)
||
__put_user
(
init32
.
back_pitch
,
&
init
->
back_pitch
)
||
__put_user
(
init32
.
depth_bpp
,
&
init
->
depth_bpp
)
||
__put_user
(
init32
.
depth_offset
,
&
init
->
depth_offset
)
||
__put_user
(
init32
.
depth_pitch
,
&
init
->
depth_pitch
)
||
__put_user
(
init32
.
span_offset
,
&
init
->
span_offset
)
||
__put_user
(
init32
.
fb_offset
,
&
init
->
fb_offset
)
||
__put_user
(
init32
.
mmio_offset
,
&
init
->
mmio_offset
)
||
__put_user
(
init32
.
ring_offset
,
&
init
->
ring_offset
)
||
__put_user
(
init32
.
ring_rptr_offset
,
&
init
->
ring_rptr_offset
)
||
__put_user
(
init32
.
buffers_offset
,
&
init
->
buffers_offset
)
||
__put_user
(
init32
.
agp_textures_offset
,
&
init
->
agp_textures_offset
))
return
-
EFAULT
;
return
drm_ioctl
(
file
,
DRM_IOCTL_R128_INIT
,
(
unsigned
long
)
init
);
init
.
func
=
init32
.
func
;
init
.
sarea_priv_offset
=
init32
.
sarea_priv_offset
;
init
.
is_pci
=
init32
.
is_pci
;
init
.
cce_mode
=
init32
.
cce_mode
;
init
.
cce_secure
=
init32
.
cce_secure
;
init
.
ring_size
=
init32
.
ring_size
;
init
.
usec_timeout
=
init32
.
usec_timeout
;
init
.
fb_bpp
=
init32
.
fb_bpp
;
init
.
front_offset
=
init32
.
front_offset
;
init
.
front_pitch
=
init32
.
front_pitch
;
init
.
back_offset
=
init32
.
back_offset
;
init
.
back_pitch
=
init32
.
back_pitch
;
init
.
depth_bpp
=
init32
.
depth_bpp
;
init
.
depth_offset
=
init32
.
depth_offset
;
init
.
depth_pitch
=
init32
.
depth_pitch
;
init
.
span_offset
=
init32
.
span_offset
;
init
.
fb_offset
=
init32
.
fb_offset
;
init
.
mmio_offset
=
init32
.
mmio_offset
;
init
.
ring_offset
=
init32
.
ring_offset
;
init
.
ring_rptr_offset
=
init32
.
ring_rptr_offset
;
init
.
buffers_offset
=
init32
.
buffers_offset
;
init
.
agp_textures_offset
=
init32
.
agp_textures_offset
;
return
drm_ioctl_kernel
(
file
,
r128_cce_init
,
&
init
,
DRM_AUTH
|
DRM_MASTER
|
DRM_ROOT_ONLY
);
}
typedef
struct
drm_r128_depth32
{
...
...
@@ -111,25 +108,19 @@ static int compat_r128_depth(struct file *file, unsigned int cmd,
unsigned
long
arg
)
{
drm_r128_depth32_t
depth32
;
drm_r128_depth_t
__user
*
depth
;
drm_r128_depth_t
depth
;
if
(
copy_from_user
(
&
depth32
,
(
void
__user
*
)
arg
,
sizeof
(
depth32
)))
return
-
EFAULT
;
depth
=
compat_alloc_user_space
(
sizeof
(
*
depth
));
if
(
!
access_ok
(
VERIFY_WRITE
,
depth
,
sizeof
(
*
depth
))
||
__put_user
(
depth32
.
func
,
&
depth
->
func
)
||
__put_user
(
depth32
.
n
,
&
depth
->
n
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
depth32
.
x
,
&
depth
->
x
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
depth32
.
y
,
&
depth
->
y
)
||
__put_user
((
unsigned
int
__user
*
)(
unsigned
long
)
depth32
.
buffer
,
&
depth
->
buffer
)
||
__put_user
((
unsigned
char
__user
*
)(
unsigned
long
)
depth32
.
mask
,
&
depth
->
mask
))
return
-
EFAULT
;
return
drm_ioctl
(
file
,
DRM_IOCTL_R128_DEPTH
,
(
unsigned
long
)
depth
);
depth
.
func
=
depth32
.
func
;
depth
.
n
=
depth32
.
n
;
depth
.
x
=
compat_ptr
(
depth32
.
x
);
depth
.
y
=
compat_ptr
(
depth32
.
y
);
depth
.
buffer
=
compat_ptr
(
depth32
.
buffer
);
depth
.
mask
=
compat_ptr
(
depth32
.
mask
);
return
drm_ioctl_kernel
(
file
,
r128_cce_depth
,
&
depth
,
DRM_AUTH
);
}
typedef
struct
drm_r128_stipple32
{
...
...
@@ -140,18 +131,14 @@ static int compat_r128_stipple(struct file *file, unsigned int cmd,
unsigned
long
arg
)
{
drm_r128_stipple32_t
stipple32
;
drm_r128_stipple_t
__user
*
stipple
;
drm_r128_stipple_t
stipple
;
if
(
copy_from_user
(
&
stipple32
,
(
void
__user
*
)
arg
,
sizeof
(
stipple32
)))
return
-
EFAULT
;
stipple
=
compat_alloc_user_space
(
sizeof
(
*
stipple
));
if
(
!
access_ok
(
VERIFY_WRITE
,
stipple
,
sizeof
(
*
stipple
))
||
__put_user
((
unsigned
int
__user
*
)(
unsigned
long
)
stipple32
.
mask
,
&
stipple
->
mask
))
return
-
EFAULT
;
stipple
.
mask
=
compat_ptr
(
stipple32
.
mask
);
return
drm_ioctl
(
file
,
DRM_IOCTL_R128_STIPPLE
,
(
unsigned
long
)
stipple
);
return
drm_ioctl
_kernel
(
file
,
r128_cce_stipple
,
&
stipple
,
DRM_AUTH
);
}
typedef
struct
drm_r128_getparam32
{
...
...
@@ -163,19 +150,15 @@ static int compat_r128_getparam(struct file *file, unsigned int cmd,
unsigned
long
arg
)
{
drm_r128_getparam32_t
getparam32
;
drm_r128_getparam_t
__user
*
getparam
;
drm_r128_getparam_t
getparam
;
if
(
copy_from_user
(
&
getparam32
,
(
void
__user
*
)
arg
,
sizeof
(
getparam32
)))
return
-
EFAULT
;
getparam
=
compat_alloc_user_space
(
sizeof
(
*
getparam
));
if
(
!
access_ok
(
VERIFY_WRITE
,
getparam
,
sizeof
(
*
getparam
))
||
__put_user
(
getparam32
.
param
,
&
getparam
->
param
)
||
__put_user
((
void
__user
*
)(
unsigned
long
)
getparam32
.
value
,
&
getparam
->
value
))
return
-
EFAULT
;
getparam
.
param
=
getparam32
.
param
;
getparam
.
value
=
compat_ptr
(
getparam32
.
value
);
return
drm_ioctl
(
file
,
DRM_IOCTL_R128_GETPARAM
,
(
unsigned
long
)
getparam
);
return
drm_ioctl
_kernel
(
file
,
r128_getparam
,
&
getparam
,
DRM_AUTH
);
}
drm_ioctl_compat_t
*
r128_compat_ioctls
[]
=
{
...
...
drivers/gpu/drm/r128/r128_state.c
浏览文件 @
2ff7cfe9
...
...
@@ -1460,7 +1460,7 @@ static int r128_cce_blit(struct drm_device *dev, void *data, struct drm_file *fi
return
ret
;
}
static
int
r128_cce_depth
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
int
r128_cce_depth
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
{
drm_r128_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_r128_depth_t
*
depth
=
data
;
...
...
@@ -1492,7 +1492,7 @@ static int r128_cce_depth(struct drm_device *dev, void *data, struct drm_file *f
return
ret
;
}
static
int
r128_cce_stipple
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
int
r128_cce_stipple
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
{
drm_r128_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_r128_stipple_t
*
stipple
=
data
;
...
...
@@ -1582,7 +1582,7 @@ static int r128_cce_indirect(struct drm_device *dev, void *data, struct drm_file
return
0
;
}
static
int
r128_getparam
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
int
r128_getparam
(
struct
drm_device
*
dev
,
void
*
data
,
struct
drm_file
*
file_priv
)
{
drm_r128_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_r128_getparam_t
*
param
=
data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录