added overlay follows head functionality

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6357 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2004-01-27 12:17:51 +00:00
parent a49b150fff
commit cc6f554257
7 changed files with 67 additions and 15 deletions

View File

@ -264,6 +264,7 @@ typedef struct {
int_buf_info myBufInfo[MAXBUFFERS]; /* extra info on scaler input buffers */
overlay_token myToken; /* scaler is free/in use */
benaphore lock; /* for creating buffers and aquiring overlay unit routines */
uint8 crtc; /* location of overlay unit */
} overlay;
} shared_info;

View File

@ -1,4 +1,4 @@
/* Written by Rudolf Cornelissen 05-2002/12-2003 */
/* Written by Rudolf Cornelissen 05-2002/1-2004 */
/* Note on 'missing features' in BeOS 5.0.3 and DANO:
* BeOS needs to define more colorspaces! It would be nice if BeOS would support the FourCC 'definitions'
@ -595,6 +595,25 @@ status_t CONFIGURE_OVERLAY
{
LOG(4,("succesfull, switching to buffer %d\n", offset));
/* do 'overlay follow head' in dualhead modes on dualhead cards */
if (si->ps.secondary_head)
{
switch (si->dm.flags & DUALHEAD_BITS)
{
case DUALHEAD_ON:
case DUALHEAD_SWITCH:
if ((ow->h_start + (ow->width / 2)) < (si->dm.virtual_width / 2))
nv_bes_to_crtc(0);
else
nv_bes_to_crtc(1);
break;
default:
nv_bes_to_crtc(0);
break;
}
}
/* _now_ program overlay hardware */
nv_configure_bes(ob, ow, ov, offset);
return B_OK;

View File

