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
af793b8c
Commit
af793b8c
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb: move comptag init out of ram submodule
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
7ef44bee
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
63 additions
and
38 deletions
+63
-38
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
+11
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
+8
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
+11
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
+2
-0
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
+3
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
+2
-4
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv04.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv10.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv10.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv20.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv20.c
+1
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
+3
-4
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
+1
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv44.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv44.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv49.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv49.c
+1
-2
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv4e.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv4e.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
+1
-2
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
View file @
af793b8c
...
...
@@ -100,6 +100,7 @@ static int
nvkm_fb_oneinit
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_fb
*
fb
=
nvkm_fb
(
subdev
);
u32
tags
=
0
;
if
(
fb
->
func
->
ram_new
)
{
int
ret
=
fb
->
func
->
ram_new
(
fb
,
&
fb
->
ram
);
...
...
@@ -115,7 +116,16 @@ nvkm_fb_oneinit(struct nvkm_subdev *subdev)
return
ret
;
}
return
0
;
/* Initialise compression tag allocator.
*
* LTC oneinit() will override this on Fermi and newer.
*/
if
(
fb
->
func
->
tags
)
{
tags
=
fb
->
func
->
tags
(
fb
);
nvkm_debug
(
subdev
,
"%d comptags
\n
"
,
tags
);
}
return
nvkm_mm_init
(
&
fb
->
tags
,
0
,
0
,
tags
,
1
);
}
static
int
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
View file @
af793b8c
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_fb_func
g84_fb
=
{
.
ram_new
=
nv50_ram_new
,
.
tags
=
nv20_fb_tags
,
.
trap
=
0x001d07ff
,
};
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
View file @
af793b8c
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_fb_func
gt215_fb
=
{
.
ram_new
=
gt215_ram_new
,
.
tags
=
nv20_fb_tags
,
.
trap
=
0x000d0fff
,
};
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
View file @
af793b8c
...
...
@@ -77,8 +77,16 @@ nv20_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
nvkm_wr32
(
device
,
0x100300
+
(
i
*
0x04
),
tile
->
zcomp
);
}
u32
nv20_fb_tags
(
struct
nvkm_fb
*
fb
)
{
const
u32
tags
=
nvkm_rd32
(
fb
->
subdev
.
device
,
0x100320
);
return
tags
?
tags
+
1
:
0
;
}
static
const
struct
nvkm_fb_func
nv20_fb
=
{
.
tags
=
nv20_fb_tags
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv20_fb_tile_comp
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
View file @
af793b8c
...
...
@@ -44,6 +44,7 @@ nv25_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
static
const
struct
nvkm_fb_func
nv25_fb
=
{
.
tags
=
nv20_fb_tags
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv25_fb_tile_comp
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
View file @
af793b8c
...
...
@@ -116,6 +116,7 @@ nv30_fb_init(struct nvkm_fb *fb)
static
const
struct
nvkm_fb_func
nv30_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv30_fb_init
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
View file @
af793b8c
...
...
@@ -45,6 +45,7 @@ nv35_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
static
const
struct
nvkm_fb_func
nv35_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv30_fb_init
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
View file @
af793b8c
...
...
@@ -45,6 +45,7 @@ nv36_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
static
const
struct
nvkm_fb_func
nv36_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv30_fb_init
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
View file @
af793b8c
...
...
@@ -51,6 +51,7 @@ nv40_fb_init(struct nvkm_fb *fb)
static
const
struct
nvkm_fb_func
nv40_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv40_fb_init
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
View file @
af793b8c
...
...
@@ -45,6 +45,7 @@ nv41_fb_init(struct nvkm_fb *fb)
static
const
struct
nvkm_fb_func
nv41_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv41_fb_init
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
View file @
af793b8c
...
...
@@ -28,6 +28,7 @@
static
const
struct
nvkm_fb_func
nv47_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv41_fb_init
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
View file @
af793b8c
...
...
@@ -28,6 +28,7 @@
static
const
struct
nvkm_fb_func
nv49_fb
=
{
.
tags
=
nv20_fb_tags
,
.
init
=
nv41_fb_init
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
View file @
af793b8c
...
...
@@ -244,6 +244,15 @@ nv50_fb_init(struct nvkm_fb *base)
nvkm_wr32
(
device
,
0x100c90
,
fb
->
func
->
trap
);
}
static
u32
nv50_fb_tags
(
struct
nvkm_fb
*
base
)
{
struct
nv50_fb
*
fb
=
nv50_fb
(
base
);
if
(
fb
->
func
->
tags
)
return
fb
->
func
->
tags
(
&
fb
->
base
);
return
0
;
}
static
void
*
nv50_fb_dtor
(
struct
nvkm_fb
*
base
)
{
...
...
@@ -262,6 +271,7 @@ nv50_fb_dtor(struct nvkm_fb *base)
static
const
struct
nvkm_fb_func
nv50_fb_
=
{
.
dtor
=
nv50_fb_dtor
,
.
tags
=
nv50_fb_tags
,
.
oneinit
=
nv50_fb_oneinit
,
.
init
=
nv50_fb_init
,
.
intr
=
nv50_fb_intr
,
...
...
@@ -287,6 +297,7 @@ nv50_fb_new_(const struct nv50_fb_func *func, struct nvkm_device *device,
static
const
struct
nv50_fb_func
nv50_fb
=
{
.
ram_new
=
nv50_ram_new
,
.
tags
=
nv20_fb_tags
,
.
trap
=
0x000707ff
,
};
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
View file @
af793b8c
...
...
@@ -12,6 +12,7 @@ struct nv50_fb {
struct
nv50_fb_func
{
int
(
*
ram_new
)(
struct
nvkm_fb
*
,
struct
nvkm_ram
**
);
u32
(
*
tags
)(
struct
nvkm_fb
*
);
u32
trap
;
};
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
View file @
af793b8c
...
...
@@ -6,6 +6,7 @@ struct nvkm_bios;
struct
nvkm_fb_func
{
void
*
(
*
dtor
)(
struct
nvkm_fb
*
);
u32
(
*
tags
)(
struct
nvkm_fb
*
);
int
(
*
oneinit
)(
struct
nvkm_fb
*
);
void
(
*
init
)(
struct
nvkm_fb
*
);
int
(
*
init_page
)(
struct
nvkm_fb
*
);
...
...
@@ -42,6 +43,7 @@ void nv10_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
void
nv10_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
nv10_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
u32
nv20_fb_tags
(
struct
nvkm_fb
*
);
void
nv20_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c
View file @
af793b8c
...
...
@@ -46,8 +46,7 @@ nvkm_ram_del(struct nvkm_ram **pram)
int
nvkm_ram_ctor
(
const
struct
nvkm_ram_func
*
func
,
struct
nvkm_fb
*
fb
,
enum
nvkm_ram_type
type
,
u64
size
,
u32
tags
,
struct
nvkm_ram
*
ram
)
enum
nvkm_ram_type
type
,
u64
size
,
struct
nvkm_ram
*
ram
)
{
static
const
char
*
name
[]
=
{
[
NVKM_RAM_TYPE_UNKNOWN
]
=
"of unknown memory type"
,
...
...
@@ -78,23 +77,14 @@ nvkm_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
return
ret
;
}
if
(
!
nvkm_mm_initialised
(
&
fb
->
tags
))
{
ret
=
nvkm_mm_init
(
&
fb
->
tags
,
0
,
0
,
tags
?
++
tags
:
0
,
1
);
if
(
ret
)
return
ret
;
nvkm_debug
(
subdev
,
"%d compression tags
\n
"
,
tags
);
}
return
0
;
}
int
nvkm_ram_new_
(
const
struct
nvkm_ram_func
*
func
,
struct
nvkm_fb
*
fb
,
enum
nvkm_ram_type
type
,
u64
size
,
u32
tags
,
struct
nvkm_ram
**
pram
)
enum
nvkm_ram_type
type
,
u64
size
,
struct
nvkm_ram
**
pram
)
{
if
(
!
(
*
pram
=
kzalloc
(
sizeof
(
**
pram
),
GFP_KERNEL
)))
return
-
ENOMEM
;
return
nvkm_ram_ctor
(
func
,
fb
,
type
,
size
,
tags
,
*
pram
);
return
nvkm_ram_ctor
(
func
,
fb
,
type
,
size
,
*
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
View file @
af793b8c
...
...
@@ -3,11 +3,9 @@
#include "priv.h"
int
nvkm_ram_ctor
(
const
struct
nvkm_ram_func
*
,
struct
nvkm_fb
*
,
enum
nvkm_ram_type
,
u64
size
,
u32
tags
,
struct
nvkm_ram
*
);
enum
nvkm_ram_type
,
u64
size
,
struct
nvkm_ram
*
);
int
nvkm_ram_new_
(
const
struct
nvkm_ram_func
*
,
struct
nvkm_fb
*
,
enum
nvkm_ram_type
,
u64
size
,
u32
tags
,
struct
nvkm_ram
**
);
enum
nvkm_ram_type
,
u64
size
,
struct
nvkm_ram
**
);
void
nvkm_ram_del
(
struct
nvkm_ram
**
);
int
nvkm_ram_init
(
struct
nvkm_ram
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
View file @
af793b8c
...
...
@@ -604,7 +604,7 @@ gf100_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
nvkm_debug
(
subdev
,
"Upper: %4lld MiB @ %010llx
\n
"
,
usize
>>
20
,
ubase
);
nvkm_debug
(
subdev
,
"Total: %4lld MiB
\n
"
,
total
>>
20
);
ret
=
nvkm_ram_ctor
(
func
,
fb
,
type
,
total
,
0
,
ram
);
ret
=
nvkm_ram_ctor
(
func
,
fb
,
type
,
total
,
ram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c
View file @
af793b8c
...
...
@@ -73,7 +73,7 @@ mcp77_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
*
pram
=
&
ram
->
base
;
ret
=
nvkm_ram_ctor
(
&
mcp77_ram_func
,
fb
,
NVKM_RAM_TYPE_STOLEN
,
size
,
0
,
&
ram
->
base
);
size
,
&
ram
->
base
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv04.c
View file @
af793b8c
...
...
@@ -61,5 +61,5 @@ nv04_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
else
type
=
NVKM_RAM_TYPE_SDRAM
;
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
0
,
pram
);
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv10.c
View file @
af793b8c
...
...
@@ -36,5 +36,5 @@ nv10_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
else
type
=
NVKM_RAM_TYPE_SDRAM
;
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
0
,
pram
);
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
View file @
af793b8c
...
...
@@ -44,5 +44,5 @@ nv1a_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
}
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
NVKM_RAM_TYPE_STOLEN
,
mib
*
1024
*
1024
,
0
,
pram
);
mib
*
1024
*
1024
,
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv20.c
View file @
af793b8c
...
...
@@ -29,7 +29,6 @@ nv20_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
u32
pbus1218
=
nvkm_rd32
(
device
,
0x001218
);
u32
size
=
(
nvkm_rd32
(
device
,
0x10020c
)
&
0xff000000
);
u32
tags
=
nvkm_rd32
(
device
,
0x100320
);
enum
nvkm_ram_type
type
=
NVKM_RAM_TYPE_UNKNOWN
;
int
ret
;
...
...
@@ -40,7 +39,7 @@ nv20_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
case
0x00000300
:
type
=
NVKM_RAM_TYPE_GDDR2
;
break
;
}
ret
=
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
tags
,
pram
);
ret
=
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
type
,
size
,
pram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c
View file @
af793b8c
...
...
@@ -187,13 +187,13 @@ nv40_ram_func = {
int
nv40_ram_new_
(
struct
nvkm_fb
*
fb
,
enum
nvkm_ram_type
type
,
u64
size
,
u32
tags
,
struct
nvkm_ram
**
pram
)
struct
nvkm_ram
**
pram
)
{
struct
nv40_ram
*
ram
;
if
(
!
(
ram
=
kzalloc
(
sizeof
(
*
ram
),
GFP_KERNEL
)))
return
-
ENOMEM
;
*
pram
=
&
ram
->
base
;
return
nvkm_ram_ctor
(
&
nv40_ram_func
,
fb
,
type
,
size
,
tags
,
&
ram
->
base
);
return
nvkm_ram_ctor
(
&
nv40_ram_func
,
fb
,
type
,
size
,
&
ram
->
base
);
}
int
...
...
@@ -202,7 +202,6 @@ nv40_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
u32
pbus1218
=
nvkm_rd32
(
device
,
0x001218
);
u32
size
=
nvkm_rd32
(
device
,
0x10020c
)
&
0xff000000
;
u32
tags
=
nvkm_rd32
(
device
,
0x100320
);
enum
nvkm_ram_type
type
=
NVKM_RAM_TYPE_UNKNOWN
;
int
ret
;
...
...
@@ -213,7 +212,7 @@ nv40_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
case
0x00000300
:
type
=
NVKM_RAM_TYPE_DDR2
;
break
;
}
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
tags
,
pram
);
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
pram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h
View file @
af793b8c
...
...
@@ -9,6 +9,6 @@ struct nv40_ram {
u32
coef
;
};
int
nv40_ram_new_
(
struct
nvkm_fb
*
fb
,
enum
nvkm_ram_type
,
u64
,
u32
,
int
nv40_ram_new_
(
struct
nvkm_fb
*
fb
,
enum
nvkm_ram_type
,
u64
,
struct
nvkm_ram
**
);
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c
View file @
af793b8c
...
...
@@ -28,7 +28,6 @@ nv41_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
u32
size
=
nvkm_rd32
(
device
,
0x10020c
)
&
0xff000000
;
u32
tags
=
nvkm_rd32
(
device
,
0x100320
);
u32
fb474
=
nvkm_rd32
(
device
,
0x100474
);
enum
nvkm_ram_type
type
=
NVKM_RAM_TYPE_UNKNOWN
;
int
ret
;
...
...
@@ -40,7 +39,7 @@ nv41_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
if
(
fb474
&
0x00000001
)
type
=
NVKM_RAM_TYPE_DDR1
;
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
tags
,
pram
);
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
pram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv44.c
View file @
af793b8c
...
...
@@ -38,5 +38,5 @@ nv44_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
if
(
fb474
&
0x00000001
)
type
=
NVKM_RAM_TYPE_DDR1
;
return
nv40_ram_new_
(
fb
,
type
,
size
,
0
,
pram
);
return
nv40_ram_new_
(
fb
,
type
,
size
,
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv49.c
View file @
af793b8c
...
...
@@ -28,7 +28,6 @@ nv49_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
u32
size
=
nvkm_rd32
(
device
,
0x10020c
)
&
0xff000000
;
u32
tags
=
nvkm_rd32
(
device
,
0x100320
);
u32
fb914
=
nvkm_rd32
(
device
,
0x100914
);
enum
nvkm_ram_type
type
=
NVKM_RAM_TYPE_UNKNOWN
;
int
ret
;
...
...
@@ -40,7 +39,7 @@ nv49_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
case
0x00000003
:
break
;
}
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
tags
,
pram
);
ret
=
nv40_ram_new_
(
fb
,
type
,
size
,
pram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv4e.c
View file @
af793b8c
...
...
@@ -29,5 +29,5 @@ nv4e_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
u32
size
=
nvkm_rd32
(
device
,
0x10020c
)
&
0xff000000
;
return
nvkm_ram_new_
(
&
nv04_ram_func
,
fb
,
NVKM_RAM_TYPE_UNKNOWN
,
size
,
0
,
pram
);
size
,
pram
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
View file @
af793b8c
...
...
@@ -639,7 +639,6 @@ nv50_ram_ctor(const struct nvkm_ram_func *func,
const
u32
rsvd_head
=
(
256
*
1024
);
/* vga memory */
const
u32
rsvd_tail
=
(
1024
*
1024
);
/* vbios etc */
u64
size
=
nvkm_rd32
(
device
,
0x10020c
);
u32
tags
=
nvkm_rd32
(
device
,
0x100320
);
enum
nvkm_ram_type
type
=
NVKM_RAM_TYPE_UNKNOWN
;
int
ret
;
...
...
@@ -660,7 +659,7 @@ nv50_ram_ctor(const struct nvkm_ram_func *func,
size
=
(
size
&
0x000000ff
)
<<
32
|
(
size
&
0xffffff00
);
ret
=
nvkm_ram_ctor
(
func
,
fb
,
type
,
size
,
tags
,
ram
);
ret
=
nvkm_ram_ctor
(
func
,
fb
,
type
,
size
,
ram
);
if
(
ret
)
return
ret
;
...
...
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