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
b4e114f1
Commit
b4e114f1
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb/ram: remove old allocators
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
1de33775
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
0 additions
and
167 deletions
+0
-167
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
+0
-4
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
+0
-5
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
+0
-67
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
+0
-77
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
View file @
b4e114f1
...
...
@@ -162,10 +162,6 @@ struct nvkm_ram_func {
void
*
(
*
dtor
)(
struct
nvkm_ram
*
);
int
(
*
init
)(
struct
nvkm_ram
*
);
int
(
*
get
)(
struct
nvkm_ram
*
,
u64
size
,
u32
align
,
u32
size_nc
,
u32
type
,
struct
nvkm_mem
**
);
void
(
*
put
)(
struct
nvkm_ram
*
,
struct
nvkm_mem
**
);
int
(
*
calc
)(
struct
nvkm_ram
*
,
u32
freq
);
int
(
*
prog
)(
struct
nvkm_ram
*
);
void
(
*
tidy
)(
struct
nvkm_ram
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
View file @
b4e114f1
...
...
@@ -13,9 +13,6 @@ extern const struct nvkm_ram_func nv04_ram_func;
int
nv50_ram_ctor
(
const
struct
nvkm_ram_func
*
,
struct
nvkm_fb
*
,
struct
nvkm_ram
*
);
int
nv50_ram_get
(
struct
nvkm_ram
*
,
u64
,
u32
,
u32
,
u32
,
struct
nvkm_mem
**
);
void
nv50_ram_put
(
struct
nvkm_ram
*
,
struct
nvkm_mem
**
);
void
__nv50_ram_put
(
struct
nvkm_ram
*
,
struct
nvkm_mem
*
);
int
gf100_ram_new_
(
const
struct
nvkm_ram_func
*
,
struct
nvkm_fb
*
,
struct
nvkm_ram
**
);
...
...
@@ -26,8 +23,6 @@ u32 gf100_ram_probe_fbp(const struct nvkm_ram_func *,
u32
gf100_ram_probe_fbp_amount
(
const
struct
nvkm_ram_func
*
,
u32
,
struct
nvkm_device
*
,
int
,
int
*
);
u32
gf100_ram_probe_fbpa_amount
(
struct
nvkm_device
*
,
int
);
int
gf100_ram_get
(
struct
nvkm_ram
*
,
u64
,
u32
,
u32
,
u32
,
struct
nvkm_mem
**
);
void
gf100_ram_put
(
struct
nvkm_ram
*
,
struct
nvkm_mem
**
);
int
gf100_ram_init
(
struct
nvkm_ram
*
);
int
gf100_ram_calc
(
struct
nvkm_ram
*
,
u32
);
int
gf100_ram_prog
(
struct
nvkm_ram
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
View file @
b4e114f1
...
...
@@ -419,71 +419,6 @@ gf100_ram_tidy(struct nvkm_ram *base)
ram_exec
(
&
ram
->
fuc
,
false
);
}
void
gf100_ram_put
(
struct
nvkm_ram
*
ram
,
struct
nvkm_mem
**
pmem
)
{
struct
nvkm_mem
*
mem
=
*
pmem
;
*
pmem
=
NULL
;
if
(
unlikely
(
mem
==
NULL
))
return
;
mutex_lock
(
&
ram
->
fb
->
subdev
.
mutex
);
__nv50_ram_put
(
ram
,
mem
);
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
kfree
(
mem
);
}
int
gf100_ram_get
(
struct
nvkm_ram
*
ram
,
u64
size
,
u32
align
,
u32
ncmin
,
u32
memtype
,
struct
nvkm_mem
**
pmem
)
{
struct
nvkm_mm
*
mm
=
&
ram
->
vram
;
struct
nvkm_mm_node
**
node
,
*
r
;
struct
nvkm_mem
*
mem
;
int
type
=
(
memtype
&
0x0ff
);
int
back
=
(
memtype
&
0x800
);
int
ret
;
size
>>=
NVKM_RAM_MM_SHIFT
;
align
>>=
NVKM_RAM_MM_SHIFT
;
ncmin
>>=
NVKM_RAM_MM_SHIFT
;
if
(
!
ncmin
)
ncmin
=
size
;
mem
=
kzalloc
(
sizeof
(
*
mem
),
GFP_KERNEL
);
if
(
!
mem
)
return
-
ENOMEM
;
mem
->
size
=
size
;
mutex_lock
(
&
ram
->
fb
->
subdev
.
mutex
);
mem
->
memtype
=
type
;
node
=
&
mem
->
mem
;
do
{
if
(
back
)
ret
=
nvkm_mm_tail
(
mm
,
0
,
1
,
size
,
ncmin
,
align
,
&
r
);
else
ret
=
nvkm_mm_head
(
mm
,
0
,
1
,
size
,
ncmin
,
align
,
&
r
);
if
(
ret
)
{
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
ram
->
func
->
put
(
ram
,
&
mem
);
return
ret
;
}
*
node
=
r
;
node
=
&
r
->
next
;
size
-=
r
->
length
;
}
while
(
size
);
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
mem
->
offset
=
(
u64
)
mem
->
mem
->
offset
<<
NVKM_RAM_MM_SHIFT
;
*
pmem
=
mem
;
return
0
;
}
int
gf100_ram_init
(
struct
nvkm_ram
*
base
)
{
...
...
@@ -725,8 +660,6 @@ gf100_ram = {
.
probe_fbp_amount
=
gf100_ram_probe_fbp_amount
,
.
probe_fbpa_amount
=
gf100_ram_probe_fbpa_amount
,
.
init
=
gf100_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
.
calc
=
gf100_ram_calc
,
.
prog
=
gf100_ram_prog
,
.
tidy
=
gf100_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c
View file @
b4e114f1
...
...
@@ -48,8 +48,6 @@ gf108_ram = {
.
probe_fbp_amount
=
gf108_ram_probe_fbp_amount
,
.
probe_fbpa_amount
=
gf100_ram_probe_fbpa_amount
,
.
init
=
gf100_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
.
calc
=
gf100_ram_calc
,
.
prog
=
gf100_ram_prog
,
.
tidy
=
gf100_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
View file @
b4e114f1
...
...
@@ -1704,8 +1704,6 @@ gk104_ram = {
.
probe_fbpa_amount
=
gf100_ram_probe_fbpa_amount
,
.
dtor
=
gk104_ram_dtor
,
.
init
=
gk104_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
.
calc
=
gk104_ram_calc
,
.
prog
=
gk104_ram_prog
,
.
tidy
=
gk104_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c
View file @
b4e114f1
...
...
@@ -39,8 +39,6 @@ gm107_ram = {
.
probe_fbpa_amount
=
gf100_ram_probe_fbpa_amount
,
.
dtor
=
gk104_ram_dtor
,
.
init
=
gk104_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
.
calc
=
gk104_ram_calc
,
.
prog
=
gk104_ram_prog
,
.
tidy
=
gk104_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
View file @
b4e114f1
...
...
@@ -54,8 +54,6 @@ gm200_ram = {
.
probe_fbpa_amount
=
gf100_ram_probe_fbpa_amount
,
.
dtor
=
gk104_ram_dtor
,
.
init
=
gk104_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
.
calc
=
gk104_ram_calc
,
.
prog
=
gk104_ram_prog
,
.
tidy
=
gk104_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c
View file @
b4e114f1
...
...
@@ -84,8 +84,6 @@ gp100_ram = {
.
probe_fbp_amount
=
gm200_ram_probe_fbp_amount
,
.
probe_fbpa_amount
=
gp100_ram_probe_fbpa
,
.
init
=
gp100_ram_init
,
.
get
=
gf100_ram_get
,
.
put
=
gf100_ram_put
,
};
int
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
View file @
b4e114f1
...
...
@@ -931,8 +931,6 @@ static const struct nvkm_ram_func
gt215_ram_func
=
{
.
dtor
=
gt215_ram_dtor
,
.
init
=
gt215_ram_init
,
.
get
=
nv50_ram_get
,
.
put
=
nv50_ram_put
,
.
calc
=
gt215_ram_calc
,
.
prog
=
gt215_ram_prog
,
.
tidy
=
gt215_ram_tidy
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
View file @
b4e114f1
...
...
@@ -53,8 +53,6 @@ mcp77_ram_init(struct nvkm_ram *base)
static
const
struct
nvkm_ram_func
mcp77_ram_func
=
{
.
init
=
mcp77_ram_init
,
.
get
=
nv50_ram_get
,
.
put
=
nv50_ram_put
,
};
int
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
View file @
b4e114f1
...
...
@@ -493,85 +493,8 @@ nv50_ram_tidy(struct nvkm_ram *base)
ram_exec
(
&
ram
->
hwsq
,
false
);
}
void
__nv50_ram_put
(
struct
nvkm_ram
*
ram
,
struct
nvkm_mem
*
mem
)
{
struct
nvkm_mm_node
*
next
=
mem
->
mem
;
struct
nvkm_mm_node
*
node
;
while
((
node
=
next
))
{
next
=
node
->
next
;
nvkm_mm_free
(
&
ram
->
vram
,
&
node
);
}
}
void
nv50_ram_put
(
struct
nvkm_ram
*
ram
,
struct
nvkm_mem
**
pmem
)
{
struct
nvkm_mem
*
mem
=
*
pmem
;
*
pmem
=
NULL
;
if
(
unlikely
(
mem
==
NULL
))
return
;
mutex_lock
(
&
ram
->
fb
->
subdev
.
mutex
);
__nv50_ram_put
(
ram
,
mem
);
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
kfree
(
mem
);
}
int
nv50_ram_get
(
struct
nvkm_ram
*
ram
,
u64
size
,
u32
align
,
u32
ncmin
,
u32
memtype
,
struct
nvkm_mem
**
pmem
)
{
struct
nvkm_mm
*
heap
=
&
ram
->
vram
;
struct
nvkm_mm_node
**
node
,
*
r
;
struct
nvkm_mem
*
mem
;
int
comp
=
(
memtype
&
0x300
)
>>
8
;
int
type
=
(
memtype
&
0x07f
);
int
back
=
(
memtype
&
0x800
);
int
min
,
max
,
ret
;
max
=
(
size
>>
NVKM_RAM_MM_SHIFT
);
min
=
ncmin
?
(
ncmin
>>
NVKM_RAM_MM_SHIFT
)
:
max
;
align
>>=
NVKM_RAM_MM_SHIFT
;
mem
=
kzalloc
(
sizeof
(
*
mem
),
GFP_KERNEL
);
if
(
!
mem
)
return
-
ENOMEM
;
mutex_lock
(
&
ram
->
fb
->
subdev
.
mutex
);
mem
->
memtype
=
(
comp
<<
7
)
|
type
;
mem
->
size
=
max
;
type
=
nv50_fb_memtype
[
type
];
node
=
&
mem
->
mem
;
do
{
if
(
back
)
ret
=
nvkm_mm_tail
(
heap
,
0
,
type
,
max
,
min
,
align
,
&
r
);
else
ret
=
nvkm_mm_head
(
heap
,
0
,
type
,
max
,
min
,
align
,
&
r
);
if
(
ret
)
{
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
ram
->
func
->
put
(
ram
,
&
mem
);
return
ret
;
}
*
node
=
r
;
node
=
&
r
->
next
;
max
-=
r
->
length
;
}
while
(
max
);
mutex_unlock
(
&
ram
->
fb
->
subdev
.
mutex
);
mem
->
offset
=
(
u64
)
mem
->
mem
->
offset
<<
NVKM_RAM_MM_SHIFT
;
*
pmem
=
mem
;
return
0
;
}
static
const
struct
nvkm_ram_func
nv50_ram_func
=
{
.
get
=
nv50_ram_get
,
.
put
=
nv50_ram_put
,
.
calc
=
nv50_ram_calc
,
.
prog
=
nv50_ram_prog
,
.
tidy
=
nv50_ram_tidy
,
...
...
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