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
6fa8e629
Commit
6fa8e629
authored
Aug 06, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv84/fifo: mask only the engine we're waiting on for channel unload
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
49981046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
+10
-6
No files found.
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
View file @
6fa8e629
...
@@ -81,14 +81,15 @@ nv84_fifo_context_detach(struct nouveau_object *parent, bool suspend,
...
@@ -81,14 +81,15 @@ nv84_fifo_context_detach(struct nouveau_object *parent, bool suspend,
struct
nv50_fifo_priv
*
priv
=
(
void
*
)
parent
->
engine
;
struct
nv50_fifo_priv
*
priv
=
(
void
*
)
parent
->
engine
;
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
->
parent
;
struct
nv50_fifo_base
*
base
=
(
void
*
)
parent
->
parent
;
struct
nv50_fifo_chan
*
chan
=
(
void
*
)
parent
;
struct
nv50_fifo_chan
*
chan
=
(
void
*
)
parent
;
u32
addr
;
u32
addr
,
save
,
engn
;
bool
done
;
switch
(
nv_engidx
(
object
->
engine
))
{
switch
(
nv_engidx
(
object
->
engine
))
{
case
NVDEV_ENGINE_SW
:
return
0
;
case
NVDEV_ENGINE_SW
:
return
0
;
case
NVDEV_ENGINE_GR
:
addr
=
0x0020
;
break
;
case
NVDEV_ENGINE_GR
:
engn
=
0
;
addr
=
0x0020
;
break
;
case
NVDEV_ENGINE_MPEG
:
addr
=
0x0060
;
break
;
case
NVDEV_ENGINE_MPEG
:
engn
=
1
;
addr
=
0x0060
;
break
;
case
NVDEV_ENGINE_CRYPT
:
addr
=
0x00a0
;
break
;
case
NVDEV_ENGINE_CRYPT
:
engn
=
4
;
addr
=
0x00a0
;
break
;
case
NVDEV_ENGINE_COPY0
:
addr
=
0x00c0
;
break
;
case
NVDEV_ENGINE_COPY0
:
engn
=
2
;
addr
=
0x00c0
;
break
;
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -101,8 +102,11 @@ nv84_fifo_context_detach(struct nouveau_object *parent, bool suspend,
...
@@ -101,8 +102,11 @@ nv84_fifo_context_detach(struct nouveau_object *parent, bool suspend,
nv_wo32
(
base
->
eng
,
addr
+
0x14
,
0x00000000
);
nv_wo32
(
base
->
eng
,
addr
+
0x14
,
0x00000000
);
bar
->
flush
(
bar
);
bar
->
flush
(
bar
);
save
=
nv_mask
(
priv
,
0x002520
,
0x0000003f
,
1
<<
engn
);
nv_wr32
(
priv
,
0x0032fc
,
nv_gpuobj
(
base
)
->
addr
>>
12
);
nv_wr32
(
priv
,
0x0032fc
,
nv_gpuobj
(
base
)
->
addr
>>
12
);
if
(
!
nv_wait_ne
(
priv
,
0x0032fc
,
0xffffffff
,
0xffffffff
))
{
done
=
nv_wait_ne
(
priv
,
0x0032fc
,
0xffffffff
,
0xffffffff
);
nv_wr32
(
priv
,
0x002520
,
save
);
if
(
!
done
)
{
nv_error
(
priv
,
"channel %d unload timeout
\n
"
,
chan
->
base
.
chid
);
nv_error
(
priv
,
"channel %d unload timeout
\n
"
,
chan
->
base
.
chid
);
if
(
suspend
)
if
(
suspend
)
return
-
EBUSY
;
return
-
EBUSY
;
...
...
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