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
96692b09
Commit
96692b09
authored
Dec 14, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
566cf877
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
drivers/gpu/drm/nouveau/nouveau_fence.h
drivers/gpu/drm/nouveau/nouveau_fence.h
+1
-0
drivers/gpu/drm/nouveau/nv84_fence.c
drivers/gpu/drm/nouveau/nv84_fence.c
+6
-0
No files found.
drivers/gpu/drm/nouveau/nouveau_fence.h
View file @
96692b09
...
...
@@ -99,6 +99,7 @@ struct nv84_fence_priv {
struct
nouveau_bo
*
bo
;
struct
nouveau_bo
*
bo_gart
;
u32
*
suspend
;
struct
mutex
mutex
;
};
int
nv84_fence_context_new
(
struct
nouveau_channel
*
);
...
...
drivers/gpu/drm/nouveau/nv84_fence.c
View file @
96692b09
...
...
@@ -107,8 +107,10 @@ nv84_fence_context_del(struct nouveau_channel *chan)
struct
nv84_fence_chan
*
fctx
=
chan
->
fence
;
nouveau_bo_wr32
(
priv
->
bo
,
chan
->
chid
*
16
/
4
,
fctx
->
base
.
sequence
);
mutex_lock
(
&
priv
->
mutex
);
nouveau_bo_vma_del
(
priv
->
bo
,
&
fctx
->
vma_gart
);
nouveau_bo_vma_del
(
priv
->
bo
,
&
fctx
->
vma
);
mutex_unlock
(
&
priv
->
mutex
);
nouveau_fence_context_del
(
&
fctx
->
base
);
chan
->
fence
=
NULL
;
nouveau_fence_context_free
(
&
fctx
->
base
);
...
...
@@ -134,11 +136,13 @@ nv84_fence_context_new(struct nouveau_channel *chan)
fctx
->
base
.
sync32
=
nv84_fence_sync32
;
fctx
->
base
.
sequence
=
nv84_fence_read
(
chan
);
mutex_lock
(
&
priv
->
mutex
);
ret
=
nouveau_bo_vma_add
(
priv
->
bo
,
cli
->
vm
,
&
fctx
->
vma
);
if
(
ret
==
0
)
{
ret
=
nouveau_bo_vma_add
(
priv
->
bo_gart
,
cli
->
vm
,
&
fctx
->
vma_gart
);
}
mutex_unlock
(
&
priv
->
mutex
);
if
(
ret
)
nv84_fence_context_del
(
chan
);
...
...
@@ -212,6 +216,8 @@ nv84_fence_create(struct nouveau_drm *drm)
priv
->
base
.
context_base
=
dma_fence_context_alloc
(
priv
->
base
.
contexts
);
priv
->
base
.
uevent
=
true
;
mutex_init
(
&
priv
->
mutex
);
/* Use VRAM if there is any ; otherwise fallback to system memory */
domain
=
drm
->
device
.
info
.
ram_size
!=
0
?
TTM_PL_FLAG_VRAM
:
/*
...
...
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