Subject: Re: a hint on /dev/grf3 problems..
To: None <port-amiga@netbsd.org>
From: Joerg Lehners <Joerg.Lehners@Informatik.Uni-Oldenburg.DE>
List: port-amiga
Date: 06/25/1999 14:33:13
On Thu, 24 Jun 1999, Ignatios Souvatzis wrote:
> On Thu, Jun 24, 1999 at 10:58:54AM -0600, Michael L. Hitch wrote:
[...]
> > It looks like the other ite drivers don't touch any hardware registers,
> > and just stuff the appropriate data into memory. The ite_cl.c driver does
> > a couple of SetTextPlane() calls, which I presume clobber the graphics mode.
> yes. For grf_cl, this is (from ...reg.h):
> #define SetTextPlane(ba, m) \
> do { \
> WGfx(ba, GCT_ID_READ_MAP_SELECT, m & 3 ); \
> WSeq(ba, SEQ_ID_MAP_MASK, (1 << (m & 3))); \
> } while (0)
>
> the Wxxx() calls do accesses to subsets of the VGA registers.
>
> > I just tried the following patch on my system and it seems to cure the
> > problem [just ignores console output while in graphics mode]:
>
> --- /opt/NetBSD-1.4/src/sys/arch/amiga/dev/ite_cl.c Thu Mar 25 19:27:17 1999
> +++ sys/arch/amiga/dev/ite_cl.c Wed Jun 23 19:06:19 1999
> @@ -161,6 +161,8 @@
> unsigned char attr;
> unsigned char *cp;
>
> + if (ip->flags & ITE_INGRF)
> + return;
> attr =(unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07));
> if (mode & ATTR_UL) attr = 0x01; /* ???????? */
> if (mode & ATTR_BOLD) attr |= 0x08;
>
> Thanks Michael... I think you found the problem. I wasn't aware that the
> other vga-style drivers don't touch the registers on text output.
> [...]
I think the modification should not only apply to the function
cl_putc() but also to cl_clear() and cl_scroll().
With the patch above I can reproduce the following effects:
If the cursor is high enough so that the console does not need
to scroll when putting out a kernel message while the X-Server
starts or runs, there are no screen distortions.
If the screen needs to scroll while the X-Server is starting
or running, I'll get a distorted screen.
The kernel I use is custom built, but without changing DIAGNOSTIC.
Joerg
--
Mail: Joerg.Lehners@arbi.Informatik.Uni-Oldenburg.DE
Real: Joerg Lehners, Informatik ARBI, Uni Oldenburg, D-26111 Oldenburg
Unwoerter: Kostensenkung - Gewinnmaximierung - billig, billig, billig