Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/sparc/dev/cgfourteen.c
RevisionDateAuthorComments
 1.99  25-Sep-2024  macallan some minor nits:
- clarify 16bit colour table construction a bit
- print some more hw info
- fix WSDISPLAYIO_GVIDEO
 1.98  12-May-2024  macallan support 16bit / RGB565 colour
 1.97  24-Apr-2024  macallan allow userland to switch to 16bit colour
 1.96  20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.95  13-Jun-2023  macallan - use sx_wait() to avoid stalling the MBus
- request 32bit alignment for glyphcache cells
 1.94  23-May-2023  macallan use macros compatible with xf86-video-suncg14 to issue SX instructions
much more readable, alignment weirdness is handled automatically and code is
interchangable
 1.93  25-May-2022  macallan branches: 1.93.4;
be lazy about clearing the cursor since most likely we're going to overwrite
it anyway. Same logic as in cgsix.
 1.92  17-Dec-2021  macallan only write the mask register if we're actually changing it
 1.91  17-Dec-2021  macallan cg14_invert():
- use only 32bit accesses
- use byte mask / ROPs for partial writes
 1.90  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.89  24-Apr-2021  thorpej branches: 1.89.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.88  11-Aug-2019  macallan branches: 1.88.10;
remove orphaned comment
 1.87  17-Jan-2019  macallan don't crash when we're not the console
 1.86  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.85  25-Jan-2018  macallan branches: 1.85.2; 1.85.4;
do boundary checks when writing cursor sprite colour registers
 1.84  12-Jan-2018  macallan enable font loading
 1.83  06-Jan-2018  macallan support underlines
 1.82  16-Sep-2016  macallan wipe glyph cache as needed when re-entering text mode
now the console is readable again when leaving X
 1.81  02-Jun-2016  macallan branches: 1.81.2;
use DEFATTR if we're not the console and can't init defattr.
should appease clang
TODO: we should really init the glyphcache whith the first screen
 1.80  30-Apr-2016  macallan support anti-aliased fonts, glyphcache etc.
 1.79  25-Jul-2014  dholland branches: 1.79.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.78  23-Apr-2014  macallan rev. 27 SX needs memory referencing instructions written to 64bit aligned
addresses ( my rev. 25 just ignores the lower 3 bits )
so, we zero these bits now
 1.77  16-Mar-2014  dholland branches: 1.77.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.76  14-Aug-2013  macallan comments & whitespace police
 1.75  04-Jun-2013  macallan branches: 1.75.2;
report actual VRAM size in fb_type.fb_size
 1.74  04-Jun-2013  macallan actually map the whole SX IO space instead of just the first page over and
over again (doh)
 1.73  29-May-2013  macallan allow userland to map SX registers and IO space
 1.72  12-Feb-2013  macallan break some more long lines
 1.71  07-Feb-2013  macallan - implement buttom-up copies in cg14_bitblt() so scrolling down works now
- use more registers when copying
- use hardware to draw the cursor
- use putchar() for horizontal scrolling since byte-wise overlapping copy
ops wouldn't be any faster anyway
 1.70  06-Feb-2013  macallan use SX for basic hardware acceleration
not quite complete yet but good enough to be useful
missing things include:
- backwards blits
- ROP support
- the cursor is still drawn by software
 1.69  05-Feb-2013  macallan throw out RASTERCONSOLE goo
 1.68  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.67  11-Jan-2012  macallan branches: 1.67.6;
use rasops_init(0, 0)
 1.66  13-Apr-2011  macallan branches: 1.66.4; 1.66.8;
use the same function whenever we change colour depth
also, when opening the fb device switch to 32bit and back to 8 on close, not
the other way around
 1.65  31-Aug-2010  macallan branches: 1.65.2;
remove shadow framebuffer support, use VCONS_DONT_READ instead
 1.64  10-Jun-2010  macallan Add a couple more hw offset definitions, add an ioctl() to set colour depth
which works like Solaris and Linux, and finally make mmap() behave like an
actual CG14. This should be all we need to get Xorg's suncg14 driver going.
 1.63  08-Jun-2010  macallan get rid of the cg3/cg8 'emulation' kludge since we have the xf86-video-suncg14
driver now
this will probably need some work in cgfourteenmmap() to match what the
driver expects from a cg14
 1.62  27-Aug-2009  macallan branches: 1.62.2; 1.62.4;
use vcons_replay_msgbuf()
 1.61  14-Jul-2009  apb Enclose the argument to #error in quotes, to protect an embedded single
