Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
igt-gpu-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
55
Issues
55
List
Boards
Labels
Service Desk
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
drm
igt-gpu-tools
Commits
24eade08
Commit
24eade08
authored
Aug 06, 2013
by
Chris Wilson
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gem_pread_after_blit: Exercise reading back through different cache levels
parent
3052fe2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
tests/gem_pread_after_blit.c
tests/gem_pread_after_blit.c
+26
-3
No files found.
tests/gem_pread_after_blit.c
View file @
24eade08
...
...
@@ -124,11 +124,17 @@ verify_small_read(drm_intel_bo *bo, uint32_t val)
}
}
static
void
do_test
(
drm_intel_bo
*
src
[
2
],
static
void
do_test
(
int
fd
,
int
cache_level
,
drm_intel_bo
*
src
[
2
],
const
uint32_t
start
[
2
],
drm_intel_bo
*
tmp
[
2
],
int
loop
)
{
if
(
cache_level
!=
-
1
)
{
gem_set_cacheing
(
fd
,
tmp
[
0
]
->
handle
,
cache_level
);
gem_set_cacheing
(
fd
,
tmp
[
1
]
->
handle
,
cache_level
);
}
do
{
/* First, do a full-buffer read after blitting */
intel_copy_bo
(
batch
,
tmp
[
0
],
src
[
0
],
width
,
height
);
...
...
@@ -184,14 +190,31 @@ main(int argc, char **argv)
dst
[
1
]
=
drm_intel_bo_alloc
(
bufmgr
,
"dst bo"
,
size
,
4096
);
if
(
drmtest_run_subtest
(
"normal"
))
do_test
(
src
,
start
,
dst
,
1
);
do_test
(
fd
,
-
1
,
src
,
start
,
dst
,
1
);
if
(
drmtest_run_subtest
(
"interruptible"
))
{
drmtest_fork_signal_helper
();
do_test
(
src
,
start
,
dst
,
100
);
do_test
(
fd
,
-
1
,
src
,
start
,
dst
,
100
);
drmtest_stop_signal_helper
();
}
if
(
drmtest_run_subtest
(
"normal-uncached"
))
do_test
(
fd
,
0
,
src
,
start
,
dst
,
1
);
if
(
drmtest_run_subtest
(
"interruptible-uncached"
))
{
drmtest_fork_signal_helper
();
do_test
(
fd
,
0
,
src
,
start
,
dst
,
100
);
drmtest_stop_signal_helper
();
}
if
(
drmtest_run_subtest
(
"normal-snoop"
))
do_test
(
fd
,
1
,
src
,
start
,
dst
,
1
);
if
(
drmtest_run_subtest
(
"interruptible-snoop"
))
{
drmtest_fork_signal_helper
();
do_test
(
fd
,
1
,
src
,
start
,
dst
,
100
);
drmtest_stop_signal_helper
();
}
drm_intel_bo_unreference
(
src
[
0
]);
drm_intel_bo_unreference
(
src
[
1
]);
drm_intel_bo_unreference
(
dst
[
0
]);
...
...
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