summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-28 17:20:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-28 17:20:11 +0000
commit5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b (patch)
tree2c3d9cb9d887f6efa498c1056809b7609eca6469 /lib
parent4479ed3920f5b5ce4af1359d4b3e485053ab60e1 (diff)
downloaddrakx-kbd-mouse-x11-5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b.tar
drakx-kbd-mouse-x11-5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b.tar.gz
drakx-kbd-mouse-x11-5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b.tar.bz2
drakx-kbd-mouse-x11-5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b.tar.xz
drakx-kbd-mouse-x11-5d1f19f264a8d5e8934f5b0cddb08dc84aa02c0b.zip
- XFdrake:
o if the EDID gives a valid 16/10 preferred resolution (even if duplicated), but no HorizSync/VertRefresh, use a generic flat panel HorizSync/VertRefresh (needed for edid.lcd.dell-inspiron-6400, #37971)
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/monitor.pm27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm
index 1e7795f..a99439d 100644
--- a/lib/Xconfig/monitor.pm
+++ b/lib/Xconfig/monitor.pm
@@ -155,6 +155,17 @@ that is beyond the capabilities of your monitor: you may damage your monitor.
1;
}
+sub _configure_automatic_LCD {
+ my ($monitor) = @_;
+
+ $monitor->{preferred_resolution}
+ && Xconfig::xfree::resolution2ratio($monitor->{preferred_resolution}) eq '16/10' or return;
+
+ log::l("no HorizSync nor VertRefresh, using preferred resolution (hopefully this is a flat panel)");
+ add2hash($monitor, generic_flat_panel($monitor->{preferred_resolution}));
+ 1;
+}
+
sub configure_automatic {
my ($monitor) = @_;
@@ -164,20 +175,17 @@ sub configure_automatic {
add2hash($monitor, $mon);
log::l("EISA_ID corresponds to: $monitor->{ModelName}");
} elsif (!$monitor->{HorizSync} || !$monitor->{VertRefresh}) {
- if ($monitor->{preferred_resolution}
- && Xconfig::xfree::resolution2ratio($monitor->{preferred_resolution}) eq '16/10') {
- log::l("no HorizSync nor VertRefresh, using preferred resolution (hopefully this is a flat panel)");
- add2hash($monitor, generic_flat_panel($monitor->{preferred_resolution}));
- } else {
- log::l("unknown EISA_ID and partial DDC probe, so unknown monitor");
- delete @$monitor{'VendorName', 'ModelName', 'EISA_ID'};
- }
+ log::l("unknown EISA_ID and partial DDC probe, so unknown monitor");
+ delete @$monitor{'VendorName', 'ModelName', 'EISA_ID'};
}
} elsif ($monitor->{VendorName}) {
if (my $mon = find { $_->{VendorName} eq $monitor->{VendorName} && $_->{ModelName} eq $monitor->{ModelName} } monitors_db()) {
put_in_hash($monitor, $mon);
}
}
+
+ _configure_automatic_LCD($monitor);
+
is_valid($monitor);
}
@@ -231,6 +239,7 @@ sub use_EDID {
$monitor->{ModeLine} = Xconfig::xfree::default_ModeLine();
my $detailed_timings = $monitor->{detailed_timings} || [];
+ my @different_timings = uniq_ { $_->{horizontal_active} . 'x' . $_->{vertical_active} } @$detailed_timings;
foreach (grep { !$_->{bad_ratio} } @$detailed_timings) {
if (Xconfig::xfree::xorg_builtin_resolution($_->{horizontal_active}, $_->{vertical_active})) {
#- we don't want the 4/3 modelines otherwise they conflict with the Xorg builtin vesamodes
@@ -239,7 +248,7 @@ sub use_EDID {
{ val => $_->{ModeLine}, pre_comment => $_->{ModeLine_comment} . "\n" };
}
- if (@$detailed_timings == 1 && $_->{horizontal_active} >= 1024) {
+ if (@different_timings == 1 && $_->{horizontal_active} >= 1024) {
#- we don't use detailed_timing when it is 640x480 or 800x600,
#- since 14" CRTs often give this even when they handle 1024x768 correctly (and desktop is no good in poor resolutions)