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
1df703fa
Commit
1df703fa
authored
May 28, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More drm updates from Keith Whitwell
parent
bae651dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
drivers/char/drm/radeon_drv.h
drivers/char/drm/radeon_drv.h
+18
-12
drivers/char/drm/radeon_state.c
drivers/char/drm/radeon_state.c
+3
-3
No files found.
drivers/char/drm/radeon_drv.h
View file @
1df703fa
...
...
@@ -714,6 +714,7 @@ do { \
n, __FUNCTION__ ); \
} \
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
COMMIT_RING(); \
radeon_wait_ring( dev_priv, (n) * sizeof(u32) ); \
} \
_nr = n; dev_priv->ring.space -= (n) * sizeof(u32); \
...
...
@@ -756,20 +757,25 @@ do { \
#define OUT_RING_USER_TABLE( tab, sz ) do { \
if (write + (sz) > mask) { \
int i; \
for ( i = 0 ; i < (sz) ; i++ ) { \
if (__get_user( tmp, &(tab)[i] )) \
return -EFAULT; \
OUT_RING( tmp ); \
} \
} \
else { \
int _size = (sz); \
int *_tab = (tab); \
\
if (write + _size > mask) { \
int i = (mask+1) - write; \
if (__copy_from_user( (int *)(ring+write), \
(tab), (sz)
*4 )) \
_tab, i
*4 )) \
return -EFAULT; \
write += (sz); \
write = 0; \
_size -= i; \
_tab += i; \
} \
\
if (_size && __copy_from_user( (int *)(ring+write), \
_tab, _size*4 )) \
return -EFAULT; \
\
write += _size; \
write &= mask; \
} while (0)
...
...
drivers/char/drm/radeon_state.c
View file @
1df703fa
...
...
@@ -1587,7 +1587,7 @@ static int radeon_emit_packets(
{
int
sz
=
packet
[(
int
)
header
.
packet
.
packet_id
].
len
;
int
reg
=
packet
[(
int
)
header
.
packet
.
packet_id
].
start
;
int
tmp
,
*
data
=
(
int
*
)
cmdbuf
->
buf
;
int
*
data
=
(
int
*
)
cmdbuf
->
buf
;
RING_LOCALS
;
if
(
sz
*
sizeof
(
int
)
>
cmdbuf
->
bufsz
)
...
...
@@ -1610,7 +1610,7 @@ static inline int radeon_emit_scalars(
drm_radeon_cmd_buffer_t
*
cmdbuf
)
{
int
sz
=
header
.
scalars
.
count
;
int
tmp
,
*
data
=
(
int
*
)
cmdbuf
->
buf
;
int
*
data
=
(
int
*
)
cmdbuf
->
buf
;
int
start
=
header
.
scalars
.
offset
;
int
stride
=
header
.
scalars
.
stride
;
RING_LOCALS
;
...
...
@@ -1632,7 +1632,7 @@ static inline int radeon_emit_vectors(
drm_radeon_cmd_buffer_t
*
cmdbuf
)
{
int
sz
=
header
.
vectors
.
count
;
int
tmp
,
*
data
=
(
int
*
)
cmdbuf
->
buf
;
int
*
data
=
(
int
*
)
cmdbuf
->
buf
;
int
start
=
header
.
vectors
.
offset
;
int
stride
=
header
.
vectors
.
stride
;
RING_LOCALS
;
...
...
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