Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d7dd91ff236b90a8aca2d619554b07bcb82953c7
Commit:     d7dd91ff236b90a8aca2d619554b07bcb82953c7
Parent:     9a054fbac8f8441f48896b855a9e11c13e0c3dc8
Author:     Geert Uytterhoeven <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:29:52 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:22 2007 -0700

    ps3fb: default to 480p on DVI-D/HDMI if video=safe
    
    Default to the 480p video mode on DVI-D and HDMI displays if `video=safe' is
    passed on the kernel command line.
    
    This is intended to be used by `kboot'-style boot loaders (i.e. first-stage
    kernels) for the PS3, to provide a failsafe video mode.
    
    Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/ps3/ps3av.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 0829641..397f4ce 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/notifier.h>
 #include <linux/ioctl.h>
+#include <linux/fb.h>
 
 #include <asm/firmware.h>
 #include <asm/ps3av.h>
@@ -33,6 +34,8 @@
 #define BUFSIZE          4096  /* vuart buf size */
 #define PS3AV_BUF_SIZE   512   /* max packet size */
 
+static int safe_mode;
+
 static int timeout = 5000;     /* in msec ( 5 sec ) */
 module_param(timeout, int, 0644);
 
@@ -639,6 +642,9 @@ static int ps3av_hdmi_get_id(struct ps3av_info_monitor 
*info)
 {
        int id;
 
+       if (safe_mode)
+               return PS3AV_DEFAULT_HDMI_MODE_ID_REG_60;
+
        /* check native resolution */
        id = ps3av_resbit2id(info->res_50.native, info->res_60.native,
                             info->res_vesa.native);
@@ -1021,7 +1027,14 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
                       res);
 
        ps3av_get_hw_conf(ps3av);
+
+#ifdef CONFIG_FB
+       if (fb_mode_option && !strcmp(fb_mode_option, "safe"))
+               safe_mode = 1;
+#endif /* CONFIG_FB */
        id = ps3av_auto_videomode(&ps3av->av_hw_conf);
+       safe_mode = 0;
+
        mutex_lock(&ps3av->mutex);
        ps3av->ps3av_mode = id;
        mutex_unlock(&ps3av->mutex);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to