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
08cd3d43
Commit
08cd3d43
authored
Oct 12, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: fix thinko in channel locking in semaphore path
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
21e86c1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/nouveau/nouveau_fence.c
+3
-3
No files found.
drivers/gpu/drm/nouveau/nouveau_fence.c
View file @
08cd3d43
...
@@ -393,23 +393,23 @@ nouveau_fence_sync(struct nouveau_fence *fence,
...
@@ -393,23 +393,23 @@ nouveau_fence_sync(struct nouveau_fence *fence,
return
nouveau_fence_wait
(
fence
,
NULL
,
false
,
false
);
return
nouveau_fence_wait
(
fence
,
NULL
,
false
,
false
);
}
}
/* try to take
w
chan's mutex, if we can't take it right away
/* try to take chan's mutex, if we can't take it right away
* we have to fallback to software sync to prevent locking
* we have to fallback to software sync to prevent locking
* order issues
* order issues
*/
*/
if
(
!
mutex_trylock
(
&
w
chan
->
mutex
))
{
if
(
!
mutex_trylock
(
&
chan
->
mutex
))
{
free_semaphore
(
&
sema
->
ref
);
free_semaphore
(
&
sema
->
ref
);
return
nouveau_fence_wait
(
fence
,
NULL
,
false
,
false
);
return
nouveau_fence_wait
(
fence
,
NULL
,
false
,
false
);
}
}
/* Make wchan wait until it gets signalled */
/* Make wchan wait until it gets signalled */
ret
=
emit_semaphore
(
wchan
,
NV_SW_SEMAPHORE_ACQUIRE
,
sema
);
ret
=
emit_semaphore
(
wchan
,
NV_SW_SEMAPHORE_ACQUIRE
,
sema
);
mutex_unlock
(
&
wchan
->
mutex
);
if
(
ret
)
if
(
ret
)
goto
out
;
goto
out
;
/* Signal the semaphore from chan */
/* Signal the semaphore from chan */
ret
=
emit_semaphore
(
chan
,
NV_SW_SEMAPHORE_RELEASE
,
sema
);
ret
=
emit_semaphore
(
chan
,
NV_SW_SEMAPHORE_RELEASE
,
sema
);
mutex_unlock
(
&
chan
->
mutex
);
out:
out:
kref_put
(
&
sema
->
ref
,
free_semaphore
);
kref_put
(
&
sema
->
ref
,
free_semaphore
);
return
ret
;
return
ret
;
...
...
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