Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: David Pye <dmp@davidmpye.dyndns.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] J5000 LCD patch
Date: Wed, 23 Mar 2005 13:18:31 -0700	[thread overview]
Message-ID: <20050323201831.GC10544@colo.lackof.org> (raw)
In-Reply-To: <200503231855.10502.dmp@davidmpye.dyndns.org>

On Wed, Mar 23, 2005 at 06:55:07PM +0000, David Pye wrote:
> It can DEFINITELY be improved further, primarily by increasing the delay 
> between rescheduling the work queue item, so reducing CPU util.  I'll submit 
> a later patch for that pending feedback on this one, which is of course very 
> welcome!

one nit after quickly glancing at it:
> +static int led_wq_created = 0;
> +static struct workqueue_struct *led_wq;

led_wq_created isn't needed. Just test led_wq != NULL.

> +	unsigned long wait_jiffies = (lcd_info.min_cmd_delay / 1000000) * HZ;

Won't this work out to be zero?
ISTR min_cmd_delay was "40" or something like that.

grundler <532>fgrep min_cmd_delay drivers/parisc/led.c
        unsigned int min_cmd_delay;     /* delay in uS after cmd-write (LCD only) */
        .min_cmd_delay =        40,
...

Yeah. You want (lcd_info.min_cmd_delay * 1000000)/HZ and this needs
to be rounded up.

> +	for (i=0; i<4; ++i) {
> +		if ((leds & mask[i]) != (lastleds & mask[i])) {
> +			gsc_writeb( blockp[i]->command, LCD_CMD_REG );
> +			
> +			set_current_state(TASK_UNINTERRUPTIBLE);		
> +			schedule_timeout(wait_jiffies);	
> +
> +			gsc_writeb( leds & mask[i] ? blockp[i]->on : 
> +					blockp[i]->off, LCD_DATA_REG );
> +			
> +			set_current_state(TASK_UNINTERRUPTIBLE);		
> +			schedule_timeout(wait_jiffies);	
> +		}

I like this *alot* better. Very nice.


thanks,
grant
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2005-03-23 20:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 18:55 [parisc-linux] J5000 LCD patch David Pye
2005-03-23 20:18 ` Grant Grundler [this message]
2005-03-24  5:01   ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050323201831.GC10544@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=dmp@davidmpye.dyndns.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox