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
87717e7f
Commit
87717e7f
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/imem/nv04: directly embed nvkm_instobj into nv04_instobj
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
49814f62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
+7
-7
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c
View file @
87717e7f
...
...
@@ -24,7 +24,6 @@
#define nv04_instmem(p) container_of((p), struct nv04_instmem, base)
#include "priv.h"
#include <core/memory.h>
#include <core/ramht.h>
struct
nv04_instmem
{
...
...
@@ -35,10 +34,10 @@ struct nv04_instmem {
/******************************************************************************
* instmem object implementation
*****************************************************************************/
#define nv04_instobj(p) container_of((p), struct nv04_instobj, memory)
#define nv04_instobj(p) container_of((p), struct nv04_instobj,
base.
memory)
struct
nv04_instobj
{
struct
nvkm_
memory
memory
;
struct
nvkm_
instobj
base
;
struct
nv04_instmem
*
imem
;
struct
nvkm_mm_node
*
node
;
};
...
...
@@ -103,6 +102,7 @@ nv04_instobj_dtor(struct nvkm_memory *memory)
mutex_lock
(
&
iobj
->
imem
->
base
.
subdev
.
mutex
);
nvkm_mm_free
(
&
iobj
->
imem
->
heap
,
&
iobj
->
node
);
mutex_unlock
(
&
iobj
->
imem
->
base
.
subdev
.
mutex
);
nvkm_instobj_dtor
(
&
iobj
->
imem
->
base
,
&
iobj
->
base
);
return
iobj
;
}
...
...
@@ -126,10 +126,10 @@ nv04_instobj_new(struct nvkm_instmem *base, u32 size, u32 align, bool zero,
if
(
!
(
iobj
=
kzalloc
(
sizeof
(
*
iobj
),
GFP_KERNEL
)))
return
-
ENOMEM
;
*
pmemory
=
&
iobj
->
memory
;
*
pmemory
=
&
iobj
->
base
.
memory
;
nvkm_
memory_ctor
(
&
nv04_instobj_func
,
&
iobj
->
memory
);
iobj
->
memory
.
ptrs
=
&
nv04_instobj_ptrs
;
nvkm_
instobj_ctor
(
&
nv04_instobj_func
,
&
imem
->
base
,
&
iobj
->
base
);
iobj
->
base
.
memory
.
ptrs
=
&
nv04_instobj_ptrs
;
iobj
->
imem
=
imem
;
mutex_lock
(
&
imem
->
base
.
subdev
.
mutex
);
...
...
@@ -214,7 +214,7 @@ nv04_instmem = {
.
rd32
=
nv04_instmem_rd32
,
.
wr32
=
nv04_instmem_wr32
,
.
memory_new
=
nv04_instobj_new
,
.
persistent
=
fals
e
,
.
persistent
=
tru
e
,
.
zero
=
false
,
};
...
...
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