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
4e7e62d6
Commit
4e7e62d6
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/client: store default device by handle, not reference
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
102b49da
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
+1
-1
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/core/client.c
drivers/gpu/drm/nouveau/nvkm/core/client.c
+2
-9
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+5
-5
No files found.
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
View file @
4e7e62d6
...
...
@@ -5,7 +5,7 @@
struct
nvkm_client
{
struct
nvkm_namedb
namedb
;
struct
nvkm_handle
*
root
;
struct
nvkm_device
*
device
;
u64
device
;
char
name
[
32
];
u32
debug
;
struct
nvkm_vm
*
vm
;
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
View file @
4e7e62d6
...
...
@@ -507,7 +507,7 @@ nouveau_drm_device_remove(struct drm_device *dev)
dev
->
irq_enabled
=
false
;
client
=
nvxx_client
(
&
drm
->
client
.
base
);
device
=
client
->
device
;
device
=
nvkm_device_find
(
client
->
device
)
;
drm_put_dev
(
dev
);
nvkm_device_del
(
&
device
);
...
...
drivers/gpu/drm/nouveau/nvkm/core/client.c
View file @
4e7e62d6
...
...
@@ -219,7 +219,6 @@ nvkm_client_del(struct nvkm_client **pclient)
nvkm_client_fini
(
client
,
false
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
client
->
notify
);
i
++
)
nvkm_client_notify_del
(
client
,
i
);
nvkm_object_ref
(
NULL
,
(
struct
nvkm_object
**
)
&
client
->
device
);
nvkm_handle_destroy
(
client
->
root
);
nvkm_namedb_destroy
(
&
client
->
namedb
);
*
pclient
=
NULL
;
...
...
@@ -233,17 +232,12 @@ nvkm_client_sclass[] = {
};
int
nvkm_client_new
(
const
char
*
name
,
u64
dev
nam
e
,
const
char
*
cfg
,
nvkm_client_new
(
const
char
*
name
,
u64
dev
ic
e
,
const
char
*
cfg
,
const
char
*
dbg
,
struct
nvkm_client
**
pclient
)
{
struct
nvkm_device
*
device
;
struct
nvkm_client
*
client
;
int
ret
;
device
=
nvkm_device_find
(
devname
);
if
(
!
device
)
return
-
ENODEV
;
ret
=
nvkm_namedb_create
(
NULL
,
NULL
,
&
nvkm_client_oclass
,
NV_CLIENT_CLASS
,
nvkm_client_sclass
,
0
,
&
client
);
...
...
@@ -259,8 +253,7 @@ nvkm_client_new(const char *name, u64 devname, const char *cfg,
/* prevent init/fini being called, os in in charge of this */
atomic_set
(
&
nv_object
(
client
)
->
usecount
,
2
);
nvkm_object_ref
(
&
device
->
engine
.
subdev
.
object
,
(
struct
nvkm_object
**
)
&
client
->
device
);
client
->
device
=
device
;
snprintf
(
client
->
name
,
sizeof
(
client
->
name
),
"%s"
,
name
);
client
->
debug
=
nvkm_dbgopt
(
dbg
,
"CLIENT"
);
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
View file @
4e7e62d6
...
...
@@ -258,12 +258,12 @@ nvkm_udevice_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
oclass
=
&
nvkm_udevice_oclass_super
;
/* find the device subdev that matches what the client requested */
device
=
client
->
device
;
if
(
args
->
v0
.
device
!=
~
0
)
{
if
(
args
->
v0
.
device
!=
~
0
)
device
=
nvkm_device_find
(
args
->
v0
.
device
);
else
device
=
nvkm_device_find
(
client
->
device
);
if
(
!
device
)
return
-
ENODEV
;
}
ret
=
nvkm_parent_create
(
parent
,
NULL
,
oclass
,
0
,
nvkm_control_oclass
,
(
1ULL
<<
NVDEV_ENGINE_DMAOBJ
)
|
...
...
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