Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/hp300/dev/diofb.c
RevisionDateAuthorComments
 1.10  01-May-2024  tsutsui Fix topcat(4) problems on some models that cause garbages on screen.

- Make sure that windowmove (hardware BITBLT) ops complete by checking
tc_busywait() before calling putchar functions by MI rasops(9).
It looks CPU accesses against VRAM during windowmove (copy, erase,
and cursor) ops causes unexpected garbages at least on 98543 on HP360,
98547 on HP370, and also on 98543 on 040 HP380 (but not on 98549).

- Handle 'sparse VRAM' on 98543 (and probably 98542) properly:
- Prepare and use own topcat_putchar1_4() function for sparse VRAM.
- Pass proper 'VRAM width' rather than actuall font width to all
windowmove (copycols, erasecols, copyrows, eraserows, and do_cursor)
operation functions.

Now all topcat(4) consoles on 98543 on HP360/HP380 and 98547 on HP370
work fine, and no visible regression on 98549 on HP380 and 98544 on HP360.

Worth to pullup netbsd-10.
 1.9  29-Apr-2024  tsutsui Fix MD allocattr to return proper attributes what MI rasops(9) expects.
 1.8  29-Apr-2024  tsutsui Move a check of topcat(4) specific fb width quirks to topcat.c.

We need to check fb->planes but it's propbed in topcat.c after
common diofb_fbinquire() is called.

Also add a comment that it looks these 1 bpp and 4 bpp boards have
VRAM with sparse address layout and we have to handle
512 pixels per line with 1024 bytes per line.
 1.7  07-Aug-2021  thorpej branches: 1.7.6;
Merge thorpej-cfargs2.
 1.6  24-Apr-2021  thorpej branches: 1.6.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.5  15-Apr-2021  tsutsui Fix two problems on old topcat(4) framebuffers found on HP332/340.

- Fix panic on monochrome framebuffers. They don't have palette registers.
The problem was reported from Anders Gustafsson and also Andrew Gillham
back in 2013:
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000086.html
https://mail-index.netbsd.org/port-hp300/2013/09/28/msg000087.html
- Fix incorrect framebuffer width of 98542/98544 framebuffers on HP332.
Reported from Andrew Gillham (98542) as above and Chris Hanson (98543):
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000083.html
https://mail-index.netbsd.org/port-hp300/2020/05/01/msg000164.html

Worth to pullup to netbsd-9.
 1.4  24-Mar-2014  christos branches: 1.4.34; 1.4.44;
- remove unused
- use cpu_{g,s}etmodel
 1.3  18-Feb-2011  tsutsui branches: 1.3.2; 1.3.6; 1.3.8; 1.3.18; 1.3.22;
Use aprint_normal(9) and variants.
 1.2  12-Feb-2011  tsutsui - make local functions static
- some KNF
 1.1  06-Feb-2011  tsutsui branches: 1.1.2;
Switch NetBSD/hp300 to wscons with rasops. Simply ported from OpenBSD/hp300.

