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
94e89532
Commit
94e89532
authored
Oct 25, 2011
by
Daniel Vetter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/sman: kill user_hash_tab
No longer used. Signed-off-by:
Daniel Vetter
<
daniel.vetter@ffwll.ch
>
parent
6de8a748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
39 deletions
+2
-39
drivers/gpu/drm/drm_sman.c
drivers/gpu/drm/drm_sman.c
+2
-34
include/drm/drm_sman.h
include/drm/drm_sman.h
+0
-5
No files found.
drivers/gpu/drm/drm_sman.c
View file @
94e89532
...
...
@@ -47,7 +47,6 @@ struct drm_owner_item {
void
drm_sman_takedown
(
struct
drm_sman
*
sman
)
{
drm_ht_remove
(
&
sman
->
user_hash_tab
);
kfree
(
sman
->
mm
);
}
...
...
@@ -62,16 +61,11 @@ drm_sman_init(struct drm_sman * sman, unsigned int num_managers,
sman
->
mm
=
kcalloc
(
num_managers
,
sizeof
(
*
sman
->
mm
),
GFP_KERNEL
);
if
(
!
sman
->
mm
)
{
ret
=
-
ENOMEM
;
goto
ou
t
;
return
re
t
;
}
sman
->
num_managers
=
num_managers
;
ret
=
drm_ht_create
(
&
sman
->
user_hash_tab
,
user_order
);
if
(
!
ret
)
goto
out
;
kfree
(
sman
->
mm
);
out:
return
ret
;
return
0
;
}
EXPORT_SYMBOL
(
drm_sman_init
);
...
...
@@ -180,15 +174,8 @@ struct drm_memblock_item *drm_sman_alloc(struct drm_sman *sman, unsigned int man
memblock
->
mm
=
sman_mm
;
memblock
->
sman
=
sman
;
if
(
drm_ht_just_insert_please
(
&
sman
->
user_hash_tab
,
&
memblock
->
user_hash
,
(
unsigned
long
)
memblock
,
32
,
0
,
0
))
goto
out1
;
return
memblock
;
out1:
kfree
(
memblock
);
out:
sman_mm
->
free
(
sman_mm
->
private
,
tmp
);
...
...
@@ -199,31 +186,12 @@ EXPORT_SYMBOL(drm_sman_alloc);
void
drm_sman_free
(
struct
drm_memblock_item
*
item
)
{
struct
drm_sman
*
sman
=
item
->
sman
;
list_del
(
&
item
->
owner_list
);
drm_ht_remove_item
(
&
sman
->
user_hash_tab
,
&
item
->
user_hash
);
item
->
mm
->
free
(
item
->
mm
->
private
,
item
->
mm_info
);
kfree
(
item
);
}
EXPORT_SYMBOL
(
drm_sman_free
);
int
drm_sman_free_key
(
struct
drm_sman
*
sman
,
unsigned
int
key
)
{
struct
drm_hash_item
*
hash_item
;
struct
drm_memblock_item
*
memblock_item
;
if
(
drm_ht_find_item
(
&
sman
->
user_hash_tab
,
key
,
&
hash_item
))
return
-
EINVAL
;
memblock_item
=
drm_hash_entry
(
hash_item
,
struct
drm_memblock_item
,
user_hash
);
drm_sman_free
(
memblock_item
);
return
0
;
}
EXPORT_SYMBOL
(
drm_sman_free_key
);
void
drm_sman_cleanup
(
struct
drm_sman
*
sman
)
{
unsigned
int
i
;
...
...
include/drm/drm_sman.h
View file @
94e89532
...
...
@@ -87,7 +87,6 @@ struct drm_memblock_item {
struct
drm_sman
{
struct
drm_sman_mm
*
mm
;
int
num_managers
;
struct
drm_open_hash
user_hash_tab
;
};
/*
...
...
@@ -139,11 +138,7 @@ extern struct drm_memblock_item *drm_sman_alloc(struct drm_sman * sman,
unsigned
long
size
,
unsigned
alignment
,
unsigned
long
owner
);
/*
* Free a memory block identified by its user hash key.
*/
extern
int
drm_sman_free_key
(
struct
drm_sman
*
sman
,
unsigned
int
key
);
extern
void
drm_sman_free
(
struct
drm_memblock_item
*
item
);
/*
...
...
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