List Info

Thread: Few Jornada 690 questions




Few Jornada 690 questions
user name
2006-08-13 09:19:47
12.08.06 uweptc.spbu.ru wrote:

Hi, and thanks for the quick reply 

> > And reboots back to WinCE. When I boot with a
serial console, it boots 
> > fine. My Jornada is French, but I don't like
it's keyboard layout, so 
> > I've selected in hpcboot "European",
maybe this is the case (does it 
> > affect only the keyboard layout?).
> 
> Which hpcboot version are you using?

Newest from the CVS (.exe.uue, not compiled by myself).

> > 2. Suspending works okay, but unsuspending does
not turn the display
> > on.  I suspect it can be related to booting with a
serial console.
> 
> Yes, it's a bug in the driver for the hd64461 video.

I've fixed it by copying some stuff from
hd64461video_attach() to the 
power hook. I don't know if all of this is really necessary
(probably 
not), but it works. Patch attached.

> > 3. Is there a program or other possibility to turn
the display off 
> > and on? I've tried wsconsctl -da, but no option
seems to be related.
> 
> I have written small wsblank utility (attached) to turn
it on/off.
> Yes, this functionality should really be integrated
into wsconsctl.

Thanks, it works. I've done some integration, check
wsconsctl.patch.

> > 4. I've calibrated my touch panel using tpctl,
but in X it still 
> > seems to be uncalibrated. Maybe there's an other
utility for X 
> > and other for the console?
> 
> What are the symptoms?  I guess the issue might be that
touchpanel
> readings are not stable when the pen is removed, and
the driver picks
> up a "ghost" move during pen removal.

That's not the case. When I drag the stylus, the cursor
move is related 
to it, but the position is shifted (shift depends on the
position). Take 
a look:

http://gal
lery.miauk.net/n/0014/dsc006.jpg
http://gal
lery.miauk.net/n/0014/dsc007.jpg
http://gal
lery.miauk.net/n/0014/dsc008.jpg
http://gal
lery.miauk.net/n/0014/dsc009.jpg

And by the way, here's the "warm reboot"
message (I know it's not 
readable, but at least the position of the message can be
seen):

http://gal
lery.miauk.net/n/0014/dsc002.jpg

Greetings.

-- 
[ Adam Wysocki :: www.chmurka.net :: +48 514 710 213 ]
[ Software Development Department, ArcaBit Sp. z o.o ]
[ Ul. Fortuny 9 :: 01-339 Warszawa :: www.arcabit.pl ]---
hd64461video.c.old	2006-08-13 11:59:47.000000000 +0200
+++ hd64461video.c	2006-08-13 12:02:44.000000000 +0200
 -1147,6
+1147,15 
 		if (!hvc->console)
 			break; /* serial console */
 		DPRINTF("%s: ON\n",
sc->sc_dev.dv_xname);
+		hd64461video_update_videochip_status(hvc);
+		hd64461video_setup_hpcfbif(hvc);
+		{
+			u_int8_t *p = hvc->off_screen_addr;
+			u_int8_t *end = p + hvc->off_screen_size;
+			while (p < end)
+				*p++ = 0xff;
+		}
+		hd64461video_hwaccel_init(hvc);
 		hd64461video_on(hvc);
 		break;
 	case PWR_SUSPEND:
--- wsconsctl.h.old	2006-08-12 19:01:42.000000000 +0200
+++ wsconsctl.h	2006-08-12 19:01:59.000000000 +0200
 -69,6
+69,7 
 #define FMT_KBMAP	105		/* keyboard map */
 #define FMT_COLOR	201		/* display color */
 #define FMT_ATTRS	202		/* display attributes */
+#define FMT_BLANK	203		/* blanking status */
 	int format;
 #define FLG_RDONLY	0x0001		/* variable cannot be modified
*/
 #define FLG_WRONLY	0x0002		/* variable cannot be displayed
*/
--- util.c.old	2006-08-12 19:02:16.000000000 +0200
+++ util.c	2006-08-12 19:15:22.000000000 +0200
 -321,6
+321,9 
 		if (first)
 			(void)printf("none");
 		break;
+	case FMT_BLANK:
+		(void)printf("%u", (*((unsigned int *)
f->valp) == WSDISPLAYIO_VIDEO_OFF) ? 1 : 0);
+		break;
 	default:
 		errx(EXIT_FAILURE, "internal error: pr_field: no
format %d",
 		    f->format);
 -359,12
+362,27 
 
 	switch (f->format) {
 	case FMT_UINT:
+	case FMT_BLANK:
 		if (sscanf(val, "%u", &u) != 1)
 			errx(EXIT_FAILURE, "%s: not a number",
val);
 		if (merge)
 			*((unsigned int *) f->valp) += u;
 		else
 			*((unsigned int *) f->valp) = u;
+
+		if (f->format == FMT_BLANK) {
+			switch (*((unsigned int *) f->valp)) {
+				case 0:
+					*((unsigned int *) f->valp) =
WSDISPLAYIO_VIDEO_ON;
+					break;
+				case 1:
+					*((unsigned int *) f->valp) =
WSDISPLAYIO_VIDEO_OFF;
+					break;
+				default:
+					errx(EXIT_FAILURE, "%d: should be 0 or 1",
*((unsigned int *) f->valp));
+			}
+		}
+
 		break;
 	case FMT_STRING:
 		if ((*((char **) f->valp) = strdup(val)) == NULL)
--- display.c.old	2006-08-12 18:44:48.000000000 +0200
+++ display.c	2006-08-12 19:15:31.000000000 +0200
 -53,6
+53,7 
 static int dpytype;
 static struct wsdisplay_usefontdata font;
 static struct wsdisplay_param backlight;
+static int blank;
 static struct wsdisplay_param brightness;
 static struct wsdisplay_param contrast;
 static struct wsdisplay_scroll_data scroll_l;
 -65,6
+66,7 
     {
"type",			&dpytype,	FMT_DPYTYPE,	FLG_RDONLY
},
     {
"font",			&font.name,	FMT_STRING,	FLG_WRONLY
},
     { "backlight",		&backlight.curval, 
FMT_UINT,	0 },
+    { "blank",			&blank,		FMT_BLANK,	0 },
     { "brightness",		&brightness.curval,
FMT_UINT,	FLG_MODIFY },
     { "contrast",		&contrast.curval,  
FMT_UINT,	FLG_MODIFY },
     {
"scroll.fastlines",	&scroll_l.fastlines,
FMT_UINT,	FLG_MODIFY },
 -100,6
+102,10 
 			field_disable_by_value(&backlight.curval);
 	}
 
