Skip to content

Commit

Permalink
lxfb: disable suspend VT switch by default
Browse files Browse the repository at this point in the history
By default disable VT switch, but allow it to be overridden via the
'vt_switch' module arg.

Signed-off-by: Andres Salomon <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Cc: Jordan Crouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dilinger authored and torvalds committed Apr 28, 2008
1 parent c805df3 commit 564820d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/fb/lxfb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Accepted options:
mode_option - specify the video mode. Of the form
<x>x<y>[-<bpp>][@<refresh>]
vram - size of video ram (normally auto-detected)
vt_switch - enable vt switching during suspend/resume. The vt
switch is slow, but harmless.

--
Andres Salomon <[email protected]>
7 changes: 7 additions & 0 deletions drivers/video/geode/lxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/console.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/init.h>
Expand All @@ -28,6 +29,7 @@
static char *mode_option;
static int noclear, nopanel, nocrt;
static int vram;
static int vt_switch;

/* Most of these modes are sorted in ascending order, but
* since the first entry in this table is the "default" mode,
Expand Down Expand Up @@ -523,6 +525,8 @@ static int __init lxfb_probe(struct pci_dev *pdev,
lxfb_check_var(&info->var, info);
lxfb_set_par(info);

pm_set_vt_switch(vt_switch);

if (register_framebuffer(info) < 0) {
ret = -EINVAL;
goto err;
Expand Down Expand Up @@ -648,5 +652,8 @@ MODULE_PARM_DESC(mode_option, "video mode (<x>x<y>[-<bpp>][@<refr>])");
module_param(vram, int, 0);
MODULE_PARM_DESC(vram, "video memory size");

module_param(vt_switch, int, 0);
MODULE_PARM_DESC(vt_switch, "enable VT switch during suspend/resume");

MODULE_DESCRIPTION("Framebuffer driver for the AMD Geode LX");
MODULE_LICENSE("GPL");

0 comments on commit 564820d

Please sign in to comment.