@ -8,6 +8,34 @@
//fixme: implement: (used for virtual screens!)
//void move_overlay(uint16 hdisp_start, uint16 vdisp_start);
status_t nv_bes_to_crtc(uint8 crtc)
{
if (si->ps.secondary_head)
{
if (crtc)
{
LOG(4,("Overlay: switching overlay to CRTC2\n"));
/* switch overlay engine to CRTC2 */
NV_REG32(NV32_FUNCSEL) &= ~0x00001000;
NV_REG32(NV32_2FUNCSEL) |= 0x00001000;
si->overlay.crtc = 1;
}
else
{
LOG(4,("Overlay: switching overlay to CRTC1\n"));
/* switch overlay engine to CRTC1 */
NV_REG32(NV32_2FUNCSEL) &= ~0x00001000;
NV_REG32(NV32_FUNCSEL) |= 0x00001000;
si->overlay.crtc = 0;
}
return B_OK;
}
else
{
return B_ERROR;
}
}
status_t nv_bes_init()
{
if (si->ps.card_arch < NV10A)
@ -103,13 +131,12 @@ status_t nv_configure_bes
/* the BES does not respect virtual_workspaces, but adheres to CRTC
* constraints only */
crtc_hstart = si->dm.h_display_start;
/* make dualhead switch mode with TVout enabled work while we're at it.. */
//fixme: probably no fix at all needed on NV cards...
/* if (si->switched_crtcs)
/* make dualhead stretch and switch mode work while we're at it.. */
if (si->overlay.crtc)
{
crtc_hstart += si->dm.timing.h_display;
}
*/
/* horizontal end is the first position beyond the displayed range on the CRTC */
crtc_hend = crtc_hstart + si->dm.timing.h_display;
crtc_vstart = si->dm.v_display_start;

View File

@ -80,7 +80,7 @@ status_t nv_general_powerup()
{
status_t status;
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.08-8 running.\n"));
LOG(1,("POWERUP: nVidia (open)BeOS Accelerant 0.08-9 running.\n"));
/* preset no laptop */
si->ps.laptop = false;
@ -936,11 +936,14 @@ status_t nv_general_bios_to_powergraphics()
if (si->ps.secondary_head)
{
/* switch overlay engine to head 1 */
//fixme: add other function blocks...
NV_REG32(NV32_FUNCSEL) |= 0x00001000;
/* switch overlay engine to CRTC1 */
/* bit 12: overlay engine,
* bit 8: TVout chip (fixme: or bit 4?),
* bit 4: DDC channel (fixme: or bit 8?) */
NV_REG32(NV32_2FUNCSEL) &= ~0x00001000;
NV_REG32(NV32_FUNCSEL) |= 0x00001000;
}
si->overlay.crtc = 0;
/* enable 'enhanced' mode on primary head: */
/* enable access to primary head */

View File

@ -106,6 +106,7 @@ status_t nv_acc_wait_idle(void);
/*backend scaler functions*/
status_t check_overlay_capability(uint32 feature);
status_t nv_bes_to_crtc(uint8 crtc);
status_t nv_bes_init(void);
status_t nv_configure_bes
(const overlay_buffer *ob, const overlay_window *ow,const overlay_view *ov, int offset);

View File

@ -34,8 +34,8 @@ Especially owners of laptops are encouraged to be extra carefull with their inte
<li>Full 2D acceleration;
<li>Full BWindowScreen support (used for hardware pageflipping, scrolling/panning and acceleration in applications/games);
<li>DPMS support (on both heads on dualhead cards);
<li>B_YCbCr422 hardware overlay support on both TNT and GeForce series cards (only on primary head on dualhead cards);
<li>Dualhead support (use Mark Watson's 'G400 Dualhead Setup' from BeBits for now).
<li>B_YCbCr422 hardware overlay support on both TNT and GeForce series cards (overlay follows head in dualhead stretch/switch modes);
<li>Dualhead support on GeForce dualhead cards (use Mark Watson's 'G400 Dualhead Setup' from BeBits for now).
</ul>
<strong>Known limitations:</strong>
<ul>
@ -122,6 +122,6 @@ Dumprom is another 'tool' for bug-tracking purposes.
<hr>
<br>
<a href="mailto:rag.cornelissen@inter.nl.net">Rudolf Cornelissen.</a>
<p>(Page last updated on January 22, 2004)</p>
<p>(Page last updated on January 27, 2004)</p>
</body>
</html>

View File

@ -4,7 +4,7 @@
</head>
<body>
<p><h2>Changes done for each driverversion:</h2></p>
<p><h1>head (0.08-8, Rudolf)</h1></p>
<p><h1>head (0.08-9, Rudolf)</h1></p>
<ul>
<li>Fixed GeForceFX 5600 and FX 5700 monitor 'refresh out of range' / shutoff fault. nVidia changed the pixelPLL for the NV31 and NV36;
<li>Fixed acceleration engine restrictions code to adhere to GeForceFX 5600 restrictions: those are still NV20 style for this card;
@ -16,10 +16,11 @@
<li>Added card recognition for GeForceFX 5700, FX 5950 and some other (older) cards;
<li>Added 256Mb RAM detection;
<li>Improved startup code: this should (could) fix random trouble on some cards like for instance hardcursor trouble on especially laptops;
<li>Added dualhead support (use Mark Watson's 'G400 Dualhead Setup' from BeBits for now): Note that dualhead switch mode still has to be setup, and overlay is fixed to the primary head for now;
<li>Added dualhead support (use Mark Watson's 'G400 Dualhead Setup' from BeBits for now): Note that dualhead switch mode still has to be setup;
<li>Updated mode granularity and max virtual size checking/limiting to adhere to new CRTC setup for dualhead cards;
<li>Added dualhead support for 8- and 16bit colordepths;
<li>Fixed move_display distortions in virtualscreens especially visible in 8-bit colordepth (for both heads).
<li>Fixed move_display distortions in virtualscreens especially visible in 8-bit colordepth (for both heads);
<li>Added 'overlay follows head' for dualhead stretch and switch modes: if more than half the overlay output is on a screen, that screen gets the overlay output.
</ul>
<p><h1>nv_driver 0.07 (Rudolf)</h1></p>
<ul>