Port-amiga archive

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

Re: a hint on /dev/grf3 problems..



On Thu, Jun 24, 1999 at 10:58:54AM -0600, Michael L. Hitch wrote:
> > Some driver(s) switch back to text mode when this happens, but most do not,
> > I think.
> 
>   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.

Can the people affected please try this patch ASAP (with DIAGNOSTIC
added back)? You'll need a make clean, as DIAGNOSTIC is not defopt'ed
(and DIAGNOSTIC code is scattered over all the kernel, so it is
not clear which one triggeres the problem).

For those without kernel build capabilities or slow compilers, I
will provide a test kernel on ftp.netbsd.org.

[This has to happen this weekend, to allow the patch to go into 1.4.1.]

Regards,
        Ignatios



Home | Main Index | Thread Index | Old Index