diff options
-rw-r--r-- | drivers/ps3/ps3av.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index fbf8dcde9675..cae4af9959d3 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
@@ -721,6 +721,45 @@ static void ps3av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info * | |||
721 | } | 721 | } |
722 | } | 722 | } |
723 | 723 | ||
724 | static const struct ps3av_monitor_quirk { | ||
725 | const char *monitor_name; | ||
726 | u32 clear_60, clear_50, clear_vesa; | ||
727 | } ps3av_monitor_quirks[] = { | ||
728 | { | ||
729 | .monitor_name = "DELL 2007WFP", | ||
730 | .clear_60 = PS3AV_RESBIT_1920x1080I | ||
731 | }, { | ||
732 | .monitor_name = "L226WTQ", | ||
733 | .clear_60 = PS3AV_RESBIT_1920x1080I | | ||
734 | PS3AV_RESBIT_1920x1080P | ||
735 | }, { | ||
736 | .monitor_name = "SyncMaster", | ||
737 | .clear_60 = PS3AV_RESBIT_1920x1080I | ||
738 | } | ||
739 | }; | ||
740 | |||
741 | static void ps3av_fixup_monitor_info(struct ps3av_info_monitor *info) | ||
742 | { | ||
743 | unsigned int i; | ||
744 | const struct ps3av_monitor_quirk *quirk; | ||
745 | |||
746 | for (i = 0; i < ARRAY_SIZE(ps3av_monitor_quirks); i++) { | ||
747 | quirk = &ps3av_monitor_quirks[i]; | ||
748 | if (!strncmp(info->monitor_name, quirk->monitor_name, | ||
749 | sizeof(info->monitor_name))) { | ||
750 | pr_info("%s: Applying quirk for %s\n", __func__, | ||
751 | quirk->monitor_name); | ||
752 | info->res_60.res_bits &= ~quirk->clear_60; | ||
753 | info->res_60.native &= ~quirk->clear_60; | ||
754 | info->res_50.res_bits &= ~quirk->clear_50; | ||
755 | info->res_50.native &= ~quirk->clear_50; | ||
756 | info->res_vesa.res_bits &= ~quirk->clear_vesa; | ||
757 | info->res_vesa.native &= ~quirk->clear_vesa; | ||
758 | break; | ||
759 | } | ||
760 | } | ||
761 | } | ||
762 | |||
724 | 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, |
725 | int boot) | 764 | int boot) |
726 | { | 765 | { |
@@ -739,6 +778,8 @@ static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, | |||
739 | ps3av_monitor_info_dump(&monitor_info); | 778 | ps3av_monitor_info_dump(&monitor_info); |
740 | 779 | ||
741 | info = &monitor_info.info; | 780 | info = &monitor_info.info; |
781 | ps3av_fixup_monitor_info(info); | ||
782 | |||
742 | switch (info->monitor_type) { | 783 | switch (info->monitor_type) { |
743 | case PS3AV_MONITOR_TYPE_DVI: | 784 | case PS3AV_MONITOR_TYPE_DVI: |
744 | dvi = PS3AV_MODE_DVI; | 785 | dvi = PS3AV_MODE_DVI; |