another modelist update regarding panels

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7373 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2004-05-03 14:21:01 +00:00
parent 5685273f87
commit 45a4e26e92
2 changed files with 41 additions and 26 deletions
@@ -455,6 +455,14 @@ status_t create_mode_list(void)
{ {
/* add flatpanel 1 native mode if it's found and when it's time */ /* add flatpanel 1 native mode if it's found and when it's time */
if (pan1 && !pan1_added) if (pan1 && !pan1_added)
{
/* only add modelines we don't already have (panels use VESA modelines) */
if ((src->timing.h_display == p1.timing.h_display) &&
(src->timing.v_display == p1.timing.v_display))
{
pan1_added = true;
}
else
{ {
/* place panel mode before same H-res mode from src list in dst list so /* place panel mode before same H-res mode from src list in dst list so
* widescreen panels are listed in order of total resolution (HxV) */ * widescreen panels are listed in order of total resolution (HxV) */
@@ -464,9 +472,18 @@ status_t create_mode_list(void)
pan1_added = true; pan1_added = true;
} }
} }
}
/* add flatpanel 2 native mode if it's found and when it's time */ /* add flatpanel 2 native mode if it's found and when it's time */
if (pan2 && !pan2_added) if (pan2 && !pan2_added)
{
/* only add modelines we don't already have (panels use VESA modelines) */
if ((src->timing.h_display == p2.timing.h_display) &&
(src->timing.v_display == p2.timing.v_display))
{
pan2_added = true;
}
else
{ {
/* place panel mode before same H-res mode from src list in dst list so /* place panel mode before same H-res mode from src list in dst list so
* widescreen panels are listed in order of total resolution (HxV) */ * widescreen panels are listed in order of total resolution (HxV) */
@@ -476,6 +493,7 @@ status_t create_mode_list(void)
pan2_added = true; pan2_added = true;
} }
} }
}
/* set ranges for acceptable values */ /* set ranges for acceptable values */
low = high = *src; low = high = *src;
@@ -510,11 +528,10 @@ status_t create_mode_list(void)
/* advance to next mode */ /* advance to next mode */
src++; src++;
}
/* (sort and) add flatpanel native mode(s) that are not added while we did /* (sort and) add flatpanel native mode(s) that are not added while we did
* reach the end of the src list */ * reach the end of the src list */
if (i == (MODE_COUNT - 1))
{
if (pan1 && pan2 && !pan1_added && !pan2_added) if (pan1 && pan2 && !pan1_added && !pan2_added)
{ {
/* sort in total resolution order */ /* sort in total resolution order */
@@ -528,8 +545,6 @@ status_t create_mode_list(void)
} }
if (pan1 && !pan1_added) add_panel1_mode(p1, &dst); if (pan1 && !pan1_added) add_panel1_mode(p1, &dst);
if (pan2 && !pan2_added) add_panel2_mode(p2, &dst); if (pan2 && !pan2_added) add_panel2_mode(p2, &dst);
}
}
return B_OK; return B_OK;
} }
@@ -8,7 +8,7 @@
#include "nv_std.h" #include "nv_std.h"
status_t test_ram(void); static status_t test_ram(void);
static status_t nvxx_general_powerup (void); static status_t nvxx_general_powerup (void);
static status_t nv_general_bios_to_powergraphics(void); static status_t nv_general_bios_to_powergraphics(void);
@@ -603,7 +603,7 @@ status_t nv_general_powerup()
return status; return status;
} }
status_t test_ram() static status_t test_ram()
{ {
uint32 value, offset; uint32 value, offset;
status_t result = B_OK; status_t result = B_OK;