Home | History | Annotate | Download | only in i2c
History log of /src/sys/dev/i2c/ddc.c
RevisionDateAuthorComments
 1.9  23-Dec-2019  thorpej No need to use I2C_F_POLL here.
 1.8  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.7  16-Jun-2018  thorpej branches: 1.7.2;
More cleanup to i2c autoconfiguration:

- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
all of the logic for direct-config matching. If it returns true,
the driver returns the match result (which may be 0). If it returns
false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
lower-indexed "compatible" device property are more-specific matches,
and return a better match quality accordingly.
 1.6  25-Jul-2015  jmcneill branches: 1.6.16;
Fix block offsets for ddc_read_edid_block.
 1.5  17-May-2015  jmcneill add ddc_dev_read_edid{,_block} functions, same as ddc_read_edid{,_block} but takes a device_t instead of i2c_tag_t
 1.4  17-Nov-2014  jmcneill branches: 1.4.2;
add ddc_read_edid_block, which is the same as ddc_read_edid but takes an additional block number argument
 1.3  04-May-2008  xtraeme branches: 1.3.44; 1.3.62;
device_t/softc split and other related cosmetic changes.
 1.2  19-Oct-2007  ad branches: 1.2.16; 1.2.18; 1.2.20;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.1  25-Apr-2006  gdamore branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10; 1.1.14; 1.1.20; 1.1.30; 1.1.44; 1.1.46; 1.1.50;
Add basic DDC (VESA Data Display Channel) driver for use by framebuffers.
Reviewed by jmcneill@ and macallan@.
 1.1.50.1  25-Oct-2007  bouyer Sync with HEAD.
 1.1.46.1  06-Nov-2007  matt sync with HEAD
 1.1.44.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.1.30.1  23-Oct-2007  ad Sync with head.
 1.1.20.2  09-Sep-2006  rpaulo sync with head
 1.1.20.1  25-Apr-2006  rpaulo file ddc.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:49:51 +0000
 1.1.14.3  27-Oct-2007  yamt sync with head.
 1.1.14.2  21-Jun-2006  yamt sync with head.
 1.1.14.1  25-Apr-2006  yamt file ddc.c was added on branch yamt-lazymbuf on 2006-06-21 15:02:51 +0000
 1.1.10.2  01-Jun-2006  kardel Sync with head.
 1.1.10.1  25-Apr-2006  kardel file ddc.c was added on branch simonb-timecounters on 2006-06-01 22:36:20 +0000
 1.1.8.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.8.1  25-Apr-2006  tron file ddc.c was added on branch peter-altq on 2006-05-24 15:50:08 +0000
 1.1.6.2  24-May-2006  yamt sync with head.
 1.1.6.1  25-Apr-2006  yamt file ddc.c was added on branch yamt-pdpolicy on 2006-05-24 10:57:40 +0000
 1.1.2.2  11-May-2006  elad sync with head
 1.1.2.1  25-Apr-2006  elad file ddc.c was added on branch elad-kernelauth on 2006-05-11 23:28:30 +0000
 1.2.20.1  16-May-2008  yamt sync with head.
 1.2.18.1  18-May-2008  yamt sync with head.
 1.2.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.3.62.1  18-Nov-2014  snj Pull up following revision(s) (requested by jmcneill in ticket #244):
sys/arch/arm/allwinner/awin_hdmi.c: revision 1.13-1.15
sys/arch/arm/allwinner/awin_hdmiaudio.c: revision 1.4
sys/arch/arm/allwinner/awin_var.h: revision 1.25
sys/arch/evbarm/awin/awin_machdep.c: revision 1.29
sys/dev/i2c/ddc.c: revision 1.4
sys/dev/i2c/ddcvar.h: revision 1.2
sys/dev/videomode/edid.c: revision 1.13
sys/dev/videomode/edidreg.h: revision 1.4
sys/dev/videomode/edidvar.h: revision 1.3
Parse the extension block count field, and make it available in struct edid_info
--
add ddc_read_edid_block, which is the same as ddc_read_edid but takes an additional block number argument
--
Add support for DVI displays. Detect HDMI vs DVI mode by looking for a
CEA-861-D extension block in the EDID, and then searching this block for
an HDMI vendor-specific data block (HDMI VSDB).
--
Allow for overriding DVI/HDMI detection with a kernel boot arg. Set
hdmi.forcemode=dvi or hdmi.forcemode=hdmi to disable auto-detection.
--
report hotplug status for AUDIO_GETDEV fields, only allow playback if a capable display is connected
--
clear repeater sel bits before setting -- would cause an issue if we ever switched away from a pixel doubling mode
 1.3.44.1  03-Dec-2017  jdolecek update from HEAD
 1.4.2.2  22-Sep-2015  skrll Sync with HEAD
 1.4.2.1  06-Jun-2015  skrll Sync with HEAD
 1.6.16.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.6.16.1  25-Jun-2018  pgoyette Sync with HEAD
 1.7.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed