xf86-video-intel: 19 commits - configure.ac src/bios_reader/bios_dumper.c src/bios_reader/bios_reader.c src/bios_reader/.gitignore src/bios_reader/Makefile.am src/bios_reader/swf_dumper.c src/drmmode_display.c src/i810_driver.c src/i810_video.c src/i830_accel.c src/i830_batchbuffer.c src/i830_bios.c src/i830_bios.h src/i830_common.h src/i830_display.h src/i830_dri.c src/i830_dri.h src/i830_driver.c src/i830.h src/i830_memory.c src/i830_render.c src/i830_ring.h src/i830_uxa.c src/i915_hwmc.c src/i965_hwmc.c src/Makefile.am src/reg_dumper/audio.c src/reg_dumper/.gitignore src/reg_dumper/gtt.c src/reg_dumper/hotplug.c src/reg_dumper/lid.c src/reg_dumper/main.c src/reg_dumper/Makefile.am src/reg_dumper/reg_dumper.h src/reg_dumper/statuspage.c src/reg_dumper/util.c src/reg_dumper/xprintf.c src/xvmc/intel_batchbuffer.c src/xvmc/intel_xvmc.h uxa/uxa-accel.c uxa/uxa-glyphs.c uxa/uxa-render.c

Eric Anholt anholt at kemper.freedesktop.org
Sat Feb 20 10:00:32 PST 2010


 configure.ac                  |    2 
 src/Makefile.am               |   11 
 src/bios_reader/.gitignore    |    4 
 src/bios_reader/Makefile.am   |   16 -
 src/bios_reader/bios_dumper.c |  107 -------
 src/bios_reader/bios_reader.c |  587 ---------------------------------------
 src/bios_reader/swf_dumper.c  |  112 -------
 src/drmmode_display.c         |    5 
 src/i810_driver.c             |   24 -
 src/i810_video.c              |    3 
 src/i830.h                    |    1 
 src/i830_accel.c              |    1 
 src/i830_batchbuffer.c        |    1 
 src/i830_bios.c               |  394 --------------------------
 src/i830_bios.h               |  631 ------------------------------------------
 src/i830_common.h             |  236 ---------------
 src/i830_display.h            |   42 --
 src/i830_dri.c                |    6 
 src/i830_dri.h                |   67 ----
 src/i830_driver.c             |  107 -------
 src/i830_memory.c             |    7 
 src/i830_render.c             |    1 
 src/i830_ring.h               |   93 ------
 src/i830_uxa.c                |    5 
 src/i915_hwmc.c               |    1 
 src/i965_hwmc.c               |    1 
 src/reg_dumper/.gitignore     |    7 
 src/reg_dumper/Makefile.am    |   41 --
 src/reg_dumper/audio.c        |  460 ------------------------------
 src/reg_dumper/gtt.c          |  117 -------
 src/reg_dumper/hotplug.c      |  126 --------
 src/reg_dumper/lid.c          |  146 ---------
 src/reg_dumper/main.c         |  109 -------
 src/reg_dumper/reg_dumper.h   |   87 -----
 src/reg_dumper/statuspage.c   |   84 -----
 src/reg_dumper/util.c         |   85 -----
 src/reg_dumper/xprintf.c      |   58 ---
 src/xvmc/intel_batchbuffer.c  |   35 --
 src/xvmc/intel_xvmc.h         |    1 
 uxa/uxa-accel.c               |    2 
 uxa/uxa-glyphs.c              |    2 
 uxa/uxa-render.c              |    6 
 42 files changed, 27 insertions(+), 3804 deletions(-)

New commits:
commit c2c670ef18755cf5c878edf8a6b7d1617f54fe73
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:54:48 2010 -0500

    Remove more DRI1 dead code.

diff --git a/src/Makefile.am b/src/Makefile.am
index c98e720..b4bafbd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,8 +39,7 @@ INTEL_DRI_SRCS = \
          i810_dri.c \
          i810_dri.h \
          i830_dri.c \
-         i810_hwmc.c \
-         i830_dri.h
+         i810_hwmc.c
 
 INTEL_XVMC_SRCS = \
 	 i830_hwmc.h \
@@ -70,7 +69,6 @@ intel_drv_la_SOURCES = \
          i830_accel.c \
          i830_batchbuffer.c \
          i830_batchbuffer.h \
-         i830_common.h \
          i830_driver.c \
          i830.h \
          i830_memory.c \
diff --git a/src/i830.h b/src/i830.h
index 49e0043..753eeb7 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -67,7 +67,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dri.h"
 #include "dri2.h"
 #include "GL/glxint.h"
-#include "i830_dri.h"
 #include "intel_bufmgr.h"
 #include "i915_drm.h"
 
diff --git a/src/i830_common.h b/src/i830_common.h
deleted file mode 100644
index 5809a11..0000000
--- a/src/i830_common.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/**************************************************************************
-
-Copyright 2001 VA Linux Systems Inc., Fremont, California.
-Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
-
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-on the rights to use, copy, modify, merge, publish, distribute, sub
-license, and/or sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef _I830_COMMON_H_
-#define _I830_COMMON_H_
-
-#include <stdint.h>
-
-#define I830_NR_TEX_REGIONS 255	/* maximum due to use of chars for next/prev */
-#define I830_LOG_MIN_TEX_REGION_SIZE 14
-
-/* Driver specific DRM command indices
- * NOTE: these are not OS specific, but they are driver specific
- */
-#define DRM_I830_INIT                     0x00
-#define DRM_I830_FLUSH                    0x01
-#define DRM_I830_FLIP                     0x02
-#define DRM_I830_BATCHBUFFER              0x03
-#define DRM_I830_IRQ_EMIT                 0x04
-#define DRM_I830_IRQ_WAIT                 0x05
-#define DRM_I830_GETPARAM                 0x06
-#define DRM_I830_SETPARAM                 0x07
-#define DRM_I830_ALLOC                    0x08
-#define DRM_I830_FREE                     0x09
-#define DRM_I830_INIT_HEAP                0x0a
-#define DRM_I830_CMDBUFFER                0x0b
-#define DRM_I830_DESTROY_HEAP             0x0c
-#define DRM_I830_SET_VBLANK_PIPE	  0x0d
-#define DRM_I830_GET_VBLANK_PIPE	  0x0e
-#define DRM_I830_HWS_PAGE_ADDR		  0x11
-
-typedef struct {
-	enum {
-		I830_INIT_DMA = 0x01,
-		I830_CLEANUP_DMA = 0x02,
-		I830_RESUME_DMA = 0x03
-	} func;
-	unsigned int mmio_offset;
-	int sarea_priv_offset;
-	unsigned int ring_start;
-	unsigned int ring_end;
-	unsigned int ring_size;
-	unsigned int front_offset;
-	unsigned int back_offset;
-	unsigned int depth_offset;
-	unsigned int w;
-	unsigned int h;
-	unsigned int pitch;	/* Pitch of front buffer in units of pixels */
-	unsigned int pitch_bits;
-	unsigned int back_pitch;
-	unsigned int depth_pitch;
-	unsigned int cpp;
-	unsigned int chipset;
-} drmI830Init;
-
-typedef struct {
-	drmTextureRegion texList[I830_NR_TEX_REGIONS + 1];
-	int last_upload;	/* last time texture was uploaded */
-	int last_enqueue;	/* last time a buffer was enqueued */
-	volatile int last_dispatch;	/* age of the most recently dispatched buffer */
-	int ctxOwner;		/* last context to upload state */
-	int texAge;
-	int pf_enabled;		/* is pageflipping allowed? */
-	int pf_active;
-	int pf_current_page;	/* which buffer is being displayed? */
-	int perf_boxes;		/* performance boxes to be displayed */
-	int width, height;	/* screen size in pixels */
-
-	drm_handle_t front_handle;
-	int front_offset;
-	int front_size;
-
-	drm_handle_t back_handle;
-	int back_offset;
-	int back_size;
-
-	drm_handle_t depth_handle;
-	int depth_offset;
-	int depth_size;
-
-	drm_handle_t tex_handle;
-	int tex_offset;
-	int tex_size;
-	int log_tex_granularity;
-	int pitch;
-	int rotation;		/* 0, 90, 180 or 270 */
-	int rotated_offset;
-	int rotated_size;
-	int rotated_pitch;
-	int virtualX, virtualY;
-
-	unsigned int front_tiled;
-	unsigned int back_tiled;
-	unsigned int depth_tiled;
-	unsigned int rotated_tiled;
-	unsigned int rotated2_tiled;
-
-	int pipeA_x;
-	int pipeA_y;
-	int pipeA_w;
-	int pipeA_h;
-	int pipeB_x;
-	int pipeB_y;
-	int pipeB_w;
-	int pipeB_h;
-
-	/* Triple buffering */
-	drm_handle_t third_handle;
-	int third_offset;
-	int third_size;
-	unsigned int third_tiled;
-
-	/* buffer object handles for the static buffers.  May change
-	 * over the lifetime of the client, though it doesn't in our current
-	 * implementation.
-	 */
-	unsigned int front_bo_handle;
-	unsigned int back_bo_handle;
-	unsigned int third_bo_handle;
-	unsigned int depth_bo_handle;
-} drmI830Sarea;
-
-/* Flags for perf_boxes
- */
-#define I830_BOX_RING_EMPTY    0x1	/* populated by kernel */
-#define I830_BOX_FLIP          0x2	/* populated by kernel */
-#define I830_BOX_WAIT          0x4	/* populated by kernel & client */
-#define I830_BOX_TEXTURE_LOAD  0x8	/* populated by kernel */
-#define I830_BOX_LOST_CONTEXT  0x10	/* populated by client */
-
-typedef struct {
-	int start;		/* agp offset */
-	int used;		/* nr bytes in use */
-	int DR1;		/* hw flags for GFX_OP_DRAWRECT_INFO */
-	int DR4;		/* window origin for GFX_OP_DRAWRECT_INFO */
-	int num_cliprects;	/* mulitpass with multiple cliprects? */
-	drm_clip_rect_t *cliprects;	/* pointer to userspace cliprects */
-} drmI830BatchBuffer;
-
-typedef struct {
-	char *buf;		/* agp offset */
-	int sz;			/* nr bytes in use */
-	int DR1;		/* hw flags for GFX_OP_DRAWRECT_INFO */
-	int DR4;		/* window origin for GFX_OP_DRAWRECT_INFO */
-	int num_cliprects;	/* mulitpass with multiple cliprects? */
-	drm_clip_rect_t *cliprects;	/* pointer to userspace cliprects */
-} drmI830CmdBuffer;
-
-typedef struct {
-	int *irq_seq;
-} drmI830IrqEmit;
-
-typedef struct {
-	int irq_seq;
-} drmI830IrqWait;
-
-typedef struct {
-	int param;
-	int *value;
-} drmI830GetParam;
-
-#define I830_PARAM_IRQ_ACTIVE     1
-#define I830_PARAM_ALLOW_BATCHBUFFER   2
-
-typedef struct {
-	int param;
-	int value;
-} drmI830SetParam;
-
-#define I830_SETPARAM_USE_MI_BATCHBUFFER_START  1
-#define I830_SETPARAM_TEX_LRU_LOG_GRANULARITY   2
-#define I830_SETPARAM_ALLOW_BATCHBUFFER         3
-
-/* A memory manager for regions of shared memory:
- */
-#define I830_MEM_REGION_AGP 1
-
-typedef struct {
-	int region;
-	int alignment;
-	int size;
-	int *region_offset;	/* offset from start of fb or agp */
-} drmI830MemAlloc;
-
-typedef struct {
-	int region;
-	int region_offset;
-} drmI830MemFree;
-
-typedef struct {
-	int region;
-	int size;
-	int start;
-} drmI830MemInitHeap;
-
-typedef struct {
-	int region;
-} drmI830MemDestroyHeap;
-
-#define	DRM_I830_VBLANK_PIPE_A	1
-#define	DRM_I830_VBLANK_PIPE_B	2
-
-typedef struct {
-	int pipe;
-} drmI830VBlankPipe;
-
-typedef struct {
-	uint64_t addr;
-} drmI830HWS;
-
-#endif /* _I830_DRM_H_ */
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 8356525..dbf7c66 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -61,7 +61,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "GL/glxtokens.h"
 
 #include "i830.h"
-#include "i830_dri.h"
 
 #include "i915_drm.h"
 
@@ -75,6 +74,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 extern XF86ModuleData dri2ModuleData;
 #endif
 
+typedef struct {
+    PixmapPtr pixmap;
+    unsigned int attachment;
+} I830DRI2BufferPrivateRec, *I830DRI2BufferPrivatePtr;
+
 #ifndef USE_DRI2_1_1_0
 static DRI2BufferPtr
 I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
diff --git a/src/i830_dri.h b/src/i830_dri.h
deleted file mode 100644
index babcac3..0000000
--- a/src/i830_dri.h
+++ /dev/null
@@ -1,67 +0,0 @@
-
-#ifndef _I830_DRI_H
-#define _I830_DRI_H
-
-#include "xorg-server.h"
-#include "xf86drm.h"
-#include "i830_common.h"
-
-#define I830_MAX_DRAWABLES 256
-
-#define I830_MAJOR_VERSION 1
-#define I830_MINOR_VERSION 9
-#define I830_PATCHLEVEL 0
-
-#define I830_REG_SIZE 0x80000
-
-typedef struct _I830DRIRec {
-	drm_handle_t regs;
-	drmSize regsSize;
-
-	drmSize unused1;	/* backbufferSize */
-	drm_handle_t unused2;	/* backbuffer */
-
-	drmSize unused3;	/* depthbufferSize */
-	drm_handle_t unused4;	/* depthbuffer */
-
-	drmSize unused5;	/* rotatedSize / */
-	drm_handle_t unused6;	/* rotatedbuffer */
-
-	drm_handle_t unused7;	/* textures */
-	int unused8;		/* textureSize */
-
-	drm_handle_t unused9;	/* agp_buffers */
-	drmSize unused10;	/* agp_buf_size */
-
-	int deviceID;
-	int width;
-	int height;
-	int mem;
-	int cpp;
-	int bitsPerPixel;
-
-	int unused11[8];	/* was front/back/depth/rotated offset/pitch */
-
-	int unused12;		/* logTextureGranularity */
-	int unused13;		/* textureOffset */
-
-	int irq;
-	int sarea_priv_offset;
-} I830DRIRec, *I830DRIPtr;
-
-typedef struct {
-	/* Nothing here yet */
-	int dummy;
-} I830ConfigPrivRec, *I830ConfigPrivPtr;
-
-typedef struct {
-	/* Nothing here yet */
-	int dummy;
-} I830DRIContextRec, *I830DRIContextPtr;
-
-typedef struct {
-    PixmapPtr pixmap;
-    unsigned int attachment;
-} I830DRI2BufferPrivateRec, *I830DRI2BufferPrivatePtr;
-
-#endif
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c
index 8be52f2..cbf3830 100644
--- a/src/i915_hwmc.c
+++ b/src/i915_hwmc.c
@@ -39,7 +39,6 @@
 #include "regionstr.h"
 
 #include "i830.h"
-#include "i830_dri.h"
 #include "i830_video.h"
 #include "xf86xv.h"
 #include "xf86xvmc.h"
diff --git a/src/i965_hwmc.c b/src/i965_hwmc.c
index 5b24f3b..1a5d4de 100644
--- a/src/i965_hwmc.c
+++ b/src/i965_hwmc.c
@@ -33,7 +33,6 @@
 #include <fourcc.h>
 
 #include "i830.h"
-#include "i830_dri.h"
 #define _INTEL_XVMC_SERVER_
 #include "i830_hwmc.h"
 #include "i965_hwmc.h"
diff --git a/src/xvmc/intel_batchbuffer.c b/src/xvmc/intel_batchbuffer.c
index ebaac7a..1807d2c 100644
--- a/src/xvmc/intel_batchbuffer.c
+++ b/src/xvmc/intel_batchbuffer.c
@@ -49,41 +49,6 @@
 #include "brw_structs.h"
 #define MI_BATCH_BUFFER_END     (0xA << 23)
 #define BATCH_SIZE 8*1024	/* one bo is allocated each time, so the size can be small */
