diff options
author | 2013-03-20 12:37:41 +0000 | |
---|---|---|
committer | 2013-03-20 12:37:41 +0000 | |
commit | 4366007c58bdc480603cef63227b2ad0182f6dba (patch) | |
tree | 75ecd910ed8b69145c9c520486cb3357fbf8e9fc | |
parent | Introduce if_get() to retrieve an interface descriptor pointer given (diff) | |
download | wireguard-openbsd-4366007c58bdc480603cef63227b2ad0182f6dba.tar.xz wireguard-openbsd-4366007c58bdc480603cef63227b2ad0182f6dba.zip |
Backout some changes introduced in linux 3.8.3 which are known
to cause problems and have been reverted in linux 3.8.4-rc1:
"drm/i915: reorder setup sequence to have irqs for output setup"
"drm/i915: enable irqs earlier when resuming"
ok kettenis@
-rw-r--r-- | sys/dev/pci/drm/i915/i915_dma.c | 23 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_irq.c | 6 |
4 files changed, 13 insertions, 34 deletions
diff --git a/sys/dev/pci/drm/i915/i915_dma.c b/sys/dev/pci/drm/i915/i915_dma.c index 28bfbc8f55c..89bb3920210 100644 --- a/sys/dev/pci/drm/i915/i915_dma.c +++ b/sys/dev/pci/drm/i915/i915_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_dma.c,v 1.1 2013/03/18 12:36:51 jsg Exp $ */ +/* $OpenBSD: i915_dma.c,v 1.2 2013/03/20 12:37:41 jsg Exp $ */ /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- */ /* @@ -301,30 +301,25 @@ i915_load_modeset_init(struct drm_device *dev) if (ret) goto cleanup_vga_switcheroo; #endif - ret = drm_irq_install(dev); - if (ret) - goto cleanup_gem_stolen; - - /* Important: The output setup functions called by modeset_init need - * working irqs for e.g. gmbus and dp aux transfers. */ intel_modeset_init(dev); ret = i915_gem_init(dev); if (ret) - goto cleanup_irq; + goto cleanup_gem_stolen; intel_modeset_gem_init(dev); + ret = drm_irq_install(dev); + if (ret) + goto cleanup_gem; + /* Always safe in the mode setting case. */ /* FIXME: do pre/post-mode set stuff in core KMS code */ dev->vblank_disable_allowed = 1; ret = intel_fbdev_init(dev); if (ret) - goto cleanup_gem; - - /* Only enable hotplug handling once the fbdev is fully set up. */ - dev_priv->enable_hotplug_processing = true; + goto cleanup_irq; drm_kms_helper_poll_init(dev); @@ -333,13 +328,13 @@ i915_load_modeset_init(struct drm_device *dev) return (0); +cleanup_irq: + drm_irq_uninstall(dev); cleanup_gem: DRM_LOCK(); i915_gem_cleanup_ringbuffer(dev); DRM_UNLOCK(); i915_gem_cleanup_aliasing_ppgtt(dev); -cleanup_irq: - drm_irq_uninstall(dev); cleanup_gem_stolen: #ifdef notyet i915_gem_cleanup_stolen(dev); diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index 118c7a0bdec..2c2aeac8404 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.3 2013/03/19 21:07:31 kettenis Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.4 2013/03/20 12:37:41 jsg Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -528,7 +528,6 @@ i915_drm_freeze(struct drm_device *dev) intel_modeset_disable(dev); drm_irq_uninstall(dev); - dev_priv->enable_hotplug_processing = false; } i915_save_state(dev); @@ -560,19 +559,9 @@ __i915_drm_thaw(struct drm_device *dev) error = i915_gem_init_hw(dev); DRM_UNLOCK(); - /* We need working interrupts for modeset enabling ... */ - drm_irq_install(dev); - intel_modeset_init_hw(dev); intel_modeset_setup_hw_state(dev, false); - - /* - * ... but also need to make sure that hotplug processing - * doesn't cause havoc. Like in the driver load code we don't - * bother with the tiny race here where we might loose hotplug - * notifications. - * */ - dev_priv->enable_hotplug_processing = true; + drm_irq_install(dev); } intel_opregion_init(dev); diff --git a/sys/dev/pci/drm/i915/i915_drv.h b/sys/dev/pci/drm/i915/i915_drv.h index e0aa6afd432..66fbd20a693 100644 --- a/sys/dev/pci/drm/i915/i915_drv.h +++ b/sys/dev/pci/drm/i915/i915_drv.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.h,v 1.1 2013/03/18 12:36:52 jsg Exp $ */ +/* $OpenBSD: i915_drv.h,v 1.2 2013/03/20 12:37:41 jsg Exp $ */ /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- */ /* @@ -560,7 +560,6 @@ struct inteldrm_softc { u_int32_t hotplug_supported_mask; struct workq_task hotplug_task; - bool enable_hotplug_processing; int num_pipe; int num_pch_pll; diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c index 20f89d06f7b..b78578035d4 100644 --- a/sys/dev/pci/drm/i915/i915_irq.c +++ b/sys/dev/pci/drm/i915/i915_irq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_irq.c,v 1.1 2013/03/18 12:36:52 jsg Exp $ */ +/* $OpenBSD: i915_irq.c,v 1.2 2013/03/20 12:37:41 jsg Exp $ */ /* i915_irq.c -- IRQ support for the I915 -*- linux-c -*- */ /* @@ -348,10 +348,6 @@ i915_hotplug_work_func(void *arg1, void *arg2) struct drm_mode_config *mode_config = &dev->mode_config; struct intel_encoder *encoder; - /* HPD irq before everything is fully set up. */ - if (!dev_priv->enable_hotplug_processing) - return; - rw_enter_write(&mode_config->rwl); DRM_DEBUG_KMS("running encoder hotplug functions\n"); |