FAILED: patch "[PATCH] drm/i915: Enable polling when we don't have hpd" failed to apply to 4.7-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.7-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
84c8e0963da434d37355079b568465cd121af295Mon Sep 17 00:00:00 2001
From: Lyude <[email protected]>
Date: Tue, 21 Jun 2016 17:03:44 -0400
Subject: [PATCH] drm/i915: Enable polling when we don't have hpd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Unfortunately, there's two situations where we lose hpd right now:
- Runtime suspend
- When we've shut off all of the power wells on Valleyview/Cherryview
While it would be nice if this didn't cause issues, this has the ability to get us in some awkward states where a user won't be able to get their display to turn on. For instance; if we boot a Valleyview system without any monitors connected, it won't need any of it's power wells and thus shut them off. Since this causes us to lose HPD, this means that unless the user knows how to ssh into their machine and do a manual reprobe for monitors, none of the monitors they connect after booting will actually work.
Eventually we should come up with a better fix then having to enable polling for this, since this makes rpm a lot less useful, but for now the infrastructure in i915 just isn't there yet to get hpd in these situations.
Changes since v1:
- Add comment explaining the addition of the if (!mode_config->poll_running) in intel_hpd_init()
- Remove unneeded if (!dev->mode_config.poll_enabled) in i915_hpd_poll_init_work()
- Call to drm_helper_hpd_irq_event() after we disable polling
- Add cancel_work_sync() call to intel_hpd_cancel_work()
Changes since v2:
- Apparently dev->mode_config.poll_running doesn't actually reflect whether or not a poll is currently in progress, and is actually used for dynamic module paramter enabling/disabling. So now we instead keep track of our own poll_running variable in dev_priv->hotplug
- Clean i915_hpd_poll_init_work() a little bit
Changes since v3:
- Remove the now-redundant connector loop in intel_hpd_init(), just rely on intel_hpd_poll_enable() for setting connector->polled correctly on each connector
- Get rid of poll_running
- Don't assign enabled in i915_hpd_poll_init_work before we actually lock dev->mode_config.mutex
- Wrap enabled assignment in i915_hpd_poll_init_work() in READ_ONCE() for doc purposes
- Do the same for dev_priv->hotplug.poll_enabled with WRITE_ONCE in intel_hpd_poll_enable()
- Add some comments about racing not mattering in intel_hpd_poll_enable
Changes since v4:
- Rename intel_hpd_poll_enable() to intel_hpd_poll_init()
- Drop the bool argument from intel_hpd_poll_init()
- Remove redundant calls to intel_hpd_poll_init()
- Rename poll_enable_work to poll_init_work
- Add some kerneldoc for intel_hpd_poll_init()
- Cross-reference intel_hpd_poll_init() in intel_hpd_init()
- Just copy the loop from intel_hpd_init() in intel_hpd_poll_init()
Changes since v5:
- Minor kerneldoc nitpicks
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -2413,6 +2413,9 @@ static int intel_runtime_suspend(struct device *device)assert_forcewakes_inactive (dev_priv); +if (!IS_VALLEYVIEW (dev_priv) || !IS_CHERRYVIEW (dev_priv)) +intel_hpd_poll_init (dev_priv); +DRM_DEBUG_KMS ("Device suspended\n" );return 0 ; }
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -284,6 +284,9 @@ struct i915_hotplug {u32 short_port_mask;struct work_struct dig_port_work; +struct work_struct poll_init_work; +bool poll_enabled; +/* * if we get a HPD irq from DP and a HPD irq from non-DP * the non-DP HPD could block the workqueue on a mode config
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -1425,6 +1425,8 @@ int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector);/* intel_dvo.c */ void intel_dvo_init (struct drm_device *dev); +/* intel_hotplug.c */ +void intel_hpd_poll_init (struct drm_i915_private *dev_priv);/* legacy fbdev emulation in intel_fbdev.c */
drivers/gpu/drm/i915/intel_hotplug.c +78 -12
128 lines not on this page · raw message
drivers/gpu/drm/i915/intel_runtime_pm.c +2 -0
@@ -1133,6 +1133,8 @@ static void vlv_display_power_well_deinit(struct drm_i915_private *dev_priv)synchronize_irq (dev_priv->drm.irq);intel_power_sequencer_reset (dev_priv); + +intel_hpd_poll_init (dev_priv); } static void vlv_display_power_well_enable(struct drm_i915_private *dev_priv,