-static int intelEmitIrqLocked(void)
-{
-	drmI830IrqEmit ie;
-	int ret, seq;
-
-	ie.irq_seq = &seq;
-	ret = drmCommandWriteRead(xvmc_driver->fd, DRM_I830_IRQ_EMIT,
-				  &ie, sizeof(ie));
-
-	if (ret) {
-		fprintf(stderr, "%s: drmI830IrqEmit: %d\n", __FUNCTION__, ret);
-		exit(1);
-	}
-
-	return seq;
-}
-
-static void intelWaitIrq(int seq)
-{
-	int ret;
-	drmI830IrqWait iw;
-
-	iw.irq_seq = seq;
-
-	do {
-		ret =
-		    drmCommandWrite(xvmc_driver->fd, DRM_I830_IRQ_WAIT, &iw,
-				    sizeof(iw));
-	} while (ret == -EAGAIN || ret == -EINTR);
-
-	if (ret) {
-		fprintf(stderr, "%s: drmI830IrqWait: %d\n", __FUNCTION__, ret);
-		exit(1);
-	}
-}
 
 static void i965_end_batch(void)
 {
diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h
index 67c7b38..43153cc 100644
--- a/src/xvmc/intel_xvmc.h
+++ b/src/xvmc/intel_xvmc.h
@@ -41,7 +41,6 @@
 #include <stdint.h>
 
 #include <xf86drm.h>
-#include "i830_common.h"
 #include "i830_hwmc.h"
 #include <X11/X.h>
 #include <X11/Xlibint.h>
commit b320449f75adf912e06832dacc0b861ce26353bd
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:44:11 2010 -0500

    Remove dead i830_ring.h.

diff --git a/src/Makefile.am b/src/Makefile.am
index 04bb95c..c98e720 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,7 +77,6 @@ intel_drv_la_SOURCES = \
          i830_video.c \
          i830_video.h \
 	 i830_reg.h \
-         i830_ring.h \
 	 i915_3d.c \
 	 i915_3d.h \
 	 i915_reg.h \
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 74808fd..da7e773 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -43,7 +43,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xf86.h"
 #include "i830.h"
 #include "i810_reg.h"
-#include "i830_ring.h"
 #include "i915_drm.h"
 
 unsigned long intel_get_pixmap_pitch(PixmapPtr pixmap)
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index ed80f14..b8995e2 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -35,7 +35,6 @@
 
 #include "xf86.h"
 #include "i830.h"
-#include "i830_ring.h"
 #include "i915_drm.h"
 
 #define DUMP_BATCHBUFFERS NULL /* "/tmp/i915-batchbuffers.dump" */
diff --git a/src/i830_ring.h b/src/i830_ring.h
deleted file mode 100644
index 994b6d2..0000000
--- a/src/i830_ring.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/**************************************************************************
-
-Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-Copyright © 2002 David Dawes
-
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-#ifndef _INTEL_RING_H
-#define _INTEL_RING_H
-
-#define OUT_RING(n) do {						\
-    if (I810_DEBUG & DEBUG_VERBOSE_RING)				\
-	ErrorF("OUT_RING 0x%08x: 0x%08x, (mask %x)\n",			\
-	       intel->ring_next, (unsigned int)(n),			\
-	       intel->ring.tail_mask);					\
-    *(volatile uint32_t *)(intel->ring.virtual_start +			\
-			   intel->ring_next) = n;			\
-    intel->ring_used += 4;						\
-    intel->ring_next += 4;						\
-    intel->ring_next &= intel->ring.tail_mask;				\
-} while (0)
-
-#define OUT_RING_F(x) do {			\
-	union intfloat tmp;			\
-	tmp.f = (float)(x);			\
-	OUT_RING(tmp.ui);			\
-} while(0)
-
-#define ADVANCE_LP_RING() do {						\
-    if (intel->ring_emitting == 0)					\
-	FatalError("%s: ADVANCE_LP_RING called with no matching "	\
-		   "BEGIN_LP_RING\n", __FUNCTION__);			\
-    if (intel->ring_used > intel->ring_emitting)			\
-	FatalError("%s: ADVANCE_LP_RING: exceeded allocation %d/%d\n ",	\
-		   __FUNCTION__, intel->ring_used,			\
-		   intel->ring_emitting);				\
-    if (intel->ring_used < intel->ring_emitting)			\
-	FatalError("%s: ADVANCE_LP_RING: under-used allocation %d/%d\n ", \
-		   __FUNCTION__, intel->ring_used,			\
-		   intel->ring_emitting);				\
-    intel->ring.tail = intel->ring_next;				\
-    intel->ring.space -= intel->ring_used;				\
-    if (intel->ring_next & 0x07)					\
-	FatalError("%s: ADVANCE_LP_RING: "				\
-		   "ring_next (0x%x) isn't on a QWord boundary\n",	\
-		   __FUNCTION__, intel->ring_next);			\
-    OUTREG(LP_RING + RING_TAIL, intel->ring_next);			\
-    intel->ring_emitting = 0;						\
-} while (0)
-
-#define BEGIN_LP_RING(n)						\
-do {									\
-    if (intel->ring_emitting != 0)					\
-	FatalError("%s: BEGIN_LP_RING called without closing "		\
-		   "ADVANCE_LP_RING\n", __FUNCTION__);			\
-    if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC))			\
-	i830_wait_ring_idle(scrn);					\
-    intel->ring_emitting = (n) * 4;					\
-    if ((n) & 1)							\
-	intel->ring_emitting += 4;					\
-    if (intel->ring.space < intel->ring_emitting)			\
-	WaitRingFunc(scrn, intel->ring_emitting, 0);			\
-    intel->ring_next = intel->ring.tail;				\
-    if (I810_DEBUG & DEBUG_VERBOSE_RING)				\
-	ErrorF( "BEGIN_LP_RING %d in %s\n", n, FUNCTION_NAME);		\
-    intel->ring_used = 0;						\
-    if ((n) & 1)							\
-	OUT_RING(MI_NOOP);						\
-} while (0)
-
-#endif /* _INTEL_RING_H */
commit 6d48b26098691d772a8de001c89a05b2442ef3b5
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:27:55 2010 -0500

    Remove dead i830_display.h.

diff --git a/src/Makefile.am b/src/Makefile.am
index eb81b48..04bb95c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,8 +92,7 @@ intel_drv_la_SOURCES = \
 EXTRA_DIST = 		\
 	$(XMODE_SRCS)	\
 	$(INTEL_DRI_SRCS) \
-	$(INTEL_XVMC_SRCS) \
-	i830_display.h
+	$(INTEL_XVMC_SRCS)
 
 if DRI
 intel_drv_la_SOURCES += \
diff --git a/src/i830_display.h b/src/i830_display.h
deleted file mode 100644
index d8961f0..0000000
--- a/src/i830_display.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright © 2006 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include "xorgVersion.h"
-
-/* i830_display.c */
-void i830PipeSetBase(xf86CrtcPtr crtc, int x, int y);
-void i830WaitForVblank(ScrnInfoPtr scrn);
-void i830DescribeOutputConfiguration(ScrnInfoPtr scrn);
-void i830_set_new_crtc_bo(ScrnInfoPtr scrn);
-
-xf86CrtcPtr i830GetLoadDetectPipe(xf86OutputPtr output, DisplayModePtr mode,
-				  int *dpms_mode);
-void i830ReleaseLoadDetectPipe(xf86OutputPtr output, int dpms_mode);
-void i830_crtc_init(ScrnInfoPtr scrn, int pipe);
-DisplayModePtr i830_crtc_mode_get(ScrnInfoPtr scrn, xf86CrtcPtr crtc);
-void i830_output_prepare(xf86OutputPtr output);
-void i830_output_commit(xf86OutputPtr output);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 5582409..2403a5a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -67,7 +67,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <X11/extensions/Xv.h>
 #include "shadow.h"
 #include "i830.h"
-#include "i830_display.h"
 #include "i830_video.h"
 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
 #include <sys/mman.h>
commit 4126f73051aa73defcf342c81aa0fc9062f83f90
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:25:47 2010 -0500

    Remove dead i830_bios.h.

diff --git a/src/Makefile.am b/src/Makefile.am
index 7b24b32..eb81b48 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -93,7 +93,6 @@ EXTRA_DIST = 		\
 	$(XMODE_SRCS)	\
 	$(INTEL_DRI_SRCS) \
 	$(INTEL_XVMC_SRCS) \
-	i830_bios.h \
 	i830_display.h
 
 if DRI
diff --git a/src/i830_bios.h b/src/i830_bios.h
deleted file mode 100644
index 436426d..0000000
--- a/src/i830_bios.h
+++ /dev/null
@@ -1,631 +0,0 @@
-/*
- * Copyright © 2006 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#ifndef _I830_BIOS_H_
-#define _I830_BIOS_H_
-
-#include <stdint.h>
-#ifndef REG_DUMPER
-#include <xf86str.h>
-#endif
-
-struct vbt_header {
-	char signature[20];		/**< Always starts with 'VBT$' */
-	uint16_t version;		/**< decimal */
-	uint16_t header_size;		/**< in bytes */
-	uint16_t vbt_size;		/**< in bytes */
-	uint8_t vbt_checksum;
-	uint8_t reserved0;
-	uint32_t bdb_offset;		/**< from beginning of VBT */
-	uint32_t aim_offset[4];		/**< from beginning of VBT */
-} __attribute__ ((packed));
-
-struct bdb_header {
-	char signature[16];		/**< Always 'BIOS_DATA_BLOCK' */
-	uint16_t version;		/**< decimal */
-	uint16_t header_size;		/**< in bytes */
-	uint16_t bdb_size;		/**< in bytes */
-} __attribute__ ((packed));
-
-/*
- * There are several types of BIOS data blocks (BDBs), each block has
- * an ID and size in the first 3 bytes (ID in first, size in next 2).
- * Known types are listed below.
- */
-#define BDB_GENERAL_FEATURES	  1
-#define BDB_GENERAL_DEFINITIONS	  2
-#define BDB_OLD_TOGGLE_LIST	  3
-#define BDB_MODE_SUPPORT_LIST	  4
-#define BDB_GENERIC_MODE_TABLE	  5
-#define BDB_EXT_MMIO_REGS	  6
-#define BDB_SWF_IO		  7
-#define BDB_SWF_MMIO		  8
-#define BDB_DOT_CLOCK_TABLE	  9
-#define BDB_MODE_REMOVAL_TABLE	 10
-#define BDB_CHILD_DEVICE_TABLE	 11
-#define BDB_DRIVER_FEATURES	 12
-#define BDB_DRIVER_PERSISTENCE	 13
-#define BDB_EXT_TABLE_PTRS	 14
-#define BDB_DOT_CLOCK_OVERRIDE	 15
-#define BDB_DISPLAY_SELECT	 16
-/* 17 rsvd */
-#define BDB_DRIVER_ROTATION	 18
-#define BDB_DISPLAY_REMOVE	 19
-#define BDB_OEM_CUSTOM		 20
-#define BDB_EFP_LIST		 21	/* workarounds for VGA hsync/vsync */
-#define BDB_SDVO_LVDS_OPTIONS	 22
-#define BDB_SDVO_PANEL_DTDS	 23
-#define BDB_SDVO_LVDS_PNP_IDS	 24
-#define BDB_SDVO_LVDS_POWER_SEQ	 25
-#define BDB_TV_OPTIONS		 26
-#define BDB_LVDS_OPTIONS	 40
-#define BDB_LVDS_LFP_DATA_PTRS	 41
-#define BDB_LVDS_LFP_DATA	 42
-#define BDB_LVDS_BACKLIGHT	 43
-#define BDB_LVDS_POWER		 44
-#define BDB_SKIP		254	/* VBIOS private block, ignore */
-
-struct bdb_general_features {
-	/* bits 1 */
-	unsigned char panel_fitting:2;
-	unsigned char flexaim:1;
-	unsigned char msg_enable:1;
-	unsigned char clear_screen:3;
-	unsigned char color_flip:1;
-
-	/* bits 2 */
-	unsigned char download_ext_vbt:1;
-	unsigned char enable_ssc:1;
-	unsigned char ssc_freq:1;
-	unsigned char enable_lfp_on_override:1;
-	unsigned char disable_ssc_ddt:1;
-	unsigned char rsvd8:3;	/* finish byte */
-
-	/* bits 3 */
-	unsigned char disable_smooth_vision:1;
-	unsigned char single_dvi:1;
-	unsigned char rsvd9:6;	/* finish byte */
-
-	/* bits 4 */
-	unsigned char legacy_monitor_detect;
-
-	/* bits 5 */
-	unsigned char int_crt_support:1;
-	unsigned char int_tv_support:1;
-	unsigned char rsvd11:6;	/* finish byte */
-} __attribute__ ((packed));
-
-#define GPIO_PIN_NONE		0x00	/* "N/A" */
-#define	GPIO_PIN_I2C		0x01	/* "I2C GPIO pins" */
-#define	GPIO_PIN_CRT_DDC	0x02	/* "Analog CRT DDC GPIO pins" */
-/* 915+ */
-#define	GPIO_PIN_LVDS		0x03	/* "Integrated LVDS DDC GPIO pins" */
-#define	GPIO_PIN_SDVO_I2C	0x05	/* "sDVO I2C GPIO pins" */
-#define	GPIO_PIN_SDVO_DDC1	0x1D	/* "SDVO DDC1 GPIO pins" */
-#define	GPIO_PIN_SDVO_DDC2	0x2D	/* "SDVO DDC2 GPIO pins" */
-/* pre-915 */
-#define	GPIO_PIN_DVI_LVDS	0x03	/* "DVI/LVDS DDC GPIO pins" */
-#define	GPIO_PIN_ADD_I2C	0x05	/* "ADDCARD I2C GPIO pins" */
-#define	GPIO_PIN_ADD_DDC	0x04	/* "ADDCARD DDC GPIO pins" */
-#define	GPIO_PIN_ADD_DDC_I2C	0x06	/* "ADDCARD DDC/I2C GPIO pins" */
-
-/* Pre 915 */
-#define DEVICE_TYPE_NONE	0x00
-#define DEVICE_TYPE_CRT		0x01
-#define DEVICE_TYPE_TV		0x09
-#define DEVICE_TYPE_EFP		0x12
-#define DEVICE_TYPE_LFP		0x22
-/* On 915+ */
-#define DEVICE_TYPE_CRT_DPMS		0x6001
-#define DEVICE_TYPE_CRT_DPMS_HOTPLUG	0x4001
-#define DEVICE_TYPE_TV_COMPOSITE	0x0209
-#define DEVICE_TYPE_TV_MACROVISION	0x0289
-#define DEVICE_TYPE_TV_RF_COMPOSITE	0x020c
-#define DEVICE_TYPE_TV_SVIDEO_COMPOSITE	0x0609
-#define DEVICE_TYPE_TV_SCART		0x0209
-#define DEVICE_TYPE_TV_CODEC_HOTPLUG_PWR 0x6009
-#define DEVICE_TYPE_EFP_HOTPLUG_PWR	0x6012
-#define DEVICE_TYPE_EFP_DVI_HOTPLUG_PWR	0x6052
-#define DEVICE_TYPE_EFP_DVI_I		0x6053
-#define DEVICE_TYPE_EFP_DVI_D_DUAL	0x6152
-#define DEVICE_TYPE_EFP_DVI_D_HDCP	0x60d2
-#define DEVICE_TYPE_OPENLDI_HOTPLUG_PWR	0x6062
-#define DEVICE_TYPE_OPENLDI_DUALPIX	0x6162
-#define DEVICE_TYPE_LFP_PANELLINK	0x5012
-#define DEVICE_TYPE_LFP_CMOS_PWR	0x5042
-#define DEVICE_TYPE_LFP_LVDS_PWR	0x5062
-#define DEVICE_TYPE_LFP_LVDS_DUAL	0x5162
-#define DEVICE_TYPE_LFP_LVDS_DUAL_HDCP	0x51e2
-
-#define DEVICE_CFG_NONE		0x00
-#define DEVICE_CFG_12BIT_DVOB	0x01
-#define DEVICE_CFG_12BIT_DVOC	0x02
-#define DEVICE_CFG_24BIT_DVOBC	0x09
-#define DEVICE_CFG_24BIT_DVOCB	0x0a
-#define DEVICE_CFG_DUAL_DVOB	0x11
-#define DEVICE_CFG_DUAL_DVOC	0x12
-#define DEVICE_CFG_DUAL_DVOBC	0x13
-#define DEVICE_CFG_DUAL_LINK_DVOBC 0x19
-#define DEVICE_CFG_DUAL_LINK_DVOCB 0x1a
-
-#define DEVICE_WIRE_NONE 	0x00
-#define DEVICE_WIRE_DVOB	0x01
-#define DEVICE_WIRE_DVOC	0x02
-#define DEVICE_WIRE_DVOBC	0x03
-#define DEVICE_WIRE_DVOBB	0x05
-#define DEVICE_WIRE_DVOCC	0x06
-#define DEVICE_WIRE_DVOB_MASTER	0x0d
-#define DEVICE_WIRE_DVOC_MASTER	0x0e
-
-#define DEVICE_PORT_DVOA	0x00	/* none on 845+ */
-#define DEVICE_PORT_DVOB	0x01
-#define DEVICE_PORT_DVOC	0x02
-
-struct child_device_config {
-	uint16_t handle;
-	uint16_t device_type;	/* See DEVICE_TYPE_* above */
-	uint8_t device_id[10];
-	uint16_t addin_offset;
-	uint8_t dvo_port;	/* See DEVICE_PORT_* above */
-	uint8_t i2c_pin;
-	uint8_t slave_addr;
-	uint8_t ddc_pin;
-	uint16_t edid_ptr;
-	uint8_t dvo_cfg;	/* See DEVICE_CFG_* above */
-	uint8_t dvo2_port;
-	uint8_t i2c2_pin;
-	uint8_t slave2_addr;
-	uint8_t ddc2_pin;
-	uint8_t capabilities;
-	uint8_t dvo_wiring;	/* See DEVICE_WIRE_* above */
-	uint8_t dvo2_wiring;
-	uint16_t extended_type;
-	uint8_t dvo_function;
-} __attribute__ ((packed));
-
-struct bdb_general_definitions {
-	unsigned char crt_ddc_gmbus_pin;	/* see GPIO_PIN_* above */
-
-	/* DPMS bits */
-	unsigned char dpms_acpi:1;
-	unsigned char skip_boot_crt_detect:1;
-	unsigned char dpms_aim:1;
-	unsigned char rsvd1:5;	/* finish byte */
-
-	/* boot device bits */
-	unsigned char boot_display[2];
-	unsigned char child_dev_size;
-
-	/*
-	 * Device info:
-	 * If TV is present, it'll be at devices[0]
-	 * LVDS will be next, either devices[0] or [1], if present
-	 * Max total will be 6, but could be as few as 4 if both
-	 * TV and LVDS are missing, so be careful when interpreting
-	 * [4] and [5].
-	 */
-	struct child_device_config devices[0];
-	/* may be another device block here on some platforms */
-} __attribute__ ((packed));
-
-#define DEVICE_CHILD_SIZE 7
-
-struct bdb_child_devices {
-	uint8_t child_structure_size;
-	struct child_device_config children[DEVICE_CHILD_SIZE];
-} __attribute__ ((packed));
-
-struct bdb_lvds_options {
-	uint8_t panel_type;
-	uint8_t rsvd1;
-	/* LVDS capabilities, stored in a dword */
-	uint8_t pfit_mode:2;
-	uint8_t pfit_text_mode_enhanced:1;
-	uint8_t pfit_gfx_mode_enhanced:1;
-	uint8_t pfit_ratio_auto:1;
-	uint8_t pixel_dither:1;
-	uint8_t lvds_edid:1;
-	uint8_t rsvd2:1;
-	uint8_t rsvd4;
-} __attribute__ ((packed));
-
-/* 915+ only */
-struct bdb_tv_features {
-	/* need to verify bit ordering */
-	uint16_t under_over_scan_via_yprpb:2;
-	uint16_t rsvd1:10;
-	uint16_t under_over_scan_via_dvi:2;
-	uint16_t add_overscan_mode:1;
-	uint16_t rsvd2:1;
-} __attribute__ ((packed));
-
-struct lvds_fp_timing {
-	uint16_t x_res;
-	uint16_t y_res;
-	uint32_t lvds_reg;
-	uint32_t lvds_reg_val;
-	uint32_t pp_on_reg;
-	uint32_t pp_on_reg_val;
-	uint32_t pp_off_reg;
-	uint32_t pp_off_reg_val;
-	uint32_t pp_cycle_reg;
-	uint32_t pp_cycle_reg_val;
-	uint32_t pfit_reg;
-	uint32_t pfit_reg_val;
-	uint16_t terminator;
-} __attribute__ ((packed));
-
-struct lvds_dvo_timing {
-	uint16_t dclk;		/**< In 10khz */
-	uint8_t hactive;
-	uint8_t hblank;
-	uint8_t high_h;		/**< 7:4 = hactive 11:8, 3:0 = hblank 11:8 */
-	uint8_t vactive;
-	uint8_t vblank;
-	uint8_t high_v;		/**< 7:4 = vactive 11:8, 3:0 = vblank 11:8 */
-	uint8_t hsync_off;
-	uint8_t hsync_pulse_width;
-	uint8_t vsync_off;
-	uint8_t high_hsync_off;	/**< 7:6 = hsync off 9:8 */
-	uint8_t h_image;
-	uint8_t v_image;
-	uint8_t max_hv;
-	uint8_t h_border;
-	uint8_t v_border;
-	uint8_t flags;
-} __attribute__ ((packed));
-
-struct lvds_pnp_id {
-	uint16_t mfg_name;
-	uint16_t product_code;
-	uint32_t serial;
-	uint8_t mfg_week;
-	uint8_t mfg_year;
-} __attribute__ ((packed));;
-
-/* LFP pointer table contains entries to the struct below */
-struct bdb_lvds_lfp_data_ptr {
-	uint16_t fp_timing_offset;	/* offsets are from start of bdb */
-	uint8_t fp_table_size;
-	uint16_t dvo_timing_offset;
-	uint8_t dvo_table_size;
-	uint16_t panel_pnp_id_offset;
-	uint8_t pnp_table_size;
-} __attribute__ ((packed));
-
-struct bdb_lvds_lfp_data_ptrs {
-	uint8_t lvds_entries;
-	struct bdb_lvds_lfp_data_ptr ptr[16];
-} __attribute__ ((packed));
-
-struct bdb_lvds_lfp_data_entry {
-	struct lvds_fp_timing fp_timing;
-	struct lvds_dvo_timing dvo_timing;
-	struct lvds_pnp_id pnp_id;
-} __attribute__ ((packed));
-
-struct bdb_lvds_lfp_data {
-	struct bdb_lvds_lfp_data_entry data[16];
-} __attribute__ ((packed));
-
-#define BACKLIGHT_TYPE_NONE 0
-#define BACKLIGHT_TYPE_I2C 1
-#define BACKLIGHT_TYPE_PWM 2
-
-#define BACKLIGHT_GMBUS_100KHZ	0
-#define BACKLIGHT_GMBUS_50KHZ	1
-#define BACKLIGHT_GMBUS_400KHZ	2
-#define BACKLIGHT_GMBUS_1MHZ	3
-
-struct backlight_info {
-	uint8_t inverter_type:2;	/* see BACKLIGHT_TYPE_* above */
-	uint8_t inverter_polarity:1;	/* 1 means 0 is max, 255 is min */
-	uint8_t gpio_pins:3;	/* see GPIO_PIN_* above */
-	uint8_t gmbus_speed:2;
-	uint16_t pwm_frequency;	/* in Hz */
-	uint8_t min_brightness;
-	/* Next two are only for 915+ systems */
-	uint8_t i2c_addr;
-	uint8_t i2c_cmd;
-} __attribute((packed));
-
-struct bdb_backlight_control {
-	uint8_t row_size;
-	struct backlight_info lfps[16];
-} __attribute__ ((packed));
-
-struct bdb_bia {
-	uint8_t bia_enable:1;
-	uint8_t bia_level:3;
-	uint8_t rsvd1:3;
-	uint8_t als_enable:1;
-	uint8_t als_response_data[20];
-} __attribute((packed));
-
-struct aimdb_header {
-	char signature[16];
-	char oem_device[20];
-	uint16_t aimdb_version;
-	uint16_t aimdb_header_size;
-	uint16_t aimdb_size;
-} __attribute__ ((packed));
-
-struct aimdb_block {
-	uint8_t aimdb_id;
-	uint16_t aimdb_size;
-} __attribute__ ((packed));
-
-struct vch_panel_data {
-	uint16_t fp_timing_offset;
-	uint8_t fp_timing_size;
-	uint16_t dvo_timing_offset;
-	uint8_t dvo_timing_size;
-	uint16_t text_fitting_offset;
-	uint8_t text_fitting_size;
-	uint16_t graphics_fitting_offset;
-	uint8_t graphics_fitting_size;
-} __attribute__ ((packed));
-
-struct vch_bdb_22 {
-	struct aimdb_block aimdb_block;
-	struct vch_panel_data panels[16];
-} __attribute__ ((packed));
-
-#define BLC_INVERTER_TYPE_NONE 0
-#define BLC_INVERTER_TYPE_I2C 1
-#define BLC_INVERTER_TYPE_PWM 2
-
-#define BLC_GPIO_NONE 0
-#define BLC_GPIO_I2C 1
-#define BLC_GPIO_CRT_DDC 2
-#define BLC_GPIO_DVI_DDC 3
-#define BLC_GPIO_SDVO_I2C 5
-
-struct blc_struct {
-	uint8_t inverter_type:2;
-	uint8_t inverter_polarity:1;	/* 1 means inverted (0 = max brightness) */
-	uint8_t gpio_pins:3;
-	uint8_t gmbus_speed:2;
-	uint16_t pwm_freq;	/* in Hz */
-	uint8_t min_brightness;	/* (0-255) */
-	uint8_t i2c_slave_addr;
-	uint8_t i2c_cmd;
-} __attribute__ ((packed));
-
-struct bdb_lvds_backlight {
-	uint8_t blcstruct_size;
-	struct blc_struct panels[16];
-} __attribute__ ((packed));
-
-struct bdb_lvds_power {
-	uint8_t dpst_enabled:1;
-	uint8_t pwr_prefs:3;
-	uint8_t rsvd1:3;
-	uint8_t als_enabled:1;
-	uint16_t als_backlight1;
-	uint16_t als_backlight2;
-	uint16_t als_backlight3;
-	uint16_t als_backlight4;
-	uint16_t als_backlight5;
-} __attribute__ ((packed));
-
-#define BDB_DRIVER_NO_LVDS	0
-#define BDB_DRIVER_INT_LVDS	1
-#define BDB_DRIVER_SDVO_LVDS	2
-#define BDB_DRIVER_EDP		3
-
-struct bdb_driver_feature {
-	uint8_t boot_dev_algorithm:1;
-	uint8_t block_display_switch:1;
-	uint8_t allow_display_switch:1;
-	uint8_t hotplug_dvo:1;
-	uint8_t dual_view_zoom:1;
-	uint8_t int15h_hook:1;
-	uint8_t sprite_in_clone:1;
-	uint8_t primary_lfp_id:1;
-
-	uint16_t boot_mode_x;
-	uint16_t boot_mode_y;
-	uint8_t boot_mode_bpp;
-	uint8_t boot_mode_refresh;
-
-	uint16_t enable_lfp_primary:1;
-	uint16_t selective_mode_pruning:1;
-	uint16_t dual_frequency:1;
-	uint16_t render_clock_freq:1;	/* 0: high freq; 1: low freq */
-	uint16_t nt_clone_support:1;
-	uint16_t power_scheme_ui:1;	/* 0: CUI; 1: 3rd party */
-	uint16_t sprite_display_assign:1;	/* 0: secondary; 1: primary */
-	uint16_t cui_aspect_scaling:1;
-	uint16_t preserve_aspect_ratio:1;
-	uint16_t sdvo_device_power_down:1;
-	uint16_t crt_hotplug:1;
-	uint16_t lvds_config:2;
-	uint16_t reserved:3;
-
-	uint8_t static_display:1;
-	uint8_t reserved2:7;
-	uint16_t legacy_crt_max_x;
-	uint16_t legacy_crt_max_y;
-	uint8_t legacy_crt_max_refresh;
-} __attribute__ ((packed));
-
-struct bdb_sdvo_lvds_options {
-	uint8_t panel_backlight;
-	uint8_t h40_set_panel_type;
-	uint8_t panel_type;
-	uint8_t ssc_clk_freq;
-	uint16_t als_low_trip;
-	uint16_t als_high_trip;
-	uint8_t sclalarcoeff_tab_row_num;
-	uint8_t sclalarcoeff_tab_row_size;
-	uint8_t coefficient[8];
-	uint8_t panel_misc_bits_1;
-	uint8_t panel_misc_bits_2;
-	uint8_t panel_misc_bits_3;
-	uint8_t panel_misc_bits_4;
-} __attribute__ ((packed));
-
-#ifndef REG_DUMPER
-int i830_bios_init(ScrnInfoPtr scrn);
-#endif
-
-/*
- * Driver<->VBIOS interaction occurs through scratch bits in
- * GR18 & SWF*.
- *
- * The VBIOS/firmware will signal to the gfx driver through the ASLE interrupt
- * (visible in the interupt regs at bit 0) when it wants something done.
- *
- * Pre-965:
- * The gfx driver can make calls to the VBIOS/firmware through an SMI request,
- * generated by writing to offset 0xe0 of the device's config space (see the
- * publically available 915 PRM for details).
- *
- * 965 and above:
- * IGD OpRegion requests to the VBIOS/firmware are made using SWSCI, which can
- * be triggered by writing to offset 0xe4 (see the publically available
- * 965 graphics PRM for details).
- */
-
-/* GR18 bits are set on display switch and hotkey events */
-#define GR18_DRIVER_SWITCH_EN	(1<<7)	/* 0: VBIOS control, 1: driver control */
-#define GR18_HOTKEY_MASK	0x78	/* See also SWF4 15:0 */
-#define   GR18_HK_NONE		(0x0<<3)
-#define   GR18_HK_LFP_STRETCH	(0x1<<3)
-#define   GR18_HK_TOGGLE_DISP	(0x2<<3)
-#define   GR18_HK_DISP_SWITCH	(0x4<<3)	/* see SWF14 15:0 for what to enable */
-#define   GR18_HK_POPUP_DISABLED (0x6<<3)
-#define   GR18_HK_POPUP_ENABLED	(0x7<<3)
-#define   GR18_HK_PFIT		(0x8<<3)
-#define   GR18_HK_APM_CHANGE	(0xa<<3)
-#define   GR18_HK_MULTIPLE	(0xc<<3)
-#define GR18_USER_INT_EN	(1<<2)
-#define GR18_A0000_FLUSH_EN	(1<<1)
-#define GR18_SMM_EN		(1<<0)
-
-/* Set by driver, cleared by VBIOS */
-#define SWF00_YRES_SHIFT	16
-#define SWF00_XRES_SHIFT	0
-#define SWF00_RES_MASK		0xffff
-
-/* Set by VBIOS at boot time and driver at runtime */
-#define SWF01_TV2_FORMAT_SHIFT	8
-#define SWF01_TV1_FORMAT_SHIFT	0
-#define SWF01_TV_FORMAT_MASK	0xffff
-
-#define SWF10_VBIOS_BLC_I2C_EN	(1<<29)
-#define SWF10_GTT_OVERRIDE_EN	(1<<28)
-#define SWF10_LFP_DPMS_OVR	(1<<27)	/* override DPMS on display switch */
-#define SWF10_ACTIVE_TOGGLE_LIST_MASK (7<<24)
-#define   SWF10_OLD_TOGGLE	0x0
-#define   SWF10_TOGGLE_LIST_1	0x1
-#define   SWF10_TOGGLE_LIST_2	0x2
-#define   SWF10_TOGGLE_LIST_3	0x3
-#define   SWF10_TOGGLE_LIST_4	0x4
-#define SWF10_PANNING_EN	(1<<23)
-#define SWF10_DRIVER_LOADED	(1<<22)
-#define SWF10_EXTENDED_DESKTOP	(1<<21)
-#define SWF10_EXCLUSIVE_MODE	(1<<20)
-#define SWF10_OVERLAY_EN	(1<<19)
-#define SWF10_PLANEB_HOLDOFF	(1<<18)
-#define SWF10_PLANEA_HOLDOFF	(1<<17)
-#define SWF10_VGA_HOLDOFF	(1<<16)
-#define SWF10_ACTIVE_DISP_MASK	0xffff
-#define   SWF10_PIPEB_LFP2	(1<<15)
-#define   SWF10_PIPEB_EFP2	(1<<14)
-#define   SWF10_PIPEB_TV2	(1<<13)
-#define   SWF10_PIPEB_CRT2	(1<<12)
-#define   SWF10_PIPEB_LFP	(1<<11)
-#define   SWF10_PIPEB_EFP	(1<<10)
-#define   SWF10_PIPEB_TV	(1<<9)
-#define   SWF10_PIPEB_CRT	(1<<8)
-#define   SWF10_PIPEA_LFP2	(1<<7)
-#define   SWF10_PIPEA_EFP2	(1<<6)
-#define   SWF10_PIPEA_TV2	(1<<5)
-#define   SWF10_PIPEA_CRT2	(1<<4)
-#define   SWF10_PIPEA_LFP	(1<<3)
-#define   SWF10_PIPEA_EFP	(1<<2)
-#define   SWF10_PIPEA_TV	(1<<1)
-#define   SWF10_PIPEA_CRT	(1<<0)
-
-#define SWF11_MEMORY_SIZE_SHIFT	16
-#define SWF11_SV_TEST_EN	(1<<15)
-#define SWF11_IS_AGP		(1<<14)
-#define SWF11_DISPLAY_HOLDOFF	(1<<13)
-#define SWF11_DPMS_REDUCED	(1<<12)
-#define SWF11_IS_VBE_MODE	(1<<11)
-#define SWF11_PIPEB_ACCESS	(1<<10)	/* 0 here means pipe a */
-#define SWF11_DPMS_MASK		0x07
-#define   SWF11_DPMS_OFF	(1<<2)
-#define   SWF11_DPMS_SUSPEND	(1<<1)
-#define   SWF11_DPMS_STANDBY	(1<<0)
-#define   SWF11_DPMS_ON		0
-
-#define SWF14_GFX_PFIT_EN	(1<<31)
-#define SWF14_TEXT_PFIT_EN	(1<<30)
-#define SWF14_LID_SWITCH_EN	(1<<29)
-#define SWF14_POPUP_EN		(1<<28)
-#define SWF14_DISPLAY_HOLDOFF	(1<<27)
-#define SWF14_DISP_DETECT_EN	(1<<26)
-#define SWF14_DOCKING_STATUS_DOCKED (1<<25)	/* 0 here means undocked */
-#define SWF14_DRIVER_STATUS	(1<<24)
-#define SWF14_OS_TYPE_WIN9X	(1<<23)
-#define SWF14_OS_TYPE_WINNT	(1<<22)
-/* 21:19 rsvd */
-#define SWF14_PM_TYPE_MASK	0x00070000
-#define   SWF14_PM_ACPI_VIDEO	(0x4 << 16)
-#define   SWF14_PM_ACPI		(0x3 << 16)
-#define   SWF14_PM_APM_12	(0x2 << 16)
-#define   SWF14_PM_APM_11	(0x1 << 16)
-#define SWF14_HK_REQUEST_MASK	0x0000ffff	/* see GR18 6:3 for event type */
-	  /* if GR18 indicates a display switch */
-#define   SWF14_DS_PIPEB_LFP2_EN (1<<15)
-#define   SWF14_DS_PIPEB_EFP2_EN (1<<14)
-#define   SWF14_DS_PIPEB_TV2_EN  (1<<13)
-#define   SWF14_DS_PIPEB_CRT2_EN (1<<12)
-#define   SWF14_DS_PIPEB_LFP_EN  (1<<11)
-#define   SWF14_DS_PIPEB_EFP_EN  (1<<10)
-#define   SWF14_DS_PIPEB_TV_EN   (1<<9)
-#define   SWF14_DS_PIPEB_CRT_EN  (1<<8)
-#define   SWF14_DS_PIPEA_LFP2_EN (1<<7)
-#define   SWF14_DS_PIPEA_EFP2_EN (1<<6)
-#define   SWF14_DS_PIPEA_TV2_EN  (1<<5)
-#define   SWF14_DS_PIPEA_CRT2_EN (1<<4)
-#define   SWF14_DS_PIPEA_LFP_EN  (1<<3)
-#define   SWF14_DS_PIPEA_EFP_EN  (1<<2)
-#define   SWF14_DS_PIPEA_TV_EN   (1<<1)
-#define   SWF14_DS_PIPEA_CRT_EN  (1<<0)
-	  /* if GR18 indicates a panel fitting request */
-#define   SWF14_PFIT_EN		(1<<0)	/* 0 means disable */
-	  /* if GR18 indicates an APM change request */
-#define   SWF14_APM_HIBERNATE	0x4
-#define   SWF14_APM_SUSPEND	0x3
-#define   SWF14_APM_STANDBY	0x1
-#define   SWF14_APM_RESTORE	0x0
-
-#endif /* _I830_BIOS_H_ */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1cbef7e..5582409 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -68,7 +68,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "shadow.h"
 #include "i830.h"
 #include "i830_display.h"
-#include "i830_bios.h"
 #include "i830_video.h"
 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
 #include <sys/mman.h>
commit ca173c1eaf0e28f7fa138b1965f5e768b3add895
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:24:00 2010 -0500

    Remove the last tool now that it's been moved to gpu_tools.

diff --git a/configure.ac b/configure.ac
index 33a3df1..87cbe55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,7 +167,6 @@ AC_OUTPUT([
 	src/xvmc/shader/Makefile
 	src/xvmc/shader/mc/Makefile
 	src/xvmc/shader/vld/Makefile
-	src/bios_reader/Makefile
 	man/Makefile
 	src/render_program/Makefile
 ])
diff --git a/src/Makefile.am b/src/Makefile.am
index 4cb8ed1..7b24b32 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-SUBDIRS = xvmc bios_reader render_program
+SUBDIRS = xvmc render_program
 
 # this is obnoxious:
 # -module lets us name the module exactly how we want
diff --git a/src/bios_reader/.gitignore b/src/bios_reader/.gitignore
deleted file mode 100644
index bc97537..0000000
--- a/src/bios_reader/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-#		Add & Override for this directory and it's subdirectories
-bios_dumper
-swf_dumper
-bios_reader
diff --git a/src/bios_reader/Makefile.am b/src/bios_reader/Makefile.am
deleted file mode 100644
index 3944b1c..0000000
--- a/src/bios_reader/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @PCIACCESS_CFLAGS@ \
-	-DREG_DUMPER
-
-noinst_PROGRAMS = $(BIOS_DUMPER)
-
-BIOS_DUMPER = bios_dumper
-
-bios_dumper_SOURCES = bios_dumper.c
-
-bios_dumper_LDADD = $(PCIACCESS_LIBS)
diff --git a/src/bios_reader/bios_dumper.c b/src/bios_reader/bios_dumper.c
deleted file mode 100644
index 53293eb..0000000
--- a/src/bios_reader/bios_dumper.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright © 2007 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <pciaccess.h>
-#include <err.h>
-
-#ifndef DEFFILEMODE
-#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)	/* 0666 */
-#endif
-
-static void usage(void)
-{
-	fprintf(stderr, "usage: bios_dumper <filename>\n");
-	exit(1);
-}
-
-int main(int argc, char **argv)
-{
-	struct pci_device *dev;
-	void *bios;
-	int err, fd;
-
-	if (argc != 2)
-		usage();
-
-	err = pci_system_init();
-	if (err != 0) {
-		fprintf(stderr, "Couldn't initialize PCI system: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	/* Grab the graphics card */
-	dev = pci_device_find_by_slot(0, 0, 2, 0);
-	if (dev == NULL)
-		errx(1, "Couldn't find graphics card");
-
-	err = pci_device_probe(dev);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't probe graphics card: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	if (dev->vendor_id != 0x8086)
-		errx(1, "Graphics card is non-intel");
-
-	bios = malloc(dev->rom_size);
-	if (bios == NULL)
-		errx(1, "Couldn't allocate memory for BIOS data\n");
-
-	err = pci_device_read_rom(dev, bios);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't read graphics card ROM: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	fd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, DEFFILEMODE);
-	if (fd < 0) {
-		fprintf(stderr, "Couldn't open output: %s\n", strerror(errno));
-		exit(1);
-	}
-
-	if (write(fd, bios, dev->rom_size) < dev->rom_size) {
-		fprintf(stderr, "Couldn't write BIOS data: %s\n",
-			strerror(errno));
-		exit(1);
-	}
-
-	close(fd);
-	pci_system_cleanup();
-
-	return 0;
-}
commit 6da7cda5830817b0c977ed4767a9432748f12b09
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:21:47 2010 -0500

    Remove swf_dumper.  We have intel_mmio_read in gpu_tools to do this.

diff --git a/src/bios_reader/Makefile.am b/src/bios_reader/Makefile.am
index 0e86660..3944b1c 100644
--- a/src/bios_reader/Makefile.am
+++ b/src/bios_reader/Makefile.am
@@ -1,16 +1,10 @@
 AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @PCIACCESS_CFLAGS@ \
 	-DREG_DUMPER
 
-noinst_PROGRAMS = $(BIOS_DUMPER) $(SWF_DUMPER)
+noinst_PROGRAMS = $(BIOS_DUMPER)
 
 BIOS_DUMPER = bios_dumper
 
 bios_dumper_SOURCES = bios_dumper.c
 
 bios_dumper_LDADD = $(PCIACCESS_LIBS)
-
-SWF_DUMPER = swf_dumper
-
-swf_dumper_SOURCES = swf_dumper.c
-
-swf_dumper_LDADD = $(PCIACCESS_LIBS)
diff --git a/src/bios_reader/swf_dumper.c b/src/bios_reader/swf_dumper.c
deleted file mode 100644
index e904495..0000000
--- a/src/bios_reader/swf_dumper.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *    Jesse Barnes <jesse.barnes at intel.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <pciaccess.h>
-#include <err.h>
-
-#include "../i810_reg.h"
-#include "../i830_bios.h"
-
-#ifndef DEFFILEMODE
-#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)	/* 0666 */
-#endif
-
-static uint32_t read32(void *base, int reg)
-{
-	uint32_t *addr = (uint32_t *) ((unsigned char *)(base) + reg);
-
-	return *addr;
-}
-
-#if 0
-static void write32(void *base, int reg, uint32_t val)
-{
-	uint32_t *addr = (uint32_t *) ((unsigned char *)(base) + reg);
-	*addr = val;
-}
-#endif
-
-static void usage(void)
-{
-	fprintf(stderr, "usage: swf_dumper\n");
-	exit(1);
-}
-
-int main(int argc, char **argv)
-{
-	struct pci_device *dev;
-	int err;
-	void *addr;
-
-	if (argc != 1)
-		usage();
-
-	err = pci_system_init();
-	if (err != 0) {
-		fprintf(stderr, "Couldn't initialize PCI system: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	/* Grab the graphics card */
-	dev = pci_device_find_by_slot(0, 0, 2, 0);
-	if (dev == NULL)
-		errx(1, "Couldn't find graphics card");
-
-	err = pci_device_probe(dev);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't probe graphics card: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	if (dev->vendor_id != 0x8086)
-		errx(1, "Graphics card is non-intel");
-
-	err = pci_device_map_range(dev, dev->regions[0].base_addr,
-				   dev->regions[0].size,
-				   PCI_DEV_MAP_FLAG_WRITABLE, &addr);
-	if (err) {
-		fprintf(stderr, "Couldn't map MMIO space: %s\n", strerror(err));
-		exit(1);
-	}
-
-	printf("SWF14: 0x%08x\n", read32(addr, SWF14));
-
-	pci_system_cleanup();
-
-	return 0;
-}
commit 71c613c8475909e58fc491131bf9c10f4b047b16
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:20:33 2010 -0500

    Remove bios_reader now that it's moved to gpu_tools.

diff --git a/src/Makefile.am b/src/Makefile.am
index 7023958..4cb8ed1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-SUBDIRS = xvmc bios_reader reg_dumper render_program
+SUBDIRS = xvmc bios_reader render_program
 
 # this is obnoxious:
 # -module lets us name the module exactly how we want
diff --git a/src/bios_reader/Makefile.am b/src/bios_reader/Makefile.am
index f2f9dc0..0e86660 100644
--- a/src/bios_reader/Makefile.am
+++ b/src/bios_reader/Makefile.am
@@ -1,7 +1,7 @@
 AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @PCIACCESS_CFLAGS@ \
 	-DREG_DUMPER
 
-noinst_PROGRAMS = bios_reader  $(BIOS_DUMPER) $(SWF_DUMPER)
+noinst_PROGRAMS = $(BIOS_DUMPER) $(SWF_DUMPER)
 
 BIOS_DUMPER = bios_dumper
 
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
deleted file mode 100644
index ee1e3f5..0000000
--- a/src/bios_reader/bios_reader.c
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
- * Copyright © 2006 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "../i830_bios.h"
-
-#include <X11/Xfuncproto.h>
-#include <X11/Xmd.h>
-#define _PARSE_EDID_
-#include "edid.h"
-
-/* Make a fake pI830 so we can easily pull i830_bios.c code in here. */
-struct _fake_i830 {
-	uint8_t *VBIOS;
-};
-struct _fake_i830 I830;
-struct _fake_i830 *pI830 = &I830;
-
-#define INTEL_BIOS_8(_addr)	(pI830->VBIOS[_addr])
-#define INTEL_BIOS_16(_addr)	(pI830->VBIOS[_addr] | \
-				 (pI830->VBIOS[_addr + 1] << 8))
-#define INTEL_BIOS_32(_addr)	(pI830->VBIOS[_addr] | \
-				 (pI830->VBIOS[_addr + 1] << 8) | \
-				 (pI830->VBIOS[_addr + 2] << 16) | \
-				 (pI830->VBIOS[_addr + 3] << 24))
-
-#define YESNO(val) ((val) ? "yes" : "no")
-
-struct bdb_block {
-	uint8_t id;
-	uint16_t size;
-	void *data;
-};
-
-struct bdb_header *bdb;
-static int tv_present;
-static int lvds_present;
-static int panel_type;
-
-static struct bdb_block *find_section(int section_id)
-{
-	struct bdb_block *block;
-	unsigned char *base = (unsigned char *)bdb;
-	int index = 0;
-	uint16_t total, current_size;
-	unsigned char current_id;
-
-	/* skip to first section */
-	index += bdb->header_size;
-	total = bdb->bdb_size;
-
-	block = malloc(sizeof(*block));
-	if (!block) {
-		fprintf(stderr, "out of memory\n");
-		exit(-1);
-	}
-
-	/* walk the sections looking for section_id */
-	while (index < total) {
-		current_id = *(base + index);
-		index++;
-		current_size = *((uint16_t *) (base + index));
-		index += 2;
-		if (current_id == section_id) {
-			block->id = current_id;
-			block->size = current_size;
-			block->data = base + index;
-			return block;
-		}
-		index += current_size;
-	}
-
-	free(block);
-	return NULL;
-}
-
-static void dump_general_features(void)
-{
-	struct bdb_general_features *features;
-	struct bdb_block *block;
-
-	block = find_section(BDB_GENERAL_FEATURES);
-
-	if (!block)
-		return;
-
-	features = block->data;
-
-	printf("General features block:\n");
-
-	printf("\tPanel fitting: ");
-	switch (features->panel_fitting) {
-	case 0:
-		printf("disabled\n");
-		break;
-	case 1:
-		printf("text only\n");
-		break;
-	case 2:
-		printf("graphics only\n");
-		break;
-	case 3:
-		printf("text & graphics\n");
-		break;
-	}
-	printf("\tFlexaim: %s\n", YESNO(features->flexaim));
-	printf("\tMessage: %s\n", YESNO(features->msg_enable));
-	printf("\tClear screen: %d\n", features->clear_screen);
-	printf("\tDVO color flip required: %s\n", YESNO(features->color_flip));
-	printf("\tExternal VBT: %s\n", YESNO(features->download_ext_vbt));
-	printf("\tEnable SSC: %s\n", YESNO(features->enable_ssc));
-	if (features->enable_ssc)
-		printf("\tSSC frequency: %s\n", features->ssc_freq ?
-		       "100 MHz (66 MHz on 855)" : "96 MHz (48 MHz on 855)");
-	printf("\tLFP on override: %s\n",
-	       YESNO(features->enable_lfp_on_override));
-	printf("\tDisable SSC on clone: %s\n",
-	       YESNO(features->disable_ssc_ddt));
-	printf("\tDisable smooth vision: %s\n",
-	       YESNO(features->disable_smooth_vision));
-	printf("\tSingle DVI for CRT/DVI: %s\n", YESNO(features->single_dvi));
-	printf("\tLegacy monitor detect: %s\n",
-	       YESNO(features->legacy_monitor_detect));
-	printf("\tIntegrated CRT: %s\n", YESNO(features->int_crt_support));
-	printf("\tIntegrated TV: %s\n", YESNO(features->int_tv_support));
-
-	tv_present = 1;		/* should be based on whether TV DAC exists */
-	lvds_present = 1;	/* should be based on IS_MOBILE() */
-
-	free(block);
-}
-
-static void dump_backlight_info(void)
-{
-	struct bdb_block *block;
-	struct bdb_lvds_backlight *backlight;
-	struct blc_struct *blc;
-
-	block = find_section(BDB_LVDS_BACKLIGHT);
-
-	if (!block)
-		return;
-
-	backlight = block->data;
-
-	printf("Backlight info block (len %d):\n", block->size);
-
-	if (sizeof(struct blc_struct) != backlight->blcstruct_size) {
-		printf
-		    ("\tBacklight struct sizes don't match (expected %d, got %d), skipping\n",
-		     sizeof(struct blc_struct), backlight->blcstruct_size);
-		return;
-	}
-
-	blc = &backlight->panels[panel_type];
-
-	printf("\tInverter type: %d\n", blc->inverter_type);
-	printf("\t     polarity: %d\n", blc->inverter_polarity);
-	printf("\t    GPIO pins: %d\n", blc->gpio_pins);
-	printf("\t  GMBUS speed: %d\n", blc->gmbus_speed);
-	printf("\t     PWM freq: %d\n", blc->pwm_freq);
-	printf("\tMinimum brightness: %d\n", blc->min_brightness);
-	printf("\tI2C slave addr: 0x%02x\n", blc->i2c_slave_addr);
-	printf("\tI2C command: 0x%02x\n", blc->i2c_cmd);
-}
-
-static void dump_general_definitions(void)
-{
-	struct bdb_block *block;
-	struct bdb_general_definitions *defs;
-	struct child_device_config *child;
-	int i;
-	char child_id[11];
-	int child_device_num;
-
-	block = find_section(BDB_GENERAL_DEFINITIONS);
-
-	if (!block)
-		return;
-
-	defs = block->data;
-
-	printf("General definitions block:\n");
-
-	printf("\tCRT DDC GMBUS addr: 0x%02x\n", defs->crt_ddc_gmbus_pin);
-	printf("\tUse ACPI DPMS CRT power states: %s\n",
-	       YESNO(defs->dpms_acpi));
-	printf("\tSkip CRT detect at boot: %s\n",
-	       YESNO(defs->skip_boot_crt_detect));
-	printf("\tUse DPMS on AIM devices: %s\n", YESNO(defs->dpms_aim));
-	printf("\tBoot display type: 0x%02x%02x\n", defs->boot_display[1],
-	       defs->boot_display[0]);
-	printf("\tTV data block present: %s\n", YESNO(tv_present));
-	child_device_num = (block->size - sizeof(*defs)) / sizeof(*child);
-	for (i = 0; i < child_device_num; i++) {
-		child = &defs->devices[i];
-		if (!child->device_type) {
-			printf("\tChild device %d not present\n", i);
-			continue;
-		}
-		strncpy(child_id, (char *)child->device_id, 10);
-		child_id[10] = 0;
-		printf("\tChild %d device info:\n", i);
-		printf("\t\tSignature: %s\n", child_id);
-		printf("\t\tAIM offset: %d\n", child->addin_offset);
-		printf("\t\tDVO port: 0x%02x\n", child->dvo_port);
-	}
-
-	free(block);
-}
-
-#if 0
-static void dump_child_devices(void)
-{
-	struct bdb_block *block;
-	struct bdb_child_devices *child_devs;
-	struct child_device_config *child;
-	int i;
-
-	block = find_section(BDB_CHILD_DEVICE_TABLE);
-	if (!block) {
-		printf("No child device table found\n");
-		return;
-	}
-
-	child_devs = block->data;
-
-	printf("Child devices block:\n");
-	for (i = 0; i < DEVICE_CHILD_SIZE; i++) {
-		child = &child_devs->children[i];
-		/* Skip nonexistent children */
-		if (!child->device_type)
-			continue;
-		printf("\tChild device %d\n", i);
-		printf("\t\tType: 0x%04x\n", child->device_type);
-		printf("\t\tDVO port: 0x%02x\n", child->dvo_port);
-		printf("\t\tI2C pin: 0x%02x\n", child->i2c_pin);
-		printf("\t\tSlave addr: 0x%02x\n", child->slave_addr);
-		printf("\t\tDDC pin: 0x%02x\n", child->ddc_pin);
-		printf("\t\tDVO config: 0x%02x\n", child->dvo_cfg);
-		printf("\t\tDVO wiring: 0x%02x\n", child->dvo_wiring);
-	}
-
-	free(block);
-}
-#endif
-
-static void dump_lvds_options(void)
-{
-	struct bdb_block *block;
-	struct bdb_lvds_options *options;
-
-	block = find_section(BDB_LVDS_OPTIONS);
-	if (!block) {
-		printf("No LVDS options block\n");
-		return;
-	}
-
-	options = block->data;
-
-	printf("LVDS options block:\n");
-
-	panel_type = options->panel_type;
-	printf("\tPanel type: %d\n", panel_type);
-	printf("\tLVDS EDID available: %s\n", YESNO(options->lvds_edid));
-	printf("\tPixel dither: %s\n", YESNO(options->pixel_dither));
-	printf("\tPFIT auto ratio: %s\n", YESNO(options->pfit_ratio_auto));
-	printf("\tPFIT enhanced graphics mode: %s\n",
-	       YESNO(options->pfit_gfx_mode_enhanced));
-	printf("\tPFIT enhanced text mode: %s\n",
-	       YESNO(options->pfit_text_mode_enhanced));
-	printf("\tPFIT mode: %d\n", options->pfit_mode);
-
-	free(block);
-}
-
-static void dump_lvds_ptr_data(void)
-{
-	struct bdb_block *block;
-	struct bdb_lvds_lfp_data *lvds_data;
-	struct bdb_lvds_lfp_data_ptrs *ptrs;
-	struct lvds_fp_timing *fp_timing;
-	struct bdb_lvds_lfp_data_entry *entry;
-	int lfp_data_size;
-
-	block = find_section(BDB_LVDS_LFP_DATA_PTRS);
-	if (!block) {
-		printf("No LFP data pointers block\n");
-		return;
-	}
-	ptrs = block->data;
-
-	block = find_section(BDB_LVDS_LFP_DATA);
-	if (!block) {
-		printf("No LVDS data block\n");
-		return;
-	}
-	lvds_data = block->data;
-
-	lfp_data_size =
-	    ptrs->ptr[1].fp_timing_offset - ptrs->ptr[0].fp_timing_offset;
-	entry =
-	    (struct bdb_lvds_lfp_data_entry *)((uint8_t *) lvds_data->data +
-					       (lfp_data_size * panel_type));
-	fp_timing = &entry->fp_timing;
-
-	printf("LVDS timing pointer data:\n");
-	printf("  Number of entries: %d\n", ptrs->lvds_entries);
-
-	printf("\tpanel type %02i: %dx%d\n", panel_type, fp_timing->x_res,
-	       fp_timing->y_res);
-
-	free(block);
-}
-
-static void dump_lvds_data(void)
-{
-	struct bdb_block *block;
-	struct bdb_lvds_lfp_data *lvds_data;
-	struct bdb_lvds_lfp_data_ptrs *ptrs;
-	int num_entries;
-	int i;
-	int hdisplay, hsyncstart, hsyncend, htotal;
-	int vdisplay, vsyncstart, vsyncend, vtotal;
-	float clock;
-	int lfp_data_size, dvo_offset;
-
-	block = find_section(BDB_LVDS_LFP_DATA_PTRS);
-	if (!block) {
-		printf("No LVDS ptr block\n");
-		return;
-	}
-	ptrs = block->data;
-	lfp_data_size =
-	    ptrs->ptr[1].fp_timing_offset - ptrs->ptr[0].fp_timing_offset;
-	dvo_offset =
-	    ptrs->ptr[0].dvo_timing_offset - ptrs->ptr[0].fp_timing_offset;
-	free(block);
-
-	block = find_section(BDB_LVDS_LFP_DATA);
-	if (!block) {
-		printf("No LVDS data block\n");
-		return;
-	}
-
-	lvds_data = block->data;
-	num_entries = block->size / lfp_data_size;
-
-	printf("LVDS panel data block (preferred block marked with '*'):\n");
-	printf("  Number of entries: %d\n", num_entries);
-
-	for (i = 0; i < num_entries; i++) {
-		uint8_t *lfp_data_ptr =
-		    (uint8_t *) lvds_data->data + lfp_data_size * i;
-		uint8_t *timing_data = lfp_data_ptr + dvo_offset;
-		struct bdb_lvds_lfp_data_entry *lfp_data =
-		    (struct bdb_lvds_lfp_data_entry *)lfp_data_ptr;
-		char marker;
-
-		if (i == panel_type)
-			marker = '*';
-		else
-			marker = ' ';
-
-		hdisplay = _H_ACTIVE(timing_data);
-		hsyncstart = hdisplay + _H_SYNC_OFF(timing_data);
-		hsyncend = hsyncstart + _H_SYNC_WIDTH(timing_data);
-		htotal = hdisplay + _H_BLANK(timing_data);
-
-		vdisplay = _V_ACTIVE(timing_data);
-		vsyncstart = vdisplay + _V_SYNC_OFF(timing_data);
-		vsyncend = vsyncstart + _V_SYNC_WIDTH(timing_data);
-		vtotal = vdisplay + _V_BLANK(timing_data);
-		clock = _PIXEL_CLOCK(timing_data) / 1000;
-
-		printf("%c\tpanel type %02i: %dx%d clock %d\n", marker,
-		       i, lfp_data->fp_timing.x_res, lfp_data->fp_timing.y_res,
-		       _PIXEL_CLOCK(timing_data));
-		printf("\t\tinfo:\n");
-		printf("\t\t  LVDS: 0x%08lx\n",
-		       (unsigned long)lfp_data->fp_timing.lvds_reg_val);
-		printf("\t\t  PP_ON_DELAYS: 0x%08lx\n",
-		       (unsigned long)lfp_data->fp_timing.pp_on_reg_val);
-		printf("\t\t  PP_OFF_DELAYS: 0x%08lx\n",
-		       (unsigned long)lfp_data->fp_timing.pp_off_reg_val);
-		printf("\t\t  PP_DIVISOR: 0x%08lx\n",
-		       (unsigned long)lfp_data->fp_timing.pp_cycle_reg_val);
-		printf("\t\t  PFIT: 0x%08lx\n",
-		       (unsigned long)lfp_data->fp_timing.pfit_reg_val);
-		printf("\t\ttimings: %d %d %d %d %d %d %d %d %.2f (%s)\n",
-		       hdisplay, hsyncstart, hsyncend, htotal,
-		       vdisplay, vsyncstart, vsyncend, vtotal, clock,
-		       (hsyncend > htotal || vsyncend > vtotal) ?
-		       "BAD!" : "good");
-	}
-	free(block);
-}
-
-static void dump_driver_feature(void)
-{
-	struct bdb_block *block;
-	struct bdb_driver_feature *feature;
-
-	block = find_section(BDB_DRIVER_FEATURES);
-	if (!block) {
-		printf("No Driver feature data block\n");
-		return;
-	}
-	feature = block->data;
-
-	printf("Driver feature Data Block:\n");
-	printf("\tBoot Device Algorithm: %s\n", feature->boot_dev_algorithm ?
-	       "driver default" : "os default");
-	printf("\tBlock display switching when DVD active: %s\n",
-	       YESNO(feature->block_display_switch));
-	printf("\tAllow display switching when in Full Screen DOS: %s\n",
-	       YESNO(feature->allow_display_switch));
-	printf("\tHot Plug DVO: %s\n", YESNO(feature->hotplug_dvo));
-	printf("\tDual View Zoom: %s\n", YESNO(feature->dual_view_zoom));
-	printf("\tDriver INT 15h hook: %s\n", YESNO(feature->int15h_hook));
-	printf("\tEnable Sprite in Clone Mode: %s\n",
-	       YESNO(feature->sprite_in_clone));
-	printf("\tUse 00000110h ID for Primary LFP: %s\n",
-	       YESNO(feature->primary_lfp_id));
-	printf("\tBoot Mode X: %u\n", feature->boot_mode_x);
-	printf("\tBoot Mode Y: %u\n", feature->boot_mode_y);
-	printf("\tBoot Mode Bpp: %u\n", feature->boot_mode_bpp);
-	printf("\tBoot Mode Refresh: %u\n", feature->boot_mode_refresh);
-	printf("\tEnable LFP as primary: %s\n",
-	       YESNO(feature->enable_lfp_primary));
-	printf("\tSelective Mode Pruning: %s\n",
-	       YESNO(feature->selective_mode_pruning));
-	printf("\tDual-Frequency Graphics Technology: %s\n",
-	       YESNO(feature->dual_frequency));
-	printf("\tDefault Render Clock Frequency: %s\n",
-	       feature->render_clock_freq ? "low" : "high");
-	printf("\tNT 4.0 Dual Display Clone Support: %s\n",
-	       YESNO(feature->nt_clone_support));
-	printf("\tDefault Power Scheme user interface: %s\n",
-	       feature->power_scheme_ui ? "3rd party" : "CUI");
-	printf
-	    ("\tSprite Display Assignment when Overlay is Active in Clone Mode: %s\n",
-	     feature->sprite_display_assign ? "primary" : "secondary");
-	printf("\tDisplay Maintain Aspect Scaling via CUI: %s\n",
-	       YESNO(feature->cui_aspect_scaling));
-	printf("\tPreserve Aspect Ratio: %s\n",
-	       YESNO(feature->preserve_aspect_ratio));
-	printf("\tEnable SDVO device power down: %s\n",
-	       YESNO(feature->sdvo_device_power_down));
-	printf("\tCRT hotplug: %s\n", YESNO(feature->crt_hotplug));
-	printf("\tLVDS config: ");
-	switch (feature->lvds_config) {
-	case BDB_DRIVER_NO_LVDS:
-		printf("No LVDS\n");
-		break;
-	case BDB_DRIVER_INT_LVDS:
-		printf("Integrated LVDS\n");
-		break;
-	case BDB_DRIVER_SDVO_LVDS:
-		printf("SDVO LVDS\n");
-		break;
-	case BDB_DRIVER_EDP:
-		printf("Embedded DisplayPort\n");
-		break;
-	}
-	printf("\tDefine Display statically: %s\n",
-	       YESNO(feature->static_display));
-	printf("\tLegacy CRT max X: %d\n", feature->legacy_crt_max_x);
-	printf("\tLegacy CRT max Y: %d\n", feature->legacy_crt_max_y);
-	printf("\tLegacy CRT max refresh: %d\n",
-	       feature->legacy_crt_max_refresh);
-	free(block);
-}
-
-int main(int argc, char **argv)
-{
-	int fd;
-	struct vbt_header *vbt = NULL;
-	int vbt_off, bdb_off, i;
-	char *filename = "bios";
-	struct stat finfo;
-	struct bdb_block *block;
-	char signature[17];
-
-	if (argc != 2) {
-		printf("usage: %s <rom file>\n", argv[0]);
-		return 1;
-	}
-
-	filename = argv[1];
-
-	fd = open(filename, O_RDONLY);
-	if (fd == -1) {
-		printf("Couldn't open \"%s\": %s\n", filename, strerror(errno));
-		return 1;
-	}
-
-	if (stat(filename, &finfo)) {
-		printf("failed to stat \"%s\": %s\n", filename,
-		       strerror(errno));
-		return 1;
-	}
-
-	pI830->VBIOS = mmap(NULL, finfo.st_size, PROT_READ, MAP_SHARED, fd, 0);
-	if (pI830->VBIOS == MAP_FAILED) {
-		printf("failed to map \"%s\": %s\n", filename, strerror(errno));
-		return 1;
-	}
-
-	/* Scour memory looking for the VBT signature */
-	for (i = 0; i + 4 < finfo.st_size; i++) {
-		if (!memcmp(pI830->VBIOS + i, "$VBT", 4)) {
-			vbt_off = i;
-			vbt = (struct vbt_header *)(pI830->VBIOS + i);
-			break;
-		}
-	}
-
-	if (!vbt) {
-		printf("VBT signature missing\n");
-		return 1;
-	}
-
-	printf("VBT vers: %d.%d\n", vbt->version / 100, vbt->version % 100);
-
-	bdb_off = vbt_off + vbt->bdb_offset;
-	bdb = (struct bdb_header *)(pI830->VBIOS + bdb_off);
-	strncpy(signature, (char *)bdb->signature, 16);
-	signature[16] = 0;
-	printf("BDB sig: %s\n", signature);
-	printf("BDB vers: %d.%d\n", bdb->version / 100, bdb->version % 100);
-
-	printf("Available sections: ");
-	for (i = 0; i < 256; i++) {
-		block = find_section(i);
-		if (!block)
-			continue;
-		printf("%d ", i);
-		free(block);
-	}
-	printf("\n");
-
-	dump_general_features();
-	dump_general_definitions();
-//    dump_child_devices();
-	dump_lvds_options();
-	dump_lvds_data();
-	dump_lvds_ptr_data();
-	dump_backlight_info();
-
-	dump_driver_feature();
-
-	return 0;
-}
commit 7ada4eb3836f58a72f1c5b6b8139030fab9b7d63
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:18:23 2010 -0500

    Remove intel_hotplug tool now that it won't work with KMS.
    
    We'd want to put something like it in sysfs or something if we wanted
    this tool to exist again.

diff --git a/configure.ac b/configure.ac
index 411bdac..33a3df1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,7 +168,6 @@ AC_OUTPUT([
 	src/xvmc/shader/mc/Makefile
 	src/xvmc/shader/vld/Makefile
 	src/bios_reader/Makefile
-	src/reg_dumper/Makefile
 	man/Makefile
 	src/render_program/Makefile
 ])
diff --git a/src/reg_dumper/.gitignore b/src/reg_dumper/.gitignore
deleted file mode 100644
index fc34443..0000000
--- a/src/reg_dumper/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-#		Add & Override for this directory and it's subdirectories
-intel_audio
-intel_gtt
-intel_hotplug
-intel_reg_dumper
-intel_statuspage
-intel_lid
diff --git a/src/reg_dumper/Makefile.am b/src/reg_dumper/Makefile.am
deleted file mode 100644
index ed216c8..0000000
--- a/src/reg_dumper/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-noinst_PROGRAMS = \
-	intel_hotplug
-
-intel_hotplug_SOURCES = \
-	hotplug.c \
-	reg_dumper.h
-
-intel_hotplug_LDADD = $(PCIACCESS_LIBS)
-
-AM_CFLAGS = $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
-	-I$(srcdir)/.. -DREG_DUMPER
-
diff --git a/src/reg_dumper/hotplug.c b/src/reg_dumper/hotplug.c
deleted file mode 100644
index aa0aba3..0000000
--- a/src/reg_dumper/hotplug.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright © 2007 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <pciaccess.h>
-#include <err.h>
-#include <unistd.h>
-
-#include "reg_dumper.h"
-#include "../i810_reg.h"
-
-struct idle_flags {
-	uint32_t instdone_flag;
-	char *name;
-	unsigned int count;
-};
-
-int main(int argc, char **argv)
-{
-	struct pci_device *dev;
-	I830Rec i830;
-	I830Ptr pI830 = &i830;
-	ScrnInfoRec scrn;
-	int err, mmio_bar;
-	void *mmio;
-	int i;
-
-	err = pci_system_init();
-	if (err != 0) {
-		fprintf(stderr, "Couldn't initialize PCI system: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	/* Grab the graphics card */
-	dev = pci_device_find_by_slot(0, 0, 2, 0);
-	if (dev == NULL)
-		errx(1, "Couldn't find graphics card");
-
-	err = pci_device_probe(dev);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't probe graphics card: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	if (dev->vendor_id != 0x8086)
-		errx(1, "Graphics card is non-intel");
-
-	i830.PciInfo = dev;
-
-	mmio_bar = IS_I9XX((&i830)) ? 0 : 1;
-
-	err = pci_device_map_range(dev,
-				   dev->regions[mmio_bar].base_addr,
-				   dev->regions[mmio_bar].size,
-				   PCI_DEV_MAP_FLAG_WRITABLE, &mmio);
-
-	if (err != 0) {
-		fprintf(stderr, "Couldn't map MMIO region: %s\n",
-			strerror(err));
-		exit(1);
-	}
-	i830.mmio = mmio;
-
-	scrn.scrnIndex = 0;
-	scrn.pI830 = &i830;
-
-	OUTREG(SDVOB, (0x0 << 10));
-	OUTREG(SDVOC, (0x0 << 10));
-
-	OUTREG(PORT_HOTPLUG_EN,
-	       (1 << 29) |
-	       (1 << 28) |
-	       (1 << 27) |
-	       SDVOB_HOTPLUG_INT_EN |
-	       SDVOC_HOTPLUG_INT_EN |
-	       (1 << 24) |
-	       CRT_HOTPLUG_INT_EN | TV_HOTPLUG_INT_EN | CRT_HOTPLUG_INT_EN);
-
-	for (i = 0;; i++) {
-		OUTREG(PORT_HOTPLUG_STAT,
-		       (1 << 20) |
-		       (1 << 19) |
-		       (1 << 18) |
-		       (1 << 17) |
-		       CRT_HOTPLUG_INT_STATUS |
-		       TV_HOTPLUG_INT_STATUS |
-		       SDVOC_HOTPLUG_INT_STATUS | SDVOB_HOTPLUG_INT_STATUS);
-		INREG(PORT_HOTPLUG_STAT);
-
-		usleep(500 * 1000);
-
-		printf("%5d: 0x%08x\n", i, INREG(PORT_HOTPLUG_STAT));
-		sleep(1);
-	}
-
-	return 0;
-}
diff --git a/src/reg_dumper/reg_dumper.h b/src/reg_dumper/reg_dumper.h
deleted file mode 100644
index 1507937..0000000
--- a/src/reg_dumper/reg_dumper.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright © 2007 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <inttypes.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <pciaccess.h>
-#include "common.h"
-
-/** @file
- * This file defines the typedefs and stub structures necessary for us to
- * use i830_debug.c mostly unmodified.
- */
-
-typedef char Bool;
-
-#define FALSE 0
-#define TRUE 1
-
-#define X_INFO 0
-#define X_WARNING 1
-#define X_ERROR 2
-
-typedef struct _i830 {
-	/* Fields in common with the real pI830 */
-	struct pci_device *PciInfo;
-	Bool use_drm_mode;
-
-	/* Fields used for setting up reg_dumper */
-	volatile unsigned char *mmio;
-} I830Rec, *I830Ptr;
-
-typedef struct _scrn {
-	/* Fields in common with the real pScrn */
-	int scrnIndex;
-
-	/* Fields used for setting up reg_dumper */
-	I830Ptr pI830;
-} ScrnInfoRec, *ScrnInfoPtr;
-
-#define I830PTR(pScrn) (pScrn->pI830)
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-
-#define INREG8(reg) (*(volatile uint8_t *)((pI830)->mmio + (reg)))
-#define INREG16(reg) (*(volatile uint16_t *)((pI830)->mmio + (reg)))
-#define INREG(reg) (*(volatile uint32_t *)((pI830)->mmio + (reg)))
-#define OUTREG8(reg, val) \
-	*(volatile uint8_t *)((pI830)->mmio + (reg)) = (val)
-#define OUTREG16(reg, val) \
-	*(volatile uint16_t *)((pI830)->mmio + (reg)) = (val)
-#define OUTREG(reg, val) \
-	*(volatile uint32_t *)((pI830)->mmio + (reg)) = (val)
-
-#define xalloc malloc
-#define xfree free
-#define ErrorF printf
-
-char *XNFprintf(const char *format, ...);
-void xf86DrvMsg(int scrnIndex, int severity, const char *format, ...);
-void i830DumpRegs(ScrnInfoPtr pScrn);
-void intel_i830rec_init(I830Ptr pI830);
diff --git a/src/reg_dumper/util.c b/src/reg_dumper/util.c
deleted file mode 100644
index 61210f6..0000000
--- a/src/reg_dumper/util.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-/** @file util.c
- *
- * Utility functions for the various tools in the reg_dumper directory.
- */
-
-#include <err.h>
-#include <pciaccess.h>
-
-#include "reg_dumper.h"
-
-/**
- * Sets up the pI830 for use by common.h-style macros, particularly
- * INREG/OUTERG.
- */
-void intel_i830rec_init(I830Ptr pI830)
-{
-	struct pci_device *dev;
-	int err, mmio_bar;
-	void *mmio;
-
-	err = pci_system_init();
-	if (err != 0) {
-		fprintf(stderr, "Couldn't initialize PCI system: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	/* Grab the graphics card */
-	dev = pci_device_find_by_slot(0, 0, 2, 0);
-	if (dev == NULL)
-		errx(1, "Couldn't find graphics card");
-
-	err = pci_device_probe(dev);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't probe graphics card: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	if (dev->vendor_id != 0x8086)
-		errx(1, "Graphics card is non-intel");
-
-	pI830->PciInfo = dev;
-
-	mmio_bar = IS_I9XX(pI830) ? 0 : 1;
-
-	err = pci_device_map_range(dev,
-				   dev->regions[mmio_bar].base_addr,
-				   dev->regions[mmio_bar].size,
-				   PCI_DEV_MAP_FLAG_WRITABLE, &mmio);
-
-	if (err != 0) {
-		fprintf(stderr, "Couldn't map MMIO region: %s\n",
-			strerror(err));
-		exit(1);
-	}
-	pI830->mmio = mmio;
-}
commit 3284aacfe095f6260eee5ed126685d0638626a29
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:14:12 2010 -0500

    Remove dead i830_bios.c.
    
    Things that used it are now either in the kernel or stashed off in
    gpu_tools.

diff --git a/src/i830_bios.c b/src/i830_bios.c
deleted file mode 100644
index dd73b57..0000000
--- a/src/i830_bios.c
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- * Copyright © 2006 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#undef VERSION			/* XXX edid.h has a VERSION too */
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define _PARSE_EDID_
-#include "xf86.h"
-#include "i830.h"
-#include "i830_bios.h"
-#include "edid.h"
-
-#define INTEL_BIOS_8(_addr)	(bios[_addr])
-#define INTEL_BIOS_16(_addr)	(bios[_addr] |			\
-				 (bios[_addr + 1] << 8))
-#define INTEL_BIOS_32(_addr)	(bios[_addr] |			\
-				 (bios[_addr + 1] << 8) |	\
-				 (bios[_addr + 2] << 16) |	\
-				 (bios[_addr + 3] << 24))
-
-#define		SLAVE_ADDR1	0x70
-#define		SLAVE_ADDR2	0x72
-static void *find_section(struct bdb_header *bdb, int section_id)
-{
-	unsigned char *base = (unsigned char *)bdb;
-	int index = 0;
-	uint16_t total, current_size;
-	unsigned char current_id;
-
-	/* skip to first section */
-	index += bdb->header_size;
-	total = bdb->bdb_size;
-
-	/* walk the sections looking for section_id */
-	while (index < total) {
-		current_id = *(base + index);
-		index++;
-		current_size = *((uint16_t *) (base + index));
-		index += 2;
-		if (current_id == section_id)
-			return base + index;
-		index += current_size;
-	}
-
-	return NULL;
-}
-
-static void
-fill_detail_timing_data(DisplayModePtr fixed_mode, unsigned char *timing_ptr)
-{
-	fixed_mode->HDisplay = _H_ACTIVE(timing_ptr);
-	fixed_mode->VDisplay = _V_ACTIVE(timing_ptr);
-	fixed_mode->HSyncStart = fixed_mode->HDisplay + _H_SYNC_OFF(timing_ptr);
-	fixed_mode->HSyncEnd = fixed_mode->HSyncStart +
-	    _H_SYNC_WIDTH(timing_ptr);
-	fixed_mode->HTotal = fixed_mode->HDisplay + _H_BLANK(timing_ptr);
-	fixed_mode->VSyncStart = fixed_mode->VDisplay + _V_SYNC_OFF(timing_ptr);
-	fixed_mode->VSyncEnd = fixed_mode->VSyncStart +
-	    _V_SYNC_WIDTH(timing_ptr);
-	fixed_mode->VTotal = fixed_mode->VDisplay + _V_BLANK(timing_ptr);
-	fixed_mode->Clock = _PIXEL_CLOCK(timing_ptr) / 1000;
-	fixed_mode->type = M_T_PREFERRED;
-
-	/* Some VBTs have bogus h/vtotal values */
-	if (fixed_mode->HSyncEnd > fixed_mode->HTotal)
-		fixed_mode->HTotal = fixed_mode->HSyncEnd + 1;
-	if (fixed_mode->VSyncEnd > fixed_mode->VTotal)
-		fixed_mode->VTotal = fixed_mode->VSyncEnd + 1;
-
-	xf86SetModeDefaultName(fixed_mode);
-
-}
-
-/**
- * Returns the BIOS's fixed panel mode.
- *
- * Note that many BIOSes will have the appropriate tables for a panel even when
- * a panel is not attached.  Additionally, many BIOSes adjust table sizes or
- * offsets, such that this parsing fails.  Thus, almost any other method for
- * detecting the panel mode is preferable.
- */
-static void parse_integrated_panel_data(intel_screen_private *intel, struct bdb_header *bdb)
-{
-	struct bdb_lvds_options *lvds_options;
-	struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
-	struct bdb_lvds_lfp_data *lvds_data;
-	struct bdb_lvds_lfp_data_entry *entry;
-	DisplayModePtr fixed_mode;
-	unsigned char *timing_ptr;
-	int lfp_data_size;
-	int dvo_offset;
-
-	/* Defaults if we can't find VBT info */
-	intel->lvds_dither = 0;
-
-	lvds_options = find_section(bdb, BDB_LVDS_OPTIONS);
-	if (!lvds_options)
-		return;
-
-	intel->lvds_dither = lvds_options->pixel_dither;
-	if (lvds_options->panel_type == 0xff)
-		return;
-
-	lvds_data = find_section(bdb, BDB_LVDS_LFP_DATA);
-	if (!lvds_data) {
-		return;
-	}
-
-	lvds_lfp_data_ptrs = find_section(bdb, BDB_LVDS_LFP_DATA_PTRS);
-	if (!lvds_lfp_data_ptrs)
-		return;
-
-	lfp_data_size = lvds_lfp_data_ptrs->ptr[1].dvo_timing_offset -
-	    lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset;
-	dvo_offset = lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset -
-	    lvds_lfp_data_ptrs->ptr[0].fp_timing_offset;
-	entry = (struct bdb_lvds_lfp_data_entry *)((uint8_t *) lvds_data->data +
-						   (lfp_data_size *
-						    lvds_options->panel_type));
-	timing_ptr = (unsigned char *)entry + dvo_offset;
-	if (intel->skip_panel_detect)
-		return;
-
-	fixed_mode = xnfalloc(sizeof(DisplayModeRec));
-	memset(fixed_mode, 0, sizeof(*fixed_mode));
-
-	/* Since lvds_bdb_2_fp_edid_dtd is just an EDID detailed timing
-	 * block, pull the contents out using EDID macros.
-	 */
-	fill_detail_timing_data(fixed_mode, timing_ptr);
-	intel->lvds_fixed_mode = fixed_mode;
-}
-
-static void parse_sdvo_panel_data(intel_screen_private *intel, struct bdb_header *bdb)
-{
-	DisplayModePtr fixed_mode;
-	struct bdb_sdvo_lvds_options *sdvo_lvds_options;
-	unsigned char *timing_ptr;
-
-	intel->sdvo_lvds_fixed_mode = NULL;
-
-	sdvo_lvds_options = find_section(bdb, BDB_SDVO_LVDS_OPTIONS);
-	if (sdvo_lvds_options == NULL)
-		return;
-
-	timing_ptr = find_section(bdb, BDB_SDVO_PANEL_DTDS);
-	if (timing_ptr == NULL)
-		return;
-
-	fixed_mode = xnfalloc(sizeof(DisplayModeRec));
-	if (fixed_mode == NULL)
-		return;
-
-	memset(fixed_mode, 0, sizeof(*fixed_mode));
-	fill_detail_timing_data(fixed_mode, timing_ptr +
-				(sdvo_lvds_options->panel_type *
-				 DET_TIMING_INFO_LEN));
-	intel->sdvo_lvds_fixed_mode = fixed_mode;
-
-}
-
-static void parse_panel_data(intel_screen_private *intel, struct bdb_header *bdb)
-{
-	parse_integrated_panel_data(intel, bdb);
-	parse_sdvo_panel_data(intel, bdb);
-}
-
-static void parse_general_features(intel_screen_private *intel, struct bdb_header *bdb)
-{
-	struct bdb_general_features *general;
-
-	/* Set sensible defaults in case we can't find the general block */
-	intel->tv_present = 1;
-
-	general = find_section(bdb, BDB_GENERAL_FEATURES);
-	if (!general)
-		return;
-
-	intel->tv_present = general->int_tv_support;
-	intel->lvds_use_ssc = general->enable_ssc;
-	if (intel->lvds_use_ssc) {
-		if (IS_I85X(intel))
-			intel->lvds_ssc_freq = general->ssc_freq ? 66 : 48;
-		else
-			intel->lvds_ssc_freq = general->ssc_freq ? 100 : 96;
-	}
-}
-
-static void parse_driver_feature(intel_screen_private *intel, struct bdb_header *bdb)
-{
-	struct bdb_driver_feature *feature;
-
-	/* For mobile chip, set default as true */
-	if (IS_MOBILE(intel) && !IS_I830(intel))
-		intel->integrated_lvds = TRUE;
-
-	/* skip pre-9xx chips which is broken to parse this block. */
-	if (!IS_I9XX(intel))
-		return;
-
-	/* XXX Disable this parsing, as it looks doesn't work for all
-	   VBIOS. Reenable it if we could find out the reliable VBT parsing
-	   for LVDS config later. */
-	if (1)
-		return;
-
-	feature = find_section(bdb, BDB_DRIVER_FEATURES);
-	if (!feature)
-		return;
-
-	if (feature->lvds_config != BDB_DRIVER_INT_LVDS)
-		intel->integrated_lvds = FALSE;
-}
-
-static
-void parse_sdvo_mapping(ScrnInfoPtr scrn, struct bdb_header *bdb)
-{
-	unsigned int block_size;
-	uint16_t *block_ptr;
-	struct bdb_general_definitions *defs;
-	struct child_device_config *child;
-	int i, child_device_num, count;
-	struct sdvo_device_mapping *p_mapping;
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-
-	defs = find_section(bdb, BDB_GENERAL_DEFINITIONS);
-	if (!defs) {
-		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-			   "can't find the general definition blocks\n");
-		return;
-	}
-	/* Get the block size of general defintion block */
-	block_ptr = (uint16_t *) ((char *)defs - 2);
-	block_size = *block_ptr;
-	child_device_num = (block_size - sizeof(*defs)) / sizeof(*child);
-	count = 0;
-
-	for (i = 0; i < child_device_num; i++) {
-		child = &defs->devices[i];
-		if (!child->device_type) {
-			/* skip invalid child device type */
-			continue;
-		}
-		if (child->slave_addr == SLAVE_ADDR1 ||
-		    child->slave_addr == SLAVE_ADDR2) {
-			if (child->dvo_port != DEVICE_PORT_DVOB &&
-			    child->dvo_port != DEVICE_PORT_DVOC) {
-				/* skip the incorrect sdvo port */
-				xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-					   "Incorrect SDVO port\n");
-				continue;
-			}
-			xf86DrvMsg(scrn->scrnIndex, X_INFO,
-				   "the SDVO device with slave addr %x "
-				   "is found on DVO %x port\n",
-				   child->slave_addr, child->dvo_port);
-			/* fill the primary dvo port */
-			p_mapping =
-			    &(intel->sdvo_mappings[child->dvo_port - 1]);
-			if (!p_mapping->initialized) {
-				p_mapping->dvo_port = child->dvo_port;
-				p_mapping->dvo_wiring = child->dvo_wiring;
-				p_mapping->initialized = 1;
-				p_mapping->slave_addr = child->slave_addr;
-			} else {
-				xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-					   "One DVO port is shared by two slave "
-					   "address. Maybe it can't be handled\n");
-			}
-			/* If there exists the slave2_addr, maybe it is a sdvo
-			 * device that contain multiple inputs. And it can't
-			 * handled by SDVO driver.
-			 * Ignore the dvo mapping of slave2_addr
-			 * of course its mapping info won't be added.
-			 */
-			if (child->slave2_addr) {
-				xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-					   "Two DVO ports uses the same slave address."
-					   "Maybe it can't be handled by SDVO driver\n");
-			}
-			count++;
-		} else {
-			/* if the slave address is neither 0x70 nor 0x72, skip it. */
-			continue;
-		}
-	}
-	/* If the count is zero, it indicates that no sdvo device is found */
-	if (!count)
-		xf86DrvMsg(scrn->scrnIndex, X_INFO,
-			   "No SDVO device is found in VBT\n");
-
-	return;
-}
-
-#define INTEL_VBIOS_SIZE (64 * 1024)	/* XXX */
-
-/**
- * i830_bios_init - map VBIOS, find VBT
- *
- * VBT existence is a sanity check that is relied on by other i830_bios.c code.
- * Note that it would be better to use a BIOS call to get the VBT, as BIOSes may
- * feed an updated VBT back through that, compared to what we'll fetch using
- * this method of groping around in the BIOS data.
- *
- * Returns 0 on success, nonzero on failure.
- */
-int i830_bios_init(ScrnInfoPtr scrn)
-{
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-	struct vbt_header *vbt;
-	struct bdb_header *bdb;
-	int vbt_off, bdb_off;
-	unsigned char *bios;
-	int ret;
-	int size;
-
-	size = intel->PciInfo->rom_size;
-	if (size == 0) {
-		size = INTEL_VBIOS_SIZE;
-		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-			   "libpciaccess reported 0 rom size, guessing %dkB\n",
-			   size / 1024);
-	}
-	bios = xalloc(size);
-	if (bios == NULL)
-		return -1;
-
-	ret = pci_device_read_rom(intel->PciInfo, bios);
-	if (ret != 0) {
-		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-			   "libpciaccess failed to read %dkB video BIOS: %s\n",
-			   size / 1024, strerror(-ret));
-		xfree(bios);
-		return -1;
-	}
-
-	vbt_off = INTEL_BIOS_16(0x1a);
-	if (vbt_off >= size) {
-		xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Bad VBT offset: 0x%x\n",
-			   vbt_off);
-		xfree(bios);
-		return -1;
-	}
-
-	vbt = (struct vbt_header *)(bios + vbt_off);
-
-	if (memcmp(vbt->signature, "$VBT", 4) != 0) {
-		xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Bad VBT signature\n");
-		xfree(bios);
-		return -1;
-	}
-
-	/* Now that we've found the VBIOS, go scour the VBTs */
-	bdb_off = vbt_off + vbt->bdb_offset;
-	bdb = (struct bdb_header *)(bios + bdb_off);
-
-	parse_general_features(intel, bdb);
-	parse_panel_data(intel, bdb);
-	parse_driver_feature(intel, bdb);
-	parse_sdvo_mapping(scrn, bdb);
-
-	xfree(bios);
-
-	return 0;
-}
commit 761d386a940081688b9b599c7a5b0270abfc5138
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:13:25 2010 -0500

    Remove intel_gtt and intel_lid now that they're in gpu_tools.

