diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-05 11:05:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-05 11:05:28 +0000 |
commit | 61a3bbd8833d07966525103d3dea878ed97cf784 (patch) | |
tree | e6278399bdc627921022283da18e286638c274d4 | |
parent | 50676c46842a31f58293e416665bc3f94ca84a53 (diff) | |
download | drakx-61a3bbd8833d07966525103d3dea878ed97cf784.tar drakx-61a3bbd8833d07966525103d3dea878ed97cf784.tar.gz drakx-61a3bbd8833d07966525103d3dea878ed97cf784.tar.bz2 drakx-61a3bbd8833d07966525103d3dea878ed97cf784.tar.xz drakx-61a3bbd8833d07966525103d3dea878ed97cf784.zip |
also try EISA ID to auto-detect the monitor (sometimes the EISA ID is there, but not the [hv]syncrange
-rw-r--r-- | perl-install/Xconfig.pm | 5 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 10 | ||||
-rw-r--r-- | tools/ddcprobe/ddcxinfos.c | 11 |
3 files changed, 19 insertions, 7 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index 836fa27c5..fac946783 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -207,9 +207,10 @@ sub getinfoFromDDC { } my ($h, $v, $size, @m) = @l; - $O->{hsyncrange} ||= chomp_($h); - $O->{vsyncrange} ||= chomp_($v); + $O->{hsyncrange} ||= $h =~ /^(\S*)/; + $O->{vsyncrange} ||= $v =~ /^(\S*)/; $O->{size} ||= to_float($size); + $O->{EISA_ID} = $1 if $size =~ /EISA ID: (\S*)/; $O->{modelines} ||= join '', @m; $o; } diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 2b3567cd6..016d510fd 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -114,9 +114,8 @@ sub readMonitorsDB { /^#/ and next; /^$/ and next; - my @fields = qw(vendor type eisa hsyncrange vsyncrange); + my @fields = qw(vendor type eisa hsyncrange vsyncrange dpms); my @l = split /\s*;\s*/; - @l == @fields or log::l("bad line $lineno ($_)"), next; my %l; @l{@fields} = @l; if ($monitors{$l{type}}) { @@ -493,6 +492,13 @@ sub monitorConfiguration(;$$) { readMonitorsDB("$ENV{SHARE_PATH}/ldetect-lst/MonitorsDB"); + if ($monitor->{EISA_ID}) { + if (my ($mon) = grep { $_->{eisa} eq $monitor->{EISA_ID} } values %monitors) { + add2hash($monitor, $mon); + return $monitor; + } + } + my $good_default = (arch() =~ /ppc/ ? 'Apple|' : 'Generic|') . translate($good_default_monitor); $monitor->{type} ||= ($::auto_install ? $low_default_monitor : diff --git a/tools/ddcprobe/ddcxinfos.c b/tools/ddcprobe/ddcxinfos.c index 439bdc75b..06723746f 100644 --- a/tools/ddcprobe/ddcxinfos.c +++ b/tools/ddcprobe/ddcxinfos.c @@ -39,13 +39,18 @@ int main(int argc, char **argv) vbe_get_edid_ranges(edid, &hmin, &hmax, &vmin, &vmax); modelines = vbe_get_edid_modelines(edid); - printf(hmin ? "%d-%d\n" : "\n", hmin, hmax); - printf(vmin ? "%d-%d\n" : "\n", vmin, vmax); + printf(hmin ? "%d-%d kHz HorizSync\n" : "\n", hmin, hmax); + printf(vmin ? "%d-%d Hz VertRefresh\n" : "\n", vmin, vmax); { + char manufacturer[4]; double size = sqrt(SQR(edid->max_size_horizontal) + SQR(edid->max_size_vertical)) / 2.54; - printf(size ? "%3.2f inches monitor (truly %3.2f')\n" : "\n", size * 1.08, size); + manufacturer[0] = edid->manufacturer_name.char1 + 'A' - 1; + manufacturer[1] = edid->manufacturer_name.char2 + 'A' - 1; + manufacturer[2] = edid->manufacturer_name.char3 + 'A' - 1; + manufacturer[3] = '\0'; + printf(size ? "%3.2f inches monitor (truly %3.2f') EISA ID=%s%04x\n" : "\n", size * 1.08, size, manufacturer, edid->product_code); } for(j=0; modelines && (modelines[j].refresh != 0); j++){ |