* Patch "drm/nouveau: Rename acpi_work to hpd_work" has been added to the 4.9-stable tree
@ 2017-06-15 12:58 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-15 12:58 UTC (permalink / raw)
To: hdegoede, alexander.levin, bskeggs, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/nouveau: Rename acpi_work to hpd_work
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-nouveau-rename-acpi_work-to-hpd_work.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Jun 15 14:56:50 CEST 2017
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 21 Nov 2016 17:50:54 +0100
Subject: drm/nouveau: Rename acpi_work to hpd_work
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 81280d0e24e76c35f40f997af26c779bcb10b04d ]
We need to call drm_helper_hpd_irq_event() on resume to properly detect
monitor connection / disconnection on some laptops. For runtime-resume
(which gets called on resume from normal suspend too) we must call
drm_helper_hpd_irq_event() from a workqueue to avoid a deadlock.
Rename acpi_work to hpd_work, and move it out of the #ifdef CONFIG_ACPI
blocks to make it suitable for generic work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 32 +++++++++++++++---------------
drivers/gpu/drm/nouveau/nouveau_drv.h | 2 -
2 files changed, 17 insertions(+), 17 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -359,21 +359,10 @@ static struct nouveau_drm_prop_enum_list
} \
} while(0)
-#ifdef CONFIG_ACPI
-
-/*
- * Hans de Goede: This define belongs in acpi/video.h, I've submitted a patch
- * to the acpi subsys to move it there from drivers/acpi/acpi_video.c .
- * This should be dropped once that is merged.
- */
-#ifndef ACPI_VIDEO_NOTIFY_PROBE
-#define ACPI_VIDEO_NOTIFY_PROBE 0x81
-#endif
-
static void
-nouveau_display_acpi_work(struct work_struct *work)
+nouveau_display_hpd_work(struct work_struct *work)
{
- struct nouveau_drm *drm = container_of(work, typeof(*drm), acpi_work);
+ struct nouveau_drm *drm = container_of(work, typeof(*drm), hpd_work);
pm_runtime_get_sync(drm->dev->dev);
@@ -383,6 +372,17 @@ nouveau_display_acpi_work(struct work_st
pm_runtime_put_sync(drm->dev->dev);
}
+#ifdef CONFIG_ACPI
+
+/*
+ * Hans de Goede: This define belongs in acpi/video.h, I've submitted a patch
+ * to the acpi subsys to move it there from drivers/acpi/acpi_video.c .
+ * This should be dropped once that is merged.
+ */
+#ifndef ACPI_VIDEO_NOTIFY_PROBE
+#define ACPI_VIDEO_NOTIFY_PROBE 0x81
+#endif
+
static int
nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
void *data)
@@ -395,9 +395,9 @@ nouveau_display_acpi_ntfy(struct notifie
/*
* This may be the only indication we receive of a
* connector hotplug on a runtime suspended GPU,
- * schedule acpi_work to check.
+ * schedule hpd_work to check.
*/
- schedule_work(&drm->acpi_work);
+ schedule_work(&drm->hpd_work);
/* acpi-video should not generate keypresses for this */
return NOTIFY_BAD;
@@ -587,8 +587,8 @@ nouveau_display_create(struct drm_device
}
nouveau_backlight_init(dev);
+ INIT_WORK(&drm->hpd_work, nouveau_display_hpd_work);
#ifdef CONFIG_ACPI
- INIT_WORK(&drm->acpi_work, nouveau_display_acpi_work);
drm->acpi_nb.notifier_call = nouveau_display_acpi_ntfy;
register_acpi_notifier(&drm->acpi_nb);
#endif
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -163,9 +163,9 @@ struct nouveau_drm {
struct nvbios vbios;
struct nouveau_display *display;
struct backlight_device *backlight;
+ struct work_struct hpd_work;
#ifdef CONFIG_ACPI
struct notifier_block acpi_nb;
- struct work_struct acpi_work;
#endif
/* power management */
Patches currently in stable-queue which might be from hdegoede@redhat.com are
queue-4.9/drm-nouveau-intercept-acpi_video_notify_probe.patch
queue-4.9/drm-nouveau-handle-fbcon-suspend-resume-in-seperate-worker.patch
queue-4.9/drm-nouveau-rename-acpi_work-to-hpd_work.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-15 12:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 12:58 Patch "drm/nouveau: Rename acpi_work to hpd_work" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox