Subject: bankeddev for Retina?

From: David C Greene <[email-masked]>

I wanted to try running MW's X11R6 server for the Retina, but
have to recompile the kernel for BANKEDDEVPAGER support.
I did this and the compile stopped because it could not find
sys/bankeddev.h.

Is banked device support still in 1.0, if so, where can I get the
bankeddev.h file?  has anyone gotten MW's server to run under 1.0 yet?

Thanks

---

From: [email-masked]

> I did this and the compile stopped because it could not find

I don't know whether the functionality is still in the 1.0 kernel
(given that they probably changed the vm-system since 0.9, the
necessary code is probably gone in vm/*[ch]. There is a bankeddev.h in
incoming on ftp.eunet.ch, if you really want to try it.

I'd like to clearly warn people with Z2 Retinas: this server will run
*dog* slow, I don't have any code in it to reduce trashing caused by
excess bank switching like I did in the R5 server. For banked chipsets,
you really should go for an X-server that does bank-switching in user-mode,
not my (sun-based)  server that assumes a contigous linearly mapped
framebuffer.

If the picasso grf driver should get ready in time, the server should run
on that board. Note that there is a critical error in the (at least 0.9) 
grfioctl.h file: GRFIOCBITBLT should be:
#define GRFIOCBITBLT    _IOW('G', 57, struct grf_bitblt)
it was defined as _IOR before, which caused the kernel not to copy the argument
into kernel space, and thus the functions dealing with it would have had to
deal with completely random data... They did not, because the second bug, 
in grf.c, prevented any bitblt-handler to be called at all...:
          case GRFIOCGSPRITEINF:
          case GRFIOCGSPRITEMAX:
+         case GRFIOCBITBLT:
                return grfdev[gp->g_type].gd_mode (gp, GM_GRFIOCTL, cmd, data);

          default:
                /* check to see whether it's a command recognized by the
                   view code if the unit is 0 XXX */

1.0 maintainers: please check that these bugs are gone there too...

Ciao,
-Markus
-- 
EUnet Switzerland   Tel:     +41 1 291 45 80	Markus Wild
Zweierstrasse 35    Hotline: +41 1 291 45 60	[email-masked]
CH-8004 Zuerich	    Fax:     +41 1 291 46 42	S=mw;P=EUnet;A=EUnet;C=CH
>Solaris 2 is not an upgrade from Solaris 1. They just want you to THINK it is.

---

From: [email-masked] (Niklas Hallqvist)

>>>>> "Chris" == chopps  <[email-masked]> writes:

>> bankeddev.h file?  has anyone gotten MW's server to run under 1.0

Chris> Oh BTW the reason its needed I suspect is that the retina Z3 is
Chris> addresses as a flat memory device unlike the Z2 which uses
Chris> banks of 64k.  The BANKEDDEV code faulted the correct bank in.
Chris> The problem is that the code is usuall much slower.  Consider
Chris> drawing a circle.

Chris> On a banked system you would optimize by drawing only once per
Chris> bank however on a flat system you just do the fastest
Chris> algorithm.  The later gererally causes many faults/banks
Chris> switches as I understand it.

This may be all moot, but...

Wouldn't it be possible to lazily do all operations in some sort of
bank cache.  When a fault occurs in a bank not cached, save the
previously mapped bank, if modified, in the cache, schedule the bank
for update later and map the copy instead of the bank being lost.  Then
map the new bank.  Maintain a modified bit for the banks.  Scheduled
banks for update could be handled at the next vbl or maybe even a
vbl later than that.

I'm not ready to go ahead with this.  I just thought I should throw out
a weird idea.

However, I have seen a real bug I think.  The Z2 Retina seems only to
allow 16K of chars sized screens.  Shouldn't it allow 32K?  If I change
to a 158x126 mode I've done the lower part of the screen (approx after
16K) contains the test pattern put out in rt_load_mon.  My guess is that
a signed short is used where an unsigned should be, but I haven't had
the time to look deep enough to find this.

Another problem I've had is that for some time the Xamiga+retina haven't
worked (the screen get's into a weird mode, it's impossible to reset the
server with the keyboard reset sequence, and ktracing it will not sync
the ktrace.out to disk thus making it impossible for me to see where).
As I don't use X, I don't know when this started for me.  Do someone else
still run Xamiga+retina?

Niklas