drm-snapshot: Changes to 'upstream-experimental'

2009-06-30 Thread Chris Lamb
 configure.ac|9 
 libdrm/Makefile.am  |6 
 libdrm/nouveau/libdrm_nouveau.pc.in |2 
 libdrm/nouveau/nouveau_bo.c |  187 +-
 libdrm/nouveau/nouveau_bo.h |   22 
 libdrm/nouveau/nouveau_device.c |6 
 libdrm/nouveau/nouveau_device.h |2 
 libdrm/nouveau/nouveau_drmif.h  |3 
 libdrm/nouveau/nouveau_private.h|1 
 libdrm/nouveau/nouveau_pushbuf.c|4 
 libdrm/nouveau/nouveau_pushbuf.h|   23 
 libdrm/radeon/Makefile.am   |   53 
 libdrm/radeon/libdrm_radeon.pc.in   |   10 
 libdrm/radeon/radeon_bo.h   |  179 ++
 libdrm/radeon/radeon_bo_gem.c   |  254 +++
 libdrm/radeon/radeon_bo_gem.h   |   42 
 libdrm/radeon/radeon_cs.h   |  208 ++
 libdrm/radeon/radeon_cs_gem.c   |  551 +++
 libdrm/radeon/radeon_cs_gem.h   |   41 
 libdrm/radeon/radeon_track.c|  140 +
 libdrm/radeon/radeon_track.h|   64 
 linux-core/Makefile |2 
 linux-core/Makefile.kernel  |7 
 linux-core/drmP.h   |   21 
 linux-core/drm_agpsupport.c |  171 --
 linux-core/drm_bo.c | 2730 
 linux-core/drm_bo_lock.c|  189 --
 linux-core/drm_bo_move.c|  614 
 linux-core/drm_compat.c |   99 -
 linux-core/drm_drv.c|   36 
 linux-core/drm_fence.c  |  829 --
 linux-core/drm_fops.c   |   35 
 linux-core/drm_object.c |  294 ---
 linux-core/drm_objects.h|  821 --
 linux-core/drm_os_linux.h   |8 
 linux-core/drm_proc.c   |  102 -
 linux-core/drm_stub.c   |   14 
 linux-core/drm_sysfs.c  |8 
 linux-core/drm_ttm.c|  512 --
 linux-core/drm_vm.c |  198 --
 linux-core/nouveau_backlight.c  |   93 +
 linux-core/via_buffer.c |  163 --
 linux-core/via_fence.c  |  169 --
 linux-core/xgi_cmdlist.c|3 
 linux-core/xgi_drv.c|   11 
 linux-core/xgi_drv.h|   12 
 linux-core/xgi_fence.c  |   87 -
 shared-core/drm.h   |  318 
 shared-core/i915_drm.h  |   52 
 shared-core/nouveau_drm.h   |   35 
 shared-core/nouveau_drv.h   |2 
 shared-core/nouveau_reg.h   |4 
 shared-core/nv50_graph.c|1 
 shared-core/radeon_drm.h|  131 +
 shared-core/via_drv.c   |   40 
 shared-core/via_drv.h   |   14 
 shared-core/via_map.c   |   10 
 tests/modetest/modetest.c   |2 
 58 files changed, 2002 insertions(+), 7642 deletions(-)

New commits:
commit de1ed01214874dcdd6116ff2587c8710d6ed4d2d
Author: Dave Airlie 
Date:   Tue Jun 30 12:19:28 2009 +1000

radeon: add support for write followed by read relocs.

the DDX does this and used to handle it internally

diff --git a/libdrm/radeon/radeon_cs_gem.c b/libdrm/radeon/radeon_cs_gem.c
index b9f6f4b..82ef16c 100644
--- a/libdrm/radeon/radeon_cs_gem.c
+++ b/libdrm/radeon/radeon_cs_gem.c
@@ -144,12 +144,19 @@ static int cs_gem_write_reloc(struct radeon_cs *cs,
  * domain set then the read_domain should also be set for this
  * new relocation.
  */
-if (reloc->read_domain && !read_domain) {
-return -EINVAL;
-}
-if (reloc->write_domain && !write_domain) {
-return -EINVAL;
+/* the DDX expects to read and write from same pixmap */
+if (write_domain && (reloc->read_domain & write_domain)) {
+reloc->read_domain = 0;
+reloc->write_domain = write_domain;
+} else if (read_domain & reloc->write_domain) {
+reloc->read_domain = 0;
+} else {
+if (write_domain != reloc->write_domain)
+return -EINVAL;
+if (read_domain != reloc->read_domain)
+return -EINVAL;
 }
+
 reloc->read_domain |= read_domain;
 reloc->write_domain |= write_domain;
 /* update flags */

commit 790097c51330090b2b7b90429b9ab8ddf259fd8e
Author: Dave Airlie 
Date:   Tue Jun 23 09:51:05 2009 +1000

remove some old ttm bits

diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h
index c8fec5f..2539966 100644
--- a/shared-core/i915_drm.h
+++ b/shared-core/i915_drm.h
@@ -395,58 +395,6 @@ typedef struct drm_i915_hws_addr {
uint64_t addr;
 } drm_i915_hws_addr_t;
 
-/*
- * Relocation header is 4 uint32_ts
- * 0 - 32 bit reloc count
- * 1 - 32-bit relocation type
- * 2-3 - 64-bit user buffer handle ptr for another list of relocs.
- */
-#define I915_RELOC_HEADER 4
-
-/*
- * type 0 relocation has 4-uint32_t stride
- * 0 - offset into buffer
- * 1 - delta to add in
- * 2 - buffer handl

drm-snapshot: Changes to 'upstream-experimental'

2009-02-04 Thread Chris Lamb
 README  |9 
 configure.ac|   18 
 libdrm/Makefile.am  |3 
 libdrm/intel/Makefile.am|1 
 libdrm/intel/intel_bufmgr_fake.c|2 
 libdrm/intel/intel_bufmgr_gem.c |   82 
 libdrm/intel/intel_chipset.h|   71 
 libdrm/nouveau/Makefile.am  |   40 
 libdrm/nouveau/libdrm_nouveau.pc.in |   10 
 libdrm/nouveau/nouveau_bo.c |  838 +++
 libdrm/nouveau/nouveau_bo.h |   97 
 libdrm/nouveau/nouveau_channel.c|  167 
 libdrm/nouveau/nouveau_channel.h|   56 
 libdrm/nouveau/nouveau_class.h  | 8006 
 libdrm/nouveau/nouveau_device.c |  185 
 libdrm/nouveau/nouveau_device.h |   31 
 libdrm/nouveau/nouveau_dma.c|  215 
 libdrm/nouveau/nouveau_dma.h|  154 
 libdrm/nouveau/nouveau_drmif.h  |   59 
 libdrm/nouveau/nouveau_fence.c  |  249 +
 libdrm/nouveau/nouveau_grobj.c  |  138 
 libdrm/nouveau/nouveau_grobj.h  |   48 
 libdrm/nouveau/nouveau_notifier.c   |  146 
 libdrm/nouveau/nouveau_notifier.h   |   63 
 libdrm/nouveau/nouveau_private.h|  203 
 libdrm/nouveau/nouveau_pushbuf.c|  276 +
 libdrm/nouveau/nouveau_pushbuf.h|  160 
 libdrm/nouveau/nouveau_resource.c   |  115 
 libdrm/nouveau/nouveau_resource.h   |   48 
 libdrm/xf86drm.c|   23 
 libdrm/xf86drmMode.c|   21 
 libdrm/xf86drmMode.h|7 
 linux-core/Makefile |   29 
 linux-core/Makefile.kernel  |2 
 linux-core/drm_compat.h |6 
 linux-core/drm_fops.c   |2 
 linux-core/nv_drv.c |   94 
 linux-core/nv_drv.h |1 
 shared-core/i915_drm.h  |2 
 shared-core/nouveau_drm.h   |  123 
 shared-core/nouveau_drv.h   |2 
 shared-core/nouveau_irq.c   |   24 
 shared-core/nouveau_mem.c   |   11 
 shared-core/nouveau_object.c|7 
 shared-core/nouveau_state.c |   23 
 shared-core/nv04_instmem.c  |3 
 shared-core/nv50_graph.c|2 
 shared-core/nv_drv.h|   52 
 tests/modetest/Makefile.am  |6 
 tests/modetest/modetest.c   |  254 -
 50 files changed, 11890 insertions(+), 294 deletions(-)

New commits:
commit 8b8803695b24d4cb4d041437a4709be06e59471b
Author: Kristian Høgsberg 
Date:   Wed Feb 4 12:17:13 2009 -0500

modetest: Add syntax to also specify a crtc when setting a mode.

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index f1c3bf3..9a82727 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -254,6 +254,7 @@ struct connector {
char mode_str[64];
struct drm_mode_modeinfo *mode;
drmModeEncoder *encoder;
+   int crtc;
 }; 
 
 static void
@@ -318,6 +319,9 @@ connector_find_mode(struct connector *c)
 
drmModeFreeEncoder(c->encoder);
}
+
+   if (c->crtc == -1)
+   c->crtc = c->encoder->crtc_id;
 }
 
 #ifdef HAVE_CAIRO
@@ -477,9 +481,14 @@ set_mode(struct connector *c, int count)
 
x = 0;
for (i = 0; i < count; i++) {
+   int crtc_id;
if (c[i].mode == NULL)
continue;
-   ret = drmModeSetCrtc(fd, c[i].encoder->crtc_id, fb_id, x, 0,
+
+   printf("setting mode %s on connector %d, crtc %d\n",
+  c[i].mode_str, c[i].id, c[i].crtc);
+
+   ret = drmModeSetCrtc(fd, c[i].crtc, fb_id, x, 0,
 &c[i].id, 1, c[i].mode);
x += c[i].mode->hdisplay;
 
@@ -503,6 +512,7 @@ void usage(char *name)
fprintf(stderr, "\t-m\tlist modes\n");
fprintf(stderr, "\t-f\tlist framebuffers\n");
fprintf(stderr, "\t-s :\tset a mode\n");
+   fprintf(stderr, "\t-s @:\tset a mode\n");
fprintf(stderr, "\n\tDefault is to dump all info.\n");
exit(0);
 }
@@ -538,13 +548,15 @@ int main(int argc, char **argv)
break;
case 's':
modeset = strdup(optarg);
+   con_args[count].crtc = -1;
if (sscanf(optarg, "%d:%64s",
   &con_args[count].id,
-  &con_args[count].mode_str) != 2)
+  &con_args[count].mode_str) != 2 &&
+   sscanf(optarg, "%...@%d:%64s",
+  &con_args[count].id,
+  &con_args[count].crtc,
+  &con_args[count].mode_str) != 3)
usage(argv[0]);
-   printf("setting mode %s on connector %d\n",
-  con_args[count].mode_str,
-  con_args[count].id);
count++;  

drm-snapshot: Changes to 'upstream-experimental'

2009-01-04 Thread Chris Lamb
 .gitignore  |2 
 bsd-core/drm_mode.h |1 
 configure.ac|4 
 libdrm/Makefile.am  |5 
 libdrm/intel/intel_bufmgr.h |   14 
 libdrm/intel/intel_bufmgr_gem.c |  281 +++-
 libdrm/xf86drm.c|   44 
 libdrm/xf86drm.h|6 
 libdrm/xf86drmMode.c|  686 ++
 libdrm/xf86drmMode.h|  258 
 linux-core/Makefile |9 
 linux-core/Makefile.kernel  |6 
 linux-core/drm_mode.h   |1 
 shared-core/Makefile.am |1 
 shared-core/drm.h   |   30 
 shared-core/drm_mode.h  |  273 
 shared-core/i915_drm.h  |   68 -
 shared-core/nv50_graph.c|6 
 shared-core/nv50_grctx.h| 2542 +---
 shared-core/radeon_irq.c|6 
 tests/Makefile.am   |4 
 tests/dristat.c |2 
 tests/modeprint/Makefile.am |   13 
 tests/modeprint/modeprint.c |  402 ++
 tests/modetest/Makefile.am  |   13 
 tests/modetest/modetest.c   |  470 +++
 26 files changed, 4906 insertions(+), 241 deletions(-)

New commits:
commit a8c548034e38d7fb8afeca100230818b3cfcb9d9
Author: Jesse Barnes 
Date:   Mon Dec 29 09:21:58 2008 -0800

Remove executable from modeprint test dir

Accidentally committed it with the mode setting changes.

diff --git a/tests/modeprint/app b/tests/modeprint/app
deleted file mode 100755
index 82085c8..000
Binary files a/tests/modeprint/app and /dev/null differ

commit 58d557c73b9e4ad1964fd083abeec74875c141cb
Author: Robert Noland 
Date:   Tue Dec 23 13:56:23 2008 -0500

[FreeBSD] Fix build on FreeBSD after modesetting import.

diff --git a/bsd-core/drm_mode.h b/bsd-core/drm_mode.h
new file mode 12
index 000..a43f138
--- /dev/null
+++ b/bsd-core/drm_mode.h
@@ -0,0 +1 @@
+../shared-core/drm_mode.h
\ No newline at end of file
diff --git a/shared-core/drm_mode.h b/shared-core/drm_mode.h
index 601d2bd..9b92733 100644
--- a/shared-core/drm_mode.h
+++ b/shared-core/drm_mode.h
@@ -27,11 +27,13 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+#ifdef __linux__
 #if !defined(__KERNEL__) && !defined(_KERNEL)
 #include 
 #else
 #include 
 #endif
+#endif
 
 #define DRM_DISPLAY_INFO_LEN   32
 #define DRM_CONNECTOR_NAME_LEN 32

commit b48bd3a036efa3c3aa759759a5be4f80f1c3ac72
Author: Dave Airlie 
Date:   Tue Dec 23 11:22:44 2008 +1000

radeon: only write irq regs if irq is enabled

diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c
index 6956996..836f384 100644
--- a/shared-core/radeon_irq.c
+++ b/shared-core/radeon_irq.c
@@ -44,7 +44,8 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, 
int state)
else
dev_priv->irq_enable_reg &= ~mask;
 
-   RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
+   if (dev->irq_enabled)
+   RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
 }
 
 static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
@@ -56,7 +57,8 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, 
u32 mask, int state)
else
dev_priv->r500_disp_irq_reg &= ~mask;
 
-   RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
+   if (dev->irq_enabled)
+   RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
 }
 
 int radeon_enable_vblank(struct drm_device *dev, int crtc)

commit dfd7fdafd8a2bad0d63ced4a969b6278c221c000
Author: Eric Anholt 
Date:   Wed Dec 17 13:55:53 2008 -0800

intel: Rename plane[AB]* back to pipe[AB]*.

The values are really going to continue meaning pipe, not plane, and that's
what they're called in the kernel copy of the header.  Userland hasn't ever
made the switch to pipe!=plane, since userland checks are based on DRM
version, which is still stuck at 1.6.  However, Mesa did start using
plane[AB] names, so provide a compat define.

diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h
index 628f7f8..04ab4cf 100644
--- a/shared-core/i915_drm.h
+++ b/shared-core/i915_drm.h
@@ -111,14 +111,25 @@ typedef struct drm_i915_sarea {
unsigned int rotated_tiled;
unsigned int rotated2_tiled;
 
-   int planeA_x;
-   int planeA_y;
-   int planeA_w;
-   int planeA_h;
-   int planeB_x;
-   int planeB_y;
-   int planeB_w;
-   int planeB_h;
+   /* compat defines for the period of time when pipeA_* got renamed
+* to planeA_*.  They mean pipe, really.
+*/
+#define planeA_x pipeA_x
+#define planeA_y pipeA_y
+#define planeA_w pipeA_w
+#define planeA_h pipeA_h
+#define planeB_x pipeB_x
+#define planeB_y pipeB_y
+#define planeB_w pipeB_w
+#define planeB_h pipeB_h
+   int pipeA_x;
+   int pipeA_y;
+   int pipeA_w;
+   int pipeA_h;
+   int pipeB_x;
+   int pipeB_y;
+   int pipeB_w;
+   in

drm-snapshot: Changes to 'upstream-experimental'

2008-11-16 Thread Chris Lamb
 configure.ac |2 
 libdrm/intel/intel_bufmgr.c  |   73 
 libdrm/intel/intel_bufmgr.h  |  179 
 libdrm/intel/intel_bufmgr_fake.c |  369 -
 libdrm/intel/intel_bufmgr_gem.c  |  449 +
 libdrm/intel/intel_bufmgr_priv.h |   65 
 linux-core/drm_compat.h  |   28 
 linux-core/nouveau_sgdma.c   |4 
 linux-core/nv50_grctx.h  |1 
 shared-core/i915_dma.c   |4 
 shared-core/i915_drm.h   |   13 
 shared-core/nv50_graph.c | 8041 -
 shared-core/nv50_grctx.h | 9232 +++
 shared-core/radeon_cp.c  |   15 
 shared-core/radeon_drv.h |   10 
 15 files changed, 9988 insertions(+), 8497 deletions(-)

New commits:
commit 930c0e7cf4f4776f7a69e7acc6fedeed7addb235
Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Fri Nov 7 12:58:52 2008 -0800

intel: Restart on interrupt of bo_wait_rendering instead of complaining.

diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index 5eaf5f5..9cb3359 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -658,7 +658,9 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)
 set_domain.handle = bo_gem->gem_handle;
 set_domain.read_domains = I915_GEM_DOMAIN_GTT;
 set_domain.write_domain = 0;
-ret = ioctl (bufmgr_gem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain);
+do {
+   ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain);
+} while (ret == -1 && errno == EINTR);
 if (ret != 0) {
fprintf (stderr, "%s:%d: Error setting memory domains %d (%08x %08x): 
%s .\n",
 __FILE__, __LINE__,

commit 87e90c73620b88005fcca5fd40d0b08932e1
Author: Pekka Paalanen <[EMAIL PROTECTED]>
Date:   Sun Nov 2 13:48:32 2008 +0200

nouveau: compat fix for set_page_locked().

The set_page_locked() function has changed its name again.
2.6.28 offers __set_page_locked() instead, which uses non-atomic
__set_bit() to do the work. In this case, offer our own
set_page_locked() using the atomic set_bit(), because I do not know
if atomic access is really necessary. Atomic behaviour is the one
previously expected.

Signed-off-by: Pekka Paalanen <[EMAIL PROTECTED]>

diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index e09be47..bc4d2e5 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -392,4 +392,17 @@ extern struct page *drm_vm_sg_nopage(struct vm_area_struct 
*vma,
 #endif
 #endif
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
+#define set_page_locked SetPageLocked
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+/*
+ * The kernel provides __set_page_locked, which uses the non-atomic
+ * __set_bit function. Let's use the atomic set_bit just in case.
+ */
+static inline void set_page_locked(struct page *page)
+{
+   set_bit(PG_locked, &page->flags);
+}
+#endif
+
 #endif
diff --git a/linux-core/nouveau_sgdma.c b/linux-core/nouveau_sgdma.c
index 739e025..1163baf 100644
--- a/linux-core/nouveau_sgdma.c
+++ b/linux-core/nouveau_sgdma.c
@@ -227,11 +227,7 @@ nouveau_sgdma_init(struct drm_device *dev)
 
dev_priv->gart_info.sg_dummy_page =
alloc_page(GFP_KERNEL|__GFP_DMA32);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
set_page_locked(dev_priv->gart_info.sg_dummy_page);
-#else
-   SetPageLocked(dev_priv->gart_info.sg_dummy_page);
-#endif
dev_priv->gart_info.sg_dummy_bus =
pci_map_page(dev->pdev, dev_priv->gart_info.sg_dummy_page, 0,
 PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);

commit 00847dabe0fa5ccf796658f486e8f6f7a77e043b
Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Thu Oct 30 11:36:46 2008 -0700

libdrm 2.4.1.

diff --git a/configure.ac b/configure.ac
index 92507cb..0f7c79e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AC_PREREQ(2.57)
-AC_INIT([libdrm], 2.4.0, [EMAIL PROTECTED], libdrm)
+AC_INIT([libdrm], 2.4.1, [EMAIL PROTECTED], libdrm)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2])
 

commit 4b9826408f65976a1a13387beda748b65e03ec52
Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Thu Oct 30 09:33:07 2008 -0700

intel: Rename dri_ and intel_ symbols to drm_intel_.

I wanted to avoid doing this, as it's a bunch of churn, but there was a
conflict between the dri_ symbols in libdrm and the symbols that were in
Mesa in 7.2, which broke Mesa 7.2 AIGLX when the 2D driver had loaded new
libdrm symbols.  The new naming was recommended by cworth for giving the
code a unique prefix identifying where the code lives.

Additionally, take the opportunity to fix up two API mistakes: emit_reloc's
arguments were in a nonsensical order, and set_tiling lacked the stride
argument that the kernel will want to 

drm-snapshot: Changes to 'upstream-experimental'

2008-10-26 Thread Chris Lamb
 bsd-core/drm_drv.c   |2 +-
 bsd-core/drm_fops.c  |2 +-
 bsd-core/drm_lock.c  |   10 --
 libdrm/intel/intel_bufmgr_fake.c |   17 +
 libdrm/intel/intel_bufmgr_gem.c  |2 +-
 shared-core/i915_dma.c   |2 +-
 6 files changed, 17 insertions(+), 18 deletions(-)

New commits:
commit 1d930fc75b99a89fc77d35d8f95f2877cfd5d7f0
Author: Matthias Hopf <[EMAIL PROTECTED]>
Date:   Sat Oct 25 12:11:44 2008 -0400

drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)

