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
Kirill Smelkov
linux
Commits
f83145ec
Commit
f83145ec
authored
Apr 24, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50-/bar: use self as parent for subobjects
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
b5795c77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c
drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c
+12
-10
drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c
+9
-5
No files found.
drivers/gpu/drm/nouveau/core/subdev/bar/nv50.c
View file @
f83145ec
...
...
@@ -122,18 +122,20 @@ nv50_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x20000
,
0
,
NVOBJ_FLAG_HEAP
,
&
priv
->
mem
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x20000
,
0
,
NVOBJ_FLAG_HEAP
,
&
priv
->
mem
);
heap
=
nv_object
(
priv
->
mem
);
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
heap
,
(
device
->
chipset
==
0x50
)
?
0x1400
:
0x0200
,
0
,
0
,
&
priv
->
pad
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
heap
,
(
device
->
chipset
==
0x50
)
?
0x1400
:
0x0200
,
0
,
0
,
&
priv
->
pad
);
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
heap
,
0x4000
,
0
,
0
,
&
priv
->
pgd
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
heap
,
0x4000
,
0
,
0
,
&
priv
->
pgd
);
if
(
ret
)
return
ret
;
...
...
@@ -145,9 +147,9 @@ nv50_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
heap
,
((
limit
--
-
start
)
>>
12
)
*
8
,
0x1000
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
vm
->
pgt
[
0
].
obj
[
0
]);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
heap
,
((
limit
--
-
start
)
>>
12
)
*
8
,
0x1000
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
vm
->
pgt
[
0
].
obj
[
0
]);
vm
->
pgt
[
0
].
refcount
[
0
]
=
1
;
if
(
ret
)
return
ret
;
...
...
@@ -157,7 +159,7 @@ nv50_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
heap
,
24
,
16
,
0
,
&
priv
->
bar3
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
)
,
heap
,
24
,
16
,
0
,
&
priv
->
bar3
);
if
(
ret
)
return
ret
;
...
...
@@ -182,7 +184,7 @@ nv50_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
heap
,
24
,
16
,
0
,
&
priv
->
bar1
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
)
,
heap
,
24
,
16
,
0
,
&
priv
->
bar1
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/bar/nvc0.c
View file @
f83145ec
...
...
@@ -101,12 +101,14 @@ nvc0_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
/* BAR3 */
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
0
,
0
,
&
priv
->
bar
[
0
].
mem
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0
,
0
,
&
priv
->
bar
[
0
].
mem
);
mem
=
priv
->
bar
[
0
].
mem
;
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x8000
,
0
,
0
,
&
priv
->
bar
[
0
].
pgd
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x8000
,
0
,
0
,
&
priv
->
bar
[
0
].
pgd
);
if
(
ret
)
return
ret
;
...
...
@@ -114,7 +116,7 @@ nvc0_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
)
,
NULL
,
(
pci_resource_len
(
pdev
,
3
)
>>
12
)
*
8
,
0x1000
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
vm
->
pgt
[
0
].
obj
[
0
]);
...
...
@@ -133,12 +135,14 @@ nvc0_bar_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
nv_wo32
(
mem
,
0x020c
,
upper_32_bits
(
pci_resource_len
(
pdev
,
3
)
-
1
));
/* BAR1 */
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
0
,
0
,
&
priv
->
bar
[
1
].
mem
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0
,
0
,
&
priv
->
bar
[
1
].
mem
);
mem
=
priv
->
bar
[
1
].
mem
;
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x8000
,
0
,
0
,
&
priv
->
bar
[
1
].
pgd
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x8000
,
0
,
0
,
&
priv
->
bar
[
1
].
pgd
);
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