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
fe32b16e
Commit
fe32b16e
authored
Jun 03, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50-nvc0/vm: take client reference on shared channel vm
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
b79181cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+5
-0
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
fe32b16e
...
...
@@ -48,6 +48,7 @@
struct
nouveau_fpriv
{
spinlock_t
lock
;
struct
list_head
channels
;
struct
nouveau_vm
*
vm
;
};
static
inline
struct
nouveau_fpriv
*
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
fe32b16e
...
...
@@ -767,6 +767,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
int
nouveau_open
(
struct
drm_device
*
dev
,
struct
drm_file
*
file_priv
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_fpriv
*
fpriv
;
fpriv
=
kzalloc
(
sizeof
(
*
fpriv
),
GFP_KERNEL
);
...
...
@@ -776,6 +777,9 @@ nouveau_open(struct drm_device *dev, struct drm_file *file_priv)
spin_lock_init
(
&
fpriv
->
lock
);
INIT_LIST_HEAD
(
&
fpriv
->
channels
);
if
(
dev_priv
->
card_type
>=
NV_50
)
nouveau_vm_ref
(
dev_priv
->
chan_vm
,
&
fpriv
->
vm
,
NULL
);
file_priv
->
driver_priv
=
fpriv
;
return
0
;
}
...
...
@@ -791,6 +795,7 @@ void
nouveau_postclose
(
struct
drm_device
*
dev
,
struct
drm_file
*
file_priv
)
{
struct
nouveau_fpriv
*
fpriv
=
nouveau_fpriv
(
file_priv
);
nouveau_vm_ref
(
NULL
,
&
fpriv
->
vm
,
NULL
);
kfree
(
fpriv
);
}
...
...
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