[mythtv] Black screen after program guide

John Harvey john.p.harvey at btinternet.com
Sun Nov 21 09:44:04 UTC 2004

One possibility I was thinking may work is that I know when the screen
should be clear now and we could set the local/global alpha values to 0 to
force the osd to be clear and then reset the local alpha when the OSD should
be drawn. That should avoid this race condition. I can try to implement this
over the next couple of days, though I have never seen this problem so is
suspect it shows up more on newer kernels as well since more people are now
using 2.6 than when 0.1.9 came out.

With my latest patches to Myth (which I should send here soon) it uses the
blt_fill to clear the screen which could by pass an outstanding write from
another process. This could be considered a bug in ivtv though I am not sure
what the defined behaviour between different processes using different entry
points should really be. 
I think it may also be possible for this to occur when they both write to
the osd as well but it is less obvious whether this would occur.
I would much prefer to get to the point where somehow we use X for
everything and don't talk to the ivtv frame buffer direct from myth.


> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org]
> On Behalf Of Isaac Richards
> Sent: 21 November 2004 03:44
> To: Development of mythtv
> Subject: Re: [mythtv] Black screen after program guide
> On Saturday 20 November 2004 07:04 pm, Frank Riley wrote:
> > John Harvey wrote:
> > > Something that is caused by a race condition between 2 parts and then
> > > shows up because one of those changes doesn't meen that thing that
> > > changed is wrong, just that its performance has changed and has
> exposed a
> > > bug (that was always known about) in the other.
> >
> > I agree.
> >
> > John, is it possible to briefly explain this race condition? I'm
> interested
> > in this since I have this same problem.
> As I understand it:
> - Myth's program guide is drawn using X, with the overlay in global alpha
> mode
> (ie, it's all semi-transparent).
> - Myth exits out of the program guide, and stops using X for drawing
> anything.
> - Myth tells the driver to go back into local alpha mode (per-pixel
> transparency, ie, the rest of the OSD).  It also sets the alpha values to
> 0
> (clear).
> The driver used to process this all in order.  It doesn't anymore.  The
> newer
> X driver seems to queue up draw events for longer, so the final X update
> may
> occur after Myth thinks it's done with X and has told the driver to reset
> +
> clear the overlay surface.  This causes the black screen.
> Thinking about it more, we could work around this by clearing the OSD
> _again_
> a quarter second or so after we tell it to the first time.  Wouldn't be
> difficult to do, but it could interfere with real OSD operation so it's
> certainly not the ideal fix.  I won't do it, though, as I haven't used my
> pvr-350 for output for several months now and wouldn't be able to test
> properly.
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list