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
cf41d53b
Commit
cf41d53b
authored
Nov 09, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: re-jig fbcon suspend/resume process a little
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2a44e499
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.c
+6
-16
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
+7
-0
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.c
View file @
cf41d53b
...
@@ -180,8 +180,8 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
...
@@ -180,8 +180,8 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
drm_kms_helper_poll_disable
(
dev
);
drm_kms_helper_poll_disable
(
dev
);
NV_INFO
(
dev
,
"Disabling fbcon
acceleration
...
\n
"
);
NV_INFO
(
dev
,
"Disabling fbcon...
\n
"
);
nouveau_fbcon_s
ave_disable_accel
(
dev
);
nouveau_fbcon_s
et_suspend
(
dev
,
1
);
NV_INFO
(
dev
,
"Unpinning framebuffer(s)...
\n
"
);
NV_INFO
(
dev
,
"Unpinning framebuffer(s)...
\n
"
);
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
...
@@ -248,10 +248,6 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
...
@@ -248,10 +248,6 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
pci_set_power_state
(
pdev
,
PCI_D3hot
);
pci_set_power_state
(
pdev
,
PCI_D3hot
);
}
}
console_lock
();
nouveau_fbcon_set_suspend
(
dev
,
1
);
console_unlock
();
nouveau_fbcon_restore_accel
(
dev
);
return
0
;
return
0
;
out_abort:
out_abort:
...
@@ -277,8 +273,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
...
@@ -277,8 +273,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
if
(
dev
->
switch_power_state
==
DRM_SWITCH_POWER_OFF
)
if
(
dev
->
switch_power_state
==
DRM_SWITCH_POWER_OFF
)
return
0
;
return
0
;
nouveau_fbcon_save_disable_accel
(
dev
);
NV_INFO
(
dev
,
"We're back, enabling device...
\n
"
);
NV_INFO
(
dev
,
"We're back, enabling device...
\n
"
);
pci_set_power_state
(
pdev
,
PCI_D0
);
pci_set_power_state
(
pdev
,
PCI_D0
);
pci_restore_state
(
pdev
);
pci_restore_state
(
pdev
);
...
@@ -360,7 +354,11 @@ nouveau_pci_resume(struct pci_dev *pdev)
...
@@ -360,7 +354,11 @@ nouveau_pci_resume(struct pci_dev *pdev)
NV_ERROR
(
dev
,
"Could not pin/map cursor.
\n
"
);
NV_ERROR
(
dev
,
"Could not pin/map cursor.
\n
"
);
}
}
nouveau_fbcon_set_suspend
(
dev
,
0
);
nouveau_fbcon_zfill_all
(
dev
);
engine
->
display
.
init
(
dev
);
engine
->
display
.
init
(
dev
);
drm_kms_helper_poll_enable
(
dev
);
/* Force CLUT to get re-loaded during modeset */
/* Force CLUT to get re-loaded during modeset */
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
...
@@ -369,12 +367,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
...
@@ -369,12 +367,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
nv_crtc
->
lut
.
depth
=
0
;
nv_crtc
->
lut
.
depth
=
0
;
}
}
console_lock
();
nouveau_fbcon_set_suspend
(
dev
,
0
);
console_unlock
();
nouveau_fbcon_zfill_all
(
dev
);
drm_helper_resume_force_mode
(
dev
);
drm_helper_resume_force_mode
(
dev
);
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
{
...
@@ -386,8 +378,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
...
@@ -386,8 +378,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
nv_crtc
->
cursor_saved_y
);
nv_crtc
->
cursor_saved_y
);
}
}
nouveau_fbcon_restore_accel
(
dev
);
drm_kms_helper_poll_enable
(
dev
);
return
0
;
return
0
;
}
}
...
...
drivers/gpu/drm/nouveau/nouveau_fbcon.c
View file @
cf41d53b
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/screen_info.h>
#include <linux/screen_info.h>
#include <linux/vga_switcheroo.h>
#include <linux/vga_switcheroo.h>
#include <linux/console.h>
#include "drmP.h"
#include "drmP.h"
#include "drm.h"
#include "drm.h"
...
@@ -548,7 +549,13 @@ void nouveau_fbcon_restore_accel(struct drm_device *dev)
...
@@ -548,7 +549,13 @@ void nouveau_fbcon_restore_accel(struct drm_device *dev)
void
nouveau_fbcon_set_suspend
(
struct
drm_device
*
dev
,
int
state
)
void
nouveau_fbcon_set_suspend
(
struct
drm_device
*
dev
,
int
state
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
console_lock
();
if
(
state
==
0
)
nouveau_fbcon_save_disable_accel
(
dev
);
fb_set_suspend
(
dev_priv
->
nfbdev
->
helper
.
fbdev
,
state
);
fb_set_suspend
(
dev_priv
->
nfbdev
->
helper
.
fbdev
,
state
);
if
(
state
==
1
)
nouveau_fbcon_restore_accel
(
dev
);
console_unlock
();
}
}
void
nouveau_fbcon_zfill_all
(
struct
drm_device
*
dev
)
void
nouveau_fbcon_zfill_all
(
struct
drm_device
*
dev
)
...
...
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