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

Re: J5000 LCD heartbeat

On Sunday 20 March 2005 20:03, Thibaut VARENE wrote:
> On Sun, 20 Mar 2005 19:52:29 +0000
> David Pye <dmp@davidmpye.dyndns.org> wrote:
> > Hi, and thanks for your reply.
> >
> > On Sunday 20 March 2005 19:40, you wrote:
> > > > I think I have an idea that it's related to CPU1 init, but I haven't
> > > > confirmed this yet - depending on your feedback to the idea below, I
> > > > won't bother tracing it down.
> > >
> > > Don't bother. I have that kind of message left on my j5k LCD has well,
> > > that's been there for ages, without problem.

> it's not that simple.
> If you want to have it gone, add
> @reboot echo "" > /proc/pdc/lcd
> in your root crontab :)

I think that's a perfectly acceptable solution for me, so I've done that. 

> > > > Did you have any hints you could give me as to fix my very
> > > > occasional heartbeat issue either?
> > >
> > > I recall that the LCD heartbeat is quite slow on my j5k as well, but
> > > nothing really awful, afaicr.
> >
> > Well, here it's sufficiently slow to be utterly useless as a heartbeat,
> > anyway. It usually flips state every 10-30 seconds, depending on how it
> > feels. It certainly doesn't boot.
> >
> > I realise the LCD functionality is something fairly minor, and that I'm
> > being picky, but I'd be happy to invest some time to do some fine
> > tuning.  The only two must-haves for me is to nail the INI CC01 message
> > being displayed over the Linux kernel version display, and preferably to
> > make my heart beat too ;)
> The LED/LCD driver uses tasklets, which are quite CPU expensive. I think
> this is one of the reason the heartbeat is slow. Though 30s seems alot to
> me either.

Well, I've had a bit of a play with this, and think I have a feel of what 
causes it.  

The led_LCD_driver() fires each time the tasklet decides the led statuses 
should change, but each time it only updates at best one of the four LEDs.

Every time it fires, it either updates one led, or it writes the command 
register, to avoid sleeping.   This means, that it requires eight fires of 
the tasklet (and eight times of it having decided an LCD state should flip) 
before the heartbeat will be written to.  It seems to be a rare occasion that 
these all line up (most of the time the heartbeat has pulsed back to its 
previous state before the LCD panel itself gets updated.

I'm wondering whether it's worth doing one of the following:

Add a separate workqueue and use that instead of the tasklet, as the workqueue 
function can sleep, update the heartbeat each time it fires, as well as any 
of the other LEDs that have changed state.

Add a single workqueue item for the heartbeat LED and use the tasklet to 
handle the rest of the LEDs, as it seems to do an acceptable job for them.

What are your thoughts on that?



> Thibaut VARENE
> The PA/Linux Team
> http://www.pateam.org/

Attachment: pgpXz3Ql3PIkT.pgp
Description: PGP signature

Reply to: