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
20cdeaf9
Commit
20cdeaf9
authored
Oct 21, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb: merge more bits and pieces into oclass definitions
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
8613e731
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
272 additions
and
519 deletions
+272
-519
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
+2
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c
+14
-12
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.h
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.h
+55
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
+12
-32
drivers/gpu/drm/nouveau/core/subdev/fb/nv1a.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv1a.c
+12
-32
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
+13
-33
drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c
+13
-33
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
+16
-36
drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
+13
-33
drivers/gpu/drm/nouveau/core/subdev/fb/nv36.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv36.c
+13
-33
drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c
+14
-35
drivers/gpu/drm/nouveau/core/subdev/fb/nv41.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv41.c
+14
-35
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
+13
-34
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
+12
-33
drivers/gpu/drm/nouveau/core/subdev/fb/nv47.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv47.c
+13
-34
drivers/gpu/drm/nouveau/core/subdev/fb/nv49.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv49.c
+13
-34
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
+12
-32
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
+2
-2
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.h
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.h
+3
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nv84.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv84.c
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nva3.c
drivers/gpu/drm/nouveau/core/subdev/fb/nva3.c
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nvaa.c
drivers/gpu/drm/nouveau/core/subdev/fb/nvaa.c
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nvaf.c
drivers/gpu/drm/nouveau/core/subdev/fb/nvaf.c
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c
+2
-4
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
+4
-31
drivers/gpu/drm/nouveau/core/subdev/fb/ramnv50.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnv50.c
+2
-1
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
+1
-0
No files found.
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
View file @
20cdeaf9
...
@@ -133,6 +133,8 @@ nouveau_fb_create_(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -133,6 +133,8 @@ nouveau_fb_create_(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
pfb
->
memtype_valid
=
impl
->
memtype
;
ret
=
nouveau_object_ctor
(
nv_object
(
pfb
),
nv_object
(
pfb
),
ret
=
nouveau_object_ctor
(
nv_object
(
pfb
),
nv_object
(
pfb
),
impl
->
ram
,
NULL
,
0
,
&
ram
);
impl
->
ram
,
NULL
,
0
,
&
ram
);
if
(
ret
)
{
if
(
ret
)
{
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c
View file @
20cdeaf9
...
@@ -22,14 +22,10 @@
...
@@ -22,14 +22,10 @@
* Authors: Ben Skeggs
* Authors: Ben Skeggs
*/
*/
#include "
priv
.h"
#include "
nv04
.h"
#define NV04_PFB_CFG0 0x00100200
#define NV04_PFB_CFG0 0x00100200
struct
nv04_fb_priv
{
struct
nouveau_fb
base
;
};
bool
bool
nv04_fb_memtype_valid
(
struct
nouveau_fb
*
pfb
,
u32
tile_flags
)
nv04_fb_memtype_valid
(
struct
nouveau_fb
*
pfb
,
u32
tile_flags
)
{
{
...
@@ -57,11 +53,12 @@ nv04_fb_init(struct nouveau_object *object)
...
@@ -57,11 +53,12 @@ nv04_fb_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
int
int
nv04_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
nv04_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
struct
nouveau_object
**
pobject
)
{
{
struct
nv04_fb_impl
*
impl
=
(
void
*
)
oclass
;
struct
nv04_fb_priv
*
priv
;
struct
nv04_fb_priv
*
priv
;
int
ret
;
int
ret
;
...
@@ -70,18 +67,23 @@ nv04_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -70,18 +67,23 @@ nv04_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
impl
->
tile
.
regions
;
priv
->
base
.
tile
.
init
=
impl
->
tile
.
init
;
priv
->
base
.
tile
.
comp
=
impl
->
tile
.
comp
;
priv
->
base
.
tile
.
fini
=
impl
->
tile
.
fini
;
priv
->
base
.
tile
.
prog
=
impl
->
tile
.
prog
;
return
0
;
return
0
;
}
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv04_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv04_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x04
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x04
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv04_fb_init
,
.
init
=
nv04_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv04_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv04_ram_oclass
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.h
0 → 100644
View file @
20cdeaf9
#ifndef __NVKM_FB_NV04_H__
#define __NVKM_FB_NV04_H__
#include "priv.h"
struct
nv04_fb_priv
{
struct
nouveau_fb
base
;
};
int
nv04_fb_ctor
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
void
*
,
u32
,
struct
nouveau_object
**
);
struct
nv04_fb_impl
{
struct
nouveau_fb_impl
base
;
struct
{
int
regions
;
void
(
*
init
)(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
(
*
comp
)(
struct
nouveau_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
(
*
fini
)(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
void
(
*
prog
)(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
}
tile
;
};
void
nv10_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
nv10_fb_tile_fini
(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
void
nv10_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_fini
(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
int
nv30_fb_init
(
struct
nouveau_object
*
);
void
nv30_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
nv40_fb_tile_comp
(
struct
nouveau_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nouveau_fb_tile
*
);
int
nv41_fb_init
(
struct
nouveau_object
*
);
void
nv41_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
int
nv44_fb_init
(
struct
nouveau_object
*
);
void
nv44_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
void
nv46_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
#endif
drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv10_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv10_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
nv10_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
...
@@ -57,35 +53,19 @@ nv10_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
...
@@ -57,35 +53,19 @@ nv10_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
nv_rd32
(
pfb
,
0x100240
+
(
i
*
0x10
));
nv_rd32
(
pfb
,
0x100240
+
(
i
*
0x10
));
}
}
static
int
nv10_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv10_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv10_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv10_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv10_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv10_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv10_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x10
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x10
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
10
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
_nouveau_fb_init
,
.
init
=
_nouveau_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv10_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv10_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv1a.c
View file @
20cdeaf9
...
@@ -24,41 +24,21 @@
...
@@ -24,41 +24,21 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv1a_fb_priv
{
struct
nouveau_fb
base
;
};
static
int
nv1a_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv1a_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv10_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv10_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv10_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv1a_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv1a_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x1a
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x1a
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
1a
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
_nouveau_fb_init
,
.
init
=
_nouveau_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv10_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv10_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv20_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv20_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
nv20_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
...
@@ -80,36 +76,20 @@ nv20_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
...
@@ -80,36 +76,20 @@ nv20_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
nv_wr32
(
pfb
,
0x100300
+
(
i
*
0x04
),
tile
->
zcomp
);
nv_wr32
(
pfb
,
0x100300
+
(
i
*
0x04
),
tile
->
zcomp
);
}
}
static
int
nv20_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv20_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv20_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv20_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv20_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv20_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x20
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x20
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
20
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
_nouveau_fb_init
,
.
init
=
_nouveau_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv20_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv20_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv20_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv25_fb_priv
{
struct
nouveau_fb
base
;
};
static
void
static
void
nv25_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
nv25_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
...
@@ -46,36 +42,20 @@ nv25_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
...
@@ -46,36 +42,20 @@ nv25_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
}
}
}
}
static
int
nv25_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv25_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv20_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv25_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv25_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv25_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x25
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x25
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
25
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
_nouveau_fb_init
,
.
init
=
_nouveau_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv20_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv20_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv25_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv30_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv30_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
nv30_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
...
@@ -67,7 +63,7 @@ nv30_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
...
@@ -67,7 +63,7 @@ nv30_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
}
}
static
int
static
int
calc_bias
(
struct
nv
30
_fb_priv
*
priv
,
int
k
,
int
i
,
int
j
)
calc_bias
(
struct
nv
04
_fb_priv
*
priv
,
int
k
,
int
i
,
int
j
)
{
{
struct
nouveau_device
*
device
=
nv_device
(
priv
);
struct
nouveau_device
*
device
=
nv_device
(
priv
);
int
b
=
(
device
->
chipset
>
0x30
?
int
b
=
(
device
->
chipset
>
0x30
?
...
@@ -78,7 +74,7 @@ calc_bias(struct nv30_fb_priv *priv, int k, int i, int j)
...
@@ -78,7 +74,7 @@ calc_bias(struct nv30_fb_priv *priv, int k, int i, int j)
}
}
static
int
static
int
calc_ref
(
struct
nv
30
_fb_priv
*
priv
,
int
l
,
int
k
,
int
i
)
calc_ref
(
struct
nv
04
_fb_priv
*
priv
,
int
l
,
int
k
,
int
i
)
{
{
int
j
,
x
=
0
;
int
j
,
x
=
0
;
...
@@ -95,7 +91,7 @@ int
...
@@ -95,7 +91,7 @@ int
nv30_fb_init
(
struct
nouveau_object
*
object
)
nv30_fb_init
(
struct
nouveau_object
*
object
)
{
{
struct
nouveau_device
*
device
=
nv_device
(
object
);
struct
nouveau_device
*
device
=
nv_device
(
object
);
struct
nv
30
_fb_priv
*
priv
=
(
void
*
)
object
;
struct
nv
04
_fb_priv
*
priv
=
(
void
*
)
object
;
int
ret
,
i
,
j
;
int
ret
,
i
,
j
;
ret
=
nouveau_fb_init
(
&
priv
->
base
);
ret
=
nouveau_fb_init
(
&
priv
->
base
);
...
@@ -124,36 +120,20 @@ nv30_fb_init(struct nouveau_object *object)
...
@@ -124,36 +120,20 @@ nv30_fb_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
int
nv30_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv30_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv30_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv30_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv30_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x30
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x30
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
30
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv30_fb_init
,
.
init
=
nv30_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv20_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv20_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv30_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv35_fb_priv
{
struct
nouveau_fb
base
;
};
static
void
static
void
nv35_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
nv35_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
...
@@ -47,36 +43,20 @@ nv35_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
...
@@ -47,36 +43,20 @@ nv35_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
}
}
}
}
static
int
nv35_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv35_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv35_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv35_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv35_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x35
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x35
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
35
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv30_fb_init
,
.
init
=
nv30_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv20_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv20_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv35_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv36.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv36_fb_priv
{
struct
nouveau_fb
base
;
};
static
void
static
void
nv36_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
nv36_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
...
@@ -47,36 +43,20 @@ nv36_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
...
@@ -47,36 +43,20 @@ nv36_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
}
}
}
}
static
int
nv36_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv36_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv36_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv36_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv36_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x36
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x36
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
36
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv30_fb_init
,
.
init
=
nv30_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv20_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv20_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv36_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv40_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv40_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
nv40_fb_tile_comp
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
size
,
u32
flags
,
...
@@ -50,7 +46,7 @@ nv40_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
...
@@ -50,7 +46,7 @@ nv40_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
static
int
static
int
nv40_fb_init
(
struct
nouveau_object
*
object
)
nv40_fb_init
(
struct
nouveau_object
*
object
)
{
{
struct
nv
40
_fb_priv
*
priv
=
(
void
*
)
object
;
struct
nv
04
_fb_priv
*
priv
=
(
void
*
)
object
;
int
ret
;
int
ret
;
ret
=
nouveau_fb_init
(
&
priv
->
base
);
ret
=
nouveau_fb_init
(
&
priv
->
base
);
...
@@ -61,37 +57,20 @@ nv40_fb_init(struct nouveau_object *object)
...
@@ -61,37 +57,20 @@ nv40_fb_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
int
nv40_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv40_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
8
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv40_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv20_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv40_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv40_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x40
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x40
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
40
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv40_fb_init
,
.
init
=
nv40_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv40_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv40_ram_oclass
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv41.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv41_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv41_fb_tile_prog
(
struct
nouveau_fb
*
pfb
,
int
i
,
struct
nouveau_fb_tile
*
tile
)
nv41_fb_tile_prog
(
struct
nouveau_fb
*
pfb
,
int
i
,
struct
nouveau_fb_tile
*
tile
)
...
@@ -43,7 +39,7 @@ nv41_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
...
@@ -43,7 +39,7 @@ nv41_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
int
int
nv41_fb_init
(
struct
nouveau_object
*
object
)
nv41_fb_init
(
struct
nouveau_object
*
object
)
{
{
struct
nv
41
_fb_priv
*
priv
=
(
void
*
)
object
;
struct
nv
04
_fb_priv
*
priv
=
(
void
*
)
object
;
int
ret
;
int
ret
;
ret
=
nouveau_fb_init
(
&
priv
->
base
);
ret
=
nouveau_fb_init
(
&
priv
->
base
);
...
@@ -54,37 +50,20 @@ nv41_fb_init(struct nouveau_object *object)
...
@@ -54,37 +50,20 @@ nv41_fb_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
int
nv41_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv41_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv40_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv41_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv41_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x41
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x41
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
41
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv41_fb_init
,
.
init
=
nv41_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv41_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv41_ram_oclass
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv44_fb_priv
{
struct
nouveau_fb
base
;
};
static
void
static
void
nv44_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
nv44_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
...
@@ -52,7 +48,7 @@ nv44_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
...
@@ -52,7 +48,7 @@ nv44_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
int
int
nv44_fb_init
(
struct
nouveau_object
*
object
)
nv44_fb_init
(
struct
nouveau_object
*
object
)
{
{
struct
nv
4
4_fb_priv
*
priv
=
(
void
*
)
object
;
struct
nv
0
4_fb_priv
*
priv
=
(
void
*
)
object
;
int
ret
;
int
ret
;
ret
=
nouveau_fb_init
(
&
priv
->
base
);
ret
=
nouveau_fb_init
(
&
priv
->
base
);
...
@@ -64,36 +60,19 @@ nv44_fb_init(struct nouveau_object *object)
...
@@ -64,36 +60,19 @@ nv44_fb_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
int
nv44_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv44_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
init
=
nv44_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv44_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv44_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv44_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x44
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x44
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
4
4_fb_ctor
,
.
ctor
=
nv
0
4_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv44_fb_init
,
.
init
=
nv44_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv44_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv44_ram_oclass
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv44_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
View file @
20cdeaf9
...
@@ -24,11 +24,7 @@
...
@@ -24,11 +24,7 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv46_fb_priv
{
struct
nouveau_fb
base
;
};
void
void
nv46_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
nv46_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
...
@@ -44,36 +40,19 @@ nv46_fb_tile_init(struct nouveau_fb *pfb, int i, u32 addr, u32 size, u32 pitch,
...
@@ -44,36 +40,19 @@ nv46_fb_tile_init(struct nouveau_fb *pfb, int i, u32 addr, u32 size, u32 pitch,
tile
->
pitch
=
pitch
;
tile
->
pitch
=
pitch
;
}
}
static
int
nv46_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv46_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
15
;
priv
->
base
.
tile
.
init
=
nv46_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv44_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv46_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv46_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x46
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x46
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
46
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv44_fb_init
,
.
init
=
nv44_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv44_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv44_ram_oclass
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv47.c
View file @
20cdeaf9
...
@@ -24,43 +24,22 @@
...
@@ -24,43 +24,22 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv47_fb_priv
{
struct
nouveau_fb
base
;
};
static
int
nv47_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv47_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
15
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv40_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv47_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv47_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x47
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x47
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
47
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv41_fb_init
,
.
init
=
nv41_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv41_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv41_ram_oclass
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv49.c
View file @
20cdeaf9
...
@@ -24,43 +24,22 @@
...
@@ -24,43 +24,22 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv49_fb_priv
{
struct
nouveau_fb
base
;
};
static
int
nv49_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv49_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
15
;
priv
->
base
.
tile
.
init
=
nv30_fb_tile_init
;
priv
->
base
.
tile
.
comp
=
nv40_fb_tile_comp
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv49_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv49_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x49
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x49
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
49
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv41_fb_init
,
.
init
=
nv41_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv49_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv49_ram_oclass
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
View file @
20cdeaf9
...
@@ -24,41 +24,21 @@
...
@@ -24,41 +24,21 @@
*
*
*/
*/
#include "priv.h"
#include "nv04.h"
struct
nv4e_fb_priv
{
struct
nouveau_fb
base
;
};
static
int
nv4e_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv4e_fb_priv
*
priv
;
int
ret
;
ret
=
nouveau_fb_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
init
=
nv46_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv20_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv44_fb_tile_prog
;
return
0
;
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nv4e_fb_oclass
=
&
(
struct
n
ouveau
_fb_impl
)
{
nv4e_fb_oclass
=
&
(
struct
n
v04
_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x4e
),
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x4e
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
4e
_fb_ctor
,
.
ctor
=
nv
04
_fb_ctor
,
.
dtor
=
_nouveau_fb_dtor
,
.
dtor
=
_nouveau_fb_dtor
,
.
init
=
nv44_fb_init
,
.
init
=
nv44_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
ram
=
&
nv4e_ram_oclass
,
.
base
.
memtype
=
nv04_fb_memtype_valid
,
}.
base
;
.
base
.
ram
=
&
nv4e_ram_oclass
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
View file @
20cdeaf9
...
@@ -43,7 +43,7 @@ nv50_fb_memtype[0x80] = {
...
@@ -43,7 +43,7 @@ nv50_fb_memtype[0x80] = {
1
,
0
,
2
,
0
,
1
,
0
,
2
,
0
,
1
,
1
,
2
,
2
,
1
,
1
,
0
,
0
1
,
0
,
2
,
0
,
1
,
0
,
2
,
0
,
1
,
1
,
2
,
2
,
1
,
1
,
0
,
0
};
};
static
bool
bool
nv50_fb_memtype_valid
(
struct
nouveau_fb
*
pfb
,
u32
memtype
)
nv50_fb_memtype_valid
(
struct
nouveau_fb
*
pfb
,
u32
memtype
)
{
{
return
nv50_fb_memtype
[(
memtype
&
0xff00
)
>>
8
]
!=
0
;
return
nv50_fb_memtype
[(
memtype
&
0xff00
)
>>
8
]
!=
0
;
...
@@ -259,7 +259,6 @@ nv50_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -259,7 +259,6 @@ nv50_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
nv_warn
(
priv
,
"failed 0x100c08 page alloc
\n
"
);
nv_warn
(
priv
,
"failed 0x100c08 page alloc
\n
"
);
}
}
priv
->
base
.
memtype_valid
=
nv50_fb_memtype_valid
;
nv_subdev
(
priv
)
->
intr
=
nv50_fb_intr
;
nv_subdev
(
priv
)
->
intr
=
nv50_fb_intr
;
return
0
;
return
0
;
}
}
...
@@ -311,6 +310,7 @@ nv50_fb_oclass = &(struct nv50_fb_impl) {
...
@@ -311,6 +310,7 @@ nv50_fb_oclass = &(struct nv50_fb_impl) {
.
init
=
nv50_fb_init
,
.
init
=
nv50_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
trap
=
0x000707ff
,
.
trap
=
0x000707ff
,
}.
base
.
base
;
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.h
View file @
20cdeaf9
...
@@ -20,4 +20,7 @@ struct nv50_fb_impl {
...
@@ -20,4 +20,7 @@ struct nv50_fb_impl {
u32
trap
;
u32
trap
;
};
};
void
__nv50_ram_put
(
struct
nouveau_fb
*
,
struct
nouveau_mem
*
);
extern
int
nv50_fb_memtype
[
0x80
];
#endif
#endif
drivers/gpu/drm/nouveau/core/subdev/fb/nv84.c
View file @
20cdeaf9
...
@@ -33,6 +33,7 @@ nv84_fb_oclass = &(struct nv50_fb_impl) {
...
@@ -33,6 +33,7 @@ nv84_fb_oclass = &(struct nv50_fb_impl) {
.
init
=
nv50_fb_init
,
.
init
=
nv50_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
trap
=
0x001d07ff
,
.
trap
=
0x001d07ff
,
}.
base
.
base
;
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nva3.c
View file @
20cdeaf9
...
@@ -33,6 +33,7 @@ nva3_fb_oclass = &(struct nv50_fb_impl) {
...
@@ -33,6 +33,7 @@ nva3_fb_oclass = &(struct nv50_fb_impl) {
.
init
=
nv50_fb_init
,
.
init
=
nv50_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
trap
=
0x000d0fff
,
.
trap
=
0x000d0fff
,
}.
base
.
base
;
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nvaa.c
View file @
20cdeaf9
...
@@ -33,6 +33,7 @@ nvaa_fb_oclass = &(struct nv50_fb_impl) {
...
@@ -33,6 +33,7 @@ nvaa_fb_oclass = &(struct nv50_fb_impl) {
.
init
=
nv50_fb_init
,
.
init
=
nv50_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
trap
=
0x001d07ff
,
.
trap
=
0x001d07ff
,
}.
base
.
base
;
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nvaf.c
View file @
20cdeaf9
...
@@ -33,6 +33,7 @@ nvaf_fb_oclass = &(struct nv50_fb_impl) {
...
@@ -33,6 +33,7 @@ nvaf_fb_oclass = &(struct nv50_fb_impl) {
.
init
=
nv50_fb_init
,
.
init
=
nv50_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
base
.
ram
=
&
nv50_ram_oclass
,
.
trap
=
0x089d1fff
,
.
trap
=
0x089d1fff
,
}.
base
.
base
;
}.
base
.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c
View file @
20cdeaf9
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
* Authors: Ben Skeggs
* Authors: Ben Skeggs
*/
*/
#include "
priv
.h"
#include "
nv04
.h"
struct
nvc0_fb_priv
{
struct
nvc0_fb_priv
{
struct
nouveau_fb
base
;
struct
nouveau_fb
base
;
...
@@ -83,8 +83,6 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -83,8 +83,6 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
priv
->
base
.
memtype_valid
=
nvc0_fb_memtype_valid
;
priv
->
r100c10_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
priv
->
r100c10_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
if
(
priv
->
r100c10_page
)
{
if
(
priv
->
r100c10_page
)
{
priv
->
r100c10
=
pci_map_page
(
device
->
pdev
,
priv
->
r100c10_page
,
priv
->
r100c10
=
pci_map_page
(
device
->
pdev
,
priv
->
r100c10_page
,
...
@@ -97,7 +95,6 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -97,7 +95,6 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
0
;
return
0
;
}
}
struct
nouveau_oclass
*
struct
nouveau_oclass
*
nvc0_fb_oclass
=
&
(
struct
nouveau_fb_impl
)
{
nvc0_fb_oclass
=
&
(
struct
nouveau_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xc0
),
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xc0
),
...
@@ -107,5 +104,6 @@ nvc0_fb_oclass = &(struct nouveau_fb_impl) {
...
@@ -107,5 +104,6 @@ nvc0_fb_oclass = &(struct nouveau_fb_impl) {
.
init
=
nvc0_fb_init
,
.
init
=
nvc0_fb_init
,
.
fini
=
_nouveau_fb_fini
,
.
fini
=
_nouveau_fb_fini
,
},
},
.
memtype
=
nvc0_fb_memtype_valid
,
.
ram
=
&
nvc0_ram_oclass
,
.
ram
=
&
nvc0_ram_oclass
,
}.
base
;
}.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
View file @
20cdeaf9
...
@@ -54,40 +54,13 @@ int _nouveau_fb_fini(struct nouveau_object *, bool);
...
@@ -54,40 +54,13 @@ int _nouveau_fb_fini(struct nouveau_object *, bool);
struct
nouveau_fb_impl
{
struct
nouveau_fb_impl
{
struct
nouveau_oclass
base
;
struct
nouveau_oclass
base
;
struct
nouveau_oclass
*
ram
;
struct
nouveau_oclass
*
ram
;
bool
(
*
memtype
)(
struct
nouveau_fb
*
,
u32
);
};
};
struct
nouveau_bios
;
int
nouveau_fb_bios_memtype
(
struct
nouveau_bios
*
);
bool
nv04_fb_memtype_valid
(
struct
nouveau_fb
*
,
u32
memtype
);
bool
nv04_fb_memtype_valid
(
struct
nouveau_fb
*
,
u32
memtype
);
bool
nv50_fb_memtype_valid
(
struct
nouveau_fb
*
,
u32
memtype
);
void
nv10_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
struct
nouveau_bios
;
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
int
nouveau_fb_bios_memtype
(
struct
nouveau_bios
*
);
void
nv10_fb_tile_fini
(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
void
nv10_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_fini
(
struct
nouveau_fb
*
,
int
i
,
struct
nouveau_fb_tile
*
);
void
nv20_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
int
nv30_fb_init
(
struct
nouveau_object
*
);
void
nv30_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
nv40_fb_tile_comp
(
struct
nouveau_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nouveau_fb_tile
*
);
int
nv41_fb_init
(
struct
nouveau_object
*
);
void
nv41_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
int
nv44_fb_init
(
struct
nouveau_object
*
);
void
nv44_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
void
nv46_fb_tile_init
(
struct
nouveau_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
);
void
__nv50_ram_put
(
struct
nouveau_fb
*
,
struct
nouveau_mem
*
);
extern
int
nv50_fb_memtype
[
0x80
];
#endif
#endif
drivers/gpu/drm/nouveau/core/subdev/fb/ramnv50.c
View file @
20cdeaf9
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
#include <subdev/bios.h>
#include <subdev/bios.h>
#include <core/mm.h>
#include <core/mm.h>
#include "priv.h"
#include "nv50.h"
void
void
__nv50_ram_put
(
struct
nouveau_fb
*
pfb
,
struct
nouveau_mem
*
mem
)
__nv50_ram_put
(
struct
nouveau_fb
*
pfb
,
struct
nouveau_mem
*
mem
)
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
View file @
20cdeaf9
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <subdev/ltcg.h>
#include <subdev/ltcg.h>
#include "priv.h"
#include "priv.h"
#include "nv50.h"
extern
const
u8
nvc0_pte_storage_type_map
[
256
];
extern
const
u8
nvc0_pte_storage_type_map
[
256
];
...
...
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