Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/sgimips/dev/crmfb.c
RevisionDateAuthorComments
 1.50  20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.49  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48  24-Apr-2021  thorpej branches: 1.48.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.47  27-Dec-2019  msaitoh branches: 1.47.10;
s/suport/support/
 1.46  22-Dec-2019  thorpej Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.45  17-Mar-2018  jmcneill branches: 1.45.2;
Add support for overriding the video mode by setting an ARCS environment
variable.

If the "crmfb_mode" environment variable is set, treat it as a mode
string in the form WIDTHxHEIGHT[@REFRESH] and generate monitor timings
using the VESA GTF formula. If set, this overrides the EDID preferred
mode.
 1.44  19-May-2017  macallan branches: 1.44.2; 1.44.8;
enable font loading / screen resizing
 1.43  14-Feb-2016  dholland Remove extra stray break missed by Christos when committing PR 50783.
 1.42  08-Feb-2016  christos PR/50783: David Binderman: Indent switch properly, add missing break.
 1.41  23-Sep-2015  macallan no need to set RI_CLEAR - we do our own clearing and rasops assumes a linear
framebuffer anyway. Now we can get away with leaving ri_bits at NULL where it
belongs on this hardware.
 1.40  18-Feb-2015  macallan switch sgimips to common bus_dma and bus_space in arch/mips/
Tested on O2 and Indy.
Things that are compile-tested only for lack of hardware:
- GIO ethernet cards with PCI bridges
- IP2x hardware not found on Indy
- IP1x
 1.39  20-Jan-2015  macallan - remove scratch area, it's been unused since we're drawing characters by
hardware
- don't sync the rendering engine unless we have to, watch FIFO levels
instead
- support anti-aliased fonts and let the drawing engine do all the work
 1.38  02-Sep-2014  macallan branches: 1.38.2;
support ioctl() WSDISPLAYIO_SVIDEO, _GVIDEO and _GET_EDID
now xf86-video-crime can actually turn the monitor off
 1.37  16-Dec-2013  mrg - remove unused variables
- use (void) when we don't care about the return value
 1.36  11-Jan-2012  macallan branches: 1.36.6; 1.36.10;
use rasops_init(0,0)
 1.35  01-Jul-2011  dyoung branches: 1.35.2; 1.35.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.34  17-May-2011  macallan add support for running the console in more than 8 bit
Now modes like 1680x1050 work. The hardware requires a stride of a multiple
of 32 bytes, with 1680 this requires 16bit colour.
 1.33  13-Apr-2011  plunky use PRIx64 for printing 64-bit values
 1.32  07-Apr-2011  macallan add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.
 1.31  04-Apr-2011  macallan remove some old debug code
 1.30  31-Mar-2011  macallan add DDC2 support. Not too useful yet.
 1.29  30-Mar-2011  macallan device_t-ify, use aprint_*_dev() where appropriate
 1.28  01-Mar-2011  macallan use hardware to draw characters, while there use vcons_replay_msgbuf()
 1.27  20-Feb-2011  matt Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
 1.26  30-Jul-2008  tsutsui branches: 1.26.16; 1.26.22; 1.26.24;
Add a BUS_DMASYNC_PREWRITE call against tile's DMA address descriptors.
Fixes mangled screen on recent kernels.
Tested on my R5K IP32 and on R10K IP32 by Jorge Acereda Macia on port-sgimips.
 1.25  08-May-2008  jmcneill branches: 1.25.2; 1.25.4;
Use 2-clause license.
 1.24  18-Mar-2008  jmcneill branches: 1.24.2; 1.24.4; 1.24.6;
Remove debug printf: ``so we need 10 x 8 tiles -> 00500000''
 1.23  15-Mar-2008  jmcneill Swap red and blue for 8bpp paletted mode.
 1.22  02-Mar-2008  macallan allow userland to map all video memory, not just the visible part
 1.21  01-Mar-2008  macallan allocate a linear buffer, don't smoke crack when setting up the engine's TLBs
 1.20  18-Feb-2008  macallan branches: 1.20.2; 1.20.6;
correct accidentially committed garbage (what the hell... )
 1.19  18-Feb-2008  macallan correct typo
 1.18  18-Feb-2008  macallan avoid unnecessary writes to the MTE's direction registers
 1.17  17-Feb-2008  macallan use MTE for rectangle filling as well
TODO: figure out why the MTE freaks out when used for character drawing
 1.16  17-Feb-2008  macallan adjust some register names, also use MTE for scrolling down
 1.15  17-Feb-2008  macallan use the memory transfer engine for scrolling when possible
currently that's only for scrolling upwards but the speedup should be very
noticeable
TODO: use MTE for erase rasops, figure out how to control the MTEs direction
 1.14  10-Feb-2008  macallan bunch of minor fixes:
- use default colour when clearing the screen on attach
- sprinkle some break; so we no longer panic in 32bit colour
- allow userland to mmap() engine registers but not TLBs
- get rid of a delay() in crmfb_wait_idle()
- use aprint_*()
 1.13  06-Feb-2008  macallan get rid of some leftover debugging cruft
 1.12  05-Feb-2008  macallan update (c) sections
 1.11  05-Feb-2008  macallan add hardware acceleration for scrolling and clearing.
The framebuffer is now run in tiled mode so we can use the rendering engine
which means X is broken for now.
This needs more testing.
 1.10  02-Feb-2008  sekiya Allow sync-on-green to be controlled by ARCS environment variable "SyncOnGreen".

Set to anything starting with the letter 'n' to disable sync-on-green, set to
anything else or leave undefined to keep default behavior.
 1.9  02-Dec-2007  jmcneill CRMFB_VT_VCMAP and CRMFB_VT_HCMAP register definitions were transposed.
From jsing@openbsd in private mail.
 1.8  17-Oct-2007  garbled branches: 1.8.2;
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.7  26-Jul-2007  macallan branches: 1.7.4; 1.7.6; 1.7.8;
- move register definitions to crmfbreg.h
- identify as WSDISPLAY_TYPE_CRIME
- always claim we're 32bit
- switch to 32bit colour in WSDISPLAYIO_MODE_MAPPED, switch back to 8bit
in WSDISPLAYIO_MODE_EMUL
- restore palette, turn off the cursor when switching back to console mode
- add a few delay()s, hopefully that will deal with occasional messed up
video timings *fingers crossed*
 1.6  15-Jul-2007  macallan branches: 1.6.2; 1.6.4;
add hardware cursor support
 1.5  15-Apr-2007  jmcneill branches: 1.5.2; 1.5.4; 1.5.6;
We don't support WSDISPLAYIO_[SG]VIDEO, so don't try to hide it.
 1.4  14-Apr-2007  martin branches: 1.4.2;
Avoid crashing if booting via serial console
 1.3  13-Apr-2007  jmcneill Add shadow framebuffer support; scrolling the screen still isn't great,
but it's noticeably better now than it was before.
 1.2  12-Apr-2007  jmcneill Don't claim to be the console if we're supposed to be using a serial
console. While we're here, save a few MB of RAM by properly calculating
the framebuffer size based on the selected video mode.
 1.1  12-Apr-2007  jmcneill Add crmfb, a framebuffer console driver for the onboard O2 video (SGI-CRM)
 1.4.2.3  07-May-2007  yamt sync with head.
 1.4.2.2  15-Apr-2007  yamt sync with head.
 1.4.2.1  14-Apr-2007  yamt file crmfb.c was added on branch yamt-idlelwp on 2007-04-15 16:02:54 +0000
 1.5.6.2  11-Jul-2007  mjf Sync with head.
 1.5.6.1  15-Apr-2007  mjf file crmfb.c was added on branch mjf-ufs-trans on 2007-07-11 20:01:40 +0000
 1.5.4.4  03-Dec-2007  ad Sync with HEAD.
 1.5.4.3  20-Aug-2007  ad Sync with HEAD.
 1.5.4.2  09-Jun-2007  ad Sync with head.
 1.5.4.1  15-Apr-2007  ad file crmfb.c was added on branch vmlocking on 2007-06-09 21:37:00 +0000
 1.5.2.1  03-Oct-2007  garbled Sync with HEAD
 1.6.4.1  15-Aug-2007  skrll Sync with HEAD.
 1.6.2.1  07-Aug-2007  matt Sync with HEAD.
 1.7.8.8  24-Mar-2008  yamt sync with head.
 1.7.8.7  17-Mar-2008  yamt sync with head.
 1.7.8.6  27-Feb-2008  yamt sync with head.
 1.7.8.5  11-Feb-2008  yamt sync with head.
 1.7.8.4  04-Feb-2008  yamt sync with head.
 1.7.8.3  07-Dec-2007  yamt sync with head
 1.7.8.2  03-Sep-2007  yamt sync with head.
 1.7.8.1  26-Jul-2007  yamt file crmfb.c was added on branch yamt-lazymbuf on 2007-09-03 14:29:14 +0000
 1.7.6.3  23-Mar-2008  matt sync with HEAD
 1.7.6.2  09-Jan-2008  matt sync with HEAD
 1.7.6.1  06-Nov-2007  matt sync with HEAD
 1.7.4.1  03-Dec-2007  joerg Sync with HEAD.
 1.8.2.2  18-Feb-2008  mjf Sync with HEAD.
 1.8.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.20.6.3  28-Sep-2008  mjf Sync with HEAD.
 1.20.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.20.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.20.2.1  24-Mar-2008  keiichi sync with head.
 1.24.6.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.24.4.2  04-May-2009  yamt sync with head.
 1.24.4.1  16-May-2008  yamt sync with head.
 1.24.2.1  18-May-2008  yamt sync with head.
 1.25.4.1  19-Oct-2008  haad Sync with HEAD.
 1.25.2.1  31-Jul-2008  simonb Sync with head.
 1.26.24.1  05-Mar-2011  bouyer Sync with HEAD
 1.26.22.1  06-Jun-2011  jruoho Sync with HEAD.
 1.26.16.3  31-May-2011  rmind sync with head
 1.26.16.2  21-Apr-2011  rmind sync with head
 1.26.16.1  05-Mar-2011  rmind sync with head
 1.35.6.1  18-Feb-2012  mrg merge to -current.
 1.35.2.2  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.35.2.1  17-Apr-2012  yamt sync with head
 1.36.10.1  18-May-2014  rmind sync with head
 1.36.6.2  03-Dec-2017  jdolecek update from HEAD
 1.36.6.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.2.4  28-Aug-2017  skrll Sync with HEAD
 1.38.2.3  19-Mar-2016  skrll Sync with HEAD
 1.38.2.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.38.2.1  06-Apr-2015  skrll Sync with HEAD
 1.44.8.1  22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.44.2.1  18-Mar-2018  martin Pull up following revision(s) (requested by jmcneill in ticket #642):
sys/arch/sgimips/dev/crmfb.c: revision 1.45
Add support for overriding the video mode by setting an ARCS environment
variable.
If the "crmfb_mode" environment variable is set, treat it as a mode
string in the form WIDTHxHEIGHT[@REFRESH] and generate monitor timings
using the VESA GTF formula. If set, this overrides the EDID preferred
mode.
 1.45.2.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.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.48.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed