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
150ccf16
Commit
150ccf16
authored
Oct 10, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv30-nv40/fb: make use of bankoff for zeta buffers, where supported
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d33db63b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
4 deletions
+36
-4
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
+3
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
+6
-1
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
+11
-1
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
+15
-1
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
View file @
150ccf16
...
@@ -148,6 +148,9 @@ int nv41_fb_init(struct nouveau_object *);
...
@@ -148,6 +148,9 @@ int nv41_fb_init(struct nouveau_object *);
int
nv44_fb_init
(
struct
nouveau_object
*
);
int
nv44_fb_init
(
struct
nouveau_object
*
);
void
nv41_fb_tile_prog
(
struct
nouveau_fb
*
,
int
,
struct
nouveau_fb_tile
*
);
void
nv41_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_fb_vram_del
(
struct
nouveau_fb
*
,
struct
nouveau_mem
**
);
void
nv50_fb_vram_del
(
struct
nouveau_fb
*
,
struct
nouveau_mem
**
);
void
nv50_fb_trap
(
struct
nouveau_fb
*
,
int
display
);
void
nv50_fb_trap
(
struct
nouveau_fb
*
,
int
display
);
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
View file @
150ccf16
...
@@ -34,7 +34,12 @@ void
...
@@ -34,7 +34,12 @@ 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
,
u32
flags
,
struct
nouveau_fb_tile
*
tile
)
u32
flags
,
struct
nouveau_fb_tile
*
tile
)
{
{
tile
->
addr
=
addr
|
1
;
/* for performance, select alternate bank offset for zeta */
if
(
!
(
flags
&
4
))
tile
->
addr
=
(
0
<<
4
);
else
tile
->
addr
=
(
1
<<
4
);
tile
->
addr
|=
0x00000001
;
/* enable */
tile
->
addr
|=
addr
;
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
pitch
=
pitch
;
tile
->
pitch
=
pitch
;
}
}
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c
View file @
150ccf16
...
@@ -30,6 +30,16 @@ struct nv44_fb_priv {
...
@@ -30,6 +30,16 @@ struct nv44_fb_priv {
struct
nouveau_fb
base
;
struct
nouveau_fb
base
;
};
};
static
void
nv44_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
tile
)
{
tile
->
addr
=
0x00000001
;
/* mode = vram */
tile
->
addr
|=
addr
;
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
pitch
=
pitch
;
}
int
int
nv44_fb_init
(
struct
nouveau_object
*
object
)
nv44_fb_init
(
struct
nouveau_object
*
object
)
{
{
...
@@ -72,7 +82,7 @@ nv44_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -72,7 +82,7 @@ nv44_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
init
=
nv
30
_fb_tile_init
;
priv
->
base
.
tile
.
init
=
nv
44
_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
nouveau_fb_created
(
&
priv
->
base
);
return
nouveau_fb_created
(
&
priv
->
base
);
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/nv46.c
View file @
150ccf16
...
@@ -30,6 +30,20 @@ struct nv46_fb_priv {
...
@@ -30,6 +30,20 @@ struct nv46_fb_priv {
struct
nouveau_fb
base
;
struct
nouveau_fb
base
;
};
};
void
nv46_fb_tile_init
(
struct
nouveau_fb
*
pfb
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nouveau_fb_tile
*
tile
)
{
/* for performance, select alternate bank offset for zeta */
if
(
!
(
flags
&
4
))
tile
->
addr
=
(
0
<<
3
);
else
tile
->
addr
=
(
1
<<
3
);
tile
->
addr
|=
0x00000001
;
/* mode = vram */
tile
->
addr
|=
addr
;
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
pitch
=
pitch
;
}
static
int
static
int
nv46_fb_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
nv46_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
,
...
@@ -57,7 +71,7 @@ nv46_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -57,7 +71,7 @@ nv46_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
15
;
priv
->
base
.
tile
.
regions
=
15
;
priv
->
base
.
tile
.
init
=
nv
30
_fb_tile_init
;
priv
->
base
.
tile
.
init
=
nv
46
_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
nouveau_fb_created
(
&
priv
->
base
);
return
nouveau_fb_created
(
&
priv
->
base
);
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/nv4e.c
View file @
150ccf16
...
@@ -48,7 +48,7 @@ nv4e_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -48,7 +48,7 @@ nv4e_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
base
.
ram
.
type
=
NV_MEM_TYPE_STOLEN
;
priv
->
base
.
ram
.
type
=
NV_MEM_TYPE_STOLEN
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
memtype_valid
=
nv04_fb_memtype_valid
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
regions
=
12
;
priv
->
base
.
tile
.
init
=
nv
30
_fb_tile_init
;
priv
->
base
.
tile
.
init
=
nv
46
_fb_tile_init
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
fini
=
nv30_fb_tile_fini
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
priv
->
base
.
tile
.
prog
=
nv41_fb_tile_prog
;
return
nouveau_fb_created
(
&
priv
->
base
);
return
nouveau_fb_created
(
&
priv
->
base
);
...
...
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