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
0b428011
Commit
0b428011
authored
Dec 11, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb/ram/mcp77: subclass nouveau_ram
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
5cc8d536
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
+14
-10
No files found.
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
View file @
0b428011
...
...
@@ -24,6 +24,10 @@
#include "nv50.h"
struct
nvaa_ram_priv
{
struct
nouveau_ram
base
;
};
static
int
nvaa_ram_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
datasize
,
...
...
@@ -32,26 +36,26 @@ nvaa_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
const
u32
rsvd_head
=
(
256
*
1024
)
>>
12
;
/* vga memory */
const
u32
rsvd_tail
=
(
1024
*
1024
)
>>
12
;
/* vbios etc */
struct
nouveau_fb
*
pfb
=
nouveau_fb
(
parent
);
struct
n
ouveau_ram
*
ram
;
struct
n
vaa_ram_priv
*
priv
;
int
ret
;
ret
=
nouveau_ram_create
(
parent
,
engine
,
oclass
,
&
ram
);
*
pobject
=
nv_object
(
ram
);
ret
=
nouveau_ram_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
ram
->
size
=
nv_rd32
(
pfb
,
0x10020c
);
ram
->
size
=
(
ram
->
size
&
0xffffff00
)
|
((
ram
->
size
&
0x000000ff
)
<<
32
);
priv
->
base
.
size
=
nv_rd32
(
pfb
,
0x10020c
);
priv
->
base
.
size
=
(
priv
->
base
.
size
&
0xffffff00
)
|
((
priv
->
base
.
size
&
0x000000ff
)
<<
32
);
ret
=
nouveau_mm_init
(
&
pfb
->
vram
,
rsvd_head
,
(
ram
->
size
>>
12
)
-
ret
=
nouveau_mm_init
(
&
pfb
->
vram
,
rsvd_head
,
(
priv
->
base
.
size
>>
12
)
-
(
rsvd_head
+
rsvd_tail
),
1
);
if
(
ret
)
return
ret
;
ram
->
type
=
NV_MEM_TYPE_STOLEN
;
ram
->
stolen
=
(
u64
)
nv_rd32
(
pfb
,
0x100e10
)
<<
12
;
ram
->
get
=
nv50_ram_get
;
ram
->
put
=
nv50_ram_put
;
priv
->
base
.
type
=
NV_MEM_TYPE_STOLEN
;
priv
->
base
.
stolen
=
(
u64
)
nv_rd32
(
pfb
,
0x100e10
)
<<
12
;
priv
->
base
.
get
=
nv50_ram_get
;
priv
->
base
.
put
=
nv50_ram_put
;
return
0
;
}
...
...
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