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
nexedi
linux
Commits
6e064a1a
Commit
6e064a1a
authored
Apr 28, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Previous DRI CVS merge improperly removed some sparc-only
support. Add it back in now that DRI is synched up again.
parent
6236de0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
drivers/char/drm/drm_drv.h
drivers/char/drm/drm_drv.h
+29
-0
No files found.
drivers/char/drm/drm_drv.h
View file @
6e064a1a
...
...
@@ -84,6 +84,9 @@
#ifndef __HAVE_SG
#define __HAVE_SG 0
#endif
#ifndef __HAVE_KERNEL_CTX_SWITCH
#define __HAVE_KERNEL_CTX_SWITCH 0
#endif
#ifndef __HAVE_DRIVER_FOPS_READ
#define __HAVE_DRIVER_FOPS_READ 0
#endif
...
...
@@ -1012,6 +1015,12 @@ int DRM(lock)( struct inode *inode, struct file *filp,
if
(
lock
.
flags
&
_DRM_LOCK_QUIESCENT
)
{
DRIVER_DMA_QUIESCENT
();
}
#endif
#if __HAVE_KERNEL_CTX_SWITCH
if
(
dev
->
last_context
!=
lock
.
context
)
{
DRM
(
context_switch
)(
dev
,
dev
->
last_context
,
lock
.
context
);
}
#endif
}
...
...
@@ -1039,6 +1048,25 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
atomic_inc
(
&
dev
->
counts
[
_DRM_STAT_UNLOCKS
]
);
#if __HAVE_KERNEL_CTX_SWITCH
/* We no longer really hold it, but if we are the next
* agent to request it then we should just be able to
* take it immediately and not eat the ioctl.
*/
dev
->
lock
.
filp
=
0
;
{
__volatile__
unsigned
int
*
plock
=
&
dev
->
lock
.
hw_lock
->
lock
;
unsigned
int
old
,
new
,
prev
,
ctx
;
ctx
=
lock
.
context
;
do
{
old
=
*
plock
;
new
=
ctx
;
prev
=
cmpxchg
(
plock
,
old
,
new
);
}
while
(
prev
!=
old
);
}
wake_up_interruptible
(
&
dev
->
lock
.
lock_queue
);
#else
DRM
(
lock_transfer
)(
dev
,
&
dev
->
lock
.
hw_lock
->
lock
,
DRM_KERNEL_CONTEXT
);
#if __HAVE_DMA_SCHEDULE
...
...
@@ -1053,6 +1081,7 @@ int DRM(unlock)( struct inode *inode, struct file *filp,
DRM_ERROR
(
"
\n
"
);
}
}
#endif
/* !__HAVE_KERNEL_CTX_SWITCH */
unblock_all_signals
();
return
0
;
...
...
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