quote. Part of PR 41255 from Kurt Lidl.
 1.60  26-May-2009  macallan use BUS_SPACE_MAP_LARGE to map the framebuffer
 1.59  16-May-2009  cegger KNF, same object code generated
 1.58  16-Apr-2009  macallan use sparc_bus_map_large() to map the framebuffer if we can't find a PROM
mapping - now we won't exhaust the IODEV range and thus prevent other graphics
devices from working.
 1.57  18-Mar-2009  cegger bcopy -> memcpy
 1.56  05-Feb-2009  macallan branches: 1.56.2;
Recycle OBP's framebuffer mapping if available instead of wasting KVA space
by creating our own.
 1.55  12-Dec-2008  macallan some cleanup, add shadowfb support
 1.54  13-Jun-2008  cegger branches: 1.54.4;
use device_lookup_private to get softc
 1.53  17-May-2008  macallan branches: 1.53.2;
struct device * -> device_t
 1.52  17-Oct-2007  garbled branches: 1.52.16; 1.52.18; 1.52.20; 1.52.22;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.51  19-Aug-2007  jdc branches: 1.51.2;
Also print a new line if we are not the console.
 1.50  30-Jul-2007  macallan branches: 1.50.2;
add hardware cursor support
 1.49  30-Jul-2007  macallan add wsdisplay support for cg14
The console will run in 8bit but switch to 32bit in mapped mode so XFree86
with wsfb can run in 24bit colour.
 1.48  04-Mar-2007  christos branches: 1.48.2; 1.48.10; 1.48.12; 1.48.14;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.47  23-Nov-2006  elad branches: 1.47.4;
Always #undef CG14_MAP_REGS, since it opens a security hole (as the comment
says) and should be used only for debugging.

Okay mouse@, christos@.
 1.46  29-Mar-2006  thorpej branches: 1.46.8; 1.46.10;
Use device_cfdata().
 1.45  04-Mar-2006  uwe branches: 1.45.2; 1.45.4; 1.45.6;
s/u_intN_t/uintN_t/
 1.44  19-Jan-2006  he branches: 1.44.2; 1.44.4;
Wrap the definition of cg14_set_rcons_luts() in an #ifdef RASTERCONSOLE,
to allow the INSTALL kernel to build, as it's unused there.
 1.43  19-Jan-2006  he Make this compile again by ensuring that we don't cast away the volatile
qualifier.
 1.42  17-Jan-2006  christos PR/32552: Antonio Bravo: cgfourteen 24-bit support
Original code from der Mouse, posted to the mailing lists by Jakob Menzi.
 1.41  11-Dec-2005  christos branches: 1.41.2;
merge ktrace-lwp.
 1.40  16-Nov-2005  uwe ANSIify function declarations/defintions. Use uint<N>_t.
Propagate "static" to function definitions. Drop trailing whitespace.
Same binary code is produced for GENERIC.MP + KGDB + DDB.
 1.39  04-Jun-2005  tsutsui branches: 1.39.2; 1.39.8;
Fix for gcc -Wcast-qual.
 1.38  13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.37  25-Aug-2003  uwe Undo previous as it broke things.

There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
 1.36  24-Aug-2003  uwe #include "opt_rcons.h"
 1.35  15-Jul-2003  lukem __KERNEL_RCSID()
 1.34  29-Jun-2003  fvdl branches: 1.34.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.33  29-Jun-2003  darrenr More changes for providing lwpid for ktrace (sparc GENERIC built)
 1.32  02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.31  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.30  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.29  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.28  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.27  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.26  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.25  23-Aug-2002  thorpej Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.24  03-Aug-2002  itojun correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.23  03-Apr-2002  darrenr branches: 1.23.2; 1.23.4;
apply patches from PR#10170
 1.22  11-Mar-2002  pk * `bus_type_t' is gone.
* Use BUS_ADDR() where appropriate to encode I/O space and physical
address offset into a `bus_addr_t' value.
* Drop obio_bus_map() since it's now completely equivalent to bus_space_map()
* Use bus_space_map2() to map device space at a fixed virtual address.
* Remove the virtual address argument from sbus_sbus_addr()
 1.21  24-Sep-2001  eeh branches: 1.21.4;
Change bus_space_mmap() signature to the official one.
 1.20  22-Aug-2000  pk branches: 1.20.2; 1.20.4;
Use the framebuffer drivers & header files that now live in /sys/dev/sun.
 1.19  09-Jul-2000  pk Re-arrange headers; drop <machine/cpu.h>.
 1.18  29-Jun-2000  mrg remove include of <vm/vm.h> and <machine/pmap.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.17  26-Jun-2000  simonb Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
 1.16  19-Mar-2000  pk branches: 1.16.4;