Olaf Kirch noticed that the i915_set_status_page() function of the i915
kernel driver calls ioremap with an address offset that is supplied by
userspace via ioctl. The function zeroes the mapped memory via memset
and tells the hardware about the address. Turns out that access to that
ioctl is not restricted to root so users could probably exploit that to
do nasty things. We haven't tried to write actual exploit code though.

It only affects the Intel G33 series and newer.

diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 619e6ac..93bfcba 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1225,7 +1225,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE,  i915_vblank_pipe_get, DRM_AUTH 
),
DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
DRM_IOCTL_DEF(DRM_I915_MMIO, i915_mmio, DRM_AUTH),
-   DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH),
+   DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, 
DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
 #ifdef I915_HAVE_BUFFER
DRM_IOCTL_DEF(DRM_I915_EXECBUFFER, i915_execbuffer, DRM_AUTH),
 #endif

commit b7d54b1dba8eba24da1b9cdd2116a26b98365b81
Author: Xiang, Haihao <[EMAIL PROTECTED]>
Date:   Fri Oct 24 16:35:00 2008 +0800

intel: Also total child_size of the target_bos. Partial fix #17964.

diff --git a/libdrm/intel/intel_bufmgr_fake.c b/libdrm/intel/intel_bufmgr_fake.c
index c82ce5a..c9545b3 100644
--- a/libdrm/intel/intel_bufmgr_fake.c
+++ b/libdrm/intel/intel_bufmgr_fake.c
@@ -1193,9 +1193,10 @@ dri_fake_emit_reloc(dri_bo *reloc_buf,
 
dri_fake_bo_reference_locked(target_buf);
 
-   if (!target_fake->is_static)
+   if (!target_fake->is_static) {
   reloc_fake->child_size += ALIGN(target_buf->size, 
target_fake->alignment);
-
+  reloc_fake->child_size += target_fake->child_size;
+   }
r->target_buf = target_buf;
r->offset = offset;
r->last_target_offset = target_buf->offset;

commit 8256c347cc80db0371b40b34ee8a163908d50079
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Thu Oct 23 15:46:32 2008 -0400

[FreeBSD] We should use dev2unit() rather than minor()

diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 725e5a9..afcad19 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -534,7 +534,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, 
DRM_STRUCTPROC *p)
struct drm_device *dev = NULL;
int retcode = 0;
 