diff --git a/src/reg_dumper/Makefile.am b/src/reg_dumper/Makefile.am
index 6354334..ed216c8 100644
--- a/src/reg_dumper/Makefile.am
+++ b/src/reg_dumper/Makefile.am
@@ -1,25 +1,11 @@
 noinst_PROGRAMS = \
-	intel_gtt \
-	intel_hotplug \
-	intel_lid
-
-intel_gtt_SOURCES = \
-	gtt.c \
-	reg_dumper.h \
-	util.c
+	intel_hotplug
 
 intel_hotplug_SOURCES = \
 	hotplug.c \
 	reg_dumper.h
 
-intel_lid_SOURCES = \
-	lid.c \
-	reg_dumper.h \
-	util.c
-
 intel_hotplug_LDADD = $(PCIACCESS_LIBS)
-intel_gtt_LDADD = $(PCIACCESS_LIBS)
-intel_lid_LDADD = $(PCIACCESS_LIBS)
 
 AM_CFLAGS = $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
 	-I$(srcdir)/.. -DREG_DUMPER
diff --git a/src/reg_dumper/gtt.c b/src/reg_dumper/gtt.c
deleted file mode 100644
index 241e5e4..0000000
--- a/src/reg_dumper/gtt.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright © 2008 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <pciaccess.h>
-#include <err.h>
-#include <unistd.h>
-
-#include "reg_dumper.h"
-#include "../i810_reg.h"
-
-#define INGTT(offset) (*(volatile uint32_t *)(gtt + (offset) / (KB(4) / 4)))
-
-int main(int argc, char **argv)
-{
-	I830Rec i830;
-	I830Ptr pI830 = &i830;
-	int start, aper_size;
-	unsigned char *gtt;
-
-	intel_i830rec_init(pI830);
-
-	if (!IS_I9XX(pI830)) {
-		printf("Unsupported chipset for gtt dumper\n");
-		exit(1);
-	}
-
-	if (IS_G4X(pI830) || IS_IGDNG(pI830))
-		gtt = (unsigned char *)(pI830->mmio + MB(2));
-	else if (IS_I965G(pI830))
-		gtt = (unsigned char *)(pI830->mmio + KB(512));
-	else {
-		/* 915/945 chips has GTT range in bar 3 */
-		int err = 0;
-		err = pci_device_map_range(pI830->PciInfo,
-					   pI830->PciInfo->regions[3].base_addr,
-					   pI830->PciInfo->regions[3].size,
-					   PCI_DEV_MAP_FLAG_WRITABLE,
-					   (void **)&gtt);
-		if (err != 0) {
-			fprintf(stderr, "mapping GTT bar failed\n");
-			exit(1);
-		}
-	}
-
-	aper_size = pI830->PciInfo->regions[2].size;
-
-	for (start = 0; start < aper_size; start += KB(4)) {
-		uint32_t start_pte = INGTT(start);
-		uint32_t end;
-		int constant_length = 0;
-		int linear_length = 0;
-
-		/* Check if it's a linear sequence */
-		for (end = start + KB(4); end < aper_size; end += KB(4)) {
-			uint32_t end_pte = INGTT(end);
-			if (end_pte == start_pte + (end - start))
-				linear_length++;
-			else
-				break;
-		}
-		if (linear_length > 0) {
-			printf("0x%08x - 0x%08x: linear from "
-			       "0x%08x to 0x%08x\n",
-			       start, end - KB(4),
-			       start_pte, start_pte + (end - start) - KB(4));
-			start = end - KB(4);
-			continue;
-		}
-
-		/* Check if it's a constant sequence */
-		for (end = start + KB(4); end < aper_size; end += KB(4)) {
-			uint32_t end_pte = INGTT(end);
-			if (end_pte == start_pte)
-				constant_length++;
-			else
-				break;
-		}
-		if (constant_length > 0) {
-			printf("0x%08x - 0x%08x: constant 0x%08x\n",
-			       start, end - KB(4), start_pte);
-			start = end - KB(4);
-			continue;
-		}
-
-		printf("0x%08x: 0x%08x\n", start, start_pte);
-	}
-
-	return 0;
-}
diff --git a/src/reg_dumper/lid.c b/src/reg_dumper/lid.c
deleted file mode 100644
index 29e6cd5..0000000
--- a/src/reg_dumper/lid.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Zhenyu Wang <zhenyu.z.wang at intel.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <pciaccess.h>
-#include <err.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "reg_dumper.h"
-#include "../i810_reg.h"
-#include "../i830_bios.h"
-
-enum lid_status {
-	LID_UNKNOWN = -1,
-	LID_OPEN,
-	LID_CLOSE,
-};
-
-#define ACPI_BUTTON "/proc/acpi/button/"
-#define ACPI_LID "/proc/acpi/button/lid/"
-
-static int i830_lvds_acpi_lid_state(void)
-{
-	int fd;
-	DIR *button_dir;
-	DIR *lid_dir;
-	struct dirent *lid_dent;
-	char *state_name;
-	char state[64];
-	enum lid_status ret = LID_UNKNOWN;
-
-	button_dir = opendir(ACPI_BUTTON);
-	/* If acpi button driver is not loaded, bypass ACPI check method */
-	if (button_dir == NULL)
-		goto out;
-	closedir(button_dir);
-
-	lid_dir = opendir(ACPI_LID);
-
-	/* no acpi lid object found */
-	if (lid_dir == NULL)
-		goto out;
-
-	while (1) {
-		lid_dent = readdir(lid_dir);
-		if (lid_dent == NULL) {
-			/* no LID object */
-			closedir(lid_dir);
-			goto out;
-		}
-		if (strcmp(lid_dent->d_name, ".") &&
-		    strcmp(lid_dent->d_name, "..")) {
-			break;
-		}
-	}
-	state_name = malloc(strlen(ACPI_LID) + strlen(lid_dent->d_name) + 7);
-	memset(state_name, 0, sizeof(state_name));
-	strcat(state_name, ACPI_LID);
-	strcat(state_name, lid_dent->d_name);
-	strcat(state_name, "/state");
-
-	closedir(lid_dir);
-
-	if ((fd = open(state_name, O_RDONLY)) == -1) {
-		free(state_name);
-		goto out;
-	}
-	free(state_name);
-	if (read(fd, state, 64) == -1) {
-		close(fd);
-		goto out;
-	}
-	close(fd);
-	if (strstr(state, "open"))
-		ret = LID_OPEN;
-	else if (strstr(state, "closed"))
-		ret = LID_CLOSE;
-	else			/* "unsupported" */
-		ret = LID_UNKNOWN;
-
-out:
-	return ret;
-}
-
-int main(int argc, char **argv)
-{
-	I830Rec i830;
-	I830Ptr pI830 = &i830;
-	int swf14, acpi_lid;
-
-	intel_i830rec_init(pI830);
-
-	while (1) {
-		swf14 = INREG(SWF14);
-
-		printf("Intel LVDS Lid status:\n");
-		printf("\tSWF14(0x%x) : %s\n", swf14,
-		       swf14 & SWF14_LID_SWITCH_EN ? "close" : "open");
-
-		acpi_lid = i830_lvds_acpi_lid_state();
-		switch (acpi_lid) {
-		case LID_UNKNOWN:
-			printf("\tACPI Lid state : unknown\n");
-			break;
-		case LID_OPEN:
-			printf("\tACPI Lid state : open\n");
-			break;
-		case LID_CLOSE:
-			printf("\tACPI Lid state : close\n");
-			break;
-		}
-		sleep(2);
-	}
-	return 0;
-}
commit 6199af00cb47df6347ecd72ff7f6c86a564cec57
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:06:18 2010 -0500

    Remove xprintf.c from the old "I can't believe it's not an X Server" tools.

