Displaying 20 results from an estimated 90 matches for "drm_kms_helper_poll_disable".
2018 Feb 14
1
[PATCH v2] drm: Allow determining if current task is output poll worker
...rent task is an output poll worker. This can be used
+ * to select distinct code paths for output polling versus other contexts.
+ *
+ * One use case is to avoid a deadlock between the output poll worker and
+ * the autosuspend worker wherein the latter waits for polling to finish
+ * upon calling drm_kms_helper_poll_disable(), while the former waits for
+ * runtime suspend to finish upon calling pm_runtime_get_sync() in a
+ * connector ->detect hook.
+ */
+bool drm_kms_helper_is_poll_worker(void)
+{
+ struct work_struct *work = current_work();
+
+ return work && work->func == output_poll_execute;
+}
+EXP...
2018 Jul 21
1
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...th the hub, we end up confusing it and cause it to stop
> > > responding for at least 10 seconds
> > > - After 5 seconds of being in drm_fb_helper_output_poll_changed(), the
> > > pm core attempts to put the GPU into autosuspend, which ends up
> > > calling drm_kms_helper_poll_disable()
> > > - While the runtime PM core is waiting in drm_kms_helper_poll_disable()
> > > for the output poll to finish, we end up finally detecting an MST
> > > display
> > > - We notice the new display and tries to enable it, which triggers
> > > an...
2018 Feb 11
2
[PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers
...drm/amd/amdgpu/amdgpu_drv.c
@@ -718,6 +718,9 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
return -EBUSY;
}
+ printk("waiting 12 sec\n");
+ msleep(12*1000);
+ printk("done waiting 12 sec\n");
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
drm_kms_helper_poll_disable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 555fbe5..ee7cf0d 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -586,6 +586,7 @@ static vo...
2018 Feb 11
0
[PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers
...;linux/vga_switcheroo.h>
@@ -718,6 +719,9 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
return -EBUSY;
}
+ printk("waiting 12 sec\n");
+ msleep(12*1000);
+ printk("done waiting 12 sec\n");
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
drm_kms_helper_poll_disable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 555fbe5..ee7cf0d 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -586,6 +586,7 @@ static vo...
2018 Jul 19
3
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...and attempting to
> communicate with the hub, we end up confusing it and cause it to stop
> responding for at least 10 seconds
> - After 5 seconds of being in drm_fb_helper_output_poll_changed(), the
> pm core attempts to put the GPU into autosuspend, which ends up
> calling drm_kms_helper_poll_disable()
> - While the runtime PM core is waiting in drm_kms_helper_poll_disable()
> for the output poll to finish, we end up finally detecting an MST
> display
> - We notice the new display and tries to enable it, which triggers
> an atomic commit which triggers a call to pm_runtime_...
2018 Jul 16
0
[PATCH 2/5] drm/nouveau: Grab RPM ref while probing outputs
...per_output_poll_changed() and attempting to
communicate with the hub, we end up confusing it and cause it to stop
responding for at least 10 seconds
- After 5 seconds of being in drm_fb_helper_output_poll_changed(), the
pm core attempts to put the GPU into autosuspend, which ends up
calling drm_kms_helper_poll_disable()
- While the runtime PM core is waiting in drm_kms_helper_poll_disable()
for the output poll to finish, we end up finally detecting an MST
display
- We notice the new display and tries to enable it, which triggers
an atomic commit which triggers a call to pm_runtime_get_sync()
- the output p...
2018 Feb 11
0
[PATCH 2/5] drm: Allow determining if current task is output poll worker
...ed
+ * to select distinct code paths for output polling versus other contexts.
+ */
+bool drm_kms_helper_is_poll_worker(void)
+{
+ struct work_struct *work = current_work();
+
+ return work && work->func == output_poll_execute;
+}
+EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
+
/**
* drm_kms_helper_poll_disable - disable output polling
* @dev: drm_device
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 76e237bd989b..6914633037a5 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -77,5 +77,6 @@ void drm_kms_helper_hotplug_event(struct drm_dev...
2018 Aug 01
0
[PATCH v4 1/8] drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement
...ll_enable()'s documentation:
Note that calls to enable and disable polling must be strictly ordered,
which is automatically the case when they're only call from
suspend/resume callbacks.
Of course, hotplugs can't really be ordered. They could even happen
immediately after we called drm_kms_helper_poll_disable() in
nouveau_display_fini(), which can lead to all sorts of issues.
Additionally; enabling polling /after/ we call
drm_helper_hpd_irq_event() could also mean that we'd miss a hotplug
event anyway, since drm_helper_hpd_irq_event() wouldn't bother trying to
probe connectors so long as pollin...
2018 Aug 13
3
[PATCH 0/3] Cleanup drm_kms_helper_poll_enable/disable() calls
Does what it says on the label, a lot of these calls are already handled
somewhere else and don't appear to be here for a legitimate reason
anymore.
Lyude Paul (3):
drm/nouveau: Remove useless poll_enable() call in
switcheroo_set_state()
drm/nouveau: Remove useless poll_disable() call in
switcheroo_set_state()
drm/nouveau: Remove useless poll_enable() call in drm_load()
2018 Aug 15
3
[PATCH v3 0/3] Cleanup drm_kms_helper_poll_enable/disable() calls
Next version of https://patchwork.freedesktop.org/series/48131/
Only changes are new A-Bs and R-Bs
Lyude Paul (3):
drm/nouveau: Remove useless poll_enable() call in
switcheroo_set_state()
drm/nouveau: Remove useless poll_disable() call in
switcheroo_set_state()
drm/nouveau: Remove useless poll_enable() call in drm_load()
drivers/gpu/drm/nouveau/nouveau_drm.c | 4 +---
2018 Jul 20
0
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...gt; communicate with the hub, we end up confusing it and cause it to stop
> > responding for at least 10 seconds
> > - After 5 seconds of being in drm_fb_helper_output_poll_changed(), the
> > pm core attempts to put the GPU into autosuspend, which ends up
> > calling drm_kms_helper_poll_disable()
> > - While the runtime PM core is waiting in drm_kms_helper_poll_disable()
> > for the output poll to finish, we end up finally detecting an MST
> > display
> > - We notice the new display and tries to enable it, which triggers
> > an atomic commit which trigg...
2018 Jul 18
0
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...per_output_poll_changed() and attempting to
communicate with the hub, we end up confusing it and cause it to stop
responding for at least 10 seconds
- After 5 seconds of being in drm_fb_helper_output_poll_changed(), the
pm core attempts to put the GPU into autosuspend, which ends up
calling drm_kms_helper_poll_disable()
- While the runtime PM core is waiting in drm_kms_helper_poll_disable()
for the output poll to finish, we end up finally detecting an MST
display
- We notice the new display and tries to enable it, which triggers
an atomic commit which triggers a call to pm_runtime_get_sync()
- the output p...
2018 Feb 11
19
[PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers
Fix a deadlock on hybrid graphics laptops that's been present since 2013:
DRM drivers poll connectors in 10 sec intervals. The poll worker is
stopped on ->runtime_suspend with cancel_delayed_work_sync(). However
the poll worker invokes the DRM drivers' ->detect callbacks, which call
pm_runtime_get_sync(). If the poll worker starts after runtime suspend
has begun,
2024 Jun 07
2
[PATCH v2] drm/nouveau: don't attempt to schedule hpd_work on headless cards
...0;
spin_unlock_irq(&drm->hpd_lock);
@@ -635,7 +638,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
}
drm_connector_list_iter_end(&conn_iter);
- if (!runtime)
+ if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work);
drm_kms_helper_poll_disable(dev);
@@ -729,6 +732,7 @@ nouveau_display_create(struct drm_device *dev)
/* no display hw */
if (ret == -ENODEV) {
ret = 0;
+ drm->headless = true;
goto disp_create_err;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index e239c6...
2014 Mar 19
2
[PATCH] drm: compute runpm on load, don't register autosuspend for non-runpm
...ouveau_runtime_pm == 0)
return -EINVAL;
- /* are we optimus enabled? */
- if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) {
- DRM_DEBUG_DRIVER("failing to power off - not optimus\n");
- return -EINVAL;
- }
-
nv_debug_level(SILENT);
drm_kms_helper_poll_disable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
@@ -951,12 +949,6 @@ static int nouveau_pmops_runtime_idle(struct device *dev)
if (nouveau_runtime_pm == 0)
return -EBUSY;
- /* are we optimus enabled? */
- if (nouveau_runtime_pm == -1 && !nouveau_is_optimus()...
2018 Oct 02
1
[PATCH] qxl: fix null-pointer crash during suspend
...a/drivers/gpu/drm/qxl/qxl_drv.c
> +++ b/drivers/gpu/drm/qxl/qxl_drv.c
> @@ -136,20 +136,11 @@ static int qxl_drm_freeze(struct drm_device *dev)
> {
> struct pci_dev *pdev = dev->pdev;
> struct qxl_device *qdev = dev->dev_private;
> - struct drm_crtc *crtc;
> -
> - drm_kms_helper_poll_disable(dev);
> -
> - console_lock();
> - qxl_fbdev_set_suspend(qdev, 1);
> - console_unlock();
> + int ret;
>
> - /* unpin the front buffers */
> - list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
> - const struct drm_crtc_helper_funcs *crtc_funcs = crtc-...
2018 Jul 18
5
[PATCH 0/2] Fix connector probing deadlocks from RPM bugs
This is a trimmed down version of
https://patchwork.freedesktop.org/series/46637/
with all of the review comments addressed.
The last version of this series had fixes for the i2c and DP aux busses
to ensure that the GPU would be turned on whenever anything tried to
access the i2c/aux busses. Unfortunately: one of the fixes apparently
contained some very incorrect usage of Linux's runtime PM
2024 May 28
1
[PATCH] drm/nouveau: don't attempt to schedule hpd_work on headless cards
...);
spin_lock_irq(&drm->hpd_lock);
@@ -635,7 +643,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
}
drm_connector_list_iter_end(&conn_iter);
- if (!runtime)
+ if (!runtime && !drm->headless)
cancel_work_sync(&drm->hpd_work);
drm_kms_helper_poll_disable(dev);
@@ -729,6 +737,7 @@ nouveau_display_create(struct drm_device *dev)
/* no display hw */
if (ret == -ENODEV) {
ret = 0;
+ drm->headless = true;
goto disp_create_err;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index e239c6...
2024 May 28
1
[PATCH] drm/nouveau: don't attempt to schedule hpd_work on headless cards
...@ -635,7 +643,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
> }
> drm_connector_list_iter_end(&conn_iter);
>
> - if (!runtime)
> + if (!runtime && !drm->headless)
> cancel_work_sync(&drm->hpd_work);
>
> drm_kms_helper_poll_disable(dev);
> @@ -729,6 +737,7 @@ nouveau_display_create(struct drm_device *dev)
> /* no display hw */
> if (ret == -ENODEV) {
> ret = 0;
> + drm->headless = true;
> goto disp_create_err;
> }
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b...
2018 Feb 12
3
[PATCH 2/5] drm: Allow determining if current task is output poll worker
...race condition in their driver.
> +bool drm_kms_helper_is_poll_worker(void)
> +{
> + struct work_struct *work = current_work();
> +
> + return work && work->func == output_poll_execute;
> +}
> +EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
> +
> /**
> * drm_kms_helper_poll_disable - disable output polling
> * @dev: drm_device
> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
> index 76e237bd989b..6914633037a5 100644
> --- a/include/drm/drm_crtc_helper.h
> +++ b/include/drm/drm_crtc_helper.h
> @@ -77,5 +77,6 @@ void drm_kms_helpe...