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
92abe749
Commit
92abe749
authored
Apr 01, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: fix suspend failure path to reinitialise all engines
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
39a654d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.c
+13
-13
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.c
View file @
92abe749
...
...
@@ -162,11 +162,10 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
struct
drm_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_instmem_engine
*
pinstmem
=
&
dev_priv
->
engine
.
instmem
;
struct
nouveau_pgraph_engine
*
pgraph
=
&
dev_priv
->
engine
.
graph
;
struct
nouveau_fifo_engine
*
pfifo
=
&
dev_priv
->
engine
.
fifo
;
struct
nouveau_channel
*
chan
;
struct
drm_crtc
*
crtc
;
int
ret
,
i
;
int
ret
,
i
,
e
;
if
(
pm_state
.
event
==
PM_EVENT_PRETHAW
)
return
0
;
...
...
@@ -206,19 +205,17 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
nouveau_channel_idle
(
chan
);
}
pgraph
->
fifo_access
(
dev
,
false
);
nouveau_wait_for_idle
(
dev
);
for
(
i
=
NVOBJ_ENGINE_NR
-
1
;
i
>=
0
;
i
--
)
{
if
(
dev_priv
->
eng
[
i
])
dev_priv
->
eng
[
i
]
->
fini
(
dev
,
i
);
}
pfifo
->
reassign
(
dev
,
false
);
pfifo
->
disable
(
dev
);
pfifo
->
unload_context
(
dev
);
if
(
pgraph
->
unload_context
)
pgraph
->
unload_context
(
dev
);
for
(
e
=
NVOBJ_ENGINE_NR
-
1
;
e
>=
0
;
e
--
)
{
if
(
dev_priv
->
eng
[
e
])
{
ret
=
dev_priv
->
eng
[
e
]
->
fini
(
dev
,
e
);
if
(
ret
)
goto
out_abort
;
}
}
ret
=
pinstmem
->
suspend
(
dev
);
if
(
ret
)
{
...
...
@@ -249,9 +246,12 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
out_abort:
NV_INFO
(
dev
,
"Re-enabling acceleration..
\n
"
);
for
(
e
=
e
+
1
;
e
<
NVOBJ_ENGINE_NR
;
e
++
)
{
if
(
dev_priv
->
eng
[
e
])
dev_priv
->
eng
[
e
]
->
init
(
dev
,
e
);
}
pfifo
->
enable
(
dev
);
pfifo
->
reassign
(
dev
,
true
);
pgraph
->
fifo_access
(
dev
,
true
);
return
ret
;
}
...
...
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