]> err.no Git - linux-2.6/blobdiff - drivers/ps3/ps3av.c
ext2: Fix the max file size for ext2 file system.
[linux-2.6] / drivers / ps3 / ps3av.c
index 08296412da961a79e059cc94e96245156a401510..87b3493d88e5bea0f93b3fc0ef412bbb1232a722 100644 (file)
@@ -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);
@@ -723,7 +729,7 @@ static void ps3av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *
 
 static const struct ps3av_monitor_quirk {
        const char *monitor_name;
-       u32 clear_60, clear_50, clear_vesa;
+       u32 clear_60;
 } ps3av_monitor_quirks[] = {
        {
                .monitor_name   = "DELL 2007WFP",
@@ -751,10 +757,6 @@ static void ps3av_fixup_monitor_info(struct ps3av_info_monitor *info)
                                quirk->monitor_name);
                        info->res_60.res_bits &= ~quirk->clear_60;
                        info->res_60.native &= ~quirk->clear_60;
-                       info->res_50.res_bits &= ~quirk->clear_50;
-                       info->res_50.native &= ~quirk->clear_50;
-                       info->res_vesa.res_bits &= ~quirk->clear_vesa;
-                       info->res_vesa.native &= ~quirk->clear_vesa;
                        break;
                }
        }
@@ -1021,7 +1023,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);