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
29dff2f5
Commit
29dff2f5
authored
Aug 10, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/core: add function to return list of supported children
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
79ca2770
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
drivers/gpu/drm/nouveau/core/core/parent.c
drivers/gpu/drm/nouveau/core/core/parent.c
+33
-0
drivers/gpu/drm/nouveau/core/include/core/parent.h
drivers/gpu/drm/nouveau/core/include/core/parent.h
+1
-0
No files found.
drivers/gpu/drm/nouveau/core/core/parent.c
View file @
29dff2f5
...
...
@@ -74,6 +74,39 @@ nouveau_parent_sclass(struct nouveau_object *parent, u16 handle,
return
-
EINVAL
;
}
int
nouveau_parent_lclass
(
struct
nouveau_object
*
parent
,
u32
*
lclass
,
int
size
)
{
struct
nouveau_sclass
*
sclass
;
struct
nouveau_engine
*
engine
;
struct
nouveau_oclass
*
oclass
;
int
nr
=
-
1
,
i
;
u64
mask
;
sclass
=
nv_parent
(
parent
)
->
sclass
;
while
(
sclass
)
{
if
(
++
nr
<
size
)
lclass
[
nr
]
=
sclass
->
oclass
->
handle
;
sclass
=
sclass
->
sclass
;
}
mask
=
nv_parent
(
parent
)
->
engine
;
while
(
i
=
__ffs64
(
mask
),
mask
)
{
engine
=
nouveau_engine
(
parent
,
i
);
if
(
engine
&&
(
oclass
=
engine
->
sclass
))
{
while
(
oclass
->
ofuncs
)
{
if
(
++
nr
<
size
)
lclass
[
nr
]
=
oclass
->
handle
;
oclass
++
;
}
}
mask
&=
~
(
1ULL
<<
i
);
}
return
nr
+
1
;
}
int
nouveau_parent_create_
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
...
...
drivers/gpu/drm/nouveau/core/include/core/parent.h
View file @
29dff2f5
...
...
@@ -57,5 +57,6 @@ void _nouveau_parent_dtor(struct nouveau_object *);
int
nouveau_parent_sclass
(
struct
nouveau_object
*
,
u16
handle
,
struct
nouveau_object
**
pengine
,
struct
nouveau_oclass
**
poclass
);
int
nouveau_parent_lclass
(
struct
nouveau_object
*
,
u32
*
,
int
);
#endif
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