* [PATCH 14/17] ps3av: add quirk database for broken monitors @ 2007-09-29 1:39 Antonino A. Daplas 2007-10-03 21:00 ` Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: Antonino A. Daplas @ 2007-09-29 1:39 UTC (permalink / raw) To: Andrew Morton; +Cc: Geert Uytterhoeven, Linux Fbdev development list From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> add a quirk database for broken monitors where the `best' advertised video mode doesn't work Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Antonino Daplas <adaplas@gmail.com> --- 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 fbf8dcd..cae4af9 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -721,6 +721,45 @@ static void ps3av_monitor_info_dump(cons } } +static const struct ps3av_monitor_quirk { + const char *monitor_name; + u32 clear_60, clear_50, clear_vesa; +} ps3av_monitor_quirks[] = { + { + .monitor_name = "DELL 2007WFP", + .clear_60 = PS3AV_RESBIT_1920x1080I + }, { + .monitor_name = "L226WTQ", + .clear_60 = PS3AV_RESBIT_1920x1080I | + PS3AV_RESBIT_1920x1080P + }, { + .monitor_name = "SyncMaster", + .clear_60 = PS3AV_RESBIT_1920x1080I + } +}; + +static void ps3av_fixup_monitor_info(struct ps3av_info_monitor *info) +{ + unsigned int i; + const struct ps3av_monitor_quirk *quirk; + + for (i = 0; i < ARRAY_SIZE(ps3av_monitor_quirks); i++) { + quirk = &ps3av_monitor_quirks[i]; + if (!strncmp(info->monitor_name, quirk->monitor_name, + sizeof(info->monitor_name))) { + pr_info("%s: Applying quirk for %s\n", __func__, + quirk->monitor_name); + info->res_60.res_bits &= ~quirk->clear_60; + info->res_60.native &= ~quirk->clear_60; + info->res_50.res_bits &= ~quirk->clear_50; + info->res_50.native &= ~quirk->clear_50; + info->res_vesa.res_bits &= ~quirk->clear_vesa; + info->res_vesa.native &= ~quirk->clear_vesa; + break; + } + } +} + static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, int boot) { @@ -739,6 +778,8 @@ static int ps3av_auto_videomode(struct p ps3av_monitor_info_dump(&monitor_info); info = &monitor_info.info; + ps3av_fixup_monitor_info(info); + switch (info->monitor_type) { case PS3AV_MONITOR_TYPE_DVI: dvi = PS3AV_MODE_DVI; ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 14/17] ps3av: add quirk database for broken monitors 2007-09-29 1:39 [PATCH 14/17] ps3av: add quirk database for broken monitors Antonino A. Daplas @ 2007-10-03 21:00 ` Andrew Morton 2007-10-04 7:46 ` Geert Uytterhoeven 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2007-10-03 21:00 UTC (permalink / raw) To: Antonino A. Daplas; +Cc: Geert.Uytterhoeven, linux-fbdev-devel On Sat, 29 Sep 2007 09:39:10 +0800 "Antonino A. Daplas" <adaplas@gmail.com> wrote: > +static const struct ps3av_monitor_quirk { > + const char *monitor_name; > + u32 clear_60, clear_50, clear_vesa; > +} ps3av_monitor_quirks[] = { > + { > + .monitor_name = "DELL 2007WFP", > + .clear_60 = PS3AV_RESBIT_1920x1080I > + }, { > + .monitor_name = "L226WTQ", > + .clear_60 = PS3AV_RESBIT_1920x1080I | > + PS3AV_RESBIT_1920x1080P > + }, { > + .monitor_name = "SyncMaster", > + .clear_60 = PS3AV_RESBIT_1920x1080I > + } > +}; One assumes that the presently-unused clear_50 and clear_vesa will be used at some time in the future... ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 14/17] ps3av: add quirk database for broken monitors 2007-10-03 21:00 ` Andrew Morton @ 2007-10-04 7:46 ` Geert Uytterhoeven 2007-10-12 14:36 ` Geert Uytterhoeven 0 siblings, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2007-10-04 7:46 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-fbdev-devel, Antonino A. Daplas [-- Attachment #1: Type: TEXT/PLAIN, Size: 1535 bytes --] On Wed, 3 Oct 2007, Andrew Morton wrote: > On Sat, 29 Sep 2007 09:39:10 +0800 > "Antonino A. Daplas" <adaplas@gmail.com> wrote: > > > +static const struct ps3av_monitor_quirk { > > + const char *monitor_name; > > + u32 clear_60, clear_50, clear_vesa; > > +} ps3av_monitor_quirks[] = { > > + { > > + .monitor_name = "DELL 2007WFP", > > + .clear_60 = PS3AV_RESBIT_1920x1080I > > + }, { > > + .monitor_name = "L226WTQ", > > + .clear_60 = PS3AV_RESBIT_1920x1080I | > > + PS3AV_RESBIT_1920x1080P > > + }, { > > + .monitor_name = "SyncMaster", > > + .clear_60 = PS3AV_RESBIT_1920x1080I > > + } > > +}; > > One assumes that the presently-unused clear_50 and clear_vesa will > be used at some time in the future... So far I haven't encountered (or been reported) a monitor that needed to clear 50 Hz or VESA mode flags. I can comment out/#if 0 out/remove those parts if you prefer. With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 [-- Attachment #2: Type: text/plain, Size: 314 bytes --] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ [-- Attachment #3: Type: text/plain, Size: 182 bytes --] _______________________________________________ Linux-fbdev-devel mailing list Linux-fbdev-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 14/17] ps3av: add quirk database for broken monitors 2007-10-04 7:46 ` Geert Uytterhoeven @ 2007-10-12 14:36 ` Geert Uytterhoeven 0 siblings, 0 replies; 4+ messages in thread From: Geert Uytterhoeven @ 2007-10-12 14:36 UTC (permalink / raw) To: Andrew Morton Cc: Geert Uytterhoeven, Linux Frame Buffer Device Development, Antonino A. Daplas [-- Attachment #1: Type: TEXT/PLAIN, Size: 3611 bytes --] Hi Andrew, On Thu, 4 Oct 2007, Geert Uytterhoeven wrote: > On Wed, 3 Oct 2007, Andrew Morton wrote: > > On Sat, 29 Sep 2007 09:39:10 +0800 > > "Antonino A. Daplas" <adaplas@gmail.com> wrote: > > > > > +static const struct ps3av_monitor_quirk { > > > + const char *monitor_name; > > > + u32 clear_60, clear_50, clear_vesa; > > > +} ps3av_monitor_quirks[] = { > > > + { > > > + .monitor_name = "DELL 2007WFP", > > > + .clear_60 = PS3AV_RESBIT_1920x1080I > > > + }, { > > > + .monitor_name = "L226WTQ", > > > + .clear_60 = PS3AV_RESBIT_1920x1080I | > > > + PS3AV_RESBIT_1920x1080P > > > + }, { > > > + .monitor_name = "SyncMaster", > > > + .clear_60 = PS3AV_RESBIT_1920x1080I > > > + } > > > +}; > > > > One assumes that the presently-unused clear_50 and clear_vesa will > > be used at some time in the future... > > So far I haven't encountered (or been reported) a monitor that needed to clear > 50 Hz or VESA mode flags. I can comment out/#if 0 out/remove those parts if you > prefer. I removed those fields. Here's an updated patch: Subject: ps3av: add quirk database for broken monitors ps3av: add a quirk database for broken monitors where the `best' advertised video mode doesn't work Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> --- Removed the `clear_50' and `clear_vesa' fields of struct ps3av_monitor_quirk, as they're currently unused drivers/ps3/ps3av.c | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+) --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -721,6 +721,41 @@ static void ps3av_monitor_info_dump(cons } } +static const struct ps3av_monitor_quirk { + const char *monitor_name; + u32 clear_60; +} ps3av_monitor_quirks[] = { + { + .monitor_name = "DELL 2007WFP", + .clear_60 = PS3AV_RESBIT_1920x1080I + }, { + .monitor_name = "L226WTQ", + .clear_60 = PS3AV_RESBIT_1920x1080I | + PS3AV_RESBIT_1920x1080P + }, { + .monitor_name = "SyncMaster", + .clear_60 = PS3AV_RESBIT_1920x1080I + } +}; + +static void ps3av_fixup_monitor_info(struct ps3av_info_monitor *info) +{ + unsigned int i; + const struct ps3av_monitor_quirk *quirk; + + for (i = 0; i < ARRAY_SIZE(ps3av_monitor_quirks); i++) { + quirk = &ps3av_monitor_quirks[i]; + if (!strncmp(info->monitor_name, quirk->monitor_name, + sizeof(info->monitor_name))) { + pr_info("%s: Applying quirk for %s\n", __func__, + quirk->monitor_name); + info->res_60.res_bits &= ~quirk->clear_60; + info->res_60.native &= ~quirk->clear_60; + break; + } + } +} + static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf, int boot) { @@ -739,6 +774,8 @@ static int ps3av_auto_videomode(struct p ps3av_monitor_info_dump(&monitor_info); info = &monitor_info.info; + ps3av_fixup_monitor_info(info); + switch (info->monitor_type) { case PS3AV_MONITOR_TYPE_DVI: dvi = PS3AV_MODE_DVI; With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619 [-- Attachment #2: Type: text/plain, Size: 314 bytes --] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ [-- Attachment #3: Type: text/plain, Size: 182 bytes --] _______________________________________________ Linux-fbdev-devel mailing list Linux-fbdev-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-12 14:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-09-29 1:39 [PATCH 14/17] ps3av: add quirk database for broken monitors Antonino A. Daplas 2007-10-03 21:00 ` Andrew Morton 2007-10-04 7:46 ` Geert Uytterhoeven 2007-10-12 14:36 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).