Re: [PATCH] bttv driver II

From: Rui Sousa (rsousa@grad.physics.sunysb.edu)
Date: Mon May 22 2000 - 14:11:40 EST


Alan Cox wrote:
>
> > > BT848 is not dependant on the sound layer.
> >
> > If you compile the kernel with sound support then $CONFIG_VIDEO_BT848 and
> > $CONFIG_SOUND
> > must have the same value. It's not what I wrote above but there is some
> > dependence
> > (trough the msp3400.c file).
>
> The msp3400 driver is not required
>

>From the makefile:

obj-$(CONFIG_VIDEO_BT848) += bttv.o msp3400.o \
        tda7432.o tda8425.o tda985x.o tda9875.o tea6300.o tea6420.o

>
> > > > + spin_unlock_irqrestore(&btv->s_lock, flags);
> > > > interruptible_sleep_on(&btv->vbiq);
> > > > - sti();
> > >
> > > Again you need to fix this with add_wait_queue
> >
> > I always though this piece of code was right... Can you explain
> > the race? Is it that the wake_up() should be protected by the lock and
> > this way it may come before we wait on it?
>
> We can go
>
> spin_unlock
> wake_up
> interruptible_sleep_on
>

This only if wake_up happens in interrupt context and it's important
not to loose _any_ interrupts (possibly because there won't be anymore),
right?

And having a interruptible_sleep_on() with no locking at all (like in VIDIOCSYNC
ioctl) is a strict no-no? Which may be why sometimes I need to generate
interrupts
(change channels, overwrite the window,...) to get the image to sync again...

Rui Sousa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:22 EST