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
d5624179
Commit
d5624179
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/nvif: add supported engines query to kepler gpfifo class
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
41a63406
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+17
-10
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
View file @
d5624179
...
...
@@ -245,9 +245,9 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
gk104_fifo
*
fifo
=
(
void
*
)
engine
;
struct
gk104_fifo_base
*
base
=
(
void
*
)
parent
;
struct
gk104_fifo_chan
*
chan
;
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_gpuobj
*
ramfc
=
&
base
->
base
.
gpuobj
;
u64
usermem
,
ioffset
,
ilength
;
u32
engines
;
int
ret
,
i
;
nvif_ioctl
(
parent
,
"create channel gpfifo size %d
\n
"
,
size
);
...
...
@@ -259,20 +259,27 @@ gk104_fifo_chan_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
}
else
return
ret
;
for
(
i
=
0
;
i
<
FIFO_ENGINE_NR
;
i
++
)
{
if
(
args
->
v0
.
engine
&
(
1
<<
i
))
{
if
(
nvkm_engine
(
parent
,
fifo_engine
[
i
].
subdev
))
{
args
->
v0
.
engine
=
(
1
<<
i
);
break
;
}
}
for
(
i
=
0
,
engines
=
0
;
i
<
FIFO_ENGINE_NR
;
i
++
)
{
if
(
!
nvkm_engine
(
parent
,
fifo_engine
[
i
].
subdev
))
continue
;
engines
|=
(
1
<<
i
);
}
if
(
!
args
->
v0
.
engine
)
{
static
struct
nvkm_oclass
oclass
=
{
.
ofuncs
=
&
nvkm_object_ofuncs
,
};
args
->
v0
.
engine
=
engines
;
return
nvkm_object_ctor
(
parent
,
engine
,
&
oclass
,
NULL
,
0
,
pobject
);
}
if
(
i
==
FIFO_ENGINE_NR
)
{
nvkm_error
(
subdev
,
"unsupported engines %08x
\n
"
,
engines
&=
args
->
v0
.
engine
;
if
(
!
engines
)
{
nvif_ioctl
(
parent
,
"unsupported engines %08x
\n
"
,
args
->
v0
.
engine
);
return
-
ENODEV
;
}
i
=
__ffs
(
engines
);
ret
=
nvkm_fifo_channel_create
(
parent
,
engine
,
oclass
,
1
,
fifo
->
user
.
bar
.
offset
,
0x200
,
...
...
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