fixed CRT monitor detection (both heads)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6436 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -184,13 +184,13 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set)
|
|||||||
/*work out where the "right" screen starts*/
|
/*work out where the "right" screen starts*/
|
||||||
startadd_right = startadd + (target.timing.h_display * (colour_depth1 >> 3));
|
startadd_right = startadd + (target.timing.h_display * (colour_depth1 >> 3));
|
||||||
|
|
||||||
/* fixme: test... */
|
|
||||||
nv_dac_crt_connected();
|
|
||||||
nv_dac2_crt_connected();
|
|
||||||
|
|
||||||
/* set the outputs if possible */
|
/* set the outputs if possible */
|
||||||
if (si->ps.secondary_head)
|
if (si->ps.secondary_head)
|
||||||
{
|
{
|
||||||
|
/* fixme: test... (do also for singlehead modes!) */
|
||||||
|
nv_dac_crt_connected();
|
||||||
|
nv_dac2_crt_connected();
|
||||||
|
|
||||||
switch (target.flags & DUALHEAD_BITS)
|
switch (target.flags & DUALHEAD_BITS)
|
||||||
{
|
{
|
||||||
case DUALHEAD_ON:
|
case DUALHEAD_ON:
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ bool nv_dac_crt_connected(void)
|
|||||||
/* save DAC state */
|
/* save DAC state */
|
||||||
dac = DACR(TSTCTRL);
|
dac = DACR(TSTCTRL);
|
||||||
|
|
||||||
/* shut-off DAC */
|
/* turn on DAC */
|
||||||
DACW(TSTCTRL, (DACR(TSTCTRL) | 0x00010000));
|
DACW(TSTCTRL, (DACR(TSTCTRL) & 0xfffeffff));
|
||||||
/* select primary head and turn off CRT (and DVI?) outputs */
|
/* select primary head and turn off CRT (and DVI?) outputs */
|
||||||
DACW(OUTPUT, (output & 0x0000feee));
|
DACW(OUTPUT, (output & 0x0000feee));
|
||||||
/* wait for signal lines to stabilize */
|
/* wait for signal lines to stabilize */
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ bool nv_dac2_crt_connected()
|
|||||||
/* save DAC state */
|
/* save DAC state */
|
||||||
dac = DAC2R(TSTCTRL);
|
dac = DAC2R(TSTCTRL);
|
||||||
|
|
||||||
/* shut-off DAC */
|
/* turn on DAC2 */
|
||||||
DAC2W(TSTCTRL, (DAC2R(TSTCTRL) | 0x00010000));
|
DAC2W(TSTCTRL, (DAC2R(TSTCTRL) & 0xfffeffff));
|
||||||
/* select primary head and turn off CRT (and DVI?) outputs */
|
/* select primary head and turn off CRT (and DVI?) outputs */
|
||||||
DAC2W(OUTPUT, (output & 0x0000feee));
|
DAC2W(OUTPUT, (output & 0x0000feee));
|
||||||
/* wait for signal lines to stabilize */
|
/* wait for signal lines to stabilize */
|
||||||
snooze(1000);
|
snooze(1000);
|
||||||
/* re-enable CRT output */
|
/* re-enable CRT output */
|
||||||
DAC2W(OUTPUT, (DACR(OUTPUT) | 0x00000001));
|
DAC2W(OUTPUT, (DAC2R(OUTPUT) | 0x00000001));
|
||||||
|
|
||||||
/* setup RGB test signal levels to approx 30% of DAC range and enable them
|
/* setup RGB test signal levels to approx 30% of DAC range and enable them
|
||||||
* (NOTE: testsignal function block resides in DAC1 only (!)) */
|
* (NOTE: testsignal function block resides in DAC1 only (!)) */
|
||||||
|
|||||||
Reference in New Issue
Block a user