- Only A1416 Kathmandu (topcat) framebuffer on 425t is tested, but
all other variants (TigerShark, Hyperion, DaVinci, GatorBox, Renaissance)
should also work if they are working on OpenBSD/hp300.
- sti(4) and SGC bus support are not pulled because I don't have 425e
and I can't confirm that 362 and 382 actually have SGC bus.
(I'll commit a DIO based dumb driver for 362 and 382 framebuffers later)
- Xorg server with wsfb driver will also be integrated soon
once after keycode with NoSymbol problem is addressed.
(We have to re-think what code should be used on WSDISPLAY_COMPAT_RAWKBD)
- MI HIL keyboard and mouse drivers are working fine though
cngetc via hilkbd has some problem (still we can input commands).
- No old HP-UX like HIL ioctl compatibility (we removed COMPAT_HPUX anyway).
grfinfo(8) and hilinfo(8) will be removed shortly.

Demonstrated on NetBSD booth at Open Source Conference 2011 Kagawa.
 1.1.2.4  05-Mar-2011  bouyer Sync with HEAD
 1.1.2.3  17-Feb-2011  bouyer Sync with HEAD
 1.1.2.2  08-Feb-2011  bouyer Sync with HEAD
 1.1.2.1  06-Feb-2011  bouyer file diofb.c was added on branch bouyer-quota2 on 2011-02-08 16:19:20 +0000
 1.3.22.1  18-May-2014  rmind sync with head
 1.3.18.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.2  06-Jun-2011  jruoho Sync with HEAD.
 1.3.6.1  18-Feb-2011  jruoho file diofb.c was added on branch jruoho-x86intr on 2011-06-06 09:05:35 +0000
 1.3.2.2  05-Mar-2011  rmind sync with head
 1.3.2.1  18-Feb-2011  rmind file diofb.c was added on branch rmind-uvmplock on 2011-03-05 20:50:20 +0000
 1.4.44.2  17-Apr-2021  thorpej Sync with HEAD.
 1.4.44.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.34.1  21-Apr-2021  martin Pull up following revision(s) (requested by tsutsui in ticket #1248):

sys/arch/hp300/dev/topcat.c: revision 1.5
sys/arch/hp300/dev/diofb.c: revision 1.5

Fix two problems on old topcat(4) framebuffers found on HP332/340.

- Fix panic on monochrome framebuffers. They don't have palette registers.
The problem was reported from Anders Gustafsson and also Andrew Gillham
back in 2013:
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000086.html
https://mail-index.netbsd.org/port-hp300/2013/09/28/msg000087.html

- Fix incorrect framebuffer width of 98542/98544 framebuffers on HP332.
Reported from Andrew Gillham (98542) as above and Chris Hanson (98543):
https://mail-index.netbsd.org/port-hp300/2013/09/27/msg000083.html
https://mail-index.netbsd.org/port-hp300/2020/05/01/msg000164.html

Worth to pullup to netbsd-9.
 1.6.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.7.6.1  16-May-2024  martin Pull up following revision(s) (requested by tsutsui in ticket #690):

sys/arch/hp300/dev/topcat.c: revision 1.7
sys/arch/hp300/dev/topcat.c: revision 1.8
sys/arch/hp300/dev/topcat.c: revision 1.9
sys/arch/hp300/dev/diofb.c: revision 1.8
sys/arch/hp300/dev/diofb.c: revision 1.9
sys/arch/hp300/dev/diofb.c: revision 1.10
sys/arch/hp300/dev/topcat.c: revision 1.10
sys/arch/hp300/dev/topcat.c: revision 1.11
sys/arch/hp300/dev/topcat.c: revision 1.12
sys/arch/hp300/dev/topcatreg.h: revision 1.5
distrib/notes/hp300/hardware: revision 1.28
sys/arch/hp300/dev/diofbvar.h: revision 1.5
share/man/man4/man4.hp300/topcat.4: revision 1.8

Increase DELAY() for waitbusy macroes as pre-wscons and 4.4BSD did.

It looks necessary for sane palette ops at least on HP98543 topcat
on 68030 HP 9000/360.

Move a check of topcat(4) specific fb width quirks to topcat.c.

We need to check fb->planes but it's propbed in topcat.c after
common diofb_fbinquire() is called.

Also add a comment that it looks these 1 bpp and 4 bpp boards have
VRAM with sparse address layout and we have to handle
512 pixels per line with 1024 bytes per line.

Fix MD allocattr to return proper attributes what MI rasops(9) expects.
Use proper planemask per a vaild number of planes.

Check tc_waitbusy() before writing palette registers in topcat_setcolor().
This seems to make palette operations more stable on my HP360 with HP98543.

Add DELAY(9) to make palette register settings stable on 98543 in HP360.
Note 98547 (6 bpp variant) on HP370 (68030 33MHz) doesn't need these
DELAYs so maybe only some old variants (98543 and 98545?) on 020/030
have such restriction (actually only one nop seems enough.)

Fix topcat(4) problems on some models that cause garbages on screen.
- Make sure that windowmove (hardware BITBLT) ops complete by checking
tc_busywait() before calling putchar functions by MI rasops(9).
It looks CPU accesses against VRAM during windowmove (copy, erase,
and cursor) ops causes unexpected garbages at least on 98543 on HP360,
98547 on HP370, and also on 98543 on 040 HP380 (but not on 98549).
- Handle 'sparse VRAM' on 98543 (and probably 98542) properly:
- Prepare and use own topcat_putchar1_4() function for sparse VRAM.
- Pass proper 'VRAM width' rather than actuall font width to all
windowmove (copycols, erasecols, copyrows, eraserows, and do_cursor)
operation functions.
Now all topcat(4) consoles on 98543 on HP360/HP380 and 98547 on HP370
work fine, and no visible regression on 98549 on HP380 and 98544 on HP360.

Note that 98542 and 98543 variants are also supported by topcat(4).

Add 98542 and 98543 framebuffers to supported "Graphics Devices" section.
I hope someone will sync a list of supported devices in port wiki pages
with one in this installation notes.

Add comments about quirks of 98542/98543 framebuffers with 1024x400 pixels.

RSS XML Feed