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
e2822b7a
Commit
e2822b7a
authored
Feb 22, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0/fifo: allow channels to be marked as unrunnable
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
40476539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+22
-10
No files found.
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
View file @
e2822b7a
...
@@ -61,6 +61,11 @@ struct nvc0_fifo_base {
...
@@ -61,6 +61,11 @@ struct nvc0_fifo_base {
struct
nvc0_fifo_chan
{
struct
nvc0_fifo_chan
{
struct
nouveau_fifo_chan
base
;
struct
nouveau_fifo_chan
base
;
enum
{
STOPPED
,
RUNNING
,
KILLED
}
state
;
};
};
/*******************************************************************************
/*******************************************************************************
...
@@ -79,16 +84,18 @@ nvc0_fifo_runlist_update(struct nvc0_fifo_priv *priv)
...
@@ -79,16 +84,18 @@ nvc0_fifo_runlist_update(struct nvc0_fifo_priv *priv)
priv
->
runlist
.
active
=
!
priv
->
runlist
.
active
;
priv
->
runlist
.
active
=
!
priv
->
runlist
.
active
;
for
(
i
=
0
,
p
=
0
;
i
<
128
;
i
++
)
{
for
(
i
=
0
,
p
=
0
;
i
<
128
;
i
++
)
{
if
(
!
(
nv_rd32
(
priv
,
0x003004
+
(
i
*
8
))
&
1
))
struct
nvc0_fifo_chan
*
chan
=
(
void
*
)
priv
->
base
.
channel
[
i
];
continue
;
if
(
chan
&&
chan
->
state
==
RUNNING
)
{
nv_wo32
(
cur
,
p
+
0
,
i
);
nv_wo32
(
cur
,
p
+
0
,
i
);
nv_wo32
(
cur
,
p
+
4
,
0x00000004
);
nv_wo32
(
cur
,
p
+
4
,
0x00000004
);
p
+=
8
;
p
+=
8
;
}
}
}
bar
->
flush
(
bar
);
bar
->
flush
(
bar
);
nv_wr32
(
priv
,
0x002270
,
cur
->
addr
>>
12
);
nv_wr32
(
priv
,
0x002270
,
cur
->
addr
>>
12
);
nv_wr32
(
priv
,
0x002274
,
0x01f00000
|
(
p
>>
3
));
nv_wr32
(
priv
,
0x002274
,
0x01f00000
|
(
p
>>
3
));
if
(
!
nv_wait
(
priv
,
0x00227c
,
0x00100000
,
0x00000000
))
if
(
!
nv_wait
(
priv
,
0x00227c
,
0x00100000
,
0x00000000
))
nv_error
(
priv
,
"runlist update failed
\n
"
);
nv_error
(
priv
,
"runlist update failed
\n
"
);
mutex_unlock
(
&
nv_subdev
(
priv
)
->
mutex
);
mutex_unlock
(
&
nv_subdev
(
priv
)
->
mutex
);
...
@@ -242,8 +249,12 @@ nvc0_fifo_chan_init(struct nouveau_object *object)
...
@@ -242,8 +249,12 @@ nvc0_fifo_chan_init(struct nouveau_object *object)
return
ret
;
return
ret
;
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0xc0000000
|
base
->
addr
>>
12
);
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0xc0000000
|
base
->
addr
>>
12
);
nv_wr32
(
priv
,
0x003004
+
(
chid
*
8
),
0x001f0001
);
nvc0_fifo_runlist_update
(
priv
);
if
(
chan
->
state
==
STOPPED
&&
(
chan
->
state
=
RUNNING
)
==
RUNNING
)
{
nv_wr32
(
priv
,
0x003004
+
(
chid
*
8
),
0x001f0001
);
nvc0_fifo_runlist_update
(
priv
);
}
return
0
;
return
0
;
}
}
...
@@ -256,13 +267,14 @@ nvc0_fifo_chan_fini(struct nouveau_object *object, bool suspend)
...
@@ -256,13 +267,14 @@ nvc0_fifo_chan_fini(struct nouveau_object *object, bool suspend)
struct
nvc0_fifo_chan
*
chan
=
(
void
*
)
object
;
struct
nvc0_fifo_chan
*
chan
=
(
void
*
)
object
;
u32
chid
=
chan
->
base
.
chid
;
u32
chid
=
chan
->
base
.
chid
;
nv_mask
(
priv
,
0x003004
+
(
chid
*
8
),
0x00000001
,
0x00000000
);
if
(
chan
->
state
==
RUNNING
&&
(
chan
->
state
=
STOPPED
)
==
STOPPED
)
{
nvc0_fifo_runlist_update
(
priv
);
nv_mask
(
priv
,
0x003004
+
(
chid
*
8
),
0x00000001
,
0x00000000
);
nvc0_fifo_runlist_update
(
priv
);
}
nvc0_fifo_intr_engine
(
priv
);
nvc0_fifo_intr_engine
(
priv
);
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0x00000000
);
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0x00000000
);
return
nouveau_fifo_channel_fini
(
&
chan
->
base
,
suspend
);
return
nouveau_fifo_channel_fini
(
&
chan
->
base
,
suspend
);
}
}
...
...
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