[iPAQ] Decreasing frame rate on an h3600

From: Justin (Gus) Hurwitz <ghurwitz.a.t.dyndns.com>
Date: Mon May 06 2002 - 15:12:48 EDT

I've put together a wonderfully well-working system on my iPAQ, for a
special-purpose monitoring application. It's running 2.4.18-rmk3-hh2, with
Xvnc/fbvnc and dillo. Network connectivity is provided via a PCMCIA
network card (and USB networking for development).

As a few others have noted, under PCMCIA activity the screen flickers.
Looking at previous research into this problem, it appears that a high
frame rate for the LCD controller is a culprit (the real problem being
caused by bus saturation). Indeed, /proc/hal/assets shows the frame rate
to be a huge 70 fps. I've been trying to reduce this to see if that will
solve the problem.

The first thing I tried was adding a /proc/sys/hal/frame_rate interface. I
added to arch/arm/mach-sa1100/h3600_hal.c: (sorry- I don't have the
sources available to generate a diff)

/***********************************************************************************/
/* Proc filesystem interface */
/***********************************************************************************/

+static int frame_rate = 70;

+static int
+frame_rate_procctl(ctl_table *ctl, int write, struct file *filp,
+ void *buffer, size_t *lenp)
+{
+ char buf[16];
+ int len;
+
+ if (write) {
+ h3600_micro_eeprom_write( 82, buffer, lenp);
+ } else {
+ len = sprintf(buf, "%d\n", h3600_micro_eeprom_read( 82, buf, 2 ));
+ if (copy_to_user(buffer, buf, len))
+ return -EFAULT;
+ }
+ return 0;
+}
+
static struct ctl_table h3600_hal_table[3] =
{
        {3, "max_flite_brightness", &max_flite_brightness, sizeof(max_flite_brightness),
         0666, NULL, &proc_dointvec},
+ {4, "frame_rate", NULL, NULL,
+ 0666, NULL, &frame_rate_procctl},
        {0}
};

Now, this didn't work. It didn't work by a long shot. I've played around
with a few different ways of passing data to h3600_micro_eeprom_write(),
but have had no success. The Good News(TM) is that most of the data
reported by /proc/hal/assets is now garbage. Yay. So, my first question
is: does h3600_micro_eeprom_write() work? If so, how? It's not used
anywhere in the kernel, as far as I can tell, so I've no refrence for it-
as far as I know, it might have never been tested.

Next question is- is this a Right Way(TM) to do this, or can anyone think
of a bettwe way to update the frame rate. I assume that I need to reboot
and/or reset the LCD controller (which being integrated will probably
require a reboot, anyhow, eh?) for this change to take effect.

And, my final question is: can someone send me a copy of their
/proc/hal/assets file :) Once I get writes to the eeprom working again,
I'd really like to make the data in the eeprom right again. I just hope
that I didn't overwrite anything I didn't want to.

Thanks,
--Gus

PS- I should probably say what happens when I try to write to the eeprom
with the above patch:
sh-2.05# echo "30" > /proc/sys/hal/frame_rate
[sits here endlessly, or at least for 5+minutes. During this time, I
cannot access the eeprom at all- cat /proc/hal/assets on another terminal
just sits there until I kill the above echo command.]

--
Justin (Gus) Hurwitz
ghurwitz@dyndns.com
ghurwitz@lanl.gov
Received on Mon May 06 21:26:58 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:44:47 EDT