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
f02ca842
Commit
f02ca842
authored
Feb 11, 2020
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/core: add nvkm_subdev_new_() for bare subdevs
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
fa4f4c21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
+2
-0
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+11
-0
No files found.
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
View file @
f02ca842
...
@@ -24,6 +24,8 @@ struct nvkm_subdev_func {
...
@@ -24,6 +24,8 @@ struct nvkm_subdev_func {
};
};
extern
const
char
*
nvkm_subdev_name
[
NVKM_SUBDEV_NR
];
extern
const
char
*
nvkm_subdev_name
[
NVKM_SUBDEV_NR
];
int
nvkm_subdev_new_
(
const
struct
nvkm_subdev_func
*
,
struct
nvkm_device
*
,
int
index
,
struct
nvkm_subdev
**
);
void
nvkm_subdev_ctor
(
const
struct
nvkm_subdev_func
*
,
struct
nvkm_device
*
,
void
nvkm_subdev_ctor
(
const
struct
nvkm_subdev_func
*
,
struct
nvkm_device
*
,
int
index
,
struct
nvkm_subdev
*
);
int
index
,
struct
nvkm_subdev
*
);
void
nvkm_subdev_del
(
struct
nvkm_subdev
**
);
void
nvkm_subdev_del
(
struct
nvkm_subdev
**
);
...
...
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
View file @
f02ca842
...
@@ -221,3 +221,14 @@ nvkm_subdev_ctor(const struct nvkm_subdev_func *func,
...
@@ -221,3 +221,14 @@ nvkm_subdev_ctor(const struct nvkm_subdev_func *func,
__mutex_init
(
&
subdev
->
mutex
,
name
,
&
nvkm_subdev_lock_class
[
index
]);
__mutex_init
(
&
subdev
->
mutex
,
name
,
&
nvkm_subdev_lock_class
[
index
]);
subdev
->
debug
=
nvkm_dbgopt
(
device
->
dbgopt
,
name
);
subdev
->
debug
=
nvkm_dbgopt
(
device
->
dbgopt
,
name
);
}
}
int
nvkm_subdev_new_
(
const
struct
nvkm_subdev_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_subdev
**
psubdev
)
{
if
(
!
(
*
psubdev
=
kzalloc
(
sizeof
(
**
psubdev
),
GFP_KERNEL
)))
return
-
ENOMEM
;
nvkm_subdev_ctor
(
func
,
device
,
index
,
*
psubdev
);
return
0
;
}
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