Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c6f08966
Commit
c6f08966
authored
May 25, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch compat_drm_dma() to drm_ioctl_kernel()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9e075680
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioc32.c
+13
-25
No files found.
drivers/gpu/drm/drm_ioc32.c
View file @
c6f08966
...
@@ -584,38 +584,26 @@ static int compat_drm_dma(struct file *file, unsigned int cmd,
...
@@ -584,38 +584,26 @@ static int compat_drm_dma(struct file *file, unsigned int cmd,
{
{
drm_dma32_t
d32
;
drm_dma32_t
d32
;
drm_dma32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
drm_dma32_t
__user
*
argp
=
(
void
__user
*
)
arg
;
struct
drm_dma
__user
*
d
;
struct
drm_dma
d
;
int
err
;
int
err
;
if
(
copy_from_user
(
&
d32
,
argp
,
sizeof
(
d32
)))
if
(
copy_from_user
(
&
d32
,
argp
,
sizeof
(
d32
)))
return
-
EFAULT
;
return
-
EFAULT
;
d
=
compat_alloc_user_space
(
sizeof
(
*
d
));
d
.
context
=
d32
.
context
;
if
(
!
d
)
d
.
send_count
=
d32
.
send_count
;
return
-
EFAULT
;
d
.
send_indices
=
compat_ptr
(
d32
.
send_indices
);
d
.
send_sizes
=
compat_ptr
(
d32
.
send_sizes
);
if
(
__put_user
(
d32
.
context
,
&
d
->
context
)
d
.
flags
=
d32
.
flags
;
||
__put_user
(
d32
.
send_count
,
&
d
->
send_count
)
d
.
request_count
=
d32
.
request_count
;
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
send_indices
,
d
.
request_indices
=
compat_ptr
(
d32
.
request_indices
);
&
d
->
send_indices
)
d
.
request_sizes
=
compat_ptr
(
d32
.
request_sizes
);
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
send_sizes
,
err
=
drm_ioctl_kernel
(
file
,
drm_legacy_dma_ioctl
,
&
d
,
DRM_AUTH
);
&
d
->
send_sizes
)
||
__put_user
(
d32
.
flags
,
&
d
->
flags
)
||
__put_user
(
d32
.
request_count
,
&
d
->
request_count
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
request_indices
,
&
d
->
request_indices
)
||
__put_user
((
int
__user
*
)(
unsigned
long
)
d32
.
request_sizes
,
&
d
->
request_sizes
))
return
-
EFAULT
;
err
=
drm_ioctl
(
file
,
DRM_IOCTL_DMA
,
(
unsigned
long
)
d
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
if
(
__get_user
(
d32
.
request_size
,
&
d
->
request_size
)
if
(
put_user
(
d
.
request_size
,
&
argp
->
request_size
)
||
__get_user
(
d32
.
granted_count
,
&
d
->
granted_count
)
||
put_user
(
d
.
granted_count
,
&
argp
->
granted_count
))
||
__put_user
(
d32
.
request_size
,
&
argp
->
request_size
)
||
__put_user
(
d32
.
granted_count
,
&
argp
->
granted_count
))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
...
@@ -996,7 +984,7 @@ static struct {
...
@@ -996,7 +984,7 @@ static struct {
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_SAREA_CTX
,
compat_drm_setsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_SET_SAREA_CTX
,
compat_drm_setsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_SAREA_CTX
,
compat_drm_getsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_GET_SAREA_CTX
,
compat_drm_getsareactx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_RES_CTX
,
compat_drm_resctx
),
DRM_IOCTL32_DEF
(
DRM_IOCTL_RES_CTX
,
compat_drm_resctx
),
[
DRM_IOCTL_NR
(
DRM_IOCTL_DMA32
)].
fn
=
compat_drm_dma
,
DRM_IOCTL32_DEF
(
DRM_IOCTL_DMA
,
compat_drm_dma
)
,
#if IS_ENABLED(CONFIG_AGP)
#if IS_ENABLED(CONFIG_AGP)
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_ENABLE32
)].
fn
=
compat_drm_agp_enable
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_ENABLE32
)].
fn
=
compat_drm_agp_enable
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_INFO32
)].
fn
=
compat_drm_agp_info
,
[
DRM_IOCTL_NR
(
DRM_IOCTL_AGP_INFO32
)].
fn
=
compat_drm_agp_info
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment