linux-hardened/drivers/gpu/drm/i915
Daniel Vetter 20afbda209 drm/i915: Fixup hpd irq register setup ordering
For GMCH platforms we set up the hpd irq registers in the irq
postinstall hook. But since we only enable the irq sources we actually
need in PORT_HOTPLUG_EN/STATUS, taking dev_priv->hotplug_supported_mask
into account, no hpd interrupt sources is enabled since

commit 52d7ecedac
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Dec 1 21:03:22 2012 +0100

    drm/i915: reorder setup sequence to have irqs for output setup

Wrongly set-up interrupts also lead to broken hw-based load-detection
on at least GM45, resulting in ghost VGA/TV-out outputs.

To fix this, delay the hotplug register setup until after all outputs
are set up, by moving it into a new dev_priv->display.hpd_irq_callback.
We might also move the PCH_SPLIT platforms to such a setup eventually.

Another funny part is that we need to delay the fbdev initial config
probing until after the hpd regs are setup, for otherwise it'll detect
ghost outputs. But we can only enable the hpd interrupt handling
itself (and the output polling) _after_ that initial scan, due to
massive locking brain-damage in the fbdev setup code. Add a big
comment to explain this cute little dragon lair.

v2: Encapsulate all the fbdev handling by wrapping the move call into
intel_fbdev_initial_config in intel_fb.c. Requested by Chris Wilson.

v3: Applied bikeshed from Jesse Barnes.

v4: Imre Deak noticed that we also need to call intel_hpd_init after
the drm_irqinstall calls in the gpu reset and resume paths - otherwise
hotplug will be broken. Also improve the comment a bit about why
hpd_init needs to be called before we set up the initial fbdev config.

Bugzilla: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54943
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v3)
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-11 17:22:53 +01:00
..
dvo.h Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
dvo_ch7xxx.c drm/i915/dvo-ch7xxx: fix get_hw_state 2012-10-12 10:59:11 +02:00
dvo_ch7017.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_ivch.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_ns2501.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_sil164.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
dvo_tfp410.c drm/i915/dvo: implement get_hw_state 2012-09-06 07:58:52 +02:00
i915_debugfs.c drm/i915: Fix debugfs seqno info print to use uint 2012-12-05 17:17:50 +01:00
i915_dma.c drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
i915_drv.c drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
i915_drv.h drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
i915_gem.c drm/i915: Set initial seqno value close to wrap boundary 2012-12-11 14:07:22 +01:00
i915_gem_context.c drm/i915: Preallocate next seqno before touching the ring 2012-11-29 11:43:52 +01:00
i915_gem_debug.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
i915_gem_dmabuf.c drm/i915: Use a slab for object allocation 2012-11-30 23:44:05 +01:00
i915_gem_evict.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
i915_gem_execbuffer.c drm/i915: Remove check for conflicting relocation write-domains 2012-12-03 20:13:16 +01:00
i915_gem_gtt.c drm/i915: Avoid clearing preallocated regions from the GTT 2012-11-30 23:24:49 +01:00
i915_gem_stolen.c drm/i915: Use a slab for object allocation 2012-11-30 23:44:05 +01:00
i915_gem_tiling.c drm/i915: Reduce memory pressure during shrinker by preallocating swizzle pages 2012-12-07 01:16:15 +01:00
i915_ioc32.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
i915_irq.c drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
i915_reg.h drm/i915: Remove duplicate and unused register #defines in i915_reg.h 2012-12-06 13:19:14 +01:00
i915_suspend.c drm/i915: Remove save/restore of physical HWS_PGA register 2012-11-21 17:45:02 +01:00
i915_sysfs.c drm/i915: protect RPS/RC6 related accesses (including PCU) with a new mutex 2012-11-11 23:51:41 +01:00
i915_trace.h drm/i915: Allow DRM_ROOT_ONLY|DRM_MASTER to submit privileged batchbuffers 2012-10-17 21:06:59 +02:00
i915_trace_points.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
intel_acpi.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
intel_bios.c drm/i915: Only check for valid PP_{ON, OFF}_DELAYS on pre ILK hardware 2012-11-21 17:45:01 +01:00
intel_bios.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
intel_crt.c drm/i915: add HAS_DDI check 2012-11-29 14:58:53 +01:00
intel_ddi.c drm/i915: fixup sparse warnings 2012-12-03 22:31:04 +01:00
intel_display.c i915: intel_set_mode: Reduce stack allocation from 500 bytes to 2 pointers 2012-12-10 10:13:35 +01:00
intel_dp.c drm/i915: extract common link_m_n helpers 2012-12-06 14:37:01 +01:00
intel_drv.h drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
intel_dvo.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
intel_fb.c drm/i915: Fixup hpd irq register setup ordering 2012-12-11 17:22:53 +01:00
intel_hdmi.c drm/i915: add HAS_DDI check 2012-11-29 14:58:53 +01:00
intel_i2c.c drm/i915: use _NOTRACE for gmbus/dp aux wait loops 2012-12-06 13:19:13 +01:00
intel_lvds.c drm/i915: enable intel_lvds->pre_pll_enable for ilk+, too 2012-11-29 12:51:37 +01:00
intel_modes.c drm/i915: Remove duplicate inclusion of drm/drm_edid.h 2012-12-10 10:12:29 +01:00
intel_opregion.c Linux 3.7-rc2 2012-10-22 14:34:51 +02:00
intel_overlay.c drm/i915: Allocate overlay registers from stolen memory 2012-11-30 23:43:32 +01:00
intel_panel.c drm/i915: resurrect panel lid handling 2012-11-21 17:45:05 +01:00
intel_pm.c drm/i915: Delay allocation of stolen space for FBC 2012-11-30 23:29:59 +01:00
intel_ringbuffer.c drm/i915: Don't emit semaphore wait if wrap happened 2012-12-11 13:32:26 +01:00
intel_ringbuffer.h drm/i915: Add intel_ring_handle_seqno wrap 2012-12-06 13:14:34 +01:00
intel_sdvo.c drm/i915: Increase the response time for slow SDVO devices 2012-11-29 11:42:38 +01:00
intel_sdvo_regs.h drm/i915: clear the entire sdvo infoframe buffer 2012-10-24 15:12:48 +02:00
intel_sprite.c drm/i915: Bad pixel formats can't reach the sprite code 2012-11-11 23:51:14 +01:00
intel_tv.c drm/i915: drm_connector_property -> drm_object_property 2012-11-21 22:12:26 +01:00
Makefile drm/i915: Support for ns2501-DVO 2012-07-25 18:23:48 +02:00