completed TVout support concerning dualhead (clone) modes and custom modeflag for selecting TVout head on a per mode basis. NV11 is now fully functional (with supported encoders that is).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14667 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
05bd1efe5b
commit
3c71b494d6
@ -192,7 +192,8 @@ status_t INIT_ACCELERANT(int the_fd) {
|
|||||||
/* ensure DPMS state */
|
/* ensure DPMS state */
|
||||||
si->dpms_flags = B_DPMS_ON;
|
si->dpms_flags = B_DPMS_ON;
|
||||||
|
|
||||||
/* ensure TVout state */
|
/* ensure TVout state:
|
||||||
|
* TVencoder is on head to be assigned primary, no dualhead switch mode active. */
|
||||||
//fixme: actually check on what CRTC TVout was active during boot (if any)...
|
//fixme: actually check on what CRTC TVout was active during boot (if any)...
|
||||||
si->dm.flags = TV_PRIMARY;
|
si->dm.flags = TV_PRIMARY;
|
||||||
|
|
||||||
|
@ -511,10 +511,15 @@ status_t SET_DPMS_MODE(uint32 dpms_flags)
|
|||||||
/* CRTC used for TVout needs specific DPMS programming */
|
/* CRTC used for TVout needs specific DPMS programming */
|
||||||
if (si->dm.flags & TV_BITS)
|
if (si->dm.flags & TV_BITS)
|
||||||
{
|
{
|
||||||
|
/* TV_PRIMARY tells us that the head to be used with TVout is the head that's
|
||||||
|
* actually assigned as being the primary head at powerup:
|
||||||
|
* so non dualhead-mode-dependant, and not 'fixed' CRTC1! */
|
||||||
if (si->dm.flags & TV_PRIMARY)
|
if (si->dm.flags & TV_PRIMARY)
|
||||||
{
|
{
|
||||||
LOG(4,("SET_DPMS_MODE: tuning primary head DPMS settings for TVout compatibility\n"));
|
LOG(4,("SET_DPMS_MODE: tuning primary head DPMS settings for TVout compatibility\n"));
|
||||||
|
|
||||||
|
if ((si->dm.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
|
{
|
||||||
if (!(si->settings.vga_on_tv))
|
if (!(si->settings.vga_on_tv))
|
||||||
{
|
{
|
||||||
/* block VGA output on head displaying on TV */
|
/* block VGA output on head displaying on TV */
|
||||||
@ -541,33 +546,50 @@ status_t SET_DPMS_MODE(uint32 dpms_flags)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(4,("SET_DPMS_MODE: tuning secondary head DPMS settings for TVout compatibility\n"));
|
|
||||||
|
|
||||||
if (!(si->settings.vga_on_tv))
|
if (!(si->settings.vga_on_tv))
|
||||||
{
|
{
|
||||||
/* block VGA output on head displaying on TV */
|
|
||||||
/* Note:
|
|
||||||
* this specific sync setting is required: Vsync is used to keep TVout
|
|
||||||
* synchronized to the CRTC 'vertically' (otherwise 'rolling' occurs).
|
|
||||||
* This leaves Hsync only for shutting off the VGA screen. */
|
|
||||||
h2h = false;
|
h2h = false;
|
||||||
h2v = true;
|
h2v = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* when concurrent VGA is used alongside TVout on a head, DPMS is safest
|
|
||||||
* applied this way: Vsync is needed for stopping TVout successfully when
|
|
||||||
* a (new) modeswitch occurs.
|
|
||||||
* (see routine BT_stop_tvout() in nv_brooktreetv.c) */
|
|
||||||
/* Note:
|
|
||||||
* applying 'normal' DPMS here and forcing Vsync on in the above mentioned
|
|
||||||
* routine seems to not always be enough: sometimes image generation will
|
|
||||||
* not resume in that case. */
|
|
||||||
h2h = display;
|
h2h = display;
|
||||||
h2v = true;
|
h2v = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG(4,("SET_DPMS_MODE: tuning secondary head DPMS settings for TVout compatibility\n"));
|
||||||
|
|
||||||
|
if ((si->dm.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
|
{
|
||||||
|
if (!(si->settings.vga_on_tv))
|
||||||
|
{
|
||||||
|
h2h = false;
|
||||||
|
h2v = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
h2h = display;
|
||||||
|
h2v = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(si->settings.vga_on_tv))
|
||||||
|
{
|
||||||
|
h1h = false;
|
||||||
|
h1v = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
h1h = display;
|
||||||
|
h1v = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* issue actual DPMS commands as far as applicable */
|
/* issue actual DPMS commands as far as applicable */
|
||||||
head1_dpms(display, h1h, h1v);
|
head1_dpms(display, h1h, h1v);
|
||||||
|
@ -1580,10 +1580,23 @@ static status_t BT_update_mode_for_gpu(display_mode *target, uint8 tvmode)
|
|||||||
* and ASUS V7100 GeForce2 MX200 AGP/32Mb (CH7007). */
|
* and ASUS V7100 GeForce2 MX200 AGP/32Mb (CH7007). */
|
||||||
static status_t BT_start_tvout(display_mode tv_target)
|
static status_t BT_start_tvout(display_mode tv_target)
|
||||||
{
|
{
|
||||||
|
/* TV_PRIMARY tells us that the head to be used with TVout is the head that's
|
||||||
|
* actually assigned as being the primary head at powerup:
|
||||||
|
* so non dualhead-mode-dependant, and not 'fixed' CRTC1! */
|
||||||
if (tv_target.flags & TV_PRIMARY)
|
if (tv_target.flags & TV_PRIMARY)
|
||||||
|
{
|
||||||
|
if ((tv_target.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
head1_start_tvout();
|
head1_start_tvout();
|
||||||
else
|
else
|
||||||
head2_start_tvout();
|
head2_start_tvout();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((tv_target.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
|
head2_start_tvout();
|
||||||
|
else
|
||||||
|
head1_start_tvout();
|
||||||
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}//end BT_start_tvout.
|
}//end BT_start_tvout.
|
||||||
@ -1597,10 +1610,23 @@ status_t BT_stop_tvout(void)
|
|||||||
/* prevent BT from being overclocked by VGA-only modes & black-out TV-out */
|
/* prevent BT from being overclocked by VGA-only modes & black-out TV-out */
|
||||||
BT_killclk_blackout();
|
BT_killclk_blackout();
|
||||||
|
|
||||||
|
/* TV_PRIMARY tells us that the head to be used with TVout is the head that's
|
||||||
|
* actually assigned as being the primary head at powerup:
|
||||||
|
* so non dualhead-mode-dependant, and not 'fixed' CRTC1! */
|
||||||
if (si->dm.flags & TV_PRIMARY)
|
if (si->dm.flags & TV_PRIMARY)
|
||||||
|
{
|
||||||
|
if ((si->dm.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
head1_stop_tvout();
|
head1_stop_tvout();
|
||||||
else
|
else
|
||||||
head2_stop_tvout();
|
head2_stop_tvout();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((si->dm.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
|
head2_stop_tvout();
|
||||||
|
else
|
||||||
|
head1_stop_tvout();
|
||||||
|
}
|
||||||
|
|
||||||
/* fixme if needed:
|
/* fixme if needed:
|
||||||
* a full encoder chip reset could be done here (so after decoupling crtc)... */
|
* a full encoder chip reset could be done here (so after decoupling crtc)... */
|
||||||
@ -1691,10 +1717,23 @@ status_t BT_setmode(display_mode target)
|
|||||||
BT_update_mode_for_gpu(&tv_target, tvmode);
|
BT_update_mode_for_gpu(&tv_target, tvmode);
|
||||||
|
|
||||||
/* setup GPU CRTC timing */
|
/* setup GPU CRTC timing */
|
||||||
|
/* TV_PRIMARY tells us that the head to be used with TVout is the head that's
|
||||||
|
* actually assigned as being the primary head at powerup:
|
||||||
|
* so non dualhead-mode-dependant, and not 'fixed' CRTC1! */
|
||||||
if (tv_target.flags & TV_PRIMARY)
|
if (tv_target.flags & TV_PRIMARY)
|
||||||
|
{
|
||||||
|
if ((tv_target.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
head1_set_timing(tv_target);
|
head1_set_timing(tv_target);
|
||||||
else
|
else
|
||||||
head2_set_timing(tv_target);
|
head2_set_timing(tv_target);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((tv_target.flags & DUALHEAD_BITS) != DUALHEAD_SWITCH)
|
||||||
|
head2_set_timing(tv_target);
|
||||||
|
else
|
||||||
|
head1_set_timing(tv_target);
|
||||||
|
}
|
||||||
|
|
||||||
//fixme: only testing older cards for now...
|
//fixme: only testing older cards for now...
|
||||||
if (si->ps.secondary_head && (si->ps.card_type > NV15))
|
if (si->ps.secondary_head && (si->ps.card_type > NV15))
|
||||||
|
@ -91,7 +91,7 @@ status_t nv_general_powerup()
|
|||||||
{
|
{
|
||||||
status_t status;
|
status_t status;
|
||||||
|
|
||||||
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.60 running.\n"));
|
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.61 running.\n"));
|
||||||
|
|
||||||
/* log VBLANK INT usability status */
|
/* log VBLANK INT usability status */
|
||||||
if (si->ps.int_assigned)
|
if (si->ps.int_assigned)
|
||||||
|
Loading…
Reference in New Issue
Block a user