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
3532c370
Commit
3532c370
authored
Dec 05, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/instmem: instobjs may not have an engine
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
490d595f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
drivers/gpu/drm/nouveau/core/subdev/instmem/base.c
drivers/gpu/drm/nouveau/core/subdev/instmem/base.c
+4
-5
drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
+6
-4
drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c
drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/core/subdev/instmem/base.c
View file @
3532c370
...
...
@@ -31,7 +31,7 @@
void
_nouveau_instobj_dtor
(
struct
nouveau_object
*
object
)
{
struct
nouveau_instmem
*
imem
=
(
void
*
)
object
->
engine
;
struct
nouveau_instmem
*
imem
=
nouveau_instmem
(
object
)
;
struct
nouveau_instobj
*
iobj
=
(
void
*
)
object
;
mutex_lock
(
&
nv_subdev
(
imem
)
->
mutex
);
...
...
@@ -47,7 +47,7 @@ nouveau_instobj_create_(struct nouveau_object *parent,
struct
nouveau_oclass
*
oclass
,
int
length
,
void
**
pobject
)
{
struct
nouveau_instmem
*
imem
=
(
void
*
)
engine
;
struct
nouveau_instmem
*
imem
=
nouveau_instmem
(
parent
)
;
struct
nouveau_instobj
*
iobj
;
int
ret
;
...
...
@@ -72,10 +72,9 @@ nouveau_instmem_alloc(struct nouveau_instmem *imem,
struct
nouveau_object
*
parent
,
u32
size
,
u32
align
,
struct
nouveau_object
**
pobject
)
{
struct
nouveau_object
*
engine
=
nv_object
(
imem
);
struct
nouveau_instmem_impl
*
impl
=
(
void
*
)
engine
->
oclass
;
struct
nouveau_instmem_impl
*
impl
=
(
void
*
)
imem
->
base
.
object
.
oclass
;
struct
nouveau_instobj_args
args
=
{
.
size
=
size
,
.
align
=
align
};
return
nouveau_object_ctor
(
parent
,
engine
,
impl
->
instobj
,
&
args
,
return
nouveau_object_ctor
(
parent
,
parent
->
engine
,
impl
->
instobj
,
&
args
,
sizeof
(
args
),
pobject
);
}
...
...
drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
View file @
3532c370
...
...
@@ -31,21 +31,23 @@
static
u32
nv04_instobj_rd32
(
struct
nouveau_object
*
object
,
u64
addr
)
{
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
object
);
struct
nv04_instobj_priv
*
node
=
(
void
*
)
object
;
return
nv_ro32
(
object
->
engine
,
node
->
mem
->
offset
+
addr
);
return
nv_ro32
(
priv
,
node
->
mem
->
offset
+
addr
);
}
static
void
nv04_instobj_wr32
(
struct
nouveau_object
*
object
,
u64
addr
,
u32
data
)
{
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
object
);
struct
nv04_instobj_priv
*
node
=
(
void
*
)
object
;
nv_wo32
(
object
->
engine
,
node
->
mem
->
offset
+
addr
,
data
);
nv_wo32
(
priv
,
node
->
mem
->
offset
+
addr
,
data
);
}
static
void
nv04_instobj_dtor
(
struct
nouveau_object
*
object
)
{
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
object
)
;
struct
nv04_instobj_priv
*
node
=
(
void
*
)
object
;
nouveau_mm_free
(
&
priv
->
heap
,
&
node
->
mem
);
nouveau_instobj_destroy
(
&
node
->
base
);
...
...
@@ -56,7 +58,7 @@ nv04_instobj_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
engine
;
struct
nv04_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
parent
)
;
struct
nv04_instobj_priv
*
node
;
struct
nouveau_instobj_args
*
args
=
data
;
int
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c
View file @
3532c370
...
...
@@ -45,7 +45,7 @@ struct nv50_instobj_priv {
static
u32
nv50_instobj_rd32
(
struct
nouveau_object
*
object
,
u64
offset
)
{
struct
nv50_instmem_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nv50_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
object
)
;
struct
nv50_instobj_priv
*
node
=
(
void
*
)
object
;
unsigned
long
flags
;
u64
base
=
(
node
->
mem
->
offset
+
offset
)
&
0xffffff00000ULL
;
...
...
@@ -65,7 +65,7 @@ nv50_instobj_rd32(struct nouveau_object *object, u64 offset)
static
void
nv50_instobj_wr32
(
struct
nouveau_object
*
object
,
u64
offset
,
u32
data
)
{
struct
nv50_instmem_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nv50_instmem_priv
*
priv
=
(
void
*
)
nouveau_instmem
(
object
)
;
struct
nv50_instobj_priv
*
node
=
(
void
*
)
object
;
unsigned
long
flags
;
u64
base
=
(
node
->
mem
->
offset
+
offset
)
&
0xffffff00000ULL
;
...
...
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