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
8f2480fb
Commit
8f2480fb
authored
Sep 26, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915/debugfs: Include list totals
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
d21d5975
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_debugfs.c
+9
-2
No files found.
drivers/gpu/drm/i915/i915_debugfs.c
View file @
8f2480fb
...
...
@@ -135,7 +135,8 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
struct
drm_device
*
dev
=
node
->
minor
->
dev
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
struct
drm_i915_gem_object
*
obj_priv
;
int
ret
;
size_t
total_obj_size
,
total_gtt_size
;
int
count
,
ret
;
ret
=
mutex_lock_interruptible
(
&
dev
->
struct_mutex
);
if
(
ret
)
...
...
@@ -171,13 +172,19 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
return
-
EINVAL
;
}
total_obj_size
=
total_gtt_size
=
count
=
0
;
list_for_each_entry
(
obj_priv
,
head
,
list
)
{
seq_printf
(
m
,
" "
);
describe_obj
(
m
,
obj_priv
);
seq_printf
(
m
,
"
\n
"
);
total_obj_size
+=
obj_priv
->
base
.
size
;
total_gtt_size
+=
obj_priv
->
gtt_space
->
size
;
count
++
;
}
mutex_unlock
(
&
dev
->
struct_mutex
);
seq_printf
(
m
,
"Total %d objects, %zu bytes, %zu GTT size
\n
"
,
count
,
total_obj_size
,
total_gtt_size
);
return
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