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
d6adbe94
Commit
d6adbe94
authored
May 30, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/mc: allow construction of subclassed device
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
3560e170
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
+9
-4
drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h
+2
-0
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
View file @
d6adbe94
...
...
@@ -148,16 +148,21 @@ nvkm_mc = {
.
fini
=
nvkm_mc_fini
,
};
void
nvkm_mc_ctor
(
const
struct
nvkm_mc_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_mc
*
mc
)
{
nvkm_subdev_ctor
(
&
nvkm_mc
,
device
,
index
,
&
mc
->
subdev
);
mc
->
func
=
func
;
}
int
nvkm_mc_new_
(
const
struct
nvkm_mc_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_mc
**
pmc
)
{
struct
nvkm_mc
*
mc
;
if
(
!
(
mc
=
*
pmc
=
kzalloc
(
sizeof
(
*
mc
),
GFP_KERNEL
)))
return
-
ENOMEM
;
nvkm_subdev_ctor
(
&
nvkm_mc
,
device
,
index
,
&
mc
->
subdev
);
mc
->
func
=
func
;
nvkm_mc_ctor
(
func
,
device
,
index
,
*
pmc
);
return
0
;
}
drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h
View file @
d6adbe94
...
...
@@ -3,6 +3,8 @@
#define nvkm_mc(p) container_of((p), struct nvkm_mc, subdev)
#include <subdev/mc.h>
void
nvkm_mc_ctor
(
const
struct
nvkm_mc_func
*
,
struct
nvkm_device
*
,
int
index
,
struct
nvkm_mc
*
);
int
nvkm_mc_new_
(
const
struct
nvkm_mc_func
*
,
struct
nvkm_device
*
,
int
index
,
struct
nvkm_mc
**
);
...
...
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