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
cef9e99e
Commit
cef9e99e
authored
Nov 22, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/ttm: explicitly wait for bo idle before memcpy buffer move
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
35b8141b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.c
+18
-19
No files found.
drivers/gpu/drm/nouveau/nouveau_bo.c
View file @
cef9e99e
...
...
@@ -1180,28 +1180,27 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr,
goto
out
;
}
/* CPU copy if we have no accelerated method available */
if
(
!
drm
->
ttm
.
move
)
{
ret
=
ttm_bo_move_memcpy
(
bo
,
evict
,
no_wait_gpu
,
new_mem
);
goto
out
;
}
/* Hardware assisted copy. */
if
(
new_mem
->
mem_type
==
TTM_PL_SYSTEM
)
ret
=
nouveau_bo_move_flipd
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
else
if
(
old_mem
->
mem_type
==
TTM_PL_SYSTEM
)
ret
=
nouveau_bo_move_flips
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
else
ret
=
nouveau_bo_move_m2mf
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
if
(
!
ret
)
goto
out
;
if
(
drm
->
ttm
.
move
)
{
if
(
new_mem
->
mem_type
==
TTM_PL_SYSTEM
)
ret
=
nouveau_bo_move_flipd
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
else
if
(
old_mem
->
mem_type
==
TTM_PL_SYSTEM
)
ret
=
nouveau_bo_move_flips
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
else
ret
=
nouveau_bo_move_m2mf
(
bo
,
evict
,
intr
,
no_wait_gpu
,
new_mem
);
if
(
!
ret
)
goto
out
;
}
/* Fallback to software copy. */
ret
=
ttm_bo_move_memcpy
(
bo
,
evict
,
no_wait_gpu
,
new_mem
);
spin_lock
(
&
bo
->
bdev
->
fence_lock
);
ret
=
ttm_bo_wait
(
bo
,
true
,
intr
,
no_wait_gpu
);
spin_unlock
(
&
bo
->
bdev
->
fence_lock
);
if
(
ret
==
0
)
ret
=
ttm_bo_move_memcpy
(
bo
,
evict
,
no_wait_gpu
,
new_mem
);
out:
if
(
nv_device
(
drm
->
device
)
->
card_type
<
NV_50
)
{
...
...
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