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
6af5289e
Commit
6af5289e
authored
Nov 03, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50/kms: use sclass() instead of trial-and-error
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
036a12b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+20
-6
No files found.
drivers/gpu/drm/nouveau/nv50_display.c
View file @
6af5289e
...
...
@@ -66,15 +66,29 @@ static int
nv50_chan_create
(
struct
nvif_object
*
disp
,
const
u32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
struct
nv50_chan
*
chan
)
{
const
u32
handle
=
(
oclass
[
0
]
<<
16
)
|
head
;
u32
sclass
[
8
];
int
ret
,
i
;
ret
=
nvif_object_sclass
(
disp
,
sclass
,
ARRAY_SIZE
(
sclass
));
WARN_ON
(
ret
>
ARRAY_SIZE
(
sclass
));
if
(
ret
<
0
)
return
ret
;
while
(
oclass
[
0
])
{
int
ret
=
nvif_object_init
(
disp
,
NULL
,
(
oclass
[
0
]
<<
16
)
|
head
,
oclass
[
0
],
data
,
size
,
&
chan
->
user
);
if
(
oclass
++
,
ret
==
0
)
{
nvif_object_map
(
&
chan
->
user
);
return
ret
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
sclass
);
i
++
)
{
if
(
sclass
[
i
]
==
oclass
[
0
])
{
ret
=
nvif_object_init
(
disp
,
NULL
,
handle
,
oclass
[
0
],
data
,
size
,
&
chan
->
user
);
if
(
ret
==
0
)
nvif_object_map
(
&
chan
->
user
);
return
ret
;
}
}
oclass
++
;
}
return
-
ENOSYS
;
}
...
...
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