[linux-dvb] problems and workaround when tuning to a channel with DD enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Stezenbach wrote:
> On Thu, Jun 16, 2005 at 06:48:55AM +0200, Oliver Endriss wrote:
> > Johannes Stezenbach wrote:
> > > On Sat, Jun 11, 2005 at 02:01:37PM +0200, Wolfgang Rohdewald wrote:
> > > > Here comes a new patch
> > > > - make sure ERESTARTSYS will always be propagated
> > > > - ReleaseBitmap: starting with Firmware 261e, also release when
> > > >   BMP_LOADING
> > > > - removes unused #define BMP_LOADINGS
> > > > - in many cases changed the return value from -1 to something more
> > > >   meaningful like ETIMEDOUT, EINVAL
> > > > - changed syslog message timeout waiting for COMMAND such that it 
> > > >   indicates what command did not complete
> > > > - reduce # of arguments for LoadBitmap and BlitBitmap
> > > > - av7110_osd_cmd: remove the out: label
> > > 
> > > Patch is in CVS now. The 261e firmware will be released real soon now.
> > 
> > Looks ok if OSDSetBlock is _never_ used by more than one thread at the
> > same time. Otherwise, some race conditions might occur.
> > 
> > Anyway, as the OSD interface has state variables like av7110->osdwin
> > it is not thread-safe 'by design'.
> 
> av7110_osd_cmd() is protected by av7110->osd_sema. Where
> do you think there is a race condition?

Ok, I somehow missed the semphore calls.
Unfortunately, the semaphore will not help in the following case:

| Task A                  Task B
|
| OSD_SetWindow(win1)
|
|                         OSD_SetWindow(win2)
|                         OSD_SetBlock(data2)
|
| OSD_SetBlock(data1)

So data1 would be written to the wrong osd window. :-(
This problem can't be fixed easily.

Oliver

-- 
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux