Skip to content

Commit d7dd91f

Browse files
Geert UytterhoevenLinus Torvalds
authored andcommitted
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 <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>
1 parent 9a054fb commit d7dd91f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎drivers/ps3/ps3av.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/delay.h>
2424
#include <linux/notifier.h>
2525
#include <linux/ioctl.h>
26+
#include <linux/fb.h>
2627

2728
#include <asm/firmware.h>
2829
#include <asm/ps3av.h>
@@ -33,6 +34,8 @@
3334
#define BUFSIZE 4096 /* vuart buf size */
3435
#define PS3AV_BUF_SIZE 512 /* max packet size */
3536

37+
static int safe_mode;
38+
3639
static int timeout = 5000; /* in msec ( 5 sec ) */
3740
module_param(timeout, int, 0644);
3841

@@ -639,6 +642,9 @@ static int ps3av_hdmi_get_id(struct ps3av_info_monitor *info)
639642
{
640643
int id;
641644

645+
if (safe_mode)
646+
return PS3AV_DEFAULT_HDMI_MODE_ID_REG_60;
647+
642648
/* check native resolution */
643649
id = ps3av_resbit2id(info->res_50.native, info->res_60.native,
644650
info->res_vesa.native);
@@ -1021,7 +1027,14 @@ static int ps3av_probe(struct ps3_system_bus_device *dev)
10211027
res);
10221028

10231029
ps3av_get_hw_conf(ps3av);
1030+
1031+
#ifdef CONFIG_FB
1032+
if (fb_mode_option && !strcmp(fb_mode_option, "safe"))
1033+
safe_mode = 1;
1034+
#endif /* CONFIG_FB */
10241035
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
1036+
safe_mode = 0;
1037+
10251038
mutex_lock(&ps3av->mutex);
10261039
ps3av->ps3av_mode = id;
10271040
mutex_unlock(&ps3av->mutex);

0 commit comments

Comments
 (0)