Use fb_is_console(); retract fbconstty & fbnode from service.
 1.15  24-Mar-1999  mrg branches: 1.15.8;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.14  19-Nov-1998  mrg fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!
 1.13  29-Jul-1998  pk We no longer need to get the register sets by ourselves.
 1.12  07-Apr-1998  pk bus_space_mmap() has changed to take a `bus_space_handle_t *' argument,
like other bus space methods.
 1.11  21-Mar-1998  pk Account for changed bus attachment scheme.
 1.10  10-Feb-1998  mrg - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
 1.9  05-Feb-1998  mrg initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the sparc portion.

this will be KNF'd shortly. :-)
 1.8  12-Jan-1998  thorpej Update for changes to config.
 1.7  24-May-1997  pk branches: 1.7.8;
Remove all `bustype' arguments from map[io]dev() and REG2PHYS().
 1.6  10-Dec-1996  pk Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
 1.5  13-Oct-1996  christos backout previous kprintf change
 1.4  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3  04-Oct-1996  thorpej Returning ENODEV is not correct in a poll entry point. Instead, since
read/write returns an error, use seltrue().
 1.2  01-Oct-1996  abrown Add cgfourteen_poll() entry point to sync with recent changes in frame
buffer cdev code.
 1.1  30-Sep-1996  abrown Initial commit of cg14 framebuffer driver for Sun4m SPARCs.
- This driver supports the on-board mbus-based cgfourteen (sometimes referred
to as "SX") video hardware present on SS20-class machines.
- It does *not* support any of the SX acceleration features.
- It does support the 8-bit mode of the hardware, and looks to X like
a cgthree.
- It does support the cg6-style hardware cursor, even when running X in
cgthree emulation.
- It does support DPMS power-down of compatible displays on later-revision
cg14's.
- There is code to support the true color (32-bit) mode of the cg14 as
cg8 emulation, but it is disabled by default because it is most likely
broken. #define CG14_CG8 to turn it on.

The driver is not yet installed in the conf files, but I will do so
shortly...
 1.7.8.1  23-Nov-1998  cgd Fix many real and potential security problems with character device
