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
Kirill Smelkov
linux
Commits
009ee7a0
Commit
009ee7a0
authored
Jun 04, 2012
by
Alex Deucher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/radeon/kms: add support for dma rings to radeon_test_moves()
Signed-off-by:
Alex Deucher
<
alexander.deucher@amd.com
>
parent
8c5fd7ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
drivers/gpu/drm/radeon/radeon_test.c
drivers/gpu/drm/radeon/radeon_test.c
+33
-4
No files found.
drivers/gpu/drm/radeon/radeon_test.c
View file @
009ee7a0
...
...
@@ -26,16 +26,31 @@
#include "radeon_reg.h"
#include "radeon.h"
#define RADEON_TEST_COPY_BLIT 1
#define RADEON_TEST_COPY_DMA 0
/* Test BO GTT->VRAM and VRAM->GTT GPU copies across the whole GTT aperture */
void
radeon_test_moves
(
struct
radeon_device
*
rdev
)
static
void
radeon_do_test_moves
(
struct
radeon_device
*
rdev
,
int
flag
)
{
struct
radeon_bo
*
vram_obj
=
NULL
;
struct
radeon_bo
**
gtt_obj
=
NULL
;
struct
radeon_fence
*
fence
=
NULL
;
uint64_t
gtt_addr
,
vram_addr
;
unsigned
i
,
n
,
size
;
int
r
;
int
r
,
ring
;
switch
(
flag
)
{
case
RADEON_TEST_COPY_DMA
:
ring
=
radeon_copy_dma_ring_index
(
rdev
);
break
;
case
RADEON_TEST_COPY_BLIT
:
ring
=
radeon_copy_blit_ring_index
(
rdev
);
break
;
default:
DRM_ERROR
(
"Unknown copy method
\n
"
);
return
;
}
size
=
1024
*
1024
;
...
...
@@ -106,7 +121,10 @@ void radeon_test_moves(struct radeon_device *rdev)
radeon_bo_kunmap
(
gtt_obj
[
i
]);
r
=
radeon_copy
(
rdev
,
gtt_addr
,
vram_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
if
(
ring
==
R600_RING_TYPE_DMA_INDEX
)
r
=
radeon_copy_dma
(
rdev
,
gtt_addr
,
vram_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
else
r
=
radeon_copy_blit
(
rdev
,
gtt_addr
,
vram_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
if
(
r
)
{
DRM_ERROR
(
"Failed GTT->VRAM copy %d
\n
"
,
i
);
goto
out_cleanup
;
...
...
@@ -149,7 +167,10 @@ void radeon_test_moves(struct radeon_device *rdev)
radeon_bo_kunmap
(
vram_obj
);
r
=
radeon_copy
(
rdev
,
vram_addr
,
gtt_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
if
(
ring
==
R600_RING_TYPE_DMA_INDEX
)
r
=
radeon_copy_dma
(
rdev
,
vram_addr
,
gtt_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
else
r
=
radeon_copy_blit
(
rdev
,
vram_addr
,
gtt_addr
,
size
/
RADEON_GPU_PAGE_SIZE
,
&
fence
);
if
(
r
)
{
DRM_ERROR
(
"Failed VRAM->GTT copy %d
\n
"
,
i
);
goto
out_cleanup
;
...
...
@@ -223,6 +244,14 @@ void radeon_test_moves(struct radeon_device *rdev)
}
}
void
radeon_test_moves
(
struct
radeon_device
*
rdev
)
{
if
(
rdev
->
asic
->
copy
.
dma
)
radeon_do_test_moves
(
rdev
,
RADEON_TEST_COPY_DMA
);
if
(
rdev
->
asic
->
copy
.
blit
)
radeon_do_test_moves
(
rdev
,
RADEON_TEST_COPY_BLIT
);
}
void
radeon_test_ring_sync
(
struct
radeon_device
*
rdev
,
struct
radeon_ring
*
ringA
,
struct
radeon_ring
*
ringB
)
...
...
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