diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-10-16 04:29:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:20 -0400 |
commit | 101aa56d02240dfe36b2fb229fed0a9d6efba425 (patch) | |
tree | add14b0d7f819b29c72004a87a9caf9040a4aee9 /drivers/ps3/ps3av.c | |
parent | 71a27fecaf836093a30fe538c5ab98ef0b25bfc8 (diff) |
ps3av: treat DVI-D like HDMI in autodetect
treat DVI-D monitors like HDMI monitors when autodetecting the best video mode
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ps3/ps3av.c')
-rw-r--r-- | drivers/ps3/ps3av.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 51feb7e46b0e..21f69a75be67 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
@@ -620,9 +620,6 @@ static int ps3av_hdmi_get_id(struct ps3av_info_monitor *info) | |||
620 | u32 res_50, res_60; | 620 | u32 res_50, res_60; |
621 | int id; | 621 | int id; |
622 | 622 | ||
623 | if (info->monitor_type != PS3AV_MONITOR_TYPE_HDMI) | ||
624 | return 0; | ||
625 | |||
626 | /* check native resolution */ | 623 | /* check native resolution */ |
627 | res_50 = info->res_50.native & PS3AV_RES_MASK_50; | 624 | res_50 = info->res_50.native & PS3AV_RES_MASK_50; |
628 | res_60 = info->res_60.native & PS3AV_RES_MASK_60; | 625 | res_60 = info->res_60.native & PS3AV_RES_MASK_60; |
@@ -712,7 +709,7 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, | |||
712 | struct ps3av_info_monitor *info; | 709 | struct ps3av_info_monitor *info; |
713 | 710 | ||
714 | /* get mode id for hdmi */ | 711 | /* get mode id for hdmi */ |
715 | for (i = 0; i < av_hw_conf->num_of_hdmi; i++) { | 712 | for (i = 0; i < av_hw_conf->num_of_hdmi && !id; i++) { |
716 | res = ps3av_cmd_video_get_monitor_info(&monitor_info, | 713 | res = ps3av_cmd_video_get_monitor_info(&monitor_info, |
717 | PS3AV_CMD_AVPORT_HDMI_0 + | 714 | PS3AV_CMD_AVPORT_HDMI_0 + |
718 | i); | 715 | i); |
@@ -720,24 +717,19 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, | |||
720 | return -1; | 717 | return -1; |
721 | 718 | ||
722 | ps3av_monitor_info_dump(&monitor_info); | 719 | ps3av_monitor_info_dump(&monitor_info); |
720 | |||
723 | info = &monitor_info.info; | 721 | info = &monitor_info.info; |
724 | /* check DVI */ | 722 | switch (info->monitor_type) { |
725 | if (info->monitor_type == PS3AV_MONITOR_TYPE_DVI) { | 723 | case PS3AV_MONITOR_TYPE_DVI: |
726 | dvi = PS3AV_MODE_DVI; | 724 | dvi = PS3AV_MODE_DVI; |
727 | break; | 725 | /* fall through */ |
728 | } | 726 | case PS3AV_MONITOR_TYPE_HDMI: |
729 | /* check HDMI */ | 727 | id = ps3av_hdmi_get_id(info); |
730 | id = ps3av_hdmi_get_id(info); | ||
731 | if (id) { | ||
732 | /* got valid mode id */ | ||
733 | break; | 728 | break; |
734 | } | 729 | } |
735 | } | 730 | } |
736 | 731 | ||
737 | if (dvi) { | 732 | if (!id) { |
738 | /* DVI mode */ | ||
739 | id = PS3AV_DEFAULT_DVI_MODE_ID; | ||
740 | } else if (!id) { | ||
741 | /* no HDMI interface or HDMI is off */ | 733 | /* no HDMI interface or HDMI is off */ |
742 | if (ps3av->region & PS3AV_REGION_60) | 734 | if (ps3av->region & PS3AV_REGION_60) |
743 | id = PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60; | 735 | id = PS3AV_DEFAULT_AVMULTI_MODE_ID_REG_60; |