-   dev = DRIVER_SOFTC(minor(kdev));
+   dev = DRIVER_SOFTC(dev2unit(kdev));
 
DRM_DEBUG("open_count = %d\n", dev->open_count);
 
diff --git a/bsd-core/drm_fops.c b/bsd-core/drm_fops.c
index c6a8d19..e4cf846 100644
--- a/bsd-core/drm_fops.c
+++ b/bsd-core/drm_fops.c
@@ -41,7 +41,7 @@ int drm_open_helper(struct cdev *kdev, int flags, int fmt, 
DRM_STRUCTPROC *p,
struct drm_device *dev)
 {
struct drm_file *priv;
-   int m = minor(kdev);
+   int m = dev2unit(kdev);
int retcode;
 
if (flags & O_EXCL)

commit 7dbeb18777a4dc1e7eb3c6bc4da3e72456afc8fc
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Thu Oct 23 15:42:49 2008 -0400

[FreeBSD] This check isn't correct and causes at least mga to lockup.

diff --git a/bsd-core/drm_lock.c b/bsd-core/drm_lock.c
index 685b0ea..dec7281 100644
--- a/bsd-core/drm_lock.c
+++ b/bsd-core/drm_lock.c
@@ -102,17 +102,15 @@ int drm_unlock(struct drm_device *dev, void *data, struct 
drm_file *file_priv)
 {
struct drm_lock *lock = data;
 
+   DRM_DEBUG("%d (pid %d) requests unlock (0x%08x), flags = 0x%08x\n",
+   lock->context, DRM_CURRENTPID, dev->lock.hw_lock->lock,
+   lock->flags);
+
if (lock->context == DRM_KERNEL_CONTEXT) {
DRM_ERROR("Process %d using kernel context %d\n",
DRM_CURRENTPID, lock->context);
return EINVAL;
}
-   /* Check that the context unlock being requested actually matches
-* who currently holds the lock.
-*/
-   if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) ||
-   _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) != lock->context)
-   return EINVAL;
 
