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
5d216f60
Commit
5d216f60
authored
Nov 13, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: allow nouveau_fence_ref() to be a noop
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
0bae1d61
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.c
+3
-10
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/nouveau/nouveau_fence.c
+2
-1
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+2
-4
No files found.
drivers/gpu/drm/nouveau/nouveau_bo.c
View file @
5d216f60
...
@@ -98,12 +98,7 @@ nv10_bo_put_tile_region(struct drm_device *dev, struct nouveau_drm_tile *tile,
...
@@ -98,12 +98,7 @@ nv10_bo_put_tile_region(struct drm_device *dev, struct nouveau_drm_tile *tile,
if
(
tile
)
{
if
(
tile
)
{
spin_lock
(
&
drm
->
tile
.
lock
);
spin_lock
(
&
drm
->
tile
.
lock
);
if
(
fence
)
{
tile
->
fence
=
nouveau_fence_ref
(
fence
);
/* Mark it as pending. */
tile
->
fence
=
fence
;
nouveau_fence_ref
(
fence
);
}
tile
->
used
=
false
;
tile
->
used
=
false
;
spin_unlock
(
&
drm
->
tile
.
lock
);
spin_unlock
(
&
drm
->
tile
.
lock
);
}
}
...
@@ -1462,14 +1457,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
...
@@ -1462,14 +1457,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
void
void
nouveau_bo_fence
(
struct
nouveau_bo
*
nvbo
,
struct
nouveau_fence
*
fence
)
nouveau_bo_fence
(
struct
nouveau_bo
*
nvbo
,
struct
nouveau_fence
*
fence
)
{
{
struct
nouveau_fence
*
new_fence
=
nouveau_fence_ref
(
fence
);
struct
nouveau_fence
*
old_fence
=
NULL
;
struct
nouveau_fence
*
old_fence
=
NULL
;
if
(
likely
(
fence
))
nouveau_fence_ref
(
fence
);
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
old_fence
=
nvbo
->
bo
.
sync_obj
;
old_fence
=
nvbo
->
bo
.
sync_obj
;
nvbo
->
bo
.
sync_obj
=
fence
;
nvbo
->
bo
.
sync_obj
=
new_
fence
;
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
nouveau_fence_unref
(
&
old_fence
);
nouveau_fence_unref
(
&
old_fence
);
...
...
drivers/gpu/drm/nouveau/nouveau_fence.c
View file @
5d216f60
...
@@ -306,6 +306,7 @@ nouveau_fence_unref(struct nouveau_fence **pfence)
...
@@ -306,6 +306,7 @@ nouveau_fence_unref(struct nouveau_fence **pfence)
struct
nouveau_fence
*
struct
nouveau_fence
*
nouveau_fence_ref
(
struct
nouveau_fence
*
fence
)
nouveau_fence_ref
(
struct
nouveau_fence
*
fence
)
{
{
if
(
fence
)
kref_get
(
&
fence
->
kref
);
kref_get
(
&
fence
->
kref
);
return
fence
;
return
fence
;
}
}
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
5d216f60
...
@@ -106,7 +106,6 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma)
...
@@ -106,7 +106,6 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma)
if
(
mapped
)
{
if
(
mapped
)
{
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
if
(
nvbo
->
bo
.
sync_obj
)
fence
=
nouveau_fence_ref
(
nvbo
->
bo
.
sync_obj
);
fence
=
nouveau_fence_ref
(
nvbo
->
bo
.
sync_obj
);
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
}
}
...
@@ -438,7 +437,6 @@ validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo)
...
@@ -438,7 +437,6 @@ validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo)
int
ret
=
0
;
int
ret
=
0
;
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_lock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
if
(
nvbo
->
bo
.
sync_obj
)
fence
=
nouveau_fence_ref
(
nvbo
->
bo
.
sync_obj
);
fence
=
nouveau_fence_ref
(
nvbo
->
bo
.
sync_obj
);
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
spin_unlock
(
&
nvbo
->
bo
.
bdev
->
fence_lock
);
...
...
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