driver mmap routines that did not properly bounds check offsets.
See NetBSD security advisory NetBSD-SA1998-005 for details. Done
as a patch because it's large, and a fair number of bits are different
in -current. (mrg)
 1.15.8.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.16.4.1  30-Jun-2000  simonb Pull up mmap paddr_t/off_t changes from trunk.
 1.20.4.7  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.20.4.6  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.20.4.5  28-Jun-2002  jdolecek hook fbkqfilter to leaf drivers' kqfilter
 1.20.4.4  28-Jun-2002  jdolecek prove kqfilter hook; it's very simple equivalent of seltrue()
 1.20.4.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20.4.2  16-Mar-2002  jdolecek Catch up with -current.
 1.20.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.20.2.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.20.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.21.4.8  11-Nov-2002  nathanw Catch up to -current
 1.21.4.7  18-Oct-2002  nathanw Catch up to -current.
 1.21.4.6  17-Sep-2002  nathanw Catch up to -current.
 1.21.4.5  27-Aug-2002  nathanw Catch up to -current.
 1.21.4.4  13-Aug-2002  nathanw Catch up to -current.
 1.21.4.3  17-Apr-2002  nathanw Catch up to -current.
 1.21.4.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.21.4.1  24-Sep-2001  nathanw file cgfourteen.c was added on branch nathanw_sa on 2002-04-01 07:42:39 +0000
 1.23.4.2  22-Nov-2002  tron Pull up revision 1.25 (requested by martin in ticket #948):
Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.23.4.1  07-Aug-2002  lukem Pull up revision 1.24 (requested by itojun in ticket #616):
correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls. from openbsd
 1.23.2.2  31-Aug-2002  gehenna catch up with -current.
 1.23.2.1  17-May-2002  gehenna Add device switch.
 1.34.2.6  11-Dec-2005  christos Sync with head.
 1.34.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.2.4  04-Feb-2005  skrll Adapt to branch.
 1.34.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.34.2.1  03-Aug-2004  skrll Sync with HEAD
 1.39.8.1  22-Nov-2005  yamt sync with head.
 1.39.2.3  03-Sep-2007  yamt sync with head.
 1.39.2.2  30-Dec-2006  yamt sync with head.
 1.39.2.1  21-Jun-2006  yamt sync with head.
 1.41.2.1  01-Feb-2006  yamt sync with head.
 1.44.4.1  22-Apr-2006  simonb Sync with head.
 1.44.2.1  09-Sep-2006  rpaulo sync with head
 1.45.6.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.45.4.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.45.2.1  01-Apr-2006  yamt sync with head.
 1.46.10.1  10-Dec-2006  yamt sync with head.
 1.46.8.1  12-Jan-2007  ad Sync with head.
 1.47.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.48.14.2  03-Sep-2007  skrll Sync with HEAD.
 1.48.14.1  15-Aug-2007  skrll Sync with HEAD.
 1.48.12.1  07-Aug-2007  matt Sync with HEAD.
 1.48.10.1  03-Oct-2007  garbled Sync with HEAD
 1.48.2.1  20-Aug-2007  ad Sync with HEAD.
 1.50.2.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.51.2.1  06-Nov-2007  matt sync with HEAD
 1.52.22.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.52.20.6  09-Oct-2010  yamt sync with head
 1.52.20.5  11-Aug-2010  yamt sync with head.
 1.52.20.4  16-Sep-2009  yamt sync with head
 1.52.20.3  18-Jul-2009  yamt sync with head.
 1.52.20.2  20-Jun-2009  yamt sync with head
 1.52.20.1  04-May-2009  yamt sync with head.
 1.52.18.2  17-Jun-2008  yamt sync with head.
 1.52.18.1  18-May-2008  yamt sync with head.
 1.52.16.3  17-Jan-2009  mjf Sync with HEAD.
 1.52.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.52.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.53.2.1  18-Jun-2008  simonb Sync with head.
 1.54.4.3  28-Apr-2009  skrll Sync with HEAD.
 1.54.4.2  03-Mar-2009  skrll Sync with HEAD.
 1.54.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.56.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.62.4.3  21-Apr-2011  rmind sync with head
 1.62.4.2  05-Mar-2011  rmind sync with head
 1.62.4.1  03-Jul-2010  rmind sync with head
 1.62.2.2  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.62.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.65.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.66.8.1  18-Feb-2012  mrg merge to -current.
 1.66.4.3  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.66.4.2  30-Oct-2012  yamt sync with head
 1.66.4.1  17-Apr-2012  yamt sync with head
 1.67.6.5  03-Dec-2017  jdolecek update from HEAD
 1.67.6.4  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.67.6.3  23-Jun-2013  tls resync from head
 1.67.6.2  25-Feb-2013  tls resync with head
 1.67.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.75.2.2  18-May-2014  rmind sync with head
 1.75.2.1  28-Aug-2013  rmind sync with head
 1.77.2.1  10-Aug-2014  tls Rebase.
 1.79.4.3  05-Oct-2016  skrll Sync with HEAD
 1.79.4.2  09-Jul-2016  skrll Sync with HEAD
 1.79.4.1  29-May-2016  skrll Sync with HEAD
 1.81.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.85.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.85.4.1  10-Jun-2019  christos Sync with HEAD
 1.85.2.2  18-Jan-2019  pgoyette Synch with HEAD
 1.85.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.88.10.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.89.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.93.4.1  05-Jul-2023  martin Pull up following revision(s) (requested by abs in ticket #224):

sys/dev/wscons/wsdisplay_vconsvar.h: revision 1.34
sys/dev/wscons/wsdisplay_glyphcachevar.h: revision 1.6
sys/arch/sparc/dev/cgfourteen.c: revision 1.94
sys/arch/sparc/dev/cgfourteen.c: revision 1.95
sys/dev/sbus/mgx.c: revision 1.21
sys/dev/sbus/mgx.c: revision 1.22
sys/dev/sbus/mgx.c: revision 1.23
sys/dev/wscons/wsdisplay_vcons.c: revision 1.65
sys/dev/wscons/wsdisplay_vcons.c: revision 1.66
sys/dev/wscons/wsdisplay_glyphcache.c: revision 1.12
sys/arch/sparc/dev/sxvar.h: revision 1.5
sys/arch/sparc/dev/sx.c: revision 1.6
sys/arch/sparc/dev/sx.c: revision 1.7

make vcons_putchar_buffer() return a flag indicating if anything actually
changed, skip the actual drawing op if nothing did

add flags for drivers to requesr R2L bit/byte-ordered fonts, default to
L2R, chack them in vcons_load_font() instead of just trusting that we'd get
what we need

initialize the diagnostic register with the value suggested by the SunOS
header. This sets a bunch of undocumented bits and yields a 10% speed increase
when rendering antialiased text.

use macros compatible with xf86-video-suncg14 to issue SX instructions
much more readable, alignment weirdness is handled automatically and code is
interchangable

allow drivers to specify horizontal alignment of glyph cache cells
for things like SX which have alignment restrictions

add counter to periodically drain the instruction queue in order to avoid
stalling the MBus during long SX operations

adapted from xf86-video-suncg14
- use sx_wait() to avoid stalling the MBus
- request 32bit alignment for glyphcache cells

wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs

following a hunch...
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands

RSS XML Feed