DRM_SPINLOCK(&dev->tsk_lock);
if (dev->locked_task_call != NULL) {

commit a59ea02ff839fa0801763a90beb8b232b933c746
Author: Keith Packard <[EMAIL PROTECTED]>
Date: 

drm-snapshot: Changes to 'upstream-experimental'

2008-10-14 Thread Chris Lamb
 libdrm/Makefile.am   |3 +--
 libdrm/intel/Makefile.am |1 +
 libdrm/intel/intel_bufmgr.c  |   10 ++
 libdrm/intel/intel_bufmgr.h  |2 ++
 libdrm/intel/intel_bufmgr_fake.c |   20 
 libdrm/intel/intel_bufmgr_gem.c  |   23 +++
 libdrm/intel/intel_bufmgr_priv.h |9 +
 7 files changed, 58 insertions(+), 10 deletions(-)

New commits:
commit 458e2d5bc5f949d00cfcc9a3f9ce89f0c9f5628c
Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Tue Oct 14 13:33:38 2008 -0700

intel: Fix compile warning.

diff --git a/libdrm/intel/intel_bufmgr_fake.c b/libdrm/intel/intel_bufmgr_fake.c
index cfe9a73..8e476c4 100644
--- a/libdrm/intel/intel_bufmgr_fake.c
+++ b/libdrm/intel/intel_bufmgr_fake.c
@@ -732,7 +732,6 @@ static void
 dri_fake_bo_wait_rendering(dri_bo *bo)
 {
dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)bo->bufmgr;
-   dri_bo_fake *bo_fake = (dri_bo_fake *)bo;
 
pthread_mutex_lock(&bufmgr_fake->lock);
dri_fake_bo_wait_rendering_locked(bo);

commit 993383873c215ab11975d98b93f131a4e3ea7ce6
Author: Eric Anholt <[EMAIL PROTECTED]>
Date:   Tue Oct 14 13:18:11 2008 -0700

intel: Add interface for getting tiling mode of a bo.

diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c
index fc7284b..92b6046 100644
--- a/libdrm/intel/intel_bufmgr.c
+++ b/libdrm/intel/intel_bufmgr.c
@@ -192,3 +192,13 @@ int dri_bo_set_tiling(dri_bo *bo, uint32_t *tiling_mode)
 *tiling_mode = I915_TILING_NONE;
 return 0;
 }
+
+int dri_bo_get_tiling(dri_bo *bo, uint32_t *tiling_mode, uint32_t 
*swizzle_mode)
+{
+if (bo->bufmgr->bo_get_tiling)
+   return bo->bufmgr->bo_get_tiling(bo, tiling_mode, swizzle_mode);
+
+*tiling_mode = I915_TILING_NONE;
+*swizzle_mode = I915_BIT_6_SWIZZLE_NONE;
+return 0;
+}
diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h
index c44d596..0c7b0e4 100644
--- a/libdrm/intel/intel_bufmgr.h
+++ b/libdrm/intel/intel_bufmgr.h
@@ -87,6 +87,8 @@ int dri_bo_emit_reloc(dri_bo *reloc_buf,
 int dri_bo_pin(dri_bo *buf, uint32_t alignment);
 int dri_bo_unpin(dri_bo *buf);
 int dri_bo_set_tiling(dri_bo *buf, uint32_t *tiling_mode);
+int dri_bo_get_tiling(dri_bo *buf, uint32_t *tiling_mode,
+ uint32_t *swizzle_mode);
 int dri_bo_flink(dri_bo *buf, uint32_t *name);
 
 /* intel_bufmgr_gem.c */
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index 9bd4441..33853c4 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -873,6 +873,28 @@ dri_gem_bo_set_tiling(dri_bo *bo, uint32_t *tiling_mode)
 }
 
 static int
