[BACK]Return to edid.9 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / man / man9

File: [cvs.NetBSD.org] / src / share / man / man9 / edid.9 (download)

Revision 1.2, Sat Dec 23 06:36:19 2006 UTC (17 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Changes since 1.1: +6 -6 lines

Drop trailing whitespace.

.\"	$NetBSD: edid.9,v 1.2 2006/12/23 06:36:19 wiz Exp $
.\"
.\" Copyright 2006 Itronix Inc.
.\" All rights reserved.
.\"
.\" Written by Garrett D'Amore for Itronix Inc.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. The name of Intronix Inc. may not be used to endorse
.\"    or promote products derived from this software without specific prior
.\"    written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY INTRONIX INC. ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ITRONIX INC.  BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 11, 2006
.Dt EDID 9
.Os
.Sh NAME
.Nm edid
.Nd VESA Extended Display Identification Data
.Sh SYNOPSIS
.In dev/videomode/edidvar.h
.In dev/videomode/edidreg.h
.Ft int
.Fo edid_is_valid
.Fa "uint8_t *data"
.Fc
.Ft int
.Fo edid_parse
.Fa "uint8_t *data"
.Fa "struct edid_info *info"
.Fc
.Ft void
.Fo edid_print
.Fa "struct edid_info *info"
.Fc
.Sh DESCRIPTION
These
functions provide support parsing the Extended Display Identification Data
which describes a display device such as a monitor or flat panel display.
.Pp
The
.Fn edid_is_valid
function simply tests if the EDID block in
.Fa data
contains valid data.  This test includes a verification of the checksum,
and that valid vendor and product idenfication data is present.  The data
block contain at least 128 bytes.
.Pp
The
.Fn edid_parse
function parses the supplied
.Fa data
block (which again, must be at least 128 bytes), writing the relevant
data into the structure pointed to by
.Fa info .
.Pp
The
.Fn edid_print
function prints the data in the given
.Fa info
structure to the console device.
.Pp
.\" XXX
.\" XXX It sure would be nice to have documentation about the details of the
.\" XXX edid_info structure itself.  This takes more time, though, and
.\" XXX hopefully someone else will write it up.  In the meantime, the code
.\" XXX references should be useful.
.\" XXX
.Sh RETURN VALUES
The
.Fn edid_is_valid
function returns 0 if the data block is valid, and
.Er EINVAL
otherwise.
The
.Fn edid_parse
function returns zero if the data was successfully parsed, and
non-zero otherwise.
.Sh CODE REFERENCES
This section describes places within the
.Nx
source tree where actual code implementing or using the
EDID subsystem can be found.
All pathnames are relative to
.Pa /usr/src .
.Pp
The EDID subsystem is implemented within the file
.Pa sys/dev/videomode/edid.c .
.Pp
The EDID subsystem also makes use of VESA Generalized Timing Formula located
located in
.Pa sys/dev/videomode/vesagtf.c
and the generic videomode database located in
.Pa sys/dev/videomode/videomode.c .
.Sh EXAMPLES
The following code uses these functions
to retrieve and print information about a monitor:
.Pp
.Bd -literal -compact
	struct edid_info info;
	i2c_tag_t        tag;
	char		 buffer[128];

	...
	/* initialize i2c tag... */
	...
	if ((ddc_read_edid(tag, buffer, 128) == 0) &&
	    (edid_parse(buffer, &info) == 0))
		edid_print(info);
	...
.Ed
.Sh SEE ALSO
.Xr ddc 9 ,
.Xr edid 9 ,
.Xr iic 9
.Sh HISTORY
These routines were added in
.Nx 4.0 .
.Sh AUTHORS
.An Garrett D'Amore Aq gdamore@NetBSD.org