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
617a6cbd
Commit
617a6cbd
authored
Apr 24, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0-/gr: use self as parent for subobjects
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
1409d90f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
+1
-2
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+8
-5
drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
+4
-2
No files found.
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
View file @
617a6cbd
...
@@ -36,7 +36,6 @@ int
...
@@ -36,7 +36,6 @@ int
nvc0_grctx_init
(
struct
nvc0_graph_priv
*
priv
,
struct
nvc0_grctx
*
info
)
nvc0_grctx_init
(
struct
nvc0_graph_priv
*
priv
,
struct
nvc0_grctx
*
info
)
{
{
struct
nouveau_bar
*
bar
=
nouveau_bar
(
priv
);
struct
nouveau_bar
*
bar
=
nouveau_bar
(
priv
);
struct
nouveau_object
*
parent
=
nv_object
(
priv
);
struct
nouveau_gpuobj
*
chan
;
struct
nouveau_gpuobj
*
chan
;
u32
size
=
(
0x80000
+
priv
->
size
+
4095
)
&
~
4095
;
u32
size
=
(
0x80000
+
priv
->
size
+
4095
)
&
~
4095
;
int
ret
,
i
;
int
ret
,
i
;
...
@@ -44,7 +43,7 @@ nvc0_grctx_init(struct nvc0_graph_priv *priv, struct nvc0_grctx *info)
...
@@ -44,7 +43,7 @@ nvc0_grctx_init(struct nvc0_graph_priv *priv, struct nvc0_grctx *info)
/* allocate memory to for a "channel", which we'll use to generate
/* allocate memory to for a "channel", which we'll use to generate
* the default context values
* the default context values
*/
*/
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
size
,
0x1000
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
)
,
NULL
,
size
,
0x1000
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
info
->
chan
);
NVOBJ_FLAG_ZERO_ALLOC
,
&
info
->
chan
);
chan
=
info
->
chan
;
chan
=
info
->
chan
;
if
(
ret
)
{
if
(
ret
)
{
...
...
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
View file @
617a6cbd
...
@@ -102,7 +102,8 @@ nvc0_graph_context_ctor(struct nouveau_object *parent,
...
@@ -102,7 +102,8 @@ nvc0_graph_context_ctor(struct nouveau_object *parent,
* fuc to modify some per-context register settings on first load
* fuc to modify some per-context register settings on first load
* of the context.
* of the context.
*/
*/
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
0x100
,
0
,
&
chan
->
mmio
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
chan
),
NULL
,
0x1000
,
0x100
,
0
,
&
chan
->
mmio
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -114,8 +115,8 @@ nvc0_graph_context_ctor(struct nouveau_object *parent,
...
@@ -114,8 +115,8 @@ nvc0_graph_context_ctor(struct nouveau_object *parent,
/* allocate buffers referenced by mmio list */
/* allocate buffers referenced by mmio list */
for
(
i
=
0
;
data
->
size
&&
i
<
ARRAY_SIZE
(
priv
->
mmio_data
);
i
++
)
{
for
(
i
=
0
;
data
->
size
&&
i
<
ARRAY_SIZE
(
priv
->
mmio_data
);
i
++
)
{
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
data
->
size
,
data
->
align
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
chan
),
NULL
,
data
->
size
,
0
,
&
chan
->
data
[
i
].
mem
);
data
->
align
,
0
,
&
chan
->
data
[
i
].
mem
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -567,11 +568,13 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -567,11 +568,13 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
break
;
break
;
}
}
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b4
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b4
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b8
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b8
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
View file @
617a6cbd
...
@@ -451,11 +451,13 @@ nve0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -451,11 +451,13 @@ nve0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
firmware
=
true
;
priv
->
firmware
=
true
;
}
}
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b4
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b4
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nouveau_gpuobj_new
(
parent
,
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b8
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
256
,
0
,
&
priv
->
unk4188b8
);
if
(
ret
)
if
(
ret
)
return
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