diff options
| -rw-r--r-- | 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 08296412da96..397f4ce849dc 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 24 | #include <linux/notifier.h> | 24 | #include <linux/notifier.h> |
| 25 | #include <linux/ioctl.h> | 25 | #include <linux/ioctl.h> |
| 26 | #include <linux/fb.h> | ||
| 26 | 27 | ||
| 27 | #include <asm/firmware.h> | 28 | #include <asm/firmware.h> |
| 28 | #include <asm/ps3av.h> | 29 | #include <asm/ps3av.h> |
| @@ -33,6 +34,8 @@ | |||
| 33 | #define BUFSIZE 4096 /* vuart buf size */ | 34 | #define BUFSIZE 4096 /* vuart buf size */ |
| 34 | #define PS3AV_BUF_SIZE 512 /* max packet size */ | 35 | #define PS3AV_BUF_SIZE 512 /* max packet size */ |
| 35 | 36 | ||
| 37 | static int safe_mode; | ||
| 38 | |||
| 36 | static int timeout = 5000; /* in msec ( 5 sec ) */ | 39 | static int timeout = 5000; /* in msec ( 5 sec ) */ |
| 37 | module_param(timeout, int, 0644); | 40 | module_param(timeout, int, 0644); |
| 38 | 41 | ||
| @@ -639,6 +642,9 @@ static int ps3av_hdmi_get_id(struct ps3av_info_monitor *info) | |||
| 639 | { | 642 | { |
| 640 | int id; | 643 | int id; |
| 641 | 644 | ||
| 645 | if (safe_mode) | ||
| 646 | return PS3AV_DEFAULT_HDMI_MODE_ID_REG_60; | ||
| 647 | |||
| 642 | /* check native resolution */ | 648 | /* check native resolution */ |
| 643 | id = ps3av_resbit2id(info->res_50.native, info->res_60.native, | 649 | id = ps3av_resbit2id(info->res_50.native, info->res_60.native, |
| 644 | info->res_vesa.native); | 650 | info->res_vesa.native); |
| @@ -1021,7 +1027,14 @@ static int ps3av_probe(struct ps3_system_bus_device *dev) | |||
| 1021 | res); | 1027 | res); |
| 1022 | 1028 | ||
| 1023 | ps3av_get_hw_conf(ps3av); | 1029 | 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 */ | ||
| 1024 | id = ps3av_auto_videomode(&ps3av->av_hw_conf); | 1035 | id = ps3av_auto_videomode(&ps3av->av_hw_conf); |
| 1036 | safe_mode = 0; | ||
| 1037 | |||
| 1025 | mutex_lock(&ps3av->mutex); | 1038 | mutex_lock(&ps3av->mutex); |
| 1026 | ps3av->ps3av_mode = id; | 1039 | ps3av->ps3av_mode = id; |
| 1027 | mutex_unlock(&ps3av->mutex); | 1040 | mutex_unlock(&ps3av->mutex); |