+	if (field_by_value(&blank)->flags & FLG_GET)
+		if (ioctl(fd, WSDISPLAYIO_GVIDEO, &blank) < 0)
+			field_disable_by_value(&blank);
+
 	if (field_by_value(&brightness.curval)->flags &
FLG_GET) {
 		brightness.param = WSDISPLAYIO_PARAM_BRIGHTNESS;
 		if (ioctl(fd, WSDISPLAYIO_GETPARAM, &brightness))
 -177,6
+183,12 
 		pr_field(field_by_value(&backlight.curval), "
-> ");
 	}
 
+	if (field_by_value(&blank)->flags & FLG_SET) {
+		if (ioctl(fd, WSDISPLAYIO_SVIDEO, &blank) < 0)
+			err(EXIT_FAILURE, "WSDISPLAYIO_SVIDEO");
+		pr_field(field_by_value(&blank), " ->
");
+	}
+
 	if (field_by_value(&brightness.curval)->flags &
FLG_SET) {
 		brightness.param = WSDISPLAYIO_PARAM_BRIGHTNESS;
 		if (ioctl(fd, WSDISPLAYIO_SETPARAM, &brightness) <
0)
Few Jornada 690 questions
user name
2006-08-14 02:49:46
On Sun, Aug 13, 2006 at 11:19:47 +0200, Adam Wysocki via
ArcaBit wrote:

> > > And reboots back to WinCE. When I boot with a
serial console, it boots 
> > > fine. My Jornada is French, but I don't like
it's keyboard layout, so 
> > > I've selected in hpcboot
"European", maybe this is the case (does it 
> > > affect only the keyboard layout?).
> > 
> > Which hpcboot version are you using?
> 
> Newest from the CVS (.exe.uue, not compiled by myself).

Hmm, I think the version in CVS has a few bugs.

Try this one:
  http://snark.ptc.spbu.ru/~uwe/netbsd/jo
rnada/hpcboot13-sh3-2006-01-16.zip

(I hate it that hpcboot needs external proprietary tools to
compile,
and so updated in the tree only infrequently.  I can never
quite
rememer which of the source level fixes have made it into
the
committed binary).


> > > 2. Suspending works okay, but unsuspending
does not turn the display
> > > on.  I suspect it can be related to booting
with a serial console.
> > 
> > Yes, it's a bug in the driver for the hd64461
video.
> 
> I've fixed it by copying some stuff from
hd64461video_attach() to the 
> power hook. I don't know if all of this is really
necessary (probably 
> not), but it works. Patch attached.

That's a wrong approach.  I've just committed a fix as
hd64461video.c
rev 1.36.


> > > 3. Is there a program or other possibility to
turn the display off 
> > > and on? I've tried wsconsctl -da, but no
option seems to be related.
> > 
> > I have written small wsblank utility (attached) to
turn it on/off.
> > Yes, this functionality should really be
integrated into wsconsctl.
> 
> Thanks, it works. I've done some integration, check
wsconsctl.patch.

Hmm, it was pointed out to me that we have screenblank(1). 
But it's
1) broken - it doesn't unblank the screen correctly on
keyboard/mouse
activity, and 2) it doens't have one-off non-daemon mode. 
This need a
bit more thought.


> > > 4. I've calibrated my touch panel using
tpctl, but in X it still 
> > > seems to be uncalibrated. Maybe there's an
other utility for X 
> > > and other for the console?
> > 
> > What are the symptoms?  I guess the issue might be
that touchpanel
> > readings are not stable when the pen is removed,
and the driver picks
> > up a "ghost" move during pen removal.
> 
> That's not the case. When I drag the stylus, the
cursor move is related 
> to it, but the position is shifted (shift depends on
the position). Take 
> a look:
> 
> http://gal
lery.miauk.net/n/0014/dsc006.jpg
> http://gal
lery.miauk.net/n/0014/dsc007.jpg
> http://gal
lery.miauk.net/n/0014/dsc008.jpg
> http://gal
lery.miauk.net/n/0014/dsc009.jpg

Strange.  I can only suggest to try some printf-debugging in
j6x0tp.c
Does it work better (if slighly off) if you don't calibrate
the screen
(tpctl=NO).


> And by the way, here's the "warm reboot"
message (I know it's not 
> readable, but at least the position of the message can
be seen):
> 
> http://gal
lery.miauk.net/n/0014/dsc002.jpg

That's printed by the WinCE ROM and is standard.


SY, Uwe
-- 
uweptc.spbu.ru                         |       Zu Grunde
kommen
http://snark.ptc.spbu.
ru/~uwe/          |       Ist zu Grunde gehen
Few Jornada 690 questions
user name
2006-08-16 16:32:31
14.08.06 uweptc.spbu.ru wrote:

Hi 

Sorry for the late reply, but I've been messing around with
my hpc a bit 
- bought 2 GB card, noticed that FFS in NetBSD definitely
doesn't like me 
(the kernel, on i386, occasionally panics when writing to
the card) and 
finally ended up with good, old, Linux ext2 root filesystem
on Jornada.

> Try this one:
>   http://snark.ptc.spbu.ru/~uwe/netbsd/jo
rnada/hpcboot13-sh3-2006-01-16.zip

It still doesn't work, but it's not a big problem - as
long as NetBSD 
eventually boots to the login prompt.

> That's a wrong approach.  I've just committed a fix
as hd64461video.c
> rev 1.36.

It works - quite strange, because I tried unblanking with
wsblank (remotely, 
via ssh, so no typing mistakes are possible) which, as I see
in the ioctl 
handler, also calls hd64461video_on, and it didn't worked.
Anyway, now it's 
okay, thanks.

> > http://gal
lery.miauk.net/n/0014/dsc006.jpg
> > http://gal
lery.miauk.net/n/0014/dsc007.jpg
> > http://gal
lery.miauk.net/n/0014/dsc008.jpg
> > http://gal
lery.miauk.net/n/0014/dsc009.jpg
> 
> Strange.  I can only suggest to try some
printf-debugging in j6x0tp.c
> Does it work better (if slighly off) if you don't
calibrate the screen
> (tpctl=NO).

After removing /etc/tpctl.dat it's still the same. I'll do
some debugging 
in the free time.

By the way, what's the status of the IrDA and the sound
card drivers? And 
one more thing - is there a method to load my custom font?

Best regards.

-- 
[ Adam Wysocki, www.chmurka.net, GSM: +48 514 710 213 ]
[ Software Development Department, ArcaBit Sp. z o.o. ]
[ Ul. Fortuny 9 :: 01-339 Warszawa :: www.arcabit.com ]
Few Jornada 690 questions
user name
2006-08-16 21:32:52
On Wed, Aug 16, 2006 at 18:32:31 +0200, Adam Wysocki via
ArcaBit wrote:

> > That's a wrong approach.  I've just committed a
fix as hd64461video.c
> > rev 1.36.
> 

> It works - quite strange, because I tried unblanking
with wsblank

Well, in that state the driver didn't turn the screen on,
but it
thought it was *not* blanked, so an unblanking request from
wsblank
would be "optimized away".  Blanking it first to
force internal state
update was a workaround.


> By the way, what's the status of the IrDA and the
sound card drivers? And 
> one more thing - is there a method to load my custom
font?

I think there should be some mails from me in the archive. 
To summarize:

* IrDA.

scif(4) has two problems: it's not bus_space'ified, so it
doesn't
support two instances of itself, and there's a bug in the
driver that
causes it to lose incoming chars.  The first problem is easy
to fix,
it's a pretty machnical change.  I had those mods in my
tree, but
didn't want to commit them b/c of the second problem.  The
second
problem can be observed if you try to run ppp over the
serial, or try
to make a dial-out connection, e.g. to cu to another unix
box.
Incoming chars are lost.  I made a few light-hearted
attempts to fix
it, thinking that it could be a simple bug, but to no avail
so far.
So with the mods that address the first problem and allow
you to
attach both scif ports you can talk to IrDA devices, but the
second
problem prevent it progress even through the IrDA handshake
(yes, I
tried ;).

* Sounds

There's no sound *card* in sh3 jornadas.  There's an
on-chip 8-bit DAC
and one of its channels is hooked to the speaker.  You need
to feed
the DAC directly from the CPU.  This means that you need to
have 8K
interrupts per second to play even crappy lo-fi 8KHz 8bit
audio.
There is on-chip DMAC that can do timed transfers using
internal
counter-timer, but attempts to use it wedge the machine
~immediately.
WinCE does not use DMAC to feed DAC.

I gave up on the DMAC approach, and I'm too lazy to do the
brute force
approach, especially as I'm not interested in playing audio
on jornada



SY, Uwe
-- 
uweptc.spbu.ru                         |       Zu Grunde
kommen
http://snark.ptc.spbu.
ru/~uwe/          |       Ist zu Grunde gehen
Few Jornada 690 questions
user name
2006-08-21 19:23:04
17.08.06 uweptc.spbu.ru wrote:

> There's no sound *card* in sh3 jornadas.  There's an
on-chip 8-bit DAC
> and one of its channels is hooked to the speaker.  You
need to feed
> the DAC directly from the CPU.  This means that you
need to have 8K
> interrupts per second to play even crappy lo-fi 8KHz
8bit audio.

I tried to do it in userspace (I'm new to NetBSD so writing
a custom 
driver could be kind of challenge for now) and even managed
to output 
some sound (and learned the hard way that securelevel
greater than 0 
prevents readwrite /dev/mem accesses), but it seems that
there's no 
easy way to get the userspace code executed at 8000 Hz.
NetBSD doesn't 
seem to have a realtime scheduler (seems strange, so maybe
I'm wrong) 
and setitimer() and usleep() on this CPU just doesn't work
at this 
frequency even when reniced to -20. Maximum archieved
frequency, 
both using setitimer() and usleep(), was 32 Hz.

[gophihpcsh ~/src]$ make test && sudo nice -n -20
./test
cc -O   -o test test.c
us=3122254 (should be 1000000), freq=32 (should be 100)

[gophihpcsh ~/src]$ make test2 && sudo nice -n -20
./test2
cc -O   -o test2 test2.c
us=3119995 (should be 1000000), freq=32 (should be 100)

(test.c and test2.c attached)

> There is on-chip DMAC that can do timed transfers using
internal 
> counter-timer, but attempts to use it wedge the machine
~immediately.

Seems promising. Have you tried it with a lower frequency
than 8 kHz? 
Maybe it just didn't worked because of too high frequency.
Do you have 
some details on this controller?

-- 
[ Adam Wysocki, www.chmurka.net, GSM: +48 514 710 213 ]
[ Software Development Department, ArcaBit Sp. z o.o. ]
[ Ul. Fortuny 9 :: 01-339 Warszawa :: www.arcabit.com ]
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )