modified custom flags behaviour, mostly TV_PRIMARY flag stuff: more in proposemode, less in other places. For singlehead TV modes on dualhead cards TVout chip is always assigned to the primary head now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14660 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
74ca3b24c2
commit
d7dfe68dc7
@ -507,12 +507,42 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con
|
||||
}
|
||||
}
|
||||
|
||||
/* if not dualhead capable card clear dualhead flags */
|
||||
if (!(target->flags & DUALHEAD_CAPABLE))
|
||||
{
|
||||
target->flags &= ~DUALHEAD_BITS;
|
||||
}
|
||||
|
||||
/* set TV_CAPABLE if suitable: pixelclock is not important (defined by TVstandard) */
|
||||
if (si->ps.tvout && BT_check_tvmode(*target))
|
||||
{
|
||||
target->flags |= TV_CAPABLE;
|
||||
}
|
||||
|
||||
/* if not TVout capable card clear TVout flags */
|
||||
if (!(target->flags & TV_CAPABLE))
|
||||
{
|
||||
target->flags &= ~TV_BITS;
|
||||
}
|
||||
|
||||
/* make sure TV head assignment is sane */
|
||||
if (target->flags & TV_BITS)
|
||||
{
|
||||
if (!si->ps.secondary_head)
|
||||
{
|
||||
target->flags |= TV_PRIMARY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((target->flags & DUALHEAD_BITS) == DUALHEAD_OFF)
|
||||
target->flags |= TV_PRIMARY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
target->flags &= ~TV_PRIMARY;
|
||||
}
|
||||
|
||||
/* set HARDWARE_CURSOR mode if suitable */
|
||||
if (si->settings.hardcursor)
|
||||
target->flags |= B_HARDWARE_CURSOR;
|
||||
@ -520,7 +550,7 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con
|
||||
/* set SUPPORTS_OVERLAYS */
|
||||
target->flags |= B_SUPPORTS_OVERLAYS;
|
||||
|
||||
LOG(1, ("PROPOSEMODE: validated status modeflags: $%08x\n", target->flags));
|
||||
LOG(1, ("PROPOSEMODE: validated modeflags: $%08x\n", target->flags));
|
||||
|
||||
/* overrule timing command flags to be (fixed) blank_pedestal = 0.0IRE,
|
||||
* progressive scan (fixed), and sync_on_green not avaible. */
|
||||
|
@ -68,18 +68,6 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set)
|
||||
/* See BOUNDS WARNING above... */
|
||||
if (PROPOSE_DISPLAY_MODE(&target, &target, &target) == B_ERROR) return B_ERROR;
|
||||
|
||||
/* if not dualhead capable card clear dualhead flags */
|
||||
if (!(target.flags & DUALHEAD_CAPABLE))
|
||||
{
|
||||
target.flags &= ~DUALHEAD_BITS;
|
||||
}
|
||||
/* if not TVout capable card clear TVout flags */
|
||||
if (!(target.flags & TV_CAPABLE))
|
||||
{
|
||||
target.flags &= ~TV_BITS;
|
||||
}
|
||||
LOG(1, ("SETMODE: (CONT.) validated command modeflags: $%08x\n", target.flags));
|
||||
|
||||
/* make sure a possible 3D add-on will block rendering and re-initialize itself.
|
||||
* note: update in _this_ order only */
|
||||
/* SET_DISPLAY_MODE will reset this flag when it's done. */
|
||||
|
@ -1580,7 +1580,7 @@ static status_t BT_update_mode_for_gpu(display_mode *target, uint8 tvmode)
|
||||
* and ASUS V7100 GeForce2 MX200 AGP/32Mb (CH7007). */
|
||||
static status_t BT_start_tvout(display_mode tv_target)
|
||||
{
|
||||
if (!si->ps.secondary_head || (tv_target.flags & TV_PRIMARY))
|
||||
if (tv_target.flags & TV_PRIMARY)
|
||||
{
|
||||
if (si->ps.secondary_head)
|
||||
{
|
||||
@ -1591,8 +1591,7 @@ static status_t BT_start_tvout(display_mode tv_target)
|
||||
|
||||
nv_crtc_start_tvout();
|
||||
}
|
||||
|
||||
if (si->ps.secondary_head && !(tv_target.flags & TV_PRIMARY))
|
||||
else
|
||||
{
|
||||
/* switch TV encoder to CRTC2 */
|
||||
NV_REG32(NV32_FUNCSEL) &= ~0x00000100;
|
||||
@ -1613,10 +1612,9 @@ status_t BT_stop_tvout(void)
|
||||
/* prevent BT from being overclocked by VGA-only modes & black-out TV-out */
|
||||
BT_killclk_blackout();
|
||||
|
||||
if (!si->ps.secondary_head || (si->dm.flags & TV_PRIMARY))
|
||||
if (si->dm.flags & TV_PRIMARY)
|
||||
nv_crtc_stop_tvout();
|
||||
|
||||
if (si->ps.secondary_head && !(si->dm.flags & TV_PRIMARY))
|
||||
else
|
||||
nv_crtc2_stop_tvout();
|
||||
|
||||
/* fixme if needed:
|
||||
@ -1708,10 +1706,9 @@ status_t BT_setmode(display_mode target)
|
||||
BT_update_mode_for_gpu(&tv_target, tvmode);
|
||||
|
||||
/* setup GPU CRTC timing */
|
||||
if (!si->ps.secondary_head || (si->dm.flags & TV_PRIMARY))
|
||||
if (tv_target.flags & TV_PRIMARY)
|
||||
head1_set_timing(tv_target);
|
||||
|
||||
if (si->ps.secondary_head && !(si->dm.flags & TV_PRIMARY))
|
||||
else
|
||||
head2_set_timing(tv_target);
|
||||
|
||||
//fixme: only testing older cards for now...
|
||||
|
@ -917,6 +917,8 @@ status_t nv_crtc_cursor_position(uint16 x, uint16 y)
|
||||
|
||||
status_t nv_crtc_stop_tvout(void)
|
||||
{
|
||||
LOG(4,("CRTC: stopping TV output\n"));
|
||||
|
||||
/* enable access to primary head */
|
||||
set_crtc_owner(0);
|
||||
|
||||
@ -974,6 +976,8 @@ status_t nv_crtc_stop_tvout(void)
|
||||
|
||||
status_t nv_crtc_start_tvout(void)
|
||||
{
|
||||
LOG(4,("CRTC: starting TV output\n"));
|
||||
|
||||
/* enable access to primary head */
|
||||
set_crtc_owner(0);
|
||||
|
||||
|
@ -767,6 +767,8 @@ status_t nv_crtc2_cursor_position(uint16 x, uint16 y)
|
||||
|
||||
status_t nv_crtc2_stop_tvout(void)
|
||||
{
|
||||
LOG(4,("CRTC2: stopping TV output\n"));
|
||||
|
||||
/* enable access to secondary head */
|
||||
set_crtc_owner(1);
|
||||
|
||||
@ -821,6 +823,8 @@ status_t nv_crtc2_stop_tvout(void)
|
||||
|
||||
status_t nv_crtc2_start_tvout(void)
|
||||
{
|
||||
LOG(4,("CRTC2: starting TV output\n"));
|
||||
|
||||
/* enable access to secondary head */
|
||||
set_crtc_owner(1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user