Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys Pull up following revision(s) (requested by mrg in ti...
details: https://anonhg.NetBSD.org/src/rev/6f20486cce54
branches: netbsd-7
changeset: 799048:6f20486cce54
user: snj <snj%NetBSD.org@localhost>
date: Fri Mar 06 21:39:08 2015 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #573):
sys/external/bsd/common/include/linux/kernel.h: 1.5, 1.6
sys/external/bsd/drm2/dist/drm/drm_ioctl.c: 1.4
sys/external/bsd/drm2/dist/drm/drm_irq.c: 1.6-1.8
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c: 1.13-1.15
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.23-1.27
sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c: 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_display.c: 1.14, 1.15
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c: 1.10
sys/external/bsd/drm2/dist/drm/i915/intel_drv.h: 1.8
sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c: 1.8-1.13
sys/external/bsd/drm2/dist/drm/i915/intel_pm.c: 1.6
sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c: 1.5, 1.6
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c: 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h: 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/mc.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/pwr.h: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/os.h: 1.4, 1.5
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_pll.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_base.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_nv50.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/devinit/fbmem.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/devinit/nouveau_subdev_devinit_nv04.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nv50.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nvc0.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c: 1.2, 1.3
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mxm/nouveau_subdev_mxm_nv50.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/pwr/nouveau_subdev_pwr_base.c: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_ic.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/timer/nouveau_subdev_timer_nv04.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_base.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nv04.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h: 1.3
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c: 1.4, 1.5
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c: 1.3
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv84_fence.c: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c: 1.3
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.h: 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_vga.h: 1.2
sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c: 1.6-1.8
sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c: 1.3
sys/external/bsd/drm2/dist/drm/radeon/rs400.c: 1.3
sys/external/bsd/drm2/dist/drm/via/via_dmablit.c: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/via/via_drv.h: 1.3
sys/external/bsd/drm2/dist/drm/via/via_irq.c: 1.3, 1.4
sys/external/bsd/drm2/dist/drm/via/via_video.c: 1.3, 1.4
sys/external/bsd/drm2/dist/include/drm/drmP.h: 1.10
sys/external/bsd/drm2/dist/include/drm/drm_crtc.h: 1.4
sys/external/bsd/drm2/dist/include/drm/drm_modes.h: 1.3
sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h: 1.2
sys/external/bsd/drm2/drm/drm_cache.c: 1.4-1.6
sys/external/bsd/drm2/drm/drm_drv.c: 1.14
sys/external/bsd/drm2/drm/drm_module.c: 1.10
sys/external/bsd/drm2/drm/drm_sysctl.c: 1.5
sys/external/bsd/drm2/drm/drm_vma_manager.c: 1.2
sys/external/bsd/drm2/drm/drmfb.c: 1.1
sys/external/bsd/drm2/drm/files.drmkms: 1.10, 1.11
sys/external/bsd/drm2/i2c/drm_encoder_slave.c: 1.1
sys/external/bsd/drm2/i915drm/files.i915drmkms: 1.7, 1.10
sys/external/bsd/drm2/i915drm/intelfb.c: 1.11, 1.12
sys/external/bsd/drm2/include/asm/io.h: 1.4
sys/external/bsd/drm2/include/asm/unaligned.h: 1.2, 1.3
sys/external/bsd/drm2/include/drm/drm_encoder_slave.h: 1.1
sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h: 1.7-1.11
sys/external/bsd/drm2/include/drm/drmfb.h: 1.1
sys/external/bsd/drm2/include/drm/drmfb_pci.h: 1.1, 1.2
sys/external/bsd/drm2/include/linux/bitops.h: 1.9
sys/external/bsd/drm2/include/linux/i2c.h: 1.7, 1.8
sys/external/bsd/drm2/include/linux/io-mapping.h: 1.5
sys/external/bsd/drm2/include/linux/moduleparam.h: 1.5
sys/external/bsd/drm2/include/linux/pci.h: 1.12-1.15
sys/external/bsd/drm2/include/linux/pm.h: 1.4
sys/external/bsd/drm2/include/linux/reboot.h: 1.2
sys/external/bsd/drm2/include/linux/slab.h: 1.5
sys/external/bsd/drm2/include/linux/string.h: 1.4
sys/external/bsd/drm2/include/linux/vgaarb.h: 1.3
sys/external/bsd/drm2/include/linux/ww_mutex.h: 1.10
sys/external/bsd/drm2/linux/files.drmkms_linux: 1.8
sys/external/bsd/drm2/linux/linux_i2c.c: 1.3
sys/external/bsd/drm2/linux/linux_ww_mutex.c: 1.1
sys/external/bsd/drm2/nouveau/files.nouveau: 1.5-1.8
sys/external/bsd/drm2/nouveau/nouveau_pci.c: 1.1-1.3
sys/external/bsd/drm2/nouveau/nouveau_pci.h: 1.1
sys/external/bsd/drm2/nouveau/nouveau_sysfs.c: 1.1
sys/external/bsd/drm2/nouveau/nouveau_vga.c: 1.1
sys/external/bsd/drm2/nouveau/nouveaufb.c: 1.1
sys/external/bsd/drm2/nouveau/nouveaufb.h: 1.1
sys/external/bsd/drm2/pci/drm_pci.c: 1.10-1.12
sys/external/bsd/drm2/pci/drm_pci_module.c: 1.4
sys/external/bsd/drm2/pci/drmfb_pci.c: 1.1-1.3
sys/external/bsd/drm2/pci/files.drmkms_pci: 1.5
sys/external/bsd/drm2/radeon/radeon_pci.c: 1.5-1.7
sys/modules/drmkms/Makefile: 1.8, 1.9
sys/modules/drmkms_linux/Makefile: 1.6
sys/modules/drmkms_pci/Makefile: 1.5
sync drm2 with HEAD.
diffstat:
sys/external/bsd/common/include/linux/kernel.h | 15 +-
sys/external/bsd/drm2/dist/drm/drm_ioctl.c | 4 +-
sys/external/bsd/drm2/dist/drm/drm_irq.c | 12 +-
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c | 9 +-
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 38 +-
sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_display.c | 13 +-
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c | 12 +-
sys/external/bsd/drm2/dist/drm/i915/intel_drv.h | 7 +-
sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c | 38 +-
sys/external/bsd/drm2/dist/drm/i915/intel_pm.c | 17 -
sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c | 11 +
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c | 21 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c | 8 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c | 8 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h | 2 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/mc.h | 3 +
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/pwr.h | 3 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/os.h | 7 +
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c | 12 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_pll.c | 12 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_base.c | 11 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/clock/nouveau_subdev_clock_nv50.c | 7 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/devinit/fbmem.h | 50 +
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/devinit/nouveau_subdev_devinit_nv04.c | 6 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nv50.c | 62 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nouveau_subdev_fb_nvc0.c | 67 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nv50.h | 6 +
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/fb/nvc0.h | 6 +
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c | 32 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mxm/nouveau_subdev_mxm_nv50.c | 6 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/pwr/nouveau_subdev_pwr_base.c | 28 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/therm/nouveau_subdev_therm_ic.c | 8 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/timer/nouveau_subdev_timer_nv04.c | 6 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_base.c | 54 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv04.c | 17 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nouveau_subdev_vm_nv44.c | 47 +-
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/vm/nv04.h | 4 +
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h | 4 +
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c | 14 +-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c | 72 +-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c | 58 +-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv84_fence.c | 15 +-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c | 31 +-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.h | 5 +
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_vga.h | 3 +
sys/external/bsd/drm2/dist/drm/radeon/radeon_fence.c | 17 +-
sys/external/bsd/drm2/dist/drm/radeon/radeon_pm.c | 2 +-
sys/external/bsd/drm2/dist/drm/radeon/rs400.c | 8 -
sys/external/bsd/drm2/dist/drm/via/via_dmablit.c | 14 +-
sys/external/bsd/drm2/dist/drm/via/via_drv.h | 2 +-
sys/external/bsd/drm2/dist/drm/via/via_irq.c | 8 +-
sys/external/bsd/drm2/dist/drm/via/via_video.c | 16 +-
sys/external/bsd/drm2/dist/include/drm/drmP.h | 1 +
sys/external/bsd/drm2/dist/include/drm/drm_crtc.h | 3 +
sys/external/bsd/drm2/dist/include/drm/drm_modes.h | 5 +
sys/external/bsd/drm2/dist/uapi/drm/i915_drm.h | 2 +-
sys/external/bsd/drm2/drm/drm_cache.c | 23 +-
sys/external/bsd/drm2/drm/drm_drv.c | 17 +-
sys/external/bsd/drm2/drm/drm_module.c | 8 +-
sys/external/bsd/drm2/drm/drm_sysctl.c | 4 +-
sys/external/bsd/drm2/drm/drm_vma_manager.c | 11 +-
sys/external/bsd/drm2/drm/drmfb.c | 293 ++++
sys/external/bsd/drm2/drm/files.drmkms | 8 +-
sys/external/bsd/drm2/i2c/drm_encoder_slave.c | 274 +++
sys/external/bsd/drm2/i915drm/files.i915drmkms | 6 +-
sys/external/bsd/drm2/i915drm/intelfb.c | 355 +----
sys/external/bsd/drm2/include/asm/io.h | 4 +-
sys/external/bsd/drm2/include/asm/unaligned.h | 23 +-
sys/external/bsd/drm2/include/drm/drm_encoder_slave.h | 112 +
sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h | 95 +-
sys/external/bsd/drm2/include/drm/drmfb.h | 92 +
sys/external/bsd/drm2/include/drm/drmfb_pci.h | 45 +
sys/external/bsd/drm2/include/linux/bitops.h | 9 +-
sys/external/bsd/drm2/include/linux/i2c.h | 172 +-
sys/external/bsd/drm2/include/linux/io-mapping.h | 3 +-
sys/external/bsd/drm2/include/linux/moduleparam.h | 3 +-
sys/external/bsd/drm2/include/linux/pci.h | 64 +-
sys/external/bsd/drm2/include/linux/pm.h | 6 +-
sys/external/bsd/drm2/include/linux/reboot.h | 17 +-
sys/external/bsd/drm2/include/linux/slab.h | 8 +-
sys/external/bsd/drm2/include/linux/string.h | 22 +-
sys/external/bsd/drm2/include/linux/vgaarb.h | 5 +-
sys/external/bsd/drm2/include/linux/ww_mutex.h | 695 +---------
sys/external/bsd/drm2/linux/files.drmkms_linux | 3 +-
sys/external/bsd/drm2/linux/linux_i2c.c | 76 +-
sys/external/bsd/drm2/linux/linux_ww_mutex.c | 707 ++++++++++
sys/external/bsd/drm2/nouveau/files.nouveau | 150 ++-
sys/external/bsd/drm2/nouveau/nouveau_pci.c | 249 +++
sys/external/bsd/drm2/nouveau/nouveau_pci.h | 55 +
sys/external/bsd/drm2/nouveau/nouveau_sysfs.c | 47 +
sys/external/bsd/drm2/nouveau/nouveau_vga.c | 50 +
sys/external/bsd/drm2/nouveau/nouveaufb.c | 196 ++
sys/external/bsd/drm2/nouveau/nouveaufb.h | 48 +
sys/external/bsd/drm2/pci/drm_pci.c | 26 +-
sys/external/bsd/drm2/pci/drm_pci_module.c | 44 +-
sys/external/bsd/drm2/pci/drmfb_pci.c | 161 ++
sys/external/bsd/drm2/pci/files.drmkms_pci | 5 +-
sys/external/bsd/drm2/radeon/radeon_pci.c | 35 +-
sys/modules/drmkms/Makefile | 6 +-
sys/modules/drmkms_linux/Makefile | 3 +-
sys/modules/drmkms_pci/Makefile | 4 +-
102 files changed, 3868 insertions(+), 1322 deletions(-)
diffs (truncated from 7570 to 300 lines):
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Fri Mar 06 21:39:08 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.4 2014/07/16 20:59:57 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.4.2.1 2015/03/06 21:39:08 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -61,6 +61,7 @@
#define min_t(T, X, Y) MIN(X, Y)
#define clamp_t(T, X, MIN, MAX) min_t(T, max_t(T, X, MIN), MAX)
+#define clamp(X, MN, MX) MIN(MAX(X, MN), MX)
/*
* Rounding to nearest.
@@ -164,4 +165,16 @@
return ret;
}
+static inline int
+kstrtol(const char *s, unsigned base, long *vp)
+{
+ long long v;
+
+ v = strtoll(s, NULL, base);
+ if (v < LONG_MIN || LONG_MAX < v)
+ return -ERANGE;
+ *vp = v;
+ return 0;
+}
+
#endif /* _LINUX_KERNEL_H_ */
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/drm_ioctl.c
--- a/sys/external/bsd/drm2/dist/drm/drm_ioctl.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_ioctl.c Fri Mar 06 21:39:08 2015 +0000
@@ -232,8 +232,8 @@
if (client->idx == 0) {
client->auth = file_priv->authenticated;
#ifdef __NetBSD__ /* XXX Too scary to contemplate. */
- client->pid = -1;
- client->uid = -1;
+ client->pid = curproc->p_pid;
+ client->uid = kauth_cred_geteuid(curproc->p_cred);
#else
client->pid = pid_vnr(file_priv->pid);
client->uid = from_kuid_munged(current_user_ns(),
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/drm_irq.c
--- a/sys/external/bsd/drm2/dist/drm/drm_irq.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_irq.c Fri Mar 06 21:39:08 2015 +0000
@@ -1293,20 +1293,14 @@
#ifdef __NetBSD__
{
unsigned long irqflags;
+
spin_lock_irqsave(&dev->vbl_lock, irqflags);
- DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev->vblank[crtc].queue,
- &dev->vbl_lock,
- (3 * HZ),
+ DRM_SPIN_WAIT_ON(ret, &dev->vblank[crtc].queue, &dev->vbl_lock,
+ 3 * HZ,
(((drm_vblank_count(dev, crtc) -
vblwait->request.sequence) <= (1 << 23)) ||
!dev->irq_enabled));
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
- if (0 < ret)
- /*
- * ret is ticks remaining on success in this case, but
- * caller just wants 0 for success.
- */
- ret = 0;
}
#else
DRM_WAIT_ON(ret, dev->vblank[crtc].queue, 3 * HZ,
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Fri Mar 06 21:39:08 2015 +0000
@@ -812,8 +812,7 @@
#ifdef __NetBSD__
unsigned long flags;
spin_lock_irqsave(&dev_priv->irq_lock, flags);
- DRM_SPIN_TIMED_WAIT_UNTIL(ret, &ring->irq_queue,
- &dev_priv->irq_lock,
+ DRM_SPIN_WAIT_ON(ret, &ring->irq_queue, &dev_priv->irq_lock,
3 * DRM_HZ,
READ_BREADCRUMB(dev_priv) >= irq_nr);
spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
@@ -1650,6 +1649,10 @@
mutex_init(&dev_priv->modeset_restore_lock);
#endif
+#ifdef __NetBSD__
+ spin_lock_init(&mchdev_lock);
+#endif
+
intel_pm_setup(dev);
intel_display_crc_init(dev);
@@ -1865,6 +1868,7 @@
if (dev_priv->slab)
kmem_cache_destroy(dev_priv->slab);
#ifdef __NetBSD__
+ spin_lock_destroy(&mchdev_lock);
linux_mutex_destroy(&dev_priv->modeset_restore_lock);
linux_mutex_destroy(&dev_priv->dpio_lock);
spin_lock_destroy(&dev_priv->mm.object_stat_lock);
@@ -1985,6 +1989,7 @@
DRM_DESTROY_WAITQUEUE(&dev_priv->pending_flip_queue);
spin_lock_destroy(&dev_priv->pending_flip_lock);
DRM_DESTROY_WAITQUEUE(&dev_priv->gpu_error.reset_queue);
+ spin_lock_destroy(&mchdev_lock);
linux_mutex_destroy(&dev_priv->modeset_restore_lock);
linux_mutex_destroy(&dev_priv->dpio_lock);
spin_lock_destroy(&dev_priv->mm.object_stat_lock);
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Fri Mar 06 21:39:08 2015 +0000
@@ -379,7 +379,11 @@
memcpy(vaddr, src, PAGE_SIZE);
kunmap_atomic(src);
-#ifndef __NetBSD__
+#ifdef __NetBSD__
+ /* XXX mark page accessed */
+ uvm_obj_unwirepages(obj->base.gemo_shm_uao, i*PAGE_SIZE,
+ (i + 1)*PAGE_SIZE);
+#else
mark_page_accessed(page);
page_cache_release(page);
#endif
@@ -1409,8 +1413,8 @@
nanotime(&before);
spin_lock(&dev_priv->irq_lock);
#define EXIT_COND \
- (((reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter)) \
- ? wedged = true : false) || \
+ ((wedged = (reset_counter != \
+ atomic_read(&dev_priv->gpu_error.reset_counter))) || \
i915_seqno_passed(ring->get_seqno(ring, false), \
seqno))
@@ -1427,6 +1431,12 @@
else
DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &ring->irq_queue,
&dev_priv->irq_lock, ticks, EXIT_COND);
+ if (ret < 0) /* Failure: return negative error as is. */
+ ;
+ else if (ret == 0) /* Timed out: return -ETIME. */
+ ret = -ETIME;
+ else /* Succeeded (ret > 0): return 0. */
+ ret = 0;
} else {
if (interruptible)
DRM_SPIN_WAIT_UNTIL(ret, &ring->irq_queue,
@@ -1434,6 +1444,7 @@
else
DRM_SPIN_WAIT_NOINTR_UNTIL(ret, &ring->irq_queue,
&dev_priv->irq_lock, EXIT_COND);
+ /* ret is negative on failure or zero on success. */
}
#undef EXIT_COND
spin_unlock(&dev_priv->irq_lock);
@@ -1463,11 +1474,7 @@
if (ret == 0)
ret = -EAGAIN;
}
- if (ret < 0) /* Error. */
- return ret;
- if (ret == 0) /* Seqno didn't pass. */
- return -ETIME;
- return 0; /* Seqno passed, maybe time to spare. */
+ return ret;
}
#else
static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
@@ -2415,6 +2422,7 @@
i915_gem_object_put_pages_gtt(struct drm_i915_gem_object *obj)
{
struct drm_device *const dev = obj->base.dev;
+ struct vm_page *page;
int ret;
/* XXX Cargo-culted from the Linux code. */
@@ -2431,7 +2439,15 @@
if (i915_gem_object_needs_bit17_swizzle(obj))
i915_gem_object_save_bit_17_swizzle(obj);
- /* XXX Maintain dirty flag? */
+ if (obj->madv == I915_MADV_DONTNEED)
+ obj->dirty = 0;
+
+ if (obj->dirty) {
+ TAILQ_FOREACH(page, &obj->igo_pageq, pageq.queue) {
+ page->flags &= ~PG_CLEAN;
+ /* XXX mark page accessed */
+ }
+ }
bus_dmamap_destroy(dev->dmat, obj->igo_dmamap);
bus_dmamem_unwire_uvm_object(dev->dmat, obj->base.gemo_shm_uao, 0,
@@ -2869,17 +2885,13 @@
struct i915_vma *vma;
if ((obj->base.write_domain & I915_GEM_DOMAIN_GTT) != 0) {
-#if 0
printk(KERN_ERR "%s: %p 0x%x flushing gtt\n", __func__, obj,
obj->base.write_domain);
-#endif
i915_gem_object_flush_gtt_write_domain(obj);
}
if ((obj->base.write_domain & I915_GEM_DOMAIN_CPU) != 0) {
-#if 0
printk(KERN_ERR "%s: %p 0x%x flushing cpu\n", __func__, obj,
obj->base.write_domain);
-#endif
i915_gem_object_flush_cpu_write_domain(obj, false);
}
BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS);
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c Fri Mar 06 21:39:08 2015 +0000
@@ -272,7 +272,7 @@
# define __iomem __gtt_iomem
static inline void
-iowrite32(uint32_t value, uint32_t __acpi_iomem *ptr)
+iowrite32(uint32_t value, uint32_t __gtt_iomem *ptr)
{
__insn_barrier();
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/intel_display.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_display.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_display.c Fri Mar 06 21:39:08 2015 +0000
@@ -3131,9 +3131,6 @@
{
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
-#ifdef __NetBSD__
- int ret = 0;
-#endif
if (crtc->primary->fb == NULL)
return;
@@ -3141,16 +3138,16 @@
#ifdef __NetBSD__
if (cold) {
unsigned timo = 1000;
- ret = 0;
- while (!intel_crtc_has_pending_flip(crtc)) {
- if (timo-- == 0) {
- ret = -ETIMEDOUT;
+ while (intel_crtc_has_pending_flip(crtc)) {
+ if (timo-- == 0)
+ /* Give up. */
break;
- }
DELAY(10);
}
} else {
unsigned long flags;
+ int ret;
+
spin_lock_irqsave(&dev_priv->pending_flip_lock, flags);
WARN_ON(DRM_SPIN_WAITERS_P(&dev_priv->pending_flip_queue,
&dev_priv->pending_flip_lock));
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/intel_dp.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Fri Mar 06 21:39:08 2015 +0000
@@ -371,10 +371,16 @@
if (has_aux_irq && !cold) {
int ret;
spin_lock(&dev_priv->gmbus_wait_lock);
- DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue,
- &dev_priv->gmbus_wait_lock, msecs_to_jiffies_timeout(10),
+ DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret,
+ &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock,
+ msecs_to_jiffies_timeout(10),
C);
- done = ret; /* XXX ugh */
+ if (ret < 0) /* Failure: pretend same as done. */
+ done = true;
+ else if (ret == 0) /* Timed out: not done. */
+ done = false;
+ else /* Succeeded (ret > 0): done. */
+ done = true;
spin_unlock(&dev_priv->gmbus_wait_lock);
} else {
done = wait_for_atomic(C, 10) == 0;
diff -r 91d129b16889 -r 6f20486cce54 sys/external/bsd/drm2/dist/drm/i915/intel_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h Fri Mar 06 21:00:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h Fri Mar 06 21:39:08 2015 +0000
@@ -50,7 +50,9 @@
int ms = (MS); \
while (!(COND)) { \
if (--ms < 0) { \
- ret__ = -ETIMEDOUT; \
+ DELAY(1000); \
+ if (!(COND)) \
+ ret__ = -ETIMEDOUT; \
Home |
Main Index |
Thread Index |
Old Index