Source-Changes-HG archive

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

[src/netbsd-9]: src Pull up following revision(s) (requested by rin in ticket...



details:   https://anonhg.NetBSD.org/src/rev/b03653f4d73a
branches:  netbsd-9
changeset: 1000675:b03653f4d73a
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Aug 15 12:21:27 2019 +0000

description:
Pull up following revision(s) (requested by rin in ticket #56):

        sys/dev/rasops/rasops.c: revision 1.120
        sys/dev/rasops/rasops.h: revision 1.40
        sys/dev/rasops/rasops.c: revision 1.121
        sys/dev/rasops/rasops.h: revision 1.41
        sys/dev/rasops/rasops.c: revision 1.122
        sys/dev/rasops/rasops.h: revision 1.42
        sys/dev/rasops/rasops.h: revision 1.43
        sys/dev/rasops/rasops.h: revision 1.44
        sys/dev/rasops/rasops.h: revision 1.45
        sys/dev/rasops/rasops.h: revision 1.46
        sys/dev/rasops/rasops.h: revision 1.47
        sys/dev/rasops/rasops.h: revision 1.48
        sys/dev/rasops/rasops32.c: revision 1.40
        sys/dev/rasops/rasops32.c: revision 1.41
        sys/dev/rasops/rasops32.c: revision 1.42
        sys/dev/rasops/rasops32.c: revision 1.43
        sys/dev/rasops/rasops32.c: revision 1.44
        sys/dev/rasops/rasops32.c: revision 1.45
        sys/dev/rasops/rasops32.c: revision 1.46
        sys/dev/rasops/rasops1-4_putchar.h: revision 1.1
        sys/dev/rasops/rasops1-4_putchar.h: revision 1.2
        sys/dev/rasops/rasops1-4_putchar.h: revision 1.3
        sys/dev/rasops/rasops1_putchar_width.h: revision 1.3
        sys/dev/rasops/rasops1_putchar_width.h: revision 1.4
        sys/dev/rasops/rasops1_putchar_width.h: revision 1.5
        sys/dev/rasops/rasops1_putchar_width.h: revision 1.6
        sys/dev/rasops/README: revision 1.7
        sys/dev/rasops/rasops_putchar_aa.h: revision 1.5
        sys/dev/rasops/rasops_putchar_aa.h: revision 1.6
        sys/dev/rasops/rasops8.c: revision 1.45
        sys/dev/rasops/rasops8.c: revision 1.46
        sys/dev/rasops/rasops8.c: revision 1.47
        sys/dev/rasops/rasops24.c: revision 1.40
        sys/dev/rasops/rasops8.c: revision 1.48
        sys/dev/rasops/rasops24.c: revision 1.41
        sys/dev/rasops/rasops8.c: revision 1.49
        sys/dev/rasops/rasops24.c: revision 1.42
        sys/dev/rasops/rasops24.c: revision 1.43
        sys/dev/rasops/rasops24.c: revision 1.44
        sys/dev/rasops/rasops_masks.c: revision 1.10
        doc/CHANGES: revision 1.2566
        sys/dev/rasops/rasops24.c: revision 1.45
        doc/CHANGES: revision 1.2567
        sys/dev/rasops/rasops24.c: revision 1.46
        sys/dev/rasops/rasops24.c: revision 1.47
        sys/dev/rasops/rasops24.c: revision 1.48
        sys/dev/rasops/rasops24.c: revision 1.49
        sys/dev/rasops/rasops_bitops.h: revision 1.19
        sys/dev/rasops/rasops_putchar_aa.h: file removal
        sys/dev/wscons/wsdisplay_vcons.c: revision 1.40
        sys/dev/rasops/rasops8.c: revision 1.50
        sys/dev/rasops/rasops8.c: revision 1.51
        sys/dev/rasops/rasops24.c: revision 1.50
        sys/arch/luna68k/dev/omrasops.c: revision 1.21
        sys/dev/rasops/rasops_bitops.h: revision 1.20
        sys/dev/wsfb/genfb.c: revision 1.68
        sys/dev/rasops/rasops_bitops.h: revision 1.21
        sys/dev/wsfb/genfb.c: revision 1.69
        sys/dev/rasops/rasops_putchar_width.h: revision 1.10
        sys/dev/rasops/rasops_bitops.h: revision 1.22
        sys/dev/rasops/rasops_putchar_width.h: revision 1.11
        sys/dev/rasops/rasops_bitops.h: revision 1.23
        sys/dev/rasops/rasops_putchar_width.h: revision 1.12
        sys/dev/rasops/rasops_bitops.h: revision 1.24
        sys/dev/rasops/rasops_putchar_width.h: revision 1.13
        sys/dev/rasops/rasops_bitops.h: revision 1.25
        sys/dev/rasops/rasops_putchar_width.h: revision 1.14
        sys/dev/rasops/rasops_putchar_width.h: revision 1.15
        sys/dev/rasops/rasops1.c: revision 1.32
        sys/dev/rasops/rasops1.c: revision 1.33
        sys/dev/rasops/rasops1.c: revision 1.34
        sys/dev/rasops/rasops1.c: revision 1.35
        sys/dev/rasops/rasops1.c: revision 1.36
        sys/dev/rasops/rasops1.c: revision 1.37
        sys/dev/rasops/rasops4.c: revision 1.21
        sys/dev/rasops/rasops4.c: revision 1.22
        sys/dev/rasops/rasops4.c: revision 1.23
        sys/dev/rasops/rasops4.c: revision 1.24
        sys/dev/rasops/rasops4.c: revision 1.25
        sys/dev/rasops/rasops4.c: revision 1.26
        sys/dev/rasops/rasops4.c: revision 1.27
        sys/dev/rasops/rasops4.c: revision 1.28
        sys/dev/wsfb/genfb.c: revision 1.70
        sys/dev/rasops/rasops2.c: revision 1.27
        sys/dev/rasops/rasops2.c: revision 1.28
        share/man/man9/rasops.9: revision 1.18
        sys/dev/rasops/rasops.c: revision 1.102
        sys/dev/rasops/rasops2.c: revision 1.29
        share/man/man9/rasops.9: revision 1.19
        sys/dev/rasops/rasops.c: revision 1.103
        sys/dev/rasops/rasops.c: revision 1.104
        sys/dev/rasops/rasops.c: revision 1.105
        sys/dev/rasops/rasops.c: revision 1.106
        sys/dev/rasops/rasops.c: revision 1.107
        sys/dev/rasops/rasops_putchar.h: revision 1.6
        sys/dev/rasops/rasops.c: revision 1.108
        sys/dev/rasops/rasops_putchar.h: revision 1.7
        sys/dev/rasops/rasops.c: revision 1.109
        sys/dev/rasops/rasops_putchar.h: revision 1.8
        sys/dev/rasops/rasops2.c: revision 1.30
        sys/dev/rasops/rasops2.c: revision 1.31
        sys/dev/rasops/rasops15.c: revision 1.32
        sys/dev/rasops/rasops2.c: revision 1.32
        sys/dev/rasops/rasops15.c: revision 1.33
        sys/dev/rasops/rasops2.c: revision 1.33
        sys/dev/rasops/rasops15.c: revision 1.34
        sys/dev/rasops/rasops15.c: revision 1.35
        sys/dev/rasops/rasops15.c: revision 1.36
        sys/dev/rasops/rasops.c: revision 1.110
        sys/dev/rasops/rasops15.c: revision 1.37
        sys/dev/rasops/rasops.c: revision 1.111
        sys/dev/rasops/rasops15.c: revision 1.38
        sys/dev/rasops/rasops.c: revision 1.112
        sys/dev/rasops/rasops15.c: revision 1.39
        sys/dev/rasops/rasops.c: revision 1.113
        sys/dev/rasops/rasops.c: revision 1.114
        sys/dev/rasops/rasops.c: revision 1.115
        sys/dev/rasops/rasops_masks.h: revision 1.9
        sys/dev/rasops/rasops.c: revision 1.116
        sys/dev/rasops/rasops.c: revision 1.117
        sys/dev/rasops/rasops.c: revision 1.118
        sys/dev/rasops/rasops.c: revision 1.119
        sys/dev/rasops/rasops.h: revision 1.39

Misc clean-up's:
- protect private stuff in rasops.h by _RASOPS_PRIVATE
- staticify rasops_copycols() and rasops_isgray[]
- G/C unused extern int cold
Switch to per-device stamp, and retire stamp_mutex.

Provide buffer capable of single-row pixels in order to make things simpler.

Factor out copy-paste. No functional changes.
When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:
https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58
4 is 1 << 2, not 1 << 3...

Fix erasecols and do_cursor for font width >= 32 bits.
Also, some cosmetic clean-up's.

Oops, for rasops_copycols(), we cannot use memmove even if src == dst.
On the other hand, memmove is safe for rasops_copyrows().
Fix unaligned writes to buffer, that are introduced in 1.105:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.105

Support font width 32 on monochrome screen.

Remove duplicate substitution. Style. No functional changes.

Correct copy count. This affects ``left-to-right'' copy for region
including word boundary.

Fix a bug in shadow fb support for copycols on 1, 2, and 4bpp screen,
which was introduced in 1.18:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops_bitops.h#rev1.18

Add general putchar functions for 2 and 4bpp.
Note that 1bpp continues to use its local version in rasops1.c,
which is much faster and simpler.

Cosmetic changes. No functional changes.

Reflect reality.

Notify size of shadow framebuffer if enabled.

Fix unaligned word write's to buffer, introduced in rev 1.42:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops24.c#rev1.42

Real fix for 24-bpp color:
- 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).

Protect rasops_copy{rows,cols}() by _RASOPS_PRIVATE.

Use _KERNEL_OPT.

Simplify calculation for 12-byte alignment.
No functional changes.

Fix black color-attribution for depths 2 and 4.

Depth 2 is monochrome.
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.

Fix a critical bug for rasops_copyrows() introduced in rev. 1.90:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.90
When src < dst, we have to copy backward.

Simplify rasops_do_cursor():
- 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.

Use "hp" instead of "hrp" consistently with other files.
No functional changes.

Stop allocating ri_buf and ri_stamp dynamically. As commented in
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.

Oops, revert an unintentional change for now.

If RI_CLEAR is set, do not forget to clear real framebuffer.

Modify struct rasops_info again (ride 9.99.4 bump).
- 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!

Scaling dimensions of underline by font height.

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.

Merge rasops_putchar_aa.h into rasops_putchar.h.

Support scaling underline dimensions by font height.

Separate general putchar for 1-4bpp from rasops_bitops:
- Support anti-aliasing for 2bpp, which works perfectly!
- Support scaling underline dimensions with font height.

We support anti-aliasing for depth 2.
Use switch appropriately.
- Stop showing struct rasops_info; readers can read the header itself.
- Correct description for optimized font widths.
- Remove strange blank line.

Try to improve formatting and naration.

Make rasops_erase{rows,cols}() public again; hp300/diofb uses them.
Pointed out by martin.

When legacy Apple 4-bpp color palette is used, make green dark so that
kernel messages are printed nicely on white background.

Fix color range overflow; we cannot make bright colors more brighter.

Correctly check whether character is in font in rasops_mapchar().
Also, make sure that in putchar functions for completeness.

Fix bug introduced in rev. 1.69:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69
is_bgr should be initialized to false. Otherwise, color becomes strange
for depths 24 and 32 unless backend explicitly set "is_bgr" property.

Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.
No functional changes since this is not in use (4-bpp is monochrome).

Misc style clean up's.
- 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.

My work for rasops(9) was finished (hopefully).

I will send pull-up request for netbsd-9, if there are no new failures
reported within few days.

Fix format in order not to confuse changes2html script.
Minor improvements of wording for my entry.

When using stamp, drop attributions other than back and foreground
colors so that stamp is not updated unnecessarily.

diffstat:

 share/man/man9/rasops.9                |  137 +---
 sys/arch/luna68k/dev/omrasops.c        |    5 +-
 sys/dev/rasops/README                  |    4 +-
 sys/dev/rasops/rasops.c                |  924 +++++++++++++++-----------------
 sys/dev/rasops/rasops.h                |  143 +++-
 sys/dev/rasops/rasops1-4_putchar.h     |  311 +++++++++++
 sys/dev/rasops/rasops1.c               |  148 +++--
 sys/dev/rasops/rasops15.c              |   56 +-
 sys/dev/rasops/rasops1_putchar_width.h |   95 +-
 sys/dev/rasops/rasops2.c               |  102 ++-
 sys/dev/rasops/rasops24.c              |  257 ++++----
 sys/dev/rasops/rasops32.c              |   58 +-
 sys/dev/rasops/rasops4.c               |   77 +-
 sys/dev/rasops/rasops8.c               |   72 +-
 sys/dev/rasops/rasops_bitops.h         |  229 ++++---
 sys/dev/rasops/rasops_masks.c          |   10 +-
 sys/dev/rasops/rasops_masks.h          |   18 +-
 sys/dev/rasops/rasops_putchar.h        |  158 ++++-
 sys/dev/rasops/rasops_putchar_aa.h     |  218 -------
 sys/dev/rasops/rasops_putchar_width.h  |  108 ++-
 sys/dev/wscons/wsdisplay_vcons.c       |   21 +-
 sys/dev/wsfb/genfb.c                   |   34 +-
 22 files changed, 1732 insertions(+), 1453 deletions(-)

diffs (truncated from 4962 to 300 lines):

diff -r 2cc2527bc664 -r b03653f4d73a share/man/man9/rasops.9
--- a/share/man/man9/rasops.9   Thu Aug 15 09:51:12 2019 +0000
+++ b/share/man/man9/rasops.9   Thu Aug 15 12:21:27 2019 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: rasops.9,v 1.17 2017/07/03 21:28:48 wiz Exp $
+.\"     $NetBSD: rasops.9,v 1.17.8.1 2019/08/15 12:21:27 martin Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 13, 2012
+.Dd August 7, 2019
 .Dt RASOPS 9
 .Os
 .Sh NAME
@@ -42,6 +42,9 @@
 .Fn rasops_init "struct rasops_info *ri" "int wantrows" "int wantcols"
 .Ft int
 .Fn rasops_reconfig "struct rasops_info *ri" "int wantrows" "int wantcols"
+.Pp
+.Cd options RASOPS_DEFAULT_WIDTH=80
+.Cd options RASOPS_DEFAULT_HEIGHT=25
 .Sh DESCRIPTION
 The
 .Nm
@@ -49,86 +52,15 @@
 .Xr wscons 9 .
 .Pp
 The primary data type for using the raster operations is the
-.Em rasops_info
+.Vt rasops_info
 structure in
-.Pa dev/rasops/rasops.h :
-.Bd -literal
-struct rasops_info {
-
-       /*
-        * These must be filled in by the caller
-        */
-       int     ri_depth;       /* depth in bits */
-       u_char  *ri_bits;       /* ptr to bits */
-       int     ri_width;       /* width (pels) */
-       int     ri_height;      /* height (pels) */
-       int     ri_stride;      /* stride in bytes */
-
-       /*
-        * If you want shadow framebuffer support, point ri_hwbits
-        * to the real framebuffer, and ri_bits to the shadow framebuffer
-        */
-       u_char  *ri_hwbits;
-
-       /*
-        * These can optionally be left zeroed out. If you fill ri_font,
-        * but aren't using wsfont, set ri_wsfcookie to -1.
-        */
-       struct  wsdisplay_font *ri_font;
-       int     ri_wsfcookie;   /* wsfont cookie */
-       void    *ri_hw;         /* driver private data */
-       int     ri_crow;        /* cursor row */
-       int     ri_ccol;        /* cursor column */
-       int     ri_flg;         /* various operational flags */
-
-       /*
-        * These are optional and will default if zero. Meaningless
-        * on depths other than 15, 16, 24 and 32 bits per pel. On
-        * 24 bit displays, ri_{r,g,b}num must be 8.
-        */
-       u_char  ri_rnum;        /* number of bits for red */
-       u_char  ri_gnum;        /* number of bits for green */
-       u_char  ri_bnum;        /* number of bits for blue */
-       u_char  ri_rpos;        /* which bit red starts at */
-       u_char  ri_gpos;        /* which bit green starts at */
-       u_char  ri_bpos;        /* which bit blue starts at */
-
-       /*
-        * These are filled in by rasops_init()
-        */
-       int     ri_emuwidth;    /* width we actually care about */
-       int     ri_emuheight;   /* height we actually care about */
-       int     ri_emustride;   /* bytes per row we actually care about */
-       int     ri_rows;        /* number of rows (characters) */
-       int     ri_cols;        /* number of columns (characters) */
-       int     ri_delta;       /* row delta in bytes */
-       int     ri_pelbytes;    /* bytes per pel (may be zero) */
-       int     ri_fontscale;   /* fontheight * fontstride */
-       int     ri_xscale;      /* fontwidth * pelbytes */
-       int     ri_yscale;      /* fontheight * stride */
-       u_char  *ri_origbits;   /* where screen bits actually start */
-       int     ri_xorigin;     /* where ri_bits begins (x) */
-       int     ri_yorigin;     /* where ri_bits begins (y) */
-       int32_t ri_devcmap[16]; /* color -> framebuffer data */
-
-       /*
-        * The emulops you need to use, and the screen caps for wscons
-        */
-       struct  wsdisplay_emulops ri_ops;
-       int     ri_caps;
-
-       /*
-        * Callbacks so we can share some code
-        */
-       void    (*ri_do_cursor)(struct rasops_info *);
-};
-.Ed
+.In dev/rasops/rasops.h .
 .Pp
 Valid values for the
-.Em ri_flg
+.Fa ri_flg
 member are:
 .Pp
-.Bl -tag -offset indent -width RI_ENABLE_ALPHA_XX -compact
+.Bl -tag -width ".Dv RI_ENABLE_ALPHA" -offset indent -compact
 .It Dv RI_FULLCLEAR
 .Fn eraserows
 hack to clear full screen
@@ -152,50 +84,47 @@
 Use this when it is not safe to allocate memory, for example when setting up
 an early console.
 .It Dv RI_ENABLE_ALPHA
-set this if the caller supports anti-aliased fonts in the given colour depth.
+the caller supports anti-aliased fonts in the given colour depth.
 Without this flag
 .Fn rasops_init
 will only pick bitmap fonts.
 .It Dv RI_8BIT_IS_RGB
-set this if the caller uses an R3G3B2 colour map in 8 bit.
+the caller uses an R3G3B2 colour map in 8 bit.
 .Fn rasops_init
-will generate an appropriate ri_devcmap[] but the caller still needs to set up
-the actual colour map.
+will generate an appropriate
+.Fa ri_devcmap Ns Li []
+but the caller still needs to set up the actual colour map.
 .El
 .Sh FUNCTIONS
-.Bl -tag -width compact
-.It Fn rasops_init "ri" "wantrows" "wantcols"
-Initialise a
-.Em rasops_info
+.Fn rasops_init
+initialises a
+.Vt rasops_info
 descriptor.
+.Fn rasops_reconfig
+is used to reconfigure it if parameters have changed in some way.
+.Pp
 The arguments
 .Fa wantrows
 and
 .Fa wantcols
 are the number of rows and columns we'd like.
-In terms of optimization, fonts that are a multiple of 8 pixels wide
-work the best.
-.It Fn rasops_reconfig "ri" "wantrows" "wantcols"
-Reconfigure a
-.Em rasops_info
-descriptor because parameters have changed in some way.
-The arguments
-.Fa wantrows
+Passing zero for either one of them uses the default \(em normally
+80 by 25 but it can be changed with config options
+.Dv RASOPS_DEFAULT_WIDTH
 and
-.Fa wantcols
-are the number of rows and columns we'd like.
-Passing zero for either one of
-them uses the default - normally 80x25 but it can be changed with
-.Bd -literal -offset indent
-options RASOPS_DEFAULT_WIDTH=80
-options RASOPS_DEFAULT_HEIGHT=25
-.Ed
+.Dv RASOPS_DEFAULT_HEIGHT .
+.Pp
+In terms of optimization, bitmap fonts of width 8 or 16 work the best
+for all depths.
+For depths other than 1 the fonts of width 12 are also optimized.
+.Pp
 If calling
 .Fn rasops_reconfig
-to change the font and ri_wsfcookie \*[Ge] 0, you must call
+to change the font and
+.Fa ri_wsfcookie
+is non-negative, you must call
 .Fn wsfont_unlock
-on it, and reset it to -1 (or a new, valid cookie).
-.El
+on it, and reset it to \-1 or a new, valid cookie.
 .Sh CODE REFERENCES
 The rasops subsystem is implemented within the directory
 .Pa sys/dev/rasops .
diff -r 2cc2527bc664 -r b03653f4d73a sys/arch/luna68k/dev/omrasops.c
--- a/sys/arch/luna68k/dev/omrasops.c   Thu Aug 15 09:51:12 2019 +0000
+++ b/sys/arch/luna68k/dev/omrasops.c   Thu Aug 15 12:21:27 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omrasops.c,v 1.20 2018/06/06 01:49:08 maya Exp $ */
+/* $NetBSD: omrasops.c,v 1.20.6.1 2019/08/15 12:21:27 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.20 2018/06/06 01:49:08 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omrasops.c,v 1.20.6.1 2019/08/15 12:21:27 martin Exp $");
 
 /*
  * Designed speficically for 'm68k bitorder';
@@ -1202,7 +1202,6 @@
        ri->ri_cols = ri->ri_emuwidth / ri->ri_font->fontwidth;
        ri->ri_rows = ri->ri_emuheight / ri->ri_font->fontheight;
        ri->ri_emustride = ri->ri_emuwidth * bpp >> 3;
-       ri->ri_delta = ri->ri_stride - ri->ri_emustride;
        ri->ri_ccol = 0;
        ri->ri_crow = 0;
        ri->ri_pelbytes = bpp >> 3;
diff -r 2cc2527bc664 -r b03653f4d73a sys/dev/rasops/README
--- a/sys/dev/rasops/README     Thu Aug 15 09:51:12 2019 +0000
+++ b/sys/dev/rasops/README     Thu Aug 15 12:21:27 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.6 2013/12/02 14:05:51 tsutsui Exp $
+$NetBSD: README,v 1.6.36.1 2019/08/15 12:21:27 martin Exp $
 
 This directory contains `rasops', a set of raster operations intended to
 replace the dev/rcons/raster stuff for both wscons and rcons. It yields
@@ -6,11 +6,9 @@
 
 Issues/TODO:
 
-- There is no generic `putchar' function for 2bpp
 - Color handling for 2bpp is broken
 - 64-bit types are not used on machines that are 64-bit
 - We should never be doing reads/writes of less than 32-bits
-- Flags in attribute values are hardcoded
 - Need a manpage
 - Should handle multiple fonts simulatneously
 - Generate an `empty' box character when we have no match?
diff -r 2cc2527bc664 -r b03653f4d73a sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Thu Aug 15 09:51:12 2019 +0000
+++ b/sys/dev/rasops/rasops.c   Thu Aug 15 12:21:27 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.101 2019/07/30 15:29:40 rin Exp $        */
+/*      $NetBSD: rasops.c,v 1.101.2.1 2019/08/15 12:21:27 martin Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,24 +30,27 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.101 2019/07/30 15:29:40 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.101.2.1 2019/08/15 12:21:27 martin Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_rasops.h"
+#include "opt_wsmsgattrs.h"
 #include "rasops_glue.h"
-#include "opt_wsmsgattrs.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/bswap.h>
 #include <sys/kmem.h>
-#include <sys/systm.h>
-#include <sys/time.h>
 
 #include <machine/endian.h>
 
 #include <dev/wscons/wsdisplayvar.h>
 #include <dev/wscons/wsconsio.h>
 #include <dev/wsfont/wsfont.h>
+
+#define        _RASOPS_PRIVATE
 #include <dev/rasops/rasops.h>
+#include <dev/rasops/rasops_masks.h>   /* XXX for MBE */
 
 #ifndef _KERNEL
 #include <errno.h>
@@ -67,6 +70,16 @@
        int ident;
 };     
 
+static const uint32_t rasops_lmask32[4 + 1] = {
+       MBE(0x00000000), MBE(0x00ffffff), MBE(0x0000ffff), MBE(0x000000ff),
+       MBE(0x00000000),
+};
+
+static const uint32_t rasops_rmask32[4 + 1] = {
+       MBE(0x00000000), MBE(0xff000000), MBE(0xffff0000), MBE(0xffffff00),
+       MBE(0xffffffff),
+};
+
 /* ANSI colormap (R,G,B). Upper 8 are high-intensity */
 const uint8_t rasops_cmap[256 * 3] = {
        0x00, 0x00, 0x00, /* black */
@@ -127,11 +140,9 @@



Home | Main Index | Thread Index | Old Index