+dri_gem_bo_get_tiling(dri_bo *bo, uint32_t *tiling_mode, uint32_t 
*swizzle_mode)
+{
+dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr;
+dri_bo_gem *bo_gem = (dri_bo_gem *)bo;
+struct drm_i915_gem_get_tiling get_tiling;
+int ret;
+
+get_tiling.handle = bo_gem->gem_handle;
+
+ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling);
+if (ret != 0) {
+   *tiling_mode = I915_TILING_NONE;
+   *swizzle_mode = I915_BIT_6_SWIZZLE_NONE;
+   return -errno;
+}
+
+*tiling_mode = get_tiling.tiling_mode;
+*swizzle_mode = get_tiling.swizzle_mode;
+return 0;
+}
+
+static int
 dri_gem_bo_flink(dri_bo *bo, uint32_t *name)
 {
 dri_bufmgr_gem *bufmgr_gem = (dri_bufmgr_gem *)bo->bufmgr;
@@ -959,6 +981,7 @@ intel_bufmgr_gem_init(int fd, int batch_size)
 bufmgr_gem->bufmgr.bo_emit_reloc = dri_gem_bo_emit_reloc;
 bufmgr_gem->bufmgr.bo_pin = dri_gem_bo_pin;
 bufmgr_gem->bufmgr.bo_unpin = dri_gem_bo_unpin;
+bufmgr_gem->bufmgr.bo_get_tiling = dri_gem_bo_get_tiling;
 bufmgr_gem->bufmgr.bo_set_tiling = dri_gem_bo_set_tiling;
 bufmgr_gem->bufmgr.bo_flink = dri_gem_bo_flink;
 bufmgr_gem->bufmgr.bo_exec = dri_gem_bo_exec;
diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h
index 7f39bfc..cbf3b31 100644
--- a/libdrm/intel/intel_bufmgr_priv.h
+++ b/libdrm/intel/intel_bufmgr_priv.h
@@ -150,6 +150,15 @@ struct _dri_bufmgr {
  */
 int (*bo_set_tiling) (dri_bo *bo, uint32_t *tiling_mode);
 /**
+ * Get the current tiling (and resulting swizzling) mode for the bo.
+ *
+ * \param buf Buffer to get tiling mode for
+ * \param tiling_mode returned tiling mode
+ * \param swizzle_mode returned swizzling mode
+ */
+int (*bo_get_tiling) (dri_bo *bo, uint32_t *tiling_mode,
+ uint32_t *swizzle_mode);
+/**
  * Create a visible name for a buffer which can be used by other apps
  *
  * \param buf Buffer to create a name for

commit d9c2f65dd8e50736a33e97a55c257ef6843e1ce7
Author: Julien Cristau <[EMAIL PROTECTED]>
Date:   Tue Oct 14 01:25:57 2008 +0200

link libdrm_intel properly

libdrm_intel needs symbols from libdrm, so link against it.

diff --git a/libdrm/Makefile.am b/libdrm/Makefile.am
index dbe

drm-snapshot: Changes to 'upstream-experimental'

2008-10-12 Thread Chris Lamb
 .gitignore   |4 
 bsd-core/ati_pcigart.c   |   97 
 bsd-core/drmP.h  |  357 -
 bsd-core/drm_agpsupport.c|   58 
 bsd-core/drm_atomic.h|   53 
 bsd-core/drm_auth.c  |   19 
 bsd-core/drm_bufs.c  |  323 -
 bsd-core/drm_context.c   |  112 
 bsd-core/drm_dma.c   |   33 
 bsd-core/drm_drawable.c  |   39 
 bsd-core/drm_drv.c   |  424 --
 bsd-core/drm_fops.c  |   91 
 bsd-core/drm_ioctl.c |   52 
 bsd-core/drm_irq.c   |  196 -
 bsd-core/drm_linux_list.h|4 
 bsd-core/drm_lock.c  |  163 
 bsd-core/drm_memory.c|   91 
 bsd-core/drm_pci.c   |   48 
 bsd-core/drm_scatter.c   |   34 
 bsd-core/drm_sysctl.c|   23 
 bsd-core/drm_vm.c|   37 
 bsd-core/i915_drv.c  |   84 
 bsd-core/mach64_drv.c|   76 
 bsd-core/mga_drv.c   |   91 
 bsd-core/r128_drv.c  |   84 
 bsd-core/radeon_drv.c|   95 
 bsd-core/savage_drv.c|   68 
 bsd-core/sis_drv.c   |   62 
 bsd-core/tdfx_drv.c  |   49 
 bsd-core/via_drv.c   |   82 
 configure.ac |   81 
 libdrm/Makefile.am   |8 
 libdrm/intel/Makefile.am |   45 
 libdrm/intel/intel_bufmgr.c  |  194 +
 libdrm/intel/intel_bufmgr.h  |  127 
 libdrm/intel/intel_bufmgr_fake.c | 1518 +++
 libdrm/intel/intel_bufmgr_gem.c  |  974 +
 libdrm/intel/intel_bufmgr_priv.h |  165 
 libdrm/intel/mm.c|  281 +
 libdrm/intel/mm.h|   96 
 libdrm/libdrm_lists.h|   87 
 libdrm/xf86drm.c |  740 ---
 libdrm/xf86drm.h |3 
 libdrm/xf86mm.h  |   12 
 linux-core/Makefile  |   14 
 linux-core/Makefile.kernel   |5 
 linux-core/drm-gem.txt   |  805 
 linux-core/drmP.h|  159 
 linux-core/drm_agpsupport.c  |   43 
 linux-core/drm_compat.h  |   10 
 linux-core/drm_drv.c |8 
 linux-core/drm_fops.c|6 
 linux-core/drm_gem.c |  444 ++
 linux-core/drm_irq.c |   41 
 linux-core/drm_lock.c|   33 
 linux-core/drm_memory.c  |4 
 linux-core/drm_mm.c  |2 
 linux-core/drm_objects.h |7 
 linux-core/drm_proc.c|   84 
 linux-core/drm_stub.c|   31 
 linux-core/drm_sysfs.c   |2 
 linux-core/drm_ttm.c |6 
 linux-core/drm_vm.c  |2 
 linux-core/i915_drv.c|   35 
 linux-core/i915_gem.c| 2502 +
 linux-core/i915_gem_debug.c  |  202 +
 linux-core/i915_gem_proc.c   |  293 +
 linux-core/i915_gem_tiling.c |  309 +
 linux-core/i915_opregion.c   |   19 
 linux-core/nouveau_sgdma.c   |8 
 scripts/create_lk_gpu.sh |   58 
 shared-core/drm.h|   33 
 shared-core/drm_pciids.txt   |   48 
 shared-core/i915_dma.c   |  285 +
 shared-core/i915_drm.h   |  321 +
 shared-core/i915_drv.h   |  327 +
 shared-core/i915_irq.c   |  144 
 shared-core/mach64_dma.c |6 
 shared-core/nouveau_drm.h|2 
 shared-core/nouveau_drv.h|   13 
 shared-core/nouveau_fifo.c   |4 
 shared-core/nouveau_object.c |7 
 shared-core/nouveau_state.c  |  171 
 shared-core/nv20_graph.c |   32 
 shared-core/nv40_graph.c |   10 
 shared-core/nv50_graph.c | 7450 +++
 shared-core/radeon_cp.c  |   46 
 shared-core/radeon_drv.h |   29 
 tests/Makefile.am|6 
 tests/drmtest.c  |2 
 tests/gem_basic.c|   98 
 tests/gem_flink.c|  128 
 tests/gem_mmap.c |  132 
 tests/gem_readwrite.c|  135 
 94 files changed, 18540 insertions(+), 3301 deletions(-)

New commits:
commit f5327aca0cbb1b602e4f954b8f361f2e1daaf20d
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Fri Oct 10 18:23:11 2008 -0400

[FreeBSD] Plug memory leak in drm_rmdraw() and drm_drawable_free_all()

diff --git a/bsd-core/drm_drawable.c b/bsd-core/drm_drawable.c
index 018db57..2ae11db 100644
--- a/bsd-core/drm_drawable.c
+++ b/bsd-core/drm_drawable.c
@@ -71,8 +71,8 @@ int drm_adddraw(struct drm_device *dev, void *data, struct 
drm_file *file_priv)
struct drm_draw *draw = data;
struct bsd_drm_drawable_info *info;
 
-   info = drm_calloc(1, sizeof(struct bsd_drm_drawable_info),
-   DRM_MEM_DRAWABLE);
+   info = malloc(sizeof(struct bsd_drm_drawable_info), DRM_MEM_DRAWABLE,
+   M_NOWAIT | M_ZERO);
if (info == NULL)
return ENOMEM;
 
@@ -99,8 +99,8 @@ int drm_rmdraw(struct drm_device *dev, void *data, struct 
drm_fil

drm-snapshot: Changes to 'upstream-experimental'

2008-07-06 Thread Chris Lamb
 shared-core/drm_pciids.txt |2 +-
 shared-core/i915_drv.h |6 +++---
 shared-core/i915_suspend.c |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 401f77a2ef1d55feaccc13cdae1e5379f4cfec7e
Author: Zhenyu Wang <[EMAIL PROTECTED]>
Date:   Thu Jul 3 00:49:19 2008 +0800

i915: official name for GM45 chipset

Signed-off-by: Zhenyu Wang <[EMAIL PROTECTED]>

diff --git a/shared-core/drm_pciids.txt b/shared-core/drm_pciids.txt
index dd88eba..205fc53 100644
--- a/shared-core/drm_pciids.txt
+++ b/shared-core/drm_pciids.txt
@@ -394,7 +394,7 @@
 0x8086 0x29C2 CHIP_I9XX|CHIP_I915 "Intel G33"
 0x8086 0x29B2 CHIP_I9XX|CHIP_I915 "Intel Q35"
 0x8086 0x29D2 CHIP_I9XX|CHIP_I915 "Intel Q33"
-0x8086 0x2A42 CHIP_I9XX|CHIP_I965 "Intel Integrated Graphics Device"
+0x8086 0x2A42 CHIP_I9XX|CHIP_I965 "Mobile Intel® GM45 Express Chipset"
 0x8086 0x2E02 CHIP_I9XX|CHIP_I965 "Intel Integrated Graphics Device"
 0x8086 0x2E12 CHIP_I9XX|CHIP_I965 "Intel Q45/Q43"
 0x8086 0x2E22 CHIP_I9XX|CHIP_I965 "Intel G45/G43"
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 3ba74db..fa3305b 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -1801,7 +1801,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, 
const char *caller);
 
 #define IS_I965GM(dev) ((dev)->pci_device == 0x2A02)
 
-#define IS_IGD_GM(dev) ((dev)->pci_device == 0x2A42)
+#define IS_GM45(dev) ((dev)->pci_device == 0x2A42)
 
 #define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \
 (dev)->pci_device == 0x2E12 || \
@@ -1815,8 +1815,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, 
const char *caller);
  IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))
 
 #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
-   IS_I945GM(dev) || IS_I965GM(dev) || IS_IGD_GM(dev))
+   IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
 
-#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_IGD_GM(dev) || IS_G4X(dev))
+#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
 
 #endif
diff --git a/shared-core/i915_suspend.c b/shared-core/i915_suspend.c
index 63cd54a..5e759b1 100644
--- a/shared-core/i915_suspend.c
+++ b/shared-core/i915_suspend.c
@@ -299,7 +299,7 @@ int i915_save_state(struct drm_device *dev)
dev_priv->saveDSPBSIZE = I915_READ(DSPBSIZE);
dev_priv->saveDSPBPOS = I915_READ(DSPBPOS);
dev_priv->saveDSPBADDR = I915_READ(DSPBADDR);
-   if (IS_I965GM(dev) || IS_IGD_GM(dev)) {
+   if (IS_I965GM(dev) || IS_GM45(dev)) {
dev_priv->saveDSPBSURF = I915_READ(DSPBSURF);
dev_priv->saveDSPBTILEOFF = I915_READ(DSPBTILEOFF);
}


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



drm-snapshot: Changes to 'upstream-experimental'

2008-07-02 Thread Chris Lamb
 bsd-core/ati_pcigart.c |  127 +-
 bsd-core/drmP.h|   10 
 bsd-core/drm_bufs.c|4 
 bsd-core/drm_drv.c |   16 
 bsd-core/drm_irq.c |  126 +-
 bsd-core/i915/Makefile |2 
 bsd-core/i915_drv.c|   32 
 bsd-core/i915_suspend.c|1 
 linux-core/Makefile.kernel |2 
 linux-core/ati_pcigart.c   |   39 
 linux-core/drm_agpsupport.c|4 
 linux-core/drm_drv.c   |6 
 linux-core/i915_drv.c  |  463 --
 linux-core/i915_fence.c|2 
 linux-core/i915_suspend.c  |1 
 linux-core/xgi_cmdlist.c   |2 
 linux-core/xgi_drv.c   |   21 
 linux-core/xgi_drv.h   |   21 
 linux-core/xgi_fb.c|4 
 linux-core/xgi_fence.c |   92 +-
 shared-core/drm_pciids.txt |   13 
 shared-core/i915_dma.c |   16 
 shared-core/i915_drv.h | 1813 ++---
 shared-core/i915_irq.c |  105 +-
 shared-core/i915_suspend.c |  520 +++
 shared-core/nouveau_drm.h  |4 
 shared-core/nouveau_drv.h  |2 
 shared-core/nouveau_mem.c  |   74 +
 shared-core/nouveau_notifier.c |2 
 shared-core/nouveau_object.c   |8 
 shared-core/nv50_fifo.c|4 
 shared-core/r300_cmdbuf.c  |  135 ++-
 shared-core/r300_reg.h |  229 -
 shared-core/radeon_cp.c|   52 -
 shared-core/radeon_drv.h   |   45 -
 shared-core/xgi_drm.h  |4 
 36 files changed, 2531 insertions(+), 1470 deletions(-)

New commits:
commit 301d984ea80cb250460d6701c4373cf0af8bf59e
Author: Jesse Barnes <[EMAIL PROTECTED](none)>
Date:   Tue Jul 1 16:10:01 2008 -0700

i915: only use tiled blits on 965+

When scheduled swaps occur, we need to blit between front & back buffers.  I
the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit,
only on 965 chips, since it will cause corruption on pre-965 (e.g. 945).

Bug reported by and fix tested by Tomas Janousek <[EMAIL PROTECTED]>.

Signed-off-by: Jesse Barnes <[EMAIL PROTECTED]>

diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 0bf01bd..28f9f6a 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -162,11 +162,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
RING_LOCALS;

-   if (sarea_priv->front_tiled) {
+   if (IS_I965G(dev) && sarea_priv->front_tiled) {
cmd |= XY_SRC_COPY_BLT_DST_TILED;
dst_pitch >>= 2;
}
-   if (sarea_priv->back_tiled) {
+   if (IS_I965G(dev) && sarea_priv->back_tiled) {
cmd |= XY_SRC_COPY_BLT_SRC_TILED;
src_pitch >>= 2;
}

commit 94dcc83ad2e8f848a3cac6cdc6f123e676e91cf8
Author: Jesse Barnes <[EMAIL PROTECTED](none)>
Date:   Tue Jul 1 16:09:02 2008 -0700

Revert "i915: only use tiled blits on 965+"

This reverts commit 727d4f1d1667e43b3558bd5f6ed6dc2cd9c29401, somehow git
deleted the symlink and replaced it with the file.

diff --git a/linux-core/i915_irq.c b/linux-core/i915_irq.c
deleted file mode 100644
index 28f9f6a..2058a2e
--- a/linux-core/i915_irq.c
+++ /dev/null
@@ -1,970 +0,0 @@
-/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
- */
-/*
- * Copyright 2003 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 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 TUNGSTEN GRAPHICS 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.
- *
- */
-
-#include "drmP.h"
-#include "drm.h"
-#include "i915_drm.h"
-#include "i915_drv.h"
-
-#define MAX_NOPID ((u32)~0)
-
-/**
- * i915_get_pipe - return the the pipe associated with a given plane
- * @dev: DRM device
- * @plane: plane to look for
- *
- * The Intel Mesa & 2D drivers call the vblank routines with a plane number
- * rather than a pipe number, since they may not

drm-snapshot: Changes to 'upstream-experimental'

2008-06-05 Thread Chris Lamb
New branch 'upstream-experimental' available with the following commits:
commit 6905c7a29d2a3bc0e605a09b98ac02a4a50893d0
Author: Dennis Kasprzyk <[EMAIL PROTECTED]>
Date:   Thu Jun 5 17:08:44 2008 +0200

radeon: Restore software interrupt on resume.

Fixes performance drop after suspend/resume on some systems.

commit ba7263b8c2f8c14c647da725ecbc73fcd456d63c
Author: Michel Dänzer <[EMAIL PROTECTED]>
Date:   Tue Jun 3 11:28:10 2008 +0200

vblank: Don't wait or update the counter while the CRTC is supposedly 
disabled.

Without kernel modesetting, this requires cooperation of the userspace
modesetting driver. We may have to leave the vblank interrupt enabled 
otherwise
to avoid problems.

commit 237172b7670611b36d92be3b92983674846f6564
Author: Michel Dänzer <[EMAIL PROTECTED]>
Date:   Tue Jun 3 11:28:10 2008 +0200

vblank: Clean up compensation for spurious wraparounds of driver counter.

Only compensate when the driver counter actually appears to have moved
backwards.

The compensation deltas need to be incremental instead of absolute; drop the
vblank_offset field and just use atomic_sub().

commit d1dcb2b32e0c51d7cbcaa2ba1e0544452cf8f47b
Author: Michel Dänzer <[EMAIL PROTECTED]>
Date:   Tue Jun 3 11:28:09 2008 +0200

vblank: Special-case driver vblank counter going back by 1.

Turns out the radeon driver is affected by the same problem that prompted 
i915
to revert to less useful counter flipping at the end of the vblank 
interval. In
the long term, we can hopefully implement more reliable methods to achieve
counter flipping at the beginning of vblank, but otherwise this should be an
acceptable workaround.

commit 0144ebeb8a713b1420d35004075037cd4b0495a1
Author: Michel Dänzer <[EMAIL PROTECTED]>
Date:   Tue Jun 3 11:28:09 2008 +0200

vblank: Don't return current sequence number and time if interrupted by 
signal.

commit 6b520005c6714d8a8afa68b8a43065a40da298cc
Author: Michel Dänzer <[EMAIL PROTECTED]>
Date:   Tue Jun 3 11:27:39 2008 +0200

Revert "don't copy back if an error was returned."

This reverts commit 6671ad1917698b6174a1af314b63b3800d75248c.

The vblank ioctl needs to update the userspace parameters when interrupted 
by
a signal, which was prevented by this. Let's see if this breaks other 
ioctls...

commit d5ae19ebcf2dc6402872e0575b5786b6e8117b6f
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Tue Jun 3 12:42:49 2008 +1000

drm: sg alloc should write back the handle to userspace

commit f1e12d40af6ce9b6159c28529bcbdc877c565c82
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Tue Jun 3 12:40:54 2008 +1000

drm/ati_pcigart: use proper page mapping function

This should be pci_map_page not pci_map_single

commit 416754f1cc5a55b1c6b2d2fa2f501b18462d62e6
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Sun Jun 1 19:34:29 2008 -0400

[FreeBSD] Declare vblank_disable_fn callout MPSAFE.

commit 4ce47fd328cd885d66abdd42db1f7c054bd44498
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Sun Jun 1 16:17:31 2008 -0400

[FreeBSD] Get rid of vbl_lock and re-use irq_lock.

commit ac4da869285173ad0ac947bdf41ffe10efe21c05
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Sun Jun 1 12:56:34 2008 -0400

[FreeBSD] Add symlink for radeon_microcode.h

commit 2186f9f6eff4b3b4f605d35a030c0910646865ab
Author: Robert Noland <[EMAIL PROTECTED]>
Date:   Sun Jun 1 12:49:20 2008 -0400

[FreeBSD] Call drm_vblank_cleanup during irq uninstall

I needed to re-arrange some functions for this.
Also needed to call DRM_SPINUNINIT on the vbl_lock during cleanup.

commit a12cbf8aa5cf21d30bd2c798ff059cb1ba92b382
Author: Alex Deucher <[EMAIL PROTECTED]>
Date:   Fri May 30 18:20:01 2008 -0400

RADEON: fix typo in last commit

commit 6e8a2cff66ac0d6afaf9bb233bc81449c2014078
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Fri May 30 20:27:31 2008 +1000

r500: attempt to make AGP work by programming agp base in the MC correctly

commit 5b86823fa36513f521412a38c240cb18f02dcc9a
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Wed May 28 11:12:57 2008 +1000

radeon: split microcode out into a separate header file.

commit 0c8a8db1b6c97dd0fad18bd72a1bc56e2a673a10
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Wed May 28 10:28:13 2008 +1000

i915: fix BSD bh, DRI2 not uses anywhere else

commit c06096d34fa4afb3f24d610ccfb385f92dbc1e83
Author: Dave Airlie <[EMAIL PROTECTED]>
Date:   Wed May 28 10:02:20 2008 +1000

radeon: bump release date/version for r500 3D support

commit 59c953245c583bb1062d3a8409a9b615a3a19654
Author: Alex Deucher <[EMAIL PROTECTED]>
Date:   Tue May 27 18:33:33 2008 -0400

RADEON: add get_param for number of GB pipes

commit df127c303d944720937fa6b54a8a9f84bc2fe518
Author: Owain Ainsworth <[EMAIL PROTECTED]>
Date:   Tue May 27 15:12:35 2008 -0700

[BSD] Move unlock in drm_vm.c from accidental platform #ifdeffing.

Also remove an unr