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
d7bda18c
Commit
d7bda18c
authored
Aug 12, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/core/mm: dump mm when trying to tear one down that still has allocations
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d979ab97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
drivers/gpu/drm/nouveau/core/core/mm.c
drivers/gpu/drm/nouveau/core/core/mm.c
+32
-9
No files found.
drivers/gpu/drm/nouveau/core/core/mm.c
View file @
d7bda18c
...
...
@@ -28,6 +28,24 @@
#define node(root, dir) ((root)->nl_entry.dir == &mm->nodes) ? NULL : \
list_entry((root)->nl_entry.dir, struct nouveau_mm_node, nl_entry)
static
void
nouveau_mm_dump
(
struct
nouveau_mm
*
mm
,
const
char
*
header
)
{
struct
nouveau_mm_node
*
node
;
printk
(
KERN_ERR
"nouveau: %s
\n
"
,
header
);
printk
(
KERN_ERR
"nouveau: node list:
\n
"
);
list_for_each_entry
(
node
,
&
mm
->
nodes
,
nl_entry
)
{
printk
(
KERN_ERR
"nouveau:
\t
%08x %08x %d
\n
"
,
node
->
offset
,
node
->
length
,
node
->
type
);
}
printk
(
KERN_ERR
"nouveau: free list:
\n
"
);
list_for_each_entry
(
node
,
&
mm
->
free
,
fl_entry
)
{
printk
(
KERN_ERR
"nouveau:
\t
%08x %08x %d
\n
"
,
node
->
offset
,
node
->
length
,
node
->
type
);
}
}
void
nouveau_mm_free
(
struct
nouveau_mm
*
mm
,
struct
nouveau_mm_node
**
pthis
)
{
...
...
@@ -239,18 +257,23 @@ nouveau_mm_init(struct nouveau_mm *mm, u32 offset, u32 length, u32 block)
int
nouveau_mm_fini
(
struct
nouveau_mm
*
mm
)
{
if
(
nouveau_mm_initialised
(
mm
))
{
struct
nouveau_mm_node
*
node
,
*
heap
=
list_first_entry
(
&
mm
->
nodes
,
typeof
(
*
heap
),
nl_entry
);
struct
nouveau_mm_node
*
node
,
*
temp
;
int
nodes
=
0
;
if
(
!
nouveau_mm_initialised
(
mm
))
return
0
;
list_for_each_entry
(
node
,
&
mm
->
nodes
,
nl_entry
)
{
if
(
WARN_ON
(
nodes
++
==
mm
->
heap_nodes
))
if
(
++
nodes
>
mm
->
heap_nodes
)
{
nouveau_mm_dump
(
mm
,
"mm not clean!"
);
return
-
EBUSY
;
}
kfree
(
heap
);
}
list_for_each_entry_safe
(
node
,
temp
,
&
mm
->
nodes
,
nl_entry
)
{
list_del
(
&
node
->
nl_entry
);
kfree
(
node
);
}
mm
->
heap_nodes
=
0
;
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