diff --git a/src/reg_dumper/Makefile.am b/src/reg_dumper/Makefile.am
index f0bca55..6354334 100644
--- a/src/reg_dumper/Makefile.am
+++ b/src/reg_dumper/Makefile.am
@@ -10,8 +10,7 @@ intel_gtt_SOURCES = \
 
 intel_hotplug_SOURCES = \
 	hotplug.c \
-	reg_dumper.h \
-	xprintf.c
+	reg_dumper.h
 
 intel_lid_SOURCES = \
 	lid.c \
diff --git a/src/reg_dumper/xprintf.c b/src/reg_dumper/xprintf.c
deleted file mode 100644
index 7b8ac99..0000000
--- a/src/reg_dumper/xprintf.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2004 Alexander Gottwald
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#include <string.h>
-#include <stdarg.h>
-#include "reg_dumper.h"
-
-static char *XNFvprintf(const char *format, va_list va)
-{
-	char *ret;
-	int size;
-	va_list va2;
-
-	va_copy(va2, va);
-	size = vsnprintf(NULL, 0, format, va2);
-	va_end(va2);
-
-	ret = (char *)malloc(size + 1);
-	if (ret == NULL)
-		return NULL;
-
-	vsnprintf(ret, size + 1, format, va);
-	ret[size] = 0;
-	return ret;
-}
-
-char *XNFprintf(const char *format, ...)
-{
-	char *ret;
-	va_list va;
-	va_start(va, format);
-	ret = XNFvprintf(format, va);
-	va_end(va);
-	return ret;
-}
commit cba8e3136a100ba274f48c78df5b23fa8960fa16
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:04:51 2010 -0500

    Remove intel_statuspage, now that we have /debug/dri/0/i915_gem_hws

