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 <Geert.Uytterhoeven@sonycom.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/ioctl.h>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/ioctl.h>
#include <asm/firmware.h>
#include <asm/ps3av.h>
#include <asm/firmware.h>
#include <asm/ps3av.h>
#define BUFSIZE 4096 /* vuart buf size */
#define PS3AV_BUF_SIZE 512 /* max packet size */
#define BUFSIZE 4096 /* vuart buf size */
#define PS3AV_BUF_SIZE 512 /* max packet size */
static int timeout = 5000; /* in msec ( 5 sec ) */
module_param(timeout, int, 0644);
static int timeout = 5000; /* in msec ( 5 sec ) */
module_param(timeout, int, 0644);
+ 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);
/* check native resolution */
id = ps3av_resbit2id(info->res_50.native, info->res_60.native,
info->res_vesa.native);
res);
ps3av_get_hw_conf(ps3av);
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);
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
mutex_lock(&ps3av->mutex);
ps3av->ps3av_mode = id;
mutex_unlock(&ps3av->mutex);
mutex_lock(&ps3av->mutex);
ps3av->ps3av_mode = id;
mutex_unlock(&ps3av->mutex);