1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Fix typo in interrupt handling code and fix bug in setting of adelay

This commit is contained in:
Roger Hardiman 2000-04-16 07:50:09 +00:00
parent 896402f402
commit f88d1687fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59277
4 changed files with 24 additions and 14 deletions

View File

@ -477,3 +477,10 @@
Stop printing MSP autodetect. Requested by
Chris D. Faulhaber <jedgar@fxp.org>
2.12 16 Apr 2000 Set adelay as an 8 bit value, noticed by
Thomas Klausner <wiz@netbsd.org>
Fix typo in the new interrupt code.

View File

@ -920,7 +920,7 @@ video_open( bktr_ptr_t bktr )
else
OUTB(bktr, BKTR_IFORM, INB(bktr, BKTR_IFORM) | BT848_IFORM_M_MUX1);
OUTL(bktr, BKTR_ADELAY, format_params[bktr->format_params].adelay);
OUTB(bktr, BKTR_ADELAY, format_params[bktr->format_params].adelay);
OUTB(bktr, BKTR_BDELAY, format_params[bktr->format_params].bdelay);
frame_rate = format_params[bktr->format_params].frame_rate;
@ -1292,7 +1292,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct pro
case BT848_IFORM_F_NTSCJ:
bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) |
METEOR_NTSC;
OUTL(bktr, BKTR_ADELAY, format_params[temp].adelay);
OUTB(bktr, BKTR_ADELAY, format_params[temp].adelay);
OUTB(bktr, BKTR_BDELAY, format_params[temp].bdelay);
bktr->format_params = temp;
break;
@ -1304,7 +1304,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct pro
case BT848_IFORM_F_PALM:
bktr->flags = (bktr->flags & ~METEOR_FORM_MASK) |
METEOR_PAL;
OUTL(bktr, BKTR_ADELAY, format_params[temp].adelay);
OUTB(bktr, BKTR_ADELAY, format_params[temp].adelay);
OUTB(bktr, BKTR_BDELAY, format_params[temp].bdelay);
bktr->format_params = temp;
break;
@ -1324,7 +1324,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct pro
METEOR_NTSC;
OUTB(bktr, BKTR_IFORM, temp_iform | BT848_IFORM_F_NTSCM |
format_params[BT848_IFORM_F_NTSCM].iform_xtsel);
OUTL(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_NTSCM].adelay);
OUTB(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_NTSCM].adelay);
OUTB(bktr, BKTR_BDELAY, format_params[BT848_IFORM_F_NTSCM].bdelay);
bktr->format_params = BT848_IFORM_F_NTSCM;
break;
@ -1334,7 +1334,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct pro
METEOR_PAL;
OUTB(bktr, BKTR_IFORM, temp_iform | BT848_IFORM_F_PALBDGHI |
format_params[BT848_IFORM_F_PALBDGHI].iform_xtsel);
OUTL(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_PALBDGHI].adelay);
OUTB(bktr, BKTR_ADELAY, format_params[BT848_IFORM_F_PALBDGHI].adelay);
OUTB(bktr, BKTR_BDELAY, format_params[BT848_IFORM_F_PALBDGHI].bdelay);
bktr->format_params = BT848_IFORM_F_PALBDGHI;
break;
@ -2333,8 +2333,9 @@ common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg )
#if defined( STATUS_SUM )
case BT848_GSTATUS: /* reap status */
{int s;
s = DISABLE_INTR;
{
DECLARE_INTR_MASK(s);
DISABLE_INTR(s);
temp = status_sum;
status_sum = 0;
ENABLE_INTR(s);

View File

@ -708,9 +708,9 @@ bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
int bktr_poll( dev_t dev, int events, struct proc *p)
{
int unit;
int s;
bktr_ptr_t bktr;
int revents = 0;
DECLARE_INTR_MASK(s);
unit = UNIT(minor(dev));
@ -721,7 +721,7 @@ int bktr_poll( dev_t dev, int events, struct proc *p)
return (ENXIO);
}
s = DISABLE_INTR;
DISABLE_INTR(s);
if (events & (POLLIN | POLLRDNORM)) {

View File

@ -59,12 +59,14 @@ void free_bktr_mem(bktr_ptr_t, bus_dmamap_t, vm_offset_t);
/************************************/
/* *** Interrupt Enable/Disable *** */
/************************************/
#if defined(__FreeBSD__)
#define DISABLE_INTR s=spltty()
#define ENABLE_INTR(s) splx(s)
#if defined(__XFreeBSD__)
#define DECLARE_INTR_MASK(s) intrmask_t s
#define DISABLE_INTR(s) s=spltty()
#define ENABLE_INTR(s) splx(s)
#else
#define DISABLE_INTR disable_intr()
#define ENABLE_INTR enable_intr()
#define DECLARE_INTR_MASK(s) /* no need to declare 's' */
#define DISABLE_INTR(s) disable_intr()
#define ENABLE_INTR(s) enable_intr()
#endif