diff --git a/src/reg_dumper/Makefile.am b/src/reg_dumper/Makefile.am
index 209a0f4..f0bca55 100644
--- a/src/reg_dumper/Makefile.am
+++ b/src/reg_dumper/Makefile.am
@@ -1,6 +1,5 @@
 noinst_PROGRAMS = \
 	intel_gtt \
-	intel_statuspage \
 	intel_hotplug \
 	intel_lid
 
@@ -14,11 +13,6 @@ intel_hotplug_SOURCES = \
 	reg_dumper.h \
 	xprintf.c
 
-intel_statuspage_SOURCES = \
-	statuspage.c \
-	reg_dumper.h \
-	util.c
-
 intel_lid_SOURCES = \
 	lid.c \
 	reg_dumper.h \
@@ -26,7 +20,6 @@ intel_lid_SOURCES = \
 
 intel_hotplug_LDADD = $(PCIACCESS_LIBS)
 intel_gtt_LDADD = $(PCIACCESS_LIBS)
-intel_statuspage_LDADD = $(PCIACCESS_LIBS)
 intel_lid_LDADD = $(PCIACCESS_LIBS)
 
 AM_CFLAGS = $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
diff --git a/src/reg_dumper/statuspage.c b/src/reg_dumper/statuspage.c
deleted file mode 100644
index 84bffa1..0000000
--- a/src/reg_dumper/statuspage.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright © 2007 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <pciaccess.h>
-#include <err.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "reg_dumper.h"
-#include "../i810_reg.h"
-
-#define HWS_NEED_GFX(pI810) ((IS_G33CLASS(pI810) ||\
-			      IS_G4X(pI810) || IS_IGDNG(pI810)))
-
-int main(int argc, char **argv)
-{
-	I830Rec i830;
-	I830Ptr pI830 = &i830;
-	int devmem;
-	uint32_t hws_offset;
-	volatile uint32_t *hws;
-
-	intel_i830rec_init(pI830);
-
-	if (HWS_NEED_GFX(pI830))
-		errx(1, "status page in graphics virtual unsupported.\n");
-
-	hws_offset = INREG(HWS_PGA);
-
-	devmem = open("/dev/mem", O_RDWR, 0);
-	if (devmem == -1)
-		err(1, "Couldn't open /dev/mem");
-
-	hws = mmap(NULL, 4096, PROT_READ, MAP_SHARED, devmem, hws_offset);
-	if (hws == MAP_FAILED)
-		err(1, "Couldn't map /dev/mem at 0x%08x", hws_offset);
-
-	close(devmem);
-
-	for (;;) {
-		int i;
-
-		printf("\n");
-
-		for (i = 0; i < 64; i += 4) {
-			printf("0x%04x: 0x%08x 0x%08x 0x%08x 0x%08x\n", i * 4,
-			       hws[i], hws[i + 1], hws[i + 2], hws[i + 3]);
-		}
-
-		sleep(1);
-	}
-
-	return 0;
-}
commit 40f5f72e30003993bfe298cd634d4f3f56148d4a
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:01:30 2010 -0500

    Remove dead main.c from reg_dumper/

diff --git a/src/reg_dumper/main.c b/src/reg_dumper/main.c
deleted file mode 100644
index be9554a..0000000
--- a/src/reg_dumper/main.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright © 2007 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Eric Anholt <eric at anholt.net>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <err.h>
-
-#include "reg_dumper.h"
-
-int main(int argc, char **argv)
-{
-	struct pci_device *dev;
-	I830Rec i830;
-	ScrnInfoRec scrn;
-	int err, mmio_bar;
-	void *mmio;
-
-	err = pci_system_init();
-	if (err != 0) {
-		fprintf(stderr, "Couldn't initialize PCI system: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	/* Grab the graphics card */
-	dev = pci_device_find_by_slot(0, 0, 2, 0);
-	if (dev == NULL)
-		errx(1, "Couldn't find graphics card");
-
-	err = pci_device_probe(dev);
-	if (err != 0) {
-		fprintf(stderr, "Couldn't probe graphics card: %s\n",
-			strerror(err));
-		exit(1);
-	}
-
-	if (dev->vendor_id != 0x8086)
-		errx(1, "Graphics card is non-intel");
-
-	i830.PciInfo = dev;
-
-	mmio_bar = IS_I9XX((&i830)) ? 0 : 1;
-
-	err = pci_device_map_range(dev,
-				   dev->regions[mmio_bar].base_addr,
-				   dev->regions[mmio_bar].size,
-				   PCI_DEV_MAP_FLAG_WRITABLE, &mmio);
-
-	if (err != 0) {
-		fprintf(stderr, "Couldn't map MMIO region: %s\n",
-			strerror(err));
-		exit(1);
-	}
-	i830.mmio = mmio;
-
-	scrn.scrnIndex = 0;
-	scrn.pI830 = &i830;
-
-	i830DumpRegs(&scrn);
-
-	return 0;
-}
-
-void xf86DrvMsg(int scrnIndex, int severity, const char *format, ...)
-{
-	va_list va;
-
-	switch (severity) {
-	case X_INFO:
-		printf("(II): ");
-		break;
-	case X_WARNING:
-		printf("(WW): ");
-		break;
-	case X_ERROR:
-		printf("(EE): ");
-		break;
-	}
-
-	va_start(va, format);
-	vprintf(format, va);
-	va_end(va);
-}
commit 0c5e4a65f5d0f8d41c6bcb4c6978054f40064494
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 12:00:56 2010 -0500

    Delete the audio dumping tool now that it lives in gpu_tools.

diff --git a/src/reg_dumper/Makefile.am b/src/reg_dumper/Makefile.am
index 8f00abe..209a0f4 100644
--- a/src/reg_dumper/Makefile.am
+++ b/src/reg_dumper/Makefile.am
@@ -2,8 +2,7 @@ noinst_PROGRAMS = \
 	intel_gtt \
 	intel_statuspage \
 	intel_hotplug \
-	intel_lid \
-	intel_audio
+	intel_lid
 
 intel_gtt_SOURCES = \
 	gtt.c \
@@ -25,16 +24,10 @@ intel_lid_SOURCES = \
 	reg_dumper.h \
 	util.c
 
-intel_audio_SOURCES = \
-	audio.c \
-	reg_dumper.h \
-	util.c
-
 intel_hotplug_LDADD = $(PCIACCESS_LIBS)
 intel_gtt_LDADD = $(PCIACCESS_LIBS)
 intel_statuspage_LDADD = $(PCIACCESS_LIBS)
 intel_lid_LDADD = $(PCIACCESS_LIBS)
-intel_audio_LDADD = $(PCIACCESS_LIBS)
 
 AM_CFLAGS = $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
 	-I$(srcdir)/.. -DREG_DUMPER
diff --git a/src/reg_dumper/audio.c b/src/reg_dumper/audio.c
deleted file mode 100644
index 91f7b14..0000000
--- a/src/reg_dumper/audio.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * Copyright © 2009 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *    Zhenyu Wang <zhenyu.z.wang at intel.com>
- *    Wu Fengguang <fengguang.wu at intel.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <pciaccess.h>
-#include <err.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <getopt.h>
-
-#include "reg_dumper.h"
-#include "../i810_reg.h"
-
-#define dump_reg(reg, desc)					\
-    do {							\
-	    dword = INREG(reg);	  				\
-	    printf("%-18s 0x%08x  %s\n", # reg, dword, desc);	\
-    } while (0)
-
-#define BITSTO(n)		(n >= sizeof(long) * 8 ? ~0 : (1UL << (n)) - 1)
-#define BITMASK(high, low)	(BITSTO(high+1) & ~BITSTO(low))
-#define BITS(reg, high, low)	(((reg) & (BITMASK(high, low))) >> (low))
-#define BIT(reg, n)		BITS(reg, n, n)
-
-#define AUD_CONFIG		0x62000
-#define AUD_DEBUG		0x62010
-#define AUD_VID_DID		0x62020
-#define AUD_RID			0x62024
-#define AUD_SUBN_CNT		0x62028
-#define AUD_FUNC_GRP		0x62040
-#define AUD_SUBN_CNT2		0x62044
-#define AUD_GRP_CAP		0x62048
-#define AUD_PWRST		0x6204c
-#define AUD_SUPPWR		0x62050
-#define AUD_SID			0x62054
-#define AUD_OUT_CWCAP		0x62070
-#define AUD_OUT_PCMSIZE		0x62074
-#define AUD_OUT_STR		0x62078
-#define AUD_OUT_DIG_CNVT	0x6207c
-#define AUD_OUT_CH_STR		0x62080
-#define AUD_OUT_STR_DESC	0x62084
-#define AUD_PINW_CAP		0x620a0
-#define AUD_PIN_CAP		0x620a4
-#define AUD_PINW_CONNLNG	0x620a8
-#define AUD_PINW_CONNLST	0x620ac
-#define AUD_PINW_CNTR		0x620b0
-#define AUD_PINW_UNSOLRESP	0x620b8
-#define AUD_CNTL_ST		0x620b4
-#define AUD_PINW_CONFIG		0x620bc
-#define AUD_HDMIW_STATUS	0x620d4
-#define AUD_HDMIW_HDMIEDID	0x6210c
-#define AUD_HDMIW_INFOFR	0x62118
-#define AUD_CONV_CHCNT 		0x62120
-#define AUD_CTS_ENABLE		0x62128
-
-#define VIDEO_DIP_CTL		0x61170
-#define VIDEO_DIP_ENABLE	(1<<31)
-#define VIDEO_DIP_ENABLE_AVI	(1<<21)
-#define VIDEO_DIP_ENABLE_VENDOR	(1<<22)
-#define VIDEO_DIP_ENABLE_SPD	(1<<24)
-#define VIDEO_DIP_BUF_AVI	(0<<19)
-#define VIDEO_DIP_BUF_VENDOR	(1<<19)
-#define VIDEO_DIP_BUF_SPD	(3<<19)
-#define VIDEO_DIP_TRANS_ONCE	(0<<16)
-#define VIDEO_DIP_TRANS_1	(1<<16)
-#define VIDEO_DIP_TRANS_2	(2<<16)
-
-#define AUDIO_HOTPLUG_EN	(1<<24)
-
-#define min_t(type, x, y) ({                    \
-        type __min1 = (x);                      \
-        type __min2 = (y);                      \
-        __min1 < __min2 ? __min1: __min2; })
-
-#define OPNAME(names, index)   \
-               names[min_t(unsigned int, index, ARRAY_SIZE(names) - 1)]
-
-static char *pixel_clock[] = {
-	[0] = "25.2 / 1.001 MHz",
-	[1] = "25.2 MHz",
-	[2] = "27 MHz",
-	[3] = "27 * 1.001 MHz",
-	[4] = "54 MHz",
-	[5] = "54 * 1.001 MHz",
-	[6] = "74.25 / 1.001 MHz",
-	[7] = "74.25 MHz",
-	[8] = "148.5 / 1.001 MHz",
-	[9] = "148.5 MHz",
-	[10] = "Reserved",
-};
-
-static char *power_state[] = {
-	[0] = "D0",
-	[1] = "D1",
-	[2] = "D2",
-	[3] = "D3",
-};
-
-static char *stream_type[] = {
-	[0] = "default samples",
-	[1] = "one bit stream",
-	[2] = "DST stream",
-	[3] = "MLP stream",
-	[4] = "Reserved",
-};
-
-static char *dip_port[] = {
-	[0] = "Reserved",
-	[1] = "HDMI B",
-	[2] = "HDMI C",
-	[3] = "Reserved",
-};
-
-static char *dip_index[] = {
-	[0] = "Audio DIP",
-	[1] = "ACP DIP",
-	[2] = "ISRC1 DIP",
-	[3] = "ISRC2 DIP",
-	[4] = "Reserved",
-};
-
-static char *dip_trans[] = {
-	[0] = "disabled",
-	[1] = "reserved",
-	[2] = "send once",
-	[3] = "best effort",
-};
-
-static char *video_dip_index[] = {
-	[0] = "AVI DIP",
-	[1] = "Vendor-specific DIP",
-	[2] = "Reserved",
-	[3] = "Source Product Description DIP",
-};
-
-static char *video_dip_trans[] = {
-	[0] = "send once",
-	[1] = "send every vsync",
-	[2] = "send at least every other vsync",
-	[3] = "reserved",
-};
-
-static void do_self_tests(void)
-{
-	if (BIT(1, 0) != 1)
-		exit(1);
-	if (BIT(0x80000000, 31) != 1)
-		exit(2);
-	if (BITS(0xc0000000, 31, 30) != 3)
-		exit(3);
-}
-
-int main(int argc, char **argv)
-{
-	I830Rec i830;
-	I830Ptr pI830 = &i830;
-	uint32_t dword;
-	int i;
-
-	do_self_tests();
-	intel_i830rec_init(pI830);
-
-	/* printf("%-18s   %8s  %s\n\n", "register name", "raw value", "description"); */
-
-#if 0				/* enable HDMI audio bits */
-	dump_reg(SDVOB, "Digital Display Port B Control Register");
-	dword |= SDVO_ENABLE;
-	dword |= SDVO_BORDER_ENABLE;
-	dword |= SDVO_AUDIO_ENABLE;
-	dword |= SDVO_NULL_PACKETS_DURING_VSYNC;
-	OUTREG(SDVOB, dword);
-
-	dump_reg(PORT_HOTPLUG_EN, "Hot Plug Detect Enable");
-	OUTREG(PORT_HOTPLUG_EN, dword | AUDIO_HOTPLUG_EN);
-
-	dump_reg(VIDEO_DIP_CTL, "Video DIP Control");
-	dword &= ~(VIDEO_DIP_ENABLE_AVI |
-		   VIDEO_DIP_ENABLE_VENDOR | VIDEO_DIP_ENABLE_SPD);
-	OUTREG(VIDEO_DIP_CTL, dword);
-	dword |= VIDEO_DIP_ENABLE;
-	OUTREG(VIDEO_DIP_CTL, dword);
-#endif
-
-#if 0				/* disable HDMI audio bits */
-	dump_reg(SDVOB, "Digital Display Port B Control Register");
-	dword &= ~SDVO_AUDIO_ENABLE;
-	dword &= ~SDVO_NULL_PACKETS_DURING_VSYNC;
-	OUTREG(SDVOB, dword);
-#endif
-
-	dump_reg(VIDEO_DIP_CTL, "Video DIP Control");
-	dump_reg(SDVOB, "Digital Display Port B Control Register");
-	dump_reg(SDVOC, "Digital Display Port C Control Register");
-	dump_reg(PORT_HOTPLUG_EN, "Hot Plug Detect Enable");
-
-	dump_reg(AUD_CONFIG, "Audio Configuration");
-	dump_reg(AUD_DEBUG, "Audio Debug");
-	dump_reg(AUD_VID_DID, "Audio Vendor ID / Device ID");
-	dump_reg(AUD_RID, "Audio Revision ID");
-	dump_reg(AUD_SUBN_CNT, "Audio Subordinate Node Count");
-	dump_reg(AUD_FUNC_GRP, "Audio Function Group Type");
-	dump_reg(AUD_SUBN_CNT2, "Audio Subordinate Node Count");
-	dump_reg(AUD_GRP_CAP, "Audio Function Group Capabilities");
-	dump_reg(AUD_PWRST, "Audio Power State");
-	dump_reg(AUD_SUPPWR, "Audio Supported Power States");
-	dump_reg(AUD_SID, "Audio Root Node Subsystem ID");
-	dump_reg(AUD_OUT_CWCAP, "Audio Output Converter Widget Capabilities");
-	dump_reg(AUD_OUT_PCMSIZE, "Audio PCM Size and Rates");
-	dump_reg(AUD_OUT_STR, "Audio Stream Formats");
-	dump_reg(AUD_OUT_DIG_CNVT, "Audio Digital Converter");
-	dump_reg(AUD_OUT_CH_STR, "Audio Channel ID and Stream ID");
-	dump_reg(AUD_OUT_STR_DESC, "Audio Stream Descriptor Format");
-	dump_reg(AUD_PINW_CAP, "Audio Pin Complex Widget Capabilities");
-	dump_reg(AUD_PIN_CAP, "Audio Pin Capabilities");
-	dump_reg(AUD_PINW_CONNLNG, "Audio Connection List Length");
-	dump_reg(AUD_PINW_CONNLST, "Audio Connection List Entry");
-	dump_reg(AUD_PINW_CNTR, "Audio Pin Widget Control");
-	dump_reg(AUD_PINW_UNSOLRESP, "Audio Unsolicited Response Enable");
-	dump_reg(AUD_CNTL_ST, "Audio Control State Register");
-	dump_reg(AUD_PINW_CONFIG, "Audio Configuration Default");
-	dump_reg(AUD_HDMIW_STATUS, "Audio HDMI Status");
-	dump_reg(AUD_HDMIW_HDMIEDID, "Audio HDMI Data EDID Block");
-	dump_reg(AUD_HDMIW_INFOFR, "Audio HDMI Widget Data Island Packet");
-	dump_reg(AUD_CONV_CHCNT, "Audio Converter Channel Count");
-	dump_reg(AUD_CTS_ENABLE, "Audio CTS Programming Enable");
-
-	printf("\nDetails:\n\n");
-
-	dword = INREG(AUD_VID_DID);
-	printf("AUD_VID_DID vendor id\t\t\t0x%x\n", dword >> 16);
-	printf("AUD_VID_DID device id\t\t\t0x%x\n", dword & 0xffff);
-
-	dword = INREG(AUD_RID);
-	printf("AUD_RID major revision\t\t\t0x%lx\n", BITS(dword, 23, 20));
-	printf("AUD_RID minor revision\t\t\t0x%lx\n", BITS(dword, 19, 16));
-	printf("AUD_RID revision id\t\t\t0x%lx\n", BITS(dword, 15, 8));
-	printf("AUD_RID stepping id\t\t\t0x%lx\n", BITS(dword, 7, 0));
-
-	dword = INREG(SDVOB);
-	printf("SDVOB enable\t\t\t\t%u\n", !!(dword & SDVO_ENABLE));
-	printf("SDVOB HDMI encoding\t\t\t%u\n", !!(dword & SDVO_ENCODING_HDMI));
-	printf("SDVOB SDVO encoding\t\t\t%u\n", !!(dword & SDVO_ENCODING_SDVO));
-	printf("SDVOB null packets\t\t\t%u\n",
-	       !!(dword & SDVO_NULL_PACKETS_DURING_VSYNC));
-	printf("SDVOB audio enabled\t\t\t%u\n", !!(dword & SDVO_AUDIO_ENABLE));
-
-	dword = INREG(SDVOC);
-	printf("SDVOC enable\t\t\t\t%u\n", !!(dword & SDVO_ENABLE));
-	printf("SDVOC HDMI encoding\t\t\t%u\n", !!(dword & SDVO_ENCODING_HDMI));
-	printf("SDVOC SDVO encoding\t\t\t%u\n", !!(dword & SDVO_ENCODING_SDVO));
-	printf("SDVOC null packets\t\t\t%u\n",
-	       !!(dword & SDVO_NULL_PACKETS_DURING_VSYNC));
-	printf("SDVOC audio enabled\t\t\t%u\n", !!(dword & SDVO_AUDIO_ENABLE));
-
-	dword = INREG(PORT_HOTPLUG_EN);
-	printf("PORT_HOTPLUG_EN DisplayPort/HDMI port B\t%ld\n",
-	       BIT(dword, 29)),
-	    printf("PORT_HOTPLUG_EN DisplayPort/HDMI port C\t%ld\n",
-		   BIT(dword, 28)),
-	    printf("PORT_HOTPLUG_EN DisplayPort port D\t%ld\n", BIT(dword, 27)),
-	    printf("PORT_HOTPLUG_EN SDVOB\t\t\t%ld\n", BIT(dword, 26)),
-	    printf("PORT_HOTPLUG_EN SDVOC\t\t\t%ld\n", BIT(dword, 25)),
-	    printf("PORT_HOTPLUG_EN audio\t\t\t%ld\n", BIT(dword, 24)),
-	    printf("PORT_HOTPLUG_EN TV\t\t\t%ld\n", BIT(dword, 23)),
-	    printf("PORT_HOTPLUG_EN CRT\t\t\t%ld\n", BIT(dword, 9)), dword =
-	    INREG(VIDEO_DIP_CTL);
-	printf("VIDEO_DIP_CTL enable graphics DIP\t%ld\n", BIT(dword, 31)),
-	    printf("VIDEO_DIP_CTL port select\t\t[0x%lx] %s\n",
-		   BITS(dword, 30, 29), dip_port[BITS(dword, 30, 29)]);
-	printf("VIDEO_DIP_CTL DIP buffer trans active\t%lu\n", BIT(dword, 28));
-	printf("VIDEO_DIP_CTL AVI DIP enabled\t\t%lu\n", BIT(dword, 21));
-	printf("VIDEO_DIP_CTL vendor DIP enabled\t%lu\n", BIT(dword, 22));
-	printf("VIDEO_DIP_CTL SPD DIP enabled\t\t%lu\n", BIT(dword, 24));
-	printf("VIDEO_DIP_CTL DIP buffer index\t\t[0x%lx] %s\n",
-	       BITS(dword, 20, 19), video_dip_index[BITS(dword, 20, 19)]);
-	printf("VIDEO_DIP_CTL DIP trans freq\t\t[0x%lx] %s\n",
-	       BITS(dword, 17, 16), video_dip_trans[BITS(dword, 17, 16)]);
-	printf("VIDEO_DIP_CTL DIP buffer size\t\t%lu\n", BITS(dword, 11, 8));
-	printf("VIDEO_DIP_CTL DIP address\t\t%lu\n", BITS(dword, 3, 0));
-
-	dword = INREG(AUD_CONFIG);
-	printf("AUD_CONFIG pixel clock\t\t\t[0x%lx] %s\n", BITS(dword, 19, 16),
-	       OPNAME(pixel_clock, BITS(dword, 19, 16)));
-	printf("AUD_CONFIG fabrication enabled\t\t%lu\n", BITS(dword, 2, 2));
-	printf("AUD_CONFIG professional use allowed\t%lu\n", BIT(dword, 1));
-	printf("AUD_CONFIG fuse enabled\t\t\t%lu\n", BIT(dword, 0));
-
-	dword = INREG(AUD_DEBUG);
-	printf("AUD_DEBUG function reset\t\t%lu\n", BIT(dword, 0));
-
-	dword = INREG(AUD_SUBN_CNT);
-	printf("AUD_SUBN_CNT starting node number\t0x%lx\n",
-	       BITS(dword, 23, 16));
-	printf("AUD_SUBN_CNT total number of nodes\t0x%lx\n",
-	       BITS(dword, 7, 0));
-
-	dword = INREG(AUD_SUBN_CNT2);
-	printf("AUD_SUBN_CNT2 starting node number\t0x%lx\n",
-	       BITS(dword, 24, 16));
-	printf("AUD_SUBN_CNT2 total number of nodes\t0x%lx\n",
-	       BITS(dword, 7, 0));
-
-	dword = INREG(AUD_FUNC_GRP);
-	printf("AUD_FUNC_GRP unsol capable\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_FUNC_GRP node type\t\t\t0x%lx\n", BITS(dword, 7, 0));
-
-	dword = INREG(AUD_GRP_CAP);
-	printf("AUD_GRP_CAP beep 0\t\t\t%lu\n", BIT(dword, 16));
-	printf("AUD_GRP_CAP input delay\t\t\t%lu\n", BITS(dword, 11, 8));
-	printf("AUD_GRP_CAP output delay\t\t%lu\n", BITS(dword, 3, 0));
-
-	dword = INREG(AUD_PWRST);
-	printf("AUD_PWRST device power state\t\t%s\n",
-	       power_state[BITS(dword, 5, 4)]);
-	printf("AUD_PWRST device power state setting\t%s\n",
-	       power_state[BITS(dword, 1, 0)]);
-
-	dword = INREG(AUD_SUPPWR);
-	printf("AUD_SUPPWR support D0\t\t\t%lu\n", BIT(dword, 0));
-	printf("AUD_SUPPWR support D1\t\t\t%lu\n", BIT(dword, 1));
-	printf("AUD_SUPPWR support D2\t\t\t%lu\n", BIT(dword, 2));
-	printf("AUD_SUPPWR support D3\t\t\t%lu\n", BIT(dword, 3));
-
-	dword = INREG(AUD_OUT_CWCAP);
-	printf("AUD_OUT_CWCAP widget type\t\t0x%lx\n", BITS(dword, 23, 20));
-	printf("AUD_OUT_CWCAP sample delay\t\t0x%lx\n", BITS(dword, 19, 16));
-	printf("AUD_OUT_CWCAP channel count\t\t%lu\n",
-	       BITS(dword, 15, 13) * 2 + BIT(dword, 0) + 1);
-	printf("AUD_OUT_CWCAP L-R swap\t\t\t%lu\n", BIT(dword, 11));
-	printf("AUD_OUT_CWCAP power control\t\t%lu\n", BIT(dword, 10));
-	printf("AUD_OUT_CWCAP digital\t\t\t%lu\n", BIT(dword, 9));
-	printf("AUD_OUT_CWCAP conn list\t\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_OUT_CWCAP unsol\t\t\t%lu\n", BIT(dword, 7));
-	printf("AUD_OUT_CWCAP mute\t\t\t%lu\n", BIT(dword, 5));
-	printf("AUD_OUT_CWCAP format override\t\t%lu\n", BIT(dword, 4));
-	printf("AUD_OUT_CWCAP amp param override\t%lu\n", BIT(dword, 3));
-	printf("AUD_OUT_CWCAP out amp present\t\t%lu\n", BIT(dword, 2));
-	printf("AUD_OUT_CWCAP in amp present\t\t%lu\n", BIT(dword, 1));
-
-	dword = INREG(AUD_OUT_DIG_CNVT);
-	printf("AUD_OUT_DIG_CNVT SPDIF category\t\t0x%lx\n",
-	       BITS(dword, 14, 8));
-	printf("AUD_OUT_DIG_CNVT SPDIF level\t\t%lu\n", BIT(dword, 7));
-	printf("AUD_OUT_DIG_CNVT professional\t\t%lu\n", BIT(dword, 6));
-	printf("AUD_OUT_DIG_CNVT non PCM\t\t%lu\n", BIT(dword, 5));
-	printf("AUD_OUT_DIG_CNVT copyright asserted\t%lu\n", BIT(dword, 4));
-	printf("AUD_OUT_DIG_CNVT filter preemphasis\t%lu\n", BIT(dword, 3));
-	printf("AUD_OUT_DIG_CNVT validity config\t%lu\n", BIT(dword, 2));
-	printf("AUD_OUT_DIG_CNVT validity flag\t\t%lu\n", BIT(dword, 1));
-	printf("AUD_OUT_DIG_CNVT digital enable\t\t%lu\n", BIT(dword, 0));
-
-	dword = INREG(AUD_OUT_CH_STR);
-	printf("AUD_OUT_CH_STR stream id\t\t0x%lx\n", BITS(dword, 7, 4));
-	printf("AUD_OUT_CH_STR lowest channel\t\t0x%lx\n", BITS(dword, 3, 0));
-
-	dword = INREG(AUD_OUT_STR_DESC);
-	printf("AUD_OUT_STR_DESC stream channels\t0x%lx\n", BITS(dword, 3, 0));
-
-	dword = INREG(AUD_PINW_CAP);
-	printf("AUD_PINW_CAP widget type\t\t0x%lx\n", BITS(dword, 23, 20));
-	printf("AUD_PINW_CAP sample delay\t\t0x%lx\n", BITS(dword, 19, 16));
-	printf("AUD_PINW_CAP channel count\t\t0x%lx\n",
-	       BITS(dword, 15, 13) * 2 + BIT(dword, 0));
-	printf("AUD_PINW_CAP HDCP\t\t\t%lu\n", BIT(dword, 12));
-	printf("AUD_PINW_CAP L-R swap\t\t\t%lu\n", BIT(dword, 11));
-	printf("AUD_PINW_CAP power control\t\t%lu\n", BIT(dword, 10));
-	printf("AUD_PINW_CAP digital\t\t\t%lu\n", BIT(dword, 9));
-	printf("AUD_PINW_CAP conn list\t\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_PINW_CAP unsol\t\t\t%lu\n", BIT(dword, 7));
-	printf("AUD_PINW_CAP mute\t\t\t%lu\n", BIT(dword, 5));
-	printf("AUD_PINW_CAP format override\t\t%lu\n", BIT(dword, 4));
-	printf("AUD_PINW_CAP amp param override\t\t%lu\n", BIT(dword, 3));
-	printf("AUD_PINW_CAP out amp present\t\t%lu\n", BIT(dword, 2));
-	printf("AUD_PINW_CAP in amp present\t\t%lu\n", BIT(dword, 1));
-
-	dword = INREG(AUD_PIN_CAP);
-	printf("AUD_PIN_CAP EAPD\t\t\t%lu\n", BIT(dword, 16));
-	printf("AUD_PIN_CAP HDMI\t\t\t%lu\n", BIT(dword, 7));
-	printf("AUD_PIN_CAP output\t\t\t%lu\n", BIT(dword, 4));
-	printf("AUD_PIN_CAP presence detect\t\t%lu\n", BIT(dword, 2));
-
-	dword = INREG(AUD_PINW_CNTR);
-	printf("AUD_PINW_CNTR mute status\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_PINW_CNTR out enable\t\t%lu\n", BIT(dword, 6));
-	printf("AUD_PINW_CNTR amp mute status\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_PINW_CNTR amp mute status\t\t%lu\n", BIT(dword, 8));
-	printf("AUD_PINW_CNTR stream type\t\t[0x%lx] %s\n",
-	       BITS(dword, 2, 0), OPNAME(stream_type, BITS(dword, 2, 0)));
-
-	dword = INREG(AUD_PINW_UNSOLRESP);
-	printf("AUD_PINW_UNSOLRESP enable unsol resp\t%lu\n", BIT(dword, 31));
-
-	dword = INREG(AUD_CNTL_ST);
-	printf("AUD_CNTL_ST DIP audio enabled\t\t%lu\n", BIT(dword, 21));
-	printf("AUD_CNTL_ST DIP ACP enabled\t\t%lu\n", BIT(dword, 22));
-	printf("AUD_CNTL_ST DIP ISRCx enabled\t\t%lu\n", BIT(dword, 23));
-	printf("AUD_CNTL_ST DIP port select\t\t[0x%lx] %s\n",
-	       BITS(dword, 30, 29), dip_port[BITS(dword, 30, 29)]);
-	printf("AUD_CNTL_ST DIP buffer index\t\t[0x%lx] %s\n",
-	       BITS(dword, 20, 18), OPNAME(dip_index, BITS(dword, 20, 18)));
-	printf("AUD_CNTL_ST DIP trans freq\t\t[0x%lx] %s\n",
-	       BITS(dword, 17, 16), dip_trans[BITS(dword, 17, 16)]);
-	printf("AUD_CNTL_ST DIP address\t\t\t%lu\n", BITS(dword, 3, 0));
-	printf("AUD_CNTL_ST CP ready\t\t\t%lu\n", BIT(dword, 15));
-	printf("AUD_CNTL_ST ELD valid\t\t\t%lu\n", BIT(dword, 14));
-	printf("AUD_CNTL_ST ELD ack\t\t\t%lu\n", BIT(dword, 4));
-	printf("AUD_CNTL_ST ELD bufsize\t\t\t%lu\n", BITS(dword, 13, 9));
-	printf("AUD_CNTL_ST ELD address\t\t\t%lu\n", BITS(dword, 8, 5));
-
-	dword = INREG(AUD_HDMIW_STATUS);
-	printf("AUD_HDMIW_STATUS CDCLK/DOTCLK underrun\t%lu\n", BIT(dword, 31));
-	printf("AUD_HDMIW_STATUS CDCLK/DOTCLK overrun\t%lu\n", BIT(dword, 30));
-	printf("AUD_HDMIW_STATUS BCLK/CDCLK underrun\t%lu\n", BIT(dword, 29));
-	printf("AUD_HDMIW_STATUS BCLK/CDCLK overrun\t%lu\n", BIT(dword, 28));
-
-	dword = INREG(AUD_CONV_CHCNT);
-	printf("AUD_CONV_CHCNT HDMI HBR enabled\t\t%lu\n", BITS(dword, 15, 14));
-	printf("AUD_CONV_CHCNT HDMI channel count\t%lu\n",
-	       BITS(dword, 11, 8) + 1);
-
-	printf("AUD_CONV_CHCNT HDMI channel mapping:\n");
-	for (i = 0; i < 8; i++) {
-		OUTREG(AUD_CONV_CHCNT, i);
-		dword = INREG(AUD_CONV_CHCNT);
-		printf("\t\t\t\t\t[0x%x] %u => %lu \n", dword, i,
-		       BITS(dword, 7, 4));
-	}
-
-	return 0;
-}
commit 6bdab841766c8d9febaa23cb01a7bbc9edfae471
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 11:21:40 2010 -0500

    uxa: Skip adjusting mask coordinates when no mask is present.
    
    Quiets clang warnings about garbage variable usage.

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 68b406e..3a3a785 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -860,8 +860,10 @@ uxa_try_driver_composite(CARD8 op,
 	nbox = REGION_NUM_RECTS(&region);
 	pbox = REGION_RECTS(&region);
 
-	xMask = xMask + mask_off_x - xDst - dst_off_x;
-	yMask = yMask + mask_off_y - yDst - dst_off_y;
+	if (pMask) {
+		xMask = xMask + mask_off_x - xDst - dst_off_x;
+		yMask = yMask + mask_off_y - yDst - dst_off_y;
+	}
 
 	xSrc = xSrc + src_off_x - xDst - dst_off_x;
 	ySrc = ySrc + src_off_y - yDst - dst_off_y;
commit a86869e6c3131b83a2ad529bc313270a9f45f5bd
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 08:15:30 2010 -0800

    Fix an unused variable warning for !INTEL_XVMC.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 35e57f6..1cbef7e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1103,7 +1103,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	VisualPtr visual;
+#ifdef INTEL_XVMC
 	MessageType from;
+#endif
 	struct pci_device *const device = intel->PciInfo;
 	int fb_bar = IS_I9XX(intel) ? 2 : 0;
 
commit ec5deb2bcbf828c3c47488eb77461c26cab38ed6
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 08:11:00 2010 -0800

    Remove dead assignments noticed by clang.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 70e1410..9e56698 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1322,7 +1322,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	i830_memory *old_front = NULL;
-	Bool	    tiled, ret;
+	Bool	    ret;
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
 	uint32_t    old_fb_id;
 	int	    i, pitch, old_width, old_height, old_pitch;
@@ -1331,7 +1331,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		return TRUE;
 
 	pitch = i830_pad_drawable_width(width, intel->cpp);
-	tiled = i830_tiled_width(intel, &pitch, intel->cpp);
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
 		   "Allocate new frame buffer %dx%d stride %d\n",
 		   width, height, pitch);
@@ -1498,7 +1497,6 @@ drm_wakeup_handler(pointer data, int err, pointer p)
 Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
 {
 	intel_screen_private *intel = intel_get_screen_private(scrn);
-	xf86CrtcConfigPtr   xf86_config;
 	struct drm_i915_getparam gp;
 	drmmode_ptr drmmode;
 	unsigned int i;
@@ -1509,7 +1507,6 @@ Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp)
 	drmmode->fb_id = 0;
 
 	xf86CrtcConfigInit(scrn, &drmmode_xf86crtc_config_funcs);
-	xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
 
 	drmmode->cpp = cpp;
 	drmmode->mode_res = drmModeGetResources(drmmode->fd);
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 68e45bb..3bec092 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -445,7 +445,6 @@ static Bool intel_pci_probe (DriverPtr		driver,
 			     intptr_t		match_data)
 {
     ScrnInfoPtr	    scrn = NULL;
-    EntityInfoPtr   entity;
 
     scrn = xf86ConfigPciEntity (scrn, 0, entity_num, I810PciChipsets,
 				NULL,
@@ -457,8 +456,6 @@ static Bool intel_pci_probe (DriverPtr		driver,
 	scrn->name = I810_NAME;
 	scrn->Probe = NULL;
 
-	entity = xf86GetEntityInfo (entity_num);
-	
 	switch (DEVICE_ID(device)) {
 #ifndef I830_ONLY
 	case PCI_CHIP_I810:
@@ -825,7 +822,6 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
       }
       if (!pI810->MaxClock)
 	 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[0];
-      from = X_CONFIG;
    } else {
       switch (pScrn->bitsPerPixel) {
       case 8:
@@ -961,17 +957,10 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
 static Bool
 I810MapMMIO(ScrnInfoPtr pScrn)
 {
-   int mmioFlags;
    I810Ptr pI810 = I810PTR(pScrn);
    struct pci_device *const device = pI810->PciInfo;
    int err;
 
-#if !defined(__alpha__)
-   mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT;
-#else
-   mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT | VIDMEM_SPARSE;
-#endif
-
    err = pci_device_map_range (device,
 			       pI810->MMIOAddr,
 			       I810_REG_SIZE,
@@ -1456,7 +1445,7 @@ I810CalcVCLK(ScrnInfoPtr pScrn, double freq)
    I810Ptr pI810 = I810PTR(pScrn);
    I810RegPtr i810Reg = &pI810->ModeReg;
    int m, n, p;
-   double f_out, f_best;
+   double f_out;
    double f_err;
    double f_vco;
    int m_best = 0, n_best = 0, p_best = 0;
@@ -1484,7 +1473,6 @@ I810CalcVCLK(ScrnInfoPtr pScrn, double freq)
       if (fabs(f_err) < err_max) {
 	 m_best = m;
 	 n_best = n;
-	 f_best = f_out;
 	 err_best = f_err;
       }
    } while ((fabs(f_err) >= err_target) &&
@@ -1685,12 +1673,10 @@ static void
 I810LoadPalette15(ScrnInfoPtr pScrn, int numColors, int *indices,
 		  LOCO * colors, VisualPtr pVisual)
 {
-   I810Ptr pI810;
    vgaHWPtr hwp;
    int i, j, index;
    unsigned char r, g, b;
 
-   pI810 = I810PTR(pScrn);
    hwp = VGAHWPTR(pScrn);
 
    for (i = 0; i < numColors; i++) {
@@ -1711,12 +1697,10 @@ static void
 I810LoadPalette16(ScrnInfoPtr pScrn, int numColors, int *indices,
 		  LOCO * colors, VisualPtr pVisual)
 {
-   I810Ptr pI810;
    vgaHWPtr hwp;
    int i, index;
    unsigned char r, g, b;
 
-   pI810 = I810PTR(pScrn);
    hwp = VGAHWPTR(pScrn);
 
    /* Load all four entries in each of the 64 color ranges.  -jens */
@@ -1777,12 +1761,10 @@ static void
 I810LoadPalette24(ScrnInfoPtr pScrn, int numColors, int *indices,
 		  LOCO * colors, VisualPtr pVisual)
 {
-   I810Ptr pI810;
    vgaHWPtr hwp;
    int i, index;
    unsigned char r, g, b;
 
-   pI810 = I810PTR(pScrn);
    hwp = VGAHWPTR(pScrn);
 
    for (i = 0; i < numColors; i++) {
@@ -1908,7 +1890,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    vgaHWPtr hwp;
    I810Ptr pI810;
    VisualPtr visual;
-   MessageType driFrom = X_DEFAULT;
 
    pScrn = xf86Screens[pScreen->myNum];
    pI810 = I810PTR(pScrn);
@@ -1957,8 +1938,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    
    if (pI810->directRenderingEnabled==TRUE)
      pI810->directRenderingEnabled = I810DRIScreenInit(pScreen);
-   else
-     driFrom = X_CONFIG;
 
 #else
    pI810->directRenderingEnabled = FALSE;
@@ -2014,7 +1993,6 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 #ifdef XF86DRI
    if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) {
       pI810->directRenderingEnabled = FALSE;
-      driFrom = X_PROBED;
       I810DRICloseScreen(pScreen);
    }
 
diff --git a/src/i810_video.c b/src/i810_video.c
index ee1a232..9bb9870 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -1206,7 +1206,7 @@ I810AllocateSurface(
     XF86SurfacePtr surface
 ){
     FBLinearPtr linear;
-    int pitch, fbpitch, size, bpp;
+    int pitch, size, bpp;
     OffscreenPrivPtr pPriv;
     I810Ptr pI810 = I810PTR(pScrn);
 
@@ -1216,7 +1216,6 @@ I810AllocateSurface(
     w = (w + 1) & ~1;
     pitch = ((w << 1) + 15) & ~15;
     bpp = pScrn->bitsPerPixel >> 3;
-    fbpitch = bpp * pScrn->displayWidth;
     size = ((pitch * h) + bpp - 1) / bpp;
 
     if(!(linear = I810AllocateMemory(pScrn, NULL, size)))
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c88195c..35e57f6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -232,25 +232,20 @@ const OptionInfoRec *I830AvailableOptions(int chipid, int busid)
 
 static Bool I830GetRec(ScrnInfoPtr scrn)
 {
-	intel_screen_private *intel;
-
 	if (scrn->driverPrivate)
 		return TRUE;
-	intel = scrn->driverPrivate = xnfcalloc(sizeof(intel_screen_private), 1);
+	scrn->driverPrivate = xnfcalloc(sizeof(intel_screen_private), 1);
+
 	return TRUE;
 }
 
 static void I830FreeRec(ScrnInfoPtr scrn)
 {
-	intel_screen_private *intel;
-
 	if (!scrn)
 		return;
 	if (!scrn->driverPrivate)
 		return;
 
-	intel = intel_get_screen_private(scrn);
-
 	xfree(scrn->driverPrivate);
 	scrn->driverPrivate = NULL;
 }
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 79c9fa7..289c5f0 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -480,7 +480,6 @@ i830_memory *i830_allocate_framebuffer(ScrnInfoPtr scrn)
 {
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	unsigned int pitch = scrn->displayWidth * intel->cpp;
-	unsigned long minspace;
 	long size, fb_height;
 	int flags;
 	i830_memory *front_buffer = NULL;
@@ -493,12 +492,6 @@ i830_memory *i830_allocate_framebuffer(ScrnInfoPtr scrn)
 	 */
 	fb_height = scrn->virtualY;
 
-	/* Calculate how much framebuffer memory to allocate.  For the
-	 * initial allocation, calculate a reasonable minimum.  This is
-	 * enough for the virtual screen size.
-	 */
-	minspace = pitch * scrn->virtualY;
-
 	size = ROUND_TO_PAGE(pitch * fb_height);
 
 	if (intel->tiling && IsTileable(scrn, pitch))
diff --git a/src/i830_render.c b/src/i830_render.c
index 4d37a40..89e5acb 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -326,7 +326,6 @@ static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit)
 			  (FILTER_LINEAR << TM0S3_MIN_FILTER_SHIFT));
 		break;
 	default:
-		filter = 0;
 		FatalError("Bad filter 0x%x\n", picture->filter);
 	}
 	filter |= (MIPFILTER_NONE << TM0S3_MIP_FILTER_SHIFT);
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 4a892b5..f489f4f 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -156,7 +156,7 @@ i830_uxa_pixmap_compute_size(PixmapPtr pixmap,
 		 */
 		size = *stride * ALIGN(h, 2);
 	} else {
-		int aligned_h = h;
+		int aligned_h;
 		if (*tiling == I915_TILING_X)
 			aligned_h = ALIGN(h, 8);
 		else
@@ -189,7 +189,6 @@ i830_uxa_prepare_solid(PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg)
 {
 	ScrnInfoPtr scrn = xf86Screens[pixmap->drawable.pScreen->myNum];
 	intel_screen_private *intel = intel_get_screen_private(scrn);
-	unsigned long pitch;
 	drm_intel_bo *bo_table[] = {
 		NULL,		/* batch_bo */
 		i830_get_pixmap_bo(pixmap),
@@ -213,8 +212,6 @@ i830_uxa_prepare_solid(PixmapPtr pixmap, int alu, Pixel planemask, Pixel fg)
 	if (!intel_check_pitch_2d(pixmap))
 		return FALSE;
 
-	pitch = i830_pixmap_pitch(pixmap);
-
 	if (!i830_pixmap_pitch_is_aligned(pixmap)) {
 		intel_debug_fallback(scrn, "pixmap pitch not aligned");
 		return FALSE;
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 80be91f..cd3e477 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -122,7 +122,7 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
 		 int w, int h, int format, char *bits, int src_stride)
 {
 	uxa_screen_t *uxa_screen = uxa_get_screen(pDrawable->pScreen);
-	PixmapPtr pPix = uxa_get_drawable_pixmap(pDrawable);
+	PixmapPtr pPix;
 	RegionPtr pClip;
 	BoxPtr pbox;
 	int nbox;
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 5c23321..be89f79 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -743,7 +743,6 @@ uxa_glyphs(CARD8 op,
 	   INT16 xSrc,
 	   INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs)
 {
-	PicturePtr pPicture;
 	PixmapPtr pMaskPixmap = 0;
 	PicturePtr pMask;
 	ScreenPtr pScreen = pDst->pDrawable->pScreen;
@@ -837,7 +836,6 @@ uxa_glyphs(CARD8 op,
 		n = list->len;
 		while (n--) {
 			glyph = *glyphs++;
-			pPicture = GlyphPicture(glyph)[pScreen->myNum];
 
 			if (glyph->info.width > 0 && glyph->info.height > 0 &&
 			    uxa_buffer_glyph(pScreen, &buffer, glyph, x,
commit a4180eabfa00c256494ed09aa336a17605c49a8a
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 08:10:17 2010 -0800

    Remove stale junk in VideoRam setup, noticed by clang.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 32d1899..c88195c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1127,35 +1127,18 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 	 * actual memory allocation, so alignment and things will cause less than
 	 * VideoRam to be actually used.
 	 */
-	if (intel->pEnt->device->videoRam == 0) {
-		from = X_DEFAULT;
-		scrn->videoRam = intel->FbMapSize / KB(1);
-	} else {
-#if 0
-		from = X_CONFIG;
-		scrn->videoRam = intel->pEnt->device->videoRam;
-#else
-		/* Disable VideoRam configuration, at least for now.  Previously,
-		 * VideoRam was necessary to avoid overly low limits on allocated
-		 * memory, so users created larger, yet still small, fixed allocation
-		 * limits in their config files.  Now, the driver wants to allocate more,
-		 * and the old intention of the VideoRam lines that had been entered is
-		 * obsolete.
-		 */
-		from = X_DEFAULT;
-		scrn->videoRam = intel->FbMapSize / KB(1);
-
+	scrn->videoRam = intel->FbMapSize / KB(1);
+	if (intel->pEnt->device->videoRam != 0) {
 		if (scrn->videoRam != intel->pEnt->device->videoRam) {
 			xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-				   "VideoRam configuration found, which is no longer "
-				   "recommended.\n");
+				   "VideoRam configuration found, which is no "
+				   "longer used.\n");
 			xf86DrvMsg(scrn->scrnIndex, X_INFO,
-				   "Continuing with default %dkB VideoRam instead of %d "
-				   "kB.\n",
+				   "Continuing with (ignored) %dkB VideoRam "
+				   "instead of %d kB.\n",
 				   scrn->videoRam,
 				   intel->pEnt->device->videoRam);
 		}
-#endif
 	}
 
 	scrn->videoRam = device->regions[fb_bar].size / 1024;
commit 03657d4a698e0a25ab3863a15ad4c8b9d64dbb9a
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 19 08:03:44 2010 -0800

    Remove dead UMS CRTC resize code.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index e94a60c..32d1899 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -403,71 +403,6 @@ int i830_pad_drawable_width(int width, int cpp)
 	return (width + 63) & ~63;
 }
 
-static Bool i830_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
-{
-#ifdef DRI2
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-	int old_width = scrn->displayWidth;
-#endif
-	int old_x = scrn->virtualX;
-	int old_y = scrn->virtualY;
-
-	if (old_x == width && old_y == height)
-		return TRUE;
-
-	scrn->virtualX = width;
-	scrn->virtualY = height;
-#ifdef DRI2
-	if (intel->front_buffer) {
-		i830_memory *new_front, *old_front;
-		Bool tiled;
-		ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
-
-		scrn->displayWidth = i830_pad_drawable_width(width, intel->cpp);
-		tiled = i830_tiled_width(intel, &scrn->displayWidth, intel->cpp);
-		xf86DrvMsg(scrn->scrnIndex, X_INFO,
-			   "Allocate new frame buffer %dx%d stride %d\n", width,
-			   height, scrn->displayWidth);
-		intel_sync(scrn);
-		i830WaitForVblank(scrn);
-		new_front = i830_allocate_framebuffer(scrn);
-		if (!new_front) {
-			scrn->virtualX = old_x;
-			scrn->virtualY = old_y;
-			scrn->displayWidth = old_width;
-			return FALSE;
-		}
-		old_front = intel->front_buffer;
-		intel->front_buffer = new_front;
-		i830_set_pixmap_bo(screen->GetScreenPixmap(screen),
-				   new_front->bo);
-		scrn->fbOffset = intel->front_buffer->offset;
-
-		screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
-					   width, height, -1, -1,
-					   scrn->displayWidth * intel->cpp,
-					   NULL);
-
-		/* ick. xf86EnableDisableFBAccess smashes the screen pixmap devPrivate,
-		 * so update the value it uses
-		 */
-		scrn->pixmapPrivate.ptr = NULL;
-		xf86DrvMsg(scrn->scrnIndex, X_INFO,
-			   "New front buffer at 0x%lx\n",
-			   intel->front_buffer->offset);
-		i830_set_new_crtc_bo(scrn);
-		intel_sync(scrn);
-		i830WaitForVblank(scrn);
-		i830_free_memory(scrn, old_front);
-	}
-#endif
-	return TRUE;
-}
-
-static const xf86CrtcConfigFuncsRec i830_xf86crtc_config_funcs = {
-	i830_xf86crtc_resize
-};
-
 /*
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.


More information about the xorg-commit mailing list