diff options
Diffstat (limited to 'drivers/ps3/ps3av.c')
| -rw-r--r-- | drivers/ps3/ps3av.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 53179f35264e..08296412da96 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
| @@ -760,8 +760,7 @@ static void ps3av_fixup_monitor_info(struct ps3av_info_monitor *info) | |||
| 760 | } | 760 | } |
| 761 | } | 761 | } |
| 762 | 762 | ||
| 763 | static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, | 763 | static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf) |
| 764 | int boot) | ||
| 765 | { | 764 | { |
| 766 | int i, res, id = 0, dvi = 0, rgb = 0; | 765 | int i, res, id = 0, dvi = 0, rgb = 0; |
| 767 | struct ps3av_pkt_av_get_monitor_info monitor_info; | 766 | struct ps3av_pkt_av_get_monitor_info monitor_info; |
| @@ -799,28 +798,6 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, | |||
| 799 | if (ps3av->region & PS3AV_REGION_RGB) | 798 | if (ps3av->region & PS3AV_REGION_RGB) |
| 800 | rgb = PS3AV_MODE_RGB; | 799 | rgb = PS3AV_MODE_RGB; |
| 801 | pr_debug("%s: Using avmulti mode %d\n", __func__, id); | 800 | pr_debug("%s: Using avmulti mode %d\n", __func__, id); |
| 802 | } else if (boot) { | ||
| 803 | /* HDMI: using DEFAULT HDMI_MODE_ID while booting up */ | ||
| 804 | info = &monitor_info.info; | ||
| 805 | if (ps3av->region & PS3AV_REGION_60) { | ||
| 806 | if (info->res_60.res_bits & PS3AV_RESBIT_720x480P) | ||
| 807 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60; | ||
| 808 | else if (info->res_50.res_bits & PS3AV_RESBIT_720x576P) | ||
| 809 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50; | ||
| 810 | else { | ||
| 811 | /* default */ | ||
| 812 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60; | ||
| 813 | } | ||
| 814 | } else { | ||
| 815 | if (info->res_50.res_bits & PS3AV_RESBIT_720x576P) | ||
| 816 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50; | ||
| 817 | else if (info->res_60.res_bits & PS3AV_RESBIT_720x480P) | ||
| 818 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60; | ||
| 819 | else { | ||
| 820 | /* default */ | ||
| 821 | id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50; | ||
| 822 | } | ||
| 823 | } | ||
| 824 | } | 801 | } |
| 825 | 802 | ||
| 826 | return id | dvi | rgb; | 803 | return id | dvi | rgb; |
| @@ -862,7 +839,7 @@ static int ps3av_get_hw_conf(struct ps3av *ps3av) | |||
| 862 | } | 839 | } |
| 863 | 840 | ||
| 864 | /* set mode using id */ | 841 | /* set mode using id */ |
| 865 | int ps3av_set_video_mode(u32 id, int boot) | 842 | int ps3av_set_video_mode(u32 id) |
| 866 | { | 843 | { |
| 867 | int size; | 844 | int size; |
| 868 | u32 option; | 845 | u32 option; |
| @@ -876,7 +853,7 @@ int ps3av_set_video_mode(u32 id, int boot) | |||
| 876 | /* auto mode */ | 853 | /* auto mode */ |
| 877 | option = id & ~PS3AV_MODE_MASK; | 854 | option = id & ~PS3AV_MODE_MASK; |
| 878 | if ((id & PS3AV_MODE_MASK) == 0) { | 855 | if ((id & PS3AV_MODE_MASK) == 0) { |
| 879 | id = ps3av_auto_videomode(&ps3av->av_hw_conf, boot); | 856 | id = ps3av_auto_videomode(&ps3av->av_hw_conf); |
| 880 | if (id < 1) { | 857 | if (id < 1) { |
| 881 | printk(KERN_ERR "%s: invalid id :%d\n", __func__, id); | 858 | printk(KERN_ERR "%s: invalid id :%d\n", __func__, id); |
| 882 | return -EINVAL; | 859 | return -EINVAL; |
| @@ -896,9 +873,9 @@ int ps3av_set_video_mode(u32 id, int boot) | |||
| 896 | 873 | ||
| 897 | EXPORT_SYMBOL_GPL(ps3av_set_video_mode); | 874 | EXPORT_SYMBOL_GPL(ps3av_set_video_mode); |
| 898 | 875 | ||
| 899 | int ps3av_get_auto_mode(int boot) | 876 | int ps3av_get_auto_mode(void) |
| 900 | { | 877 | { |
| 901 | return ps3av_auto_videomode(&ps3av->av_hw_conf, boot); | 878 | return ps3av_auto_videomode(&ps3av->av_hw_conf); |
| 902 | } | 879 | } |
| 903 | 880 | ||
| 904 | EXPORT_SYMBOL_GPL(ps3av_get_auto_mode); | 881 | EXPORT_SYMBOL_GPL(ps3av_get_auto_mode); |
| @@ -1044,7 +1021,7 @@ static int ps3av_probe(struct ps3_system_bus_device *dev) | |||
| 1044 | res); | 1021 | res); |
| 1045 | 1022 | ||
| 1046 | ps3av_get_hw_conf(ps3av); | 1023 | ps3av_get_hw_conf(ps3av); |
| 1047 | id = ps3av_auto_videomode(&ps3av->av_hw_conf, 1); | 1024 | id = ps3av_auto_videomode(&ps3av->av_hw_conf); |
| 1048 | mutex_lock(&ps3av->mutex); | 1025 | mutex_lock(&ps3av->mutex); |
| 1049 | ps3av->ps3av_mode = id; | 1026 | ps3av->ps3av_mode = id; |
| 1050 | mutex_unlock(&ps3av->mutex); | 1027 | mutex_unlock(&ps3av->mutex); |
