summaryrefslogtreecommitdiff
path: root/sys/dev/rasops
AgeCommit message (Collapse)Author
2022-05-29s/littel/little/ mainly in copy pasted comments.andvar
2022-05-15rasops: fix automagic box chars for stride > 1 on little endianuwe
This makes DEC line drawing (acsc) work correctly for "iso" fonts of large sizes, e.g. spleen16x32 on x86.
2022-05-15rasops_mapchar: cosmetics, same object code.uwe
Don't hide the important function call inside an if condition. Don't reuse a variable, changing what it means in the middle of an expression.
2022-05-15rasops: make autogenerated box drawing chars actually useduwe
Fix mapchar to use PICK_FONT() to match what putchar does. Otherwise putchar will never get to see the glyph codes for the autogenerated box drawing chars.
2021-12-24wsfb: Prefer wide fonts when EDID data is available.jmcneill
To give us a better chance of picking a readable font, prefer fonts that will render at least 3mm wide instead of picking the font that will be closest to that size.
2021-10-04rasops_reconfig: Do not abort even if font stride is not supported byrin
rasops_make_box_chars_*() functions; Stop using ri_optfont instead. XXX Add rasops_make_box_chars_24().
2020-07-02Remove pointless cast; dp is already uint32_t *.rin
No functional changes intended.
2019-11-02Fix "Alignment Fault 3" kernel failure of NetBSD/zaurus 8.1 GENERIC.tsutsui
#ifdef switch per kernel config options in definition of device driver structure in header files could be problematic. See my post in port-zaurus@ for details: https://mail-index.netbsd.org/port-zaurus/2019/10/31/msg000079.html Should be pulled up to netbsd-8 and netbsd-9.
2019-08-14When using stamp, drop attributions other than back and foregroundrin
colors so that stamp is not updated unnecessarily.
2019-08-10Misc style clean up's.rin
- Introduce and use proper macros. - Use not ambiguous variable names. - Unify similar functions as possible as I can. - G/C unused headers. - Use #include <dev/rasops/foo.h> instead of "foo.h" No particular functional changes intended.
2019-08-10Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.rin
No functional changes since this is not in use (4-bpp is monochrome).
2019-08-09Correctly check whether character is in font in rasops_mapchar().rin
Also, make sure that in putchar functions for completeness.
2019-08-09Fix color range overflow; we cannot make bright colors more brighter.rin
2019-08-09When legacy Apple 4-bpp color palette is used, make green dark so thatrin
kernel messages are printed nicely on white background.
2019-08-07Make rasops_erase{rows,cols}() public again; hp300/diofb uses them.rin
Pointed out by martin.
2019-08-07Separate general putchar for 1-4bpp from rasops_bitops:rin
- Support anti-aliasing for 2bpp, which works perfectly! - Support scaling underline dimensions with font height.
2019-08-07Merge rasops_putchar_aa.h into rasops_putchar.h.rin
Support scaling underline dimensions by font height.
2019-08-07Scaling dimensions of underline by font height.rin
Currently, - offset of underline is fixed to 1-row from bottom of characters, and - height of underline is fixed to 1. Both are good for standard 8x16 fonts. However, it is too thin for larger fonts, especially when used on display of high resolution. Also, 1-row offset of underline is ugly for small fonts, e.g., spleen5x8. Therefore, adjust offset and height as, - no changes for standard 16-height fonts. - scaling by font height for larger fonts. - set offset to zero for fonts of height smaller than 16.
2019-08-07Modify struct rasops_info again (ride 9.99.4 bump).rin
- remove ri_buf and friends. - remove ri_stamp and frieds. - introduce ri_ul, which will be used for scaling underline with font. Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta, which was only used rasops routines internally. Now, size and offsets of all members of struct rasops_info become same with netbsd-9, -8, and -7, again. So we can safelly pull up fixes to any release branches!
2019-08-07If RI_CLEAR is set, do not forget to clear real framebuffer.rin
2019-08-07Oops, revert an unintentional change for now.rin
2019-08-07Stop allocating ri_buf and ri_stamp dynamically. As commented inrin
rasops.h, it is not safe to use kmem_alloc(9) in rasops_init(); rasops routines can be used for early putchar, which means that UVM is not fully initialized. Should fix a problem reported by macallan: http://mail-index.netbsd.org/tech-kern/2019/08/02/msg025327.html Instead of using ri_buf, inline function rasops_memcpy32() is introduced to fill 32bit data efficiently. Instead of using ri_stamp (per device stamp), stamp_ri is introduced to distinguish for which device stamp is calculated.
2019-08-07Use "hp" instead of "hrp" consistently with other files.rin
No functional changes.
2019-08-07Simplify rasops_do_cursor():rin
- Use static masks similar to that used in rasops_bitops.h, rather than generating them on the fly. - Use pointer for proper type to avoid unnecessary casts.
2019-08-07Fix a critical bug for rasops_copyrows() introduced in rev. 1.90:rin
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.90 When src < dst, we have to copy backward.
2019-08-07Depth 2 is monochrome.rin
IMO, it is impossible to support ANSI colors on 2-bpp display; fore- and background can be same value even if they are different colors logically.
2019-08-07Fix black color-attribution for depths 2 and 4.rin
2019-08-07Simplify calculation for 12-byte alignment.rin
No functional changes.
2019-08-07Use _KERNEL_OPT.rin
2019-08-03Protect rasops_copy{rows,cols}() by _RASOPS_PRIVATE.rin
2019-08-02Real fix for 24-bpp color:rin
- When centering screen, locate effective base address of framebuffer to both word and 24-bit color boundary. - Consistently convert ri_devcmap to ``big endian'' if not RI_BSWAP. Also, fix possible bug for 15/16-bpp with RI_BSWAP (not tested).
2019-08-02Fix unaligned word write's to buffer, introduced in rev 1.42:rin
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops24.c#rev1.42
2019-08-02Reflect reality.rin
2019-08-02Cosmetic changes. No functional changes.rin
2019-08-02Add general putchar functions for 2 and 4bpp.rin
Note that 1bpp continues to use its local version in rasops1.c, which is much faster and simpler.
2019-08-02Fix a bug in shadow fb support for copycols on 1, 2, and 4bpp screen,rin
which was introduced in 1.18: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops_bitops.h#rev1.18
2019-08-02Correct copy count. This affects ``left-to-right'' copy for regionrin
including word boundary.
2019-08-02Remove duplicate substitution. Style. No functional changes.rin
2019-08-02Support font width 32 on monochrome screen.rin
2019-08-02Fix unaligned writes to buffer, that are introduced in 1.105:rin
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.105
2019-08-02Oops, for rasops_copycols(), we cannot use memmove even if src == dst.rin
On the other hand, memmove is safe for rasops_copyrows().
2019-08-01Fix erasecols and do_cursor for font width >= 32 bits.rin
Also, some cosmetic clean-up's.
2019-08-014 is 1 << 2, not 1 << 3...rin
2019-07-31Factor out copy-paste. No functional changes.rin
2019-07-31Provide buffer capable of single-row pixels in order to make things simpler.rin
XXX Bump kernel version for rasops_info later.
2019-07-31Reduce memcpy.rin
2019-07-31G/C ri_delta.rin
XXX Bump kernel version after other changes for struct rasops_info.
2019-07-31Switch to per-device stamp, and retire stamp_mutex.rin
XXX Bump kernel version after other changes for struct rasops_info.
2019-07-31Misc clean-up's:rin
- protect private stuff in rasops.h by _RASOPS_PRIVATE - staticify rasops_copycols() and rasops_isgray[] - G/C unused extern int cold
2019-07-30Try to improve performance when shadow framebuffer is present;rin
Use block copy from shadow fb to real fb, instead of repeating the same operations to two fb's.