updated DPF stuff: primary and secondary DVI are fully working now (confirmed FX5200)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6974 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -81,7 +81,6 @@ status_t nv_crtc_validate_timing(
|
|||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*set a mode line - inputs are in pixels*/
|
/*set a mode line - inputs are in pixels*/
|
||||||
status_t nv_crtc_set_timing(display_mode target)
|
status_t nv_crtc_set_timing(display_mode target)
|
||||||
@@ -106,6 +105,22 @@ status_t nv_crtc_set_timing(display_mode target)
|
|||||||
|
|
||||||
LOG(4,("CRTC: setting timing\n"));
|
LOG(4,("CRTC: setting timing\n"));
|
||||||
|
|
||||||
|
/* setup fixed modeline for flatpanel if connected and active */
|
||||||
|
if (si->ps.tmds1_active)
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC: DFP active: tuning modeline\n"));
|
||||||
|
|
||||||
|
/* horizontal timing */
|
||||||
|
target.timing.h_total = target.timing.h_display + 56;
|
||||||
|
target.timing.h_sync_start = target.timing.h_total - 40;
|
||||||
|
target.timing.h_sync_end = target.timing.h_total - 16;
|
||||||
|
|
||||||
|
/* vertical timing */
|
||||||
|
target.timing.v_total = target.timing.v_display + 6;
|
||||||
|
target.timing.v_sync_start = target.timing.v_total - 3;
|
||||||
|
target.timing.v_sync_end = target.timing.v_total - 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* Modify parameters as required by standard VGA */
|
/* Modify parameters as required by standard VGA */
|
||||||
htotal = ((target.timing.h_total >> 3) - 5);
|
htotal = ((target.timing.h_total >> 3) - 5);
|
||||||
hdisp_e = ((target.timing.h_display >> 3) - 1);
|
hdisp_e = ((target.timing.h_display >> 3) - 1);
|
||||||
@@ -255,20 +270,26 @@ status_t nv_crtc_set_timing(display_mode target)
|
|||||||
CRTCW(FP_HTIMING, 0);
|
CRTCW(FP_HTIMING, 0);
|
||||||
CRTCW(FP_VTIMING, 0);
|
CRTCW(FP_VTIMING, 0);
|
||||||
|
|
||||||
/* nVidia cards only support upscaling: NV11 can't scale at all */
|
/* nVidia cards support upscaling except on NV11 */
|
||||||
if ((si->ps.card_arch == NV11) ||
|
if (si->ps.card_arch == NV11)
|
||||||
(iscale_x > (1 << 12)) || (iscale_y > (1 << 12)))
|
|
||||||
{
|
{
|
||||||
LOG(2,("CRTC: DFP needs to do scaling\n"));
|
|
||||||
|
|
||||||
/* disable last fetched line limiting */
|
/* disable last fetched line limiting */
|
||||||
DACW(FP_DEBUG2, 0x00000000);
|
DACW(FP_DEBUG2, 0x00000000);
|
||||||
/* inform panel to scale */
|
/* inform panel to scale if needed */
|
||||||
DACW(FP_TG_CTRL, (DACR(FP_TG_CTRL) | 0x00000100));
|
if ((iscale_x != (1 << 12)) || (iscale_y != (1 << 12)))
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC: DFP needs to do scaling\n"));
|
||||||
|
DACW(FP_TG_CTRL, (DACR(FP_TG_CTRL) | 0x00000100));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC: no scaling for DFP needed\n"));
|
||||||
|
DACW(FP_TG_CTRL, (DACR(FP_TG_CTRL) & 0xfffffeff));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(2,("CRTC: GPU scales if needed\n"));
|
LOG(2,("CRTC: GPU scales for DFP if needed\n"));
|
||||||
|
|
||||||
/* GPU scaling is automatically setup by hardware */
|
/* GPU scaling is automatically setup by hardware */
|
||||||
//fixme: checkout non 4:3 aspect scaling.
|
//fixme: checkout non 4:3 aspect scaling.
|
||||||
|
|||||||
@@ -91,6 +91,22 @@ status_t nv_crtc2_set_timing(display_mode target)
|
|||||||
|
|
||||||
LOG(4,("CRTC2: setting timing\n"));
|
LOG(4,("CRTC2: setting timing\n"));
|
||||||
|
|
||||||
|
/* setup fixed modeline for flatpanel if connected and active */
|
||||||
|
if (si->ps.tmds2_active)
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC2: DFP active: tuning modeline\n"));
|
||||||
|
|
||||||
|
/* horizontal timing */
|
||||||
|
target.timing.h_total = target.timing.h_display + 56;
|
||||||
|
target.timing.h_sync_start = target.timing.h_total - 40;
|
||||||
|
target.timing.h_sync_end = target.timing.h_total - 16;
|
||||||
|
|
||||||
|
/* vertical timing */
|
||||||
|
target.timing.v_total = target.timing.v_display + 6;
|
||||||
|
target.timing.v_sync_start = target.timing.v_total - 3;
|
||||||
|
target.timing.v_sync_end = target.timing.v_total - 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* Modify parameters as required by standard VGA */
|
/* Modify parameters as required by standard VGA */
|
||||||
htotal = ((target.timing.h_total >> 3) - 5);
|
htotal = ((target.timing.h_total >> 3) - 5);
|
||||||
hdisp_e = ((target.timing.h_display >> 3) - 1);
|
hdisp_e = ((target.timing.h_display >> 3) - 1);
|
||||||
@@ -237,20 +253,26 @@ status_t nv_crtc2_set_timing(display_mode target)
|
|||||||
CRTC2W(FP_HTIMING, 0);
|
CRTC2W(FP_HTIMING, 0);
|
||||||
CRTC2W(FP_VTIMING, 0);
|
CRTC2W(FP_VTIMING, 0);
|
||||||
|
|
||||||
/* nVidia cards only support upscaling: NV11 can't scale at all */
|
/* nVidia cards support upscaling except on NV11 */
|
||||||
if ((si->ps.card_arch == NV11) ||
|
if (si->ps.card_arch == NV11)
|
||||||
(iscale_x > (1 << 12)) || (iscale_y > (1 << 12)))
|
|
||||||
{
|
{
|
||||||
LOG(2,("CRTC2: DFP needs to do scaling\n"));
|
|
||||||
|
|
||||||
/* disable last fetched line limiting */
|
/* disable last fetched line limiting */
|
||||||
DAC2W(FP_DEBUG2, 0x00000000);
|
DAC2W(FP_DEBUG2, 0x00000000);
|
||||||
/* inform panel to scale */
|
/* inform panel to scale if needed */
|
||||||
DAC2W(FP_TG_CTRL, (DAC2R(FP_TG_CTRL) | 0x00000100));
|
if ((iscale_x != (1 << 12)) || (iscale_y != (1 << 12)))
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC2: DFP needs to do scaling\n"));
|
||||||
|
DAC2W(FP_TG_CTRL, (DAC2R(FP_TG_CTRL) | 0x00000100));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG(2,("CRTC2: no scaling for DFP needed\n"));
|
||||||
|
DAC2W(FP_TG_CTRL, (DAC2R(FP_TG_CTRL) & 0xfffffeff));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(2,("CRTC2: GPU scales if needed\n"));
|
LOG(2,("CRTC2: GPU scales for DFP if needed\n"));
|
||||||
|
|
||||||
/* GPU scaling is automatically setup by hardware */
|
/* GPU scaling is automatically setup by hardware */
|
||||||
//fixme: checkout non 4:3 aspect scaling.
|
//fixme: checkout non 4:3 aspect scaling.
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ status_t nv_general_powerup()
|
|||||||
{
|
{
|
||||||
status_t status;
|
status_t status;
|
||||||
|
|
||||||
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.10-3 running.\n"));
|
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.10-4 running.\n"));
|
||||||
|
|
||||||
/* preset no laptop */
|
/* preset no laptop */
|
||||||
si->ps.laptop = false;
|
si->ps.laptop = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user