added no-INT-assigned capability to kerneldriver. Updated docs.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14439 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2005-10-20 09:01:54 +00:00
parent ce3fc95ee4
commit 52c8d6219d
3 changed files with 33 additions and 29 deletions

View File

@ -45,7 +45,7 @@ You use this software at your own risk! Although I don't expect it to damage you
</ul>
<strong>Known limitations:</strong>
<ul>
<li>If the driver does not load make sure you enabled 'assign IRQ to VGA card' in your system BIOS;
<li>If you want 'Sync_to_Retrace' capability make sure you enabled 'assign IRQ to VGA card' in your system BIOS (if available);
<li>If the driver still seems to create 'random' trouble make sure you have a fully functional VGA BIOS, or system BIOS for embedded cards (check for updates on the manufacturor's site). Make sure you mail me if you still have trouble but also if this version fixed that!
<li>If on a laptop the internal panel doesn't work when you connect an external monitor, make sure you set 'output device selection' to 'internal' (instead of 'auto') in the system BIOS if it has such an option. If you have this symptom on a normal card, or on a laptop without that BIOS option then you are probably out of luck for dualhead support;
<li><strong>NV40 architecture cards:</strong> (GeForce 6200 and 6600 at least, but 6800 AGP seems to be OK)<br>
@ -191,6 +191,6 @@ With the <strong>pgm_panel true</strong> setting, the driver will fix your panel
<hr>
<br>
<a href="mailto:info.be-hold@inter.nl.net">Rudolf Cornelissen.</a>
<p>(Page last updated on October 6, 2005)</p>
<p>(Page last updated on October 20, 2005)</p>
</body>
</html>

View File

@ -4,8 +4,9 @@
</head>
<body>
<p><h2>Changes done for each driverversion:</h2></p>
<p><h1>head (SVN 0.55, Rudolf)</h1></p>
<p><h1>head (SVN 0.56, Rudolf)</h1></p>
<ul>
<li>Added capability to driver to run without an INT assigned. Driver will now automatically disable the 'Sync_to_Retrace' function if no INT was assigned instead of not loading/running at all;
<li>Added TVout support for Brooktree BT868/BT869 and Conexant CX25870/CX25871 TV encoders: NTSC and PAL 640x480 and 800x600 Desktop modes are supported, NTSC VCD 640x480 and DVD 720x480 Video modes are supported, PAL VCD 768x576 and DVD 720x576 Video modes are supported. Singlehead cards should work perfectly while dualhead cards only display a testimage on TV in all modes for now. Still in progress...
</ul>
<p><h1>nv_driver 0.53 (Rudolf)</h1></p>

View File

@ -4,7 +4,7 @@
Other authors:
Mark Watson;
Rudolf Cornelissen 3/2002-9/2005.
Rudolf Cornelissen 3/2002-10/2005.
*/
/* standard kernel driver stuff */
@ -852,7 +852,6 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
thread_id thid;
thread_info thinfo;
status_t result = B_OK;
vuint32 *regs;
char shared_name[B_OS_NAME_LENGTH];
physical_entry map[1];
size_t net_buf_size;
@ -971,14 +970,19 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
/* map the device */
result = map_device(di);
if (result < 0) goto free_shared_and_alldma;
/* we will be returning OK status for sure now */
result = B_OK;
/* disable and clear any pending interrupts */
disable_vbi(di->regs);
/* preset we can't use INT related functions */
si->ps.int_assigned = false;
/* create a semaphore for vertical blank management */
si->vblank = create_sem(0, di->name);
if (si->vblank < 0) {
result = si->vblank;
goto unmap;
}
if (si->vblank < 0) goto mark_as_open;
/* change the owner of the semaphores to the opener's team */
/* this is required because apps can't aquire kernel semaphores */
@ -986,29 +990,31 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
get_thread_info(thid, &thinfo);
set_sem_owner(si->vblank, thinfo.team);
/* assign local regs pointer for SAMPLExx() macros */
regs = di->regs;
/* disable and clear any pending interrupts */
disable_vbi(regs);
/* If there is a valid interrupt line assigned then set up interrupts */
if ((di->pcii.u.h0.interrupt_pin == 0x00) ||
(di->pcii.u.h0.interrupt_line == 0xff) || /* no IRQ assigned */
(di->pcii.u.h0.interrupt_line <= 0x02)) /* system IRQ assigned */
{
/* we are aborting! */
/* Note: the R4 graphics driver kit lacks this statement!! */
result = B_ERROR;
/* interrupt does not exist so exit without installing our handler */
goto delete_the_sem;
/* delete the semaphore as it won't be used */
delete_sem(si->vblank);
si->vblank = -1;
}
else
{
/* otherwise install our interrupt handler */
result = install_io_interrupt_handler(di->pcii.u.h0.interrupt_line, nv_interrupt, (void *)di, 0);
/* bail if we couldn't install the handler */
if (result != B_OK) goto delete_the_sem;
if (result != B_OK)
{
/* delete the semaphore as it won't be used */
delete_sem(si->vblank);
si->vblank = -1;
}
else
{
/* inform accelerant(s) we can use INT related functions */
si->ps.int_assigned = true;
}
}
mark_as_open:
@ -1021,12 +1027,6 @@ mark_as_open:
goto done;
delete_the_sem:
delete_sem(si->vblank);
unmap:
unmap_device(di);
free_shared_and_alldma:
/* clean up our aligned DMA area */
delete_area(si->dma_area);
@ -1106,8 +1106,11 @@ free_hook (void* dev) {
remove_io_interrupt_handler(di->pcii.u.h0.interrupt_line, nv_interrupt, di);
/* delete the semaphores, ignoring any errors ('cause the owning team may have died on us) */
delete_sem(si->vblank);
si->vblank = -1;
if (si->ps.int_assigned)
{
delete_sem(si->vblank);
si->vblank = -1;
}
/* free regs and framebuffer areas */
unmap_device(di);