Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/igsfb_subr.c
RevisionDateAuthorComments
 1.15  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.14  03-Apr-2017  christos branches: 1.14.12; 1.14.14;
PR/52136: David Binderman: Rewrite loop to fix bounds check.
 1.13  25-Jan-2017  jakllsch Improve/fix igsfb(4) support for 15BPP.

Use howmany(depth, NBBY) instead of (depth >> 3), so that 15 bits maps
to 2 bytes instead of 1.

While here, in a nearly-identical change, don't hard-code 8BPP into the
CyberPro blitter.
 1.12  18-Nov-2009  macallan branches: 1.12.22; 1.12.40; 1.12.44; 1.12.48;
Make colour depths higher than 8bit work in X.
Now igsfb will switch to 16 or 32 bit colour when entering graphics mode,
depending on available video memory and the given mode.
While there re-initialize the colour map etc. when leaving graphics mode.
 1.11  18-Nov-2009  macallan Write something more sane into the pixel format register - it's not pixel size
in bytes although that works in 8 and 16 bit colour depth.
While there do some magic number reduction.
 1.10  11-Nov-2009  macallan add modeseting support. Now if there's a mode string in igsfb_devconfig the
driver will try to use it if at all possible, otherwise fall back to the old
hardcoded 1024x768x60 mode.
 1.9  19-Oct-2007  ad branches: 1.9.20;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.8  05-Apr-2006  uwe branches: 1.8.18; 1.8.32; 1.8.34; 1.8.38;
KNF: no parentheses around return value.
 1.7  05-Apr-2006  uwe ANSI'ify.
 1.6  23-Feb-2006  macallan branches: 1.6.2; 1.6.4; 1.6.6;
Add support for virtual consoles to igsfb.
Works fine on a Krups, needs testing on other ports.
 1.5  11-Dec-2005  christos branches: 1.5.2; 1.5.4; 1.5.6;
merge ktrace-lwp.
 1.4  26-Nov-2004  uwe branches: 1.4.12;
Use standard uintN_t types instead of home-grown u_intN_t types.
 1.3  30-May-2003  uwe branches: 1.3.2;
Oops, do not disable coprocessor in igsfb_init_ext.
 1.2  10-May-2003  uwe Redo attachment to support proper cnattach.
wscons on netwinder almost works now.
 1.1  24-Sep-2002  uwe branches: 1.1.2; 1.1.4;
Add some preliminary support for setting up the CyberPro in Netwinder.
Setup sequence obtained from Krups OFW with some CyberPro-specific
magic from Linux driver. The driver still has a lot of hardcoded
stuff, but it is useful enough to bring up wscons on netwinder.

XXX: Proper console attachment needs to be written (the driver was
originally developed on sparc, where our approach to attaching console
is totally different).

Caveat emptor!
 1.1.4.2  18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1  24-Sep-2002  nathanw file igsfb_subr.c was added on branch nathanw_sa on 2002-10-18 02:41:53 +0000
 1.1.2.2  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.1.2.1  24-Sep-2002  jdolecek file igsfb_subr.c was added on branch kqueue on 2002-10-10 18:39:01 +0000
 1.3.2.1  29-Nov-2004  skrll Sync with HEAD.
 1.4.12.2  27-Oct-2007  yamt sync with head.
 1.4.12.1  21-Jun-2006  yamt sync with head.
 1.5.6.1  22-Apr-2006  simonb Sync with head.
 1.5.4.1  09-Sep-2006  rpaulo sync with head
 1.5.2.1  01-Mar-2006  yamt sync with head.
 1.6.6.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.6.4.1  19-Apr-2006  elad sync with head.
 1.6.2.1  11-Apr-2006  yamt sync with head
 1.8.38.1  25-Oct-2007  bouyer Sync with HEAD.
 1.8.34.1  06-Nov-2007  matt sync with HEAD
 1.8.32.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.8.18.1  23-Oct-2007  ad Sync with head.
 1.9.20.1  11-Mar-2010  yamt sync with head
 1.12.48.1  21-Apr-2017  bouyer Sync with HEAD
 1.12.44.2  26-Apr-2017  pgoyette Sync with HEAD
 1.12.44.1  20-Mar-2017  pgoyette Sync with HEAD
 1.12.40.2  28-Aug-2017  skrll Sync with HEAD
 1.12.40.1  05-Feb-2017  skrll Sync with HEAD
 1.12.22.1  03-Dec-2017  jdolecek update from HEAD
 1.14.14.1  10-Jun-2019  christos Sync with HEAD
 1.14.12.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

RSS XML Feed