search for: hotplug_lock

Displaying 15 results from an estimated 15 matches for "hotplug_lock".

2018 Aug 13
0
[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...device *dev, int state) schedule_work(&drm->fbcon_work); } +void +nouveau_fbcon_output_poll_changed(struct drm_device *dev) +{ + struct nouveau_drm *drm = nouveau_drm(dev); + struct nouveau_fbdev *fbcon = drm->fbcon; + int ret; + + if (!fbcon) + return; + + mutex_lock(&fbcon->hotplug_lock); + + ret = pm_runtime_get(dev->dev); + if (ret == 1 || ret == -EACCES) { + drm_fb_helper_hotplug_event(&fbcon->helper); + + pm_runtime_mark_last_busy(dev->dev); + pm_runtime_put_autosuspend(dev->dev); + } else if (ret == 0) { + /* If the GPU was already in the process of suspen...
2018 Aug 13
1
[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...ug 13, 2018 at 3:07 PM, Lyude Paul <lyude at redhat.com> wrote: > +bool > +nouveau_fbcon_hotplugged_in_suspend(struct nouveau_fbdev *fbcon) > +{ > + bool hotplug; > + > + if (!fbcon) > + return false; > + > + mutex_lock(&fbcon->hotplug_lock); > + hotplug = fbcon->hotplug_waiting; > + mutex_unlock(&fbcon->hotplug_lock); > + > + return hotplug; > +} I'm probably missing it, but where is this function used?
2018 Aug 13
0
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...device *dev, int state) schedule_work(&drm->fbcon_work); } +void +nouveau_fbcon_output_poll_changed(struct drm_device *dev) +{ + struct nouveau_drm *drm = nouveau_drm(dev); + struct nouveau_fbdev *fbcon = drm->fbcon; + int ret; + + if (!fbcon) + return; + + mutex_lock(&fbcon->hotplug_lock); + + ret = pm_runtime_get(dev->dev); + if (ret == 1 || ret == -EACCES) { + drm_fb_helper_hotplug_event(&fbcon->helper); + + pm_runtime_mark_last_busy(dev->dev); + pm_runtime_put_autosuspend(dev->dev); + } else if (ret == 0) { + /* If the GPU was already in the process of suspen...
2018 Aug 13
6
[PATCH v6 0/5] Fix connector probing deadlocks from RPM bugs
Latest version of https://patchwork.freedesktop.org/series/46815/ with some significant improvements: - I finally figured out a clean way to do this entirely with runtime PM helpers, no avoiding grabbing refs required! - Since this new method removes the need for a lot of the other changes I made (although we probably still want those changes, but not for fixing these deadlocks)
2018 Aug 13
6
[PATCH v7 0/5] Fix connector probing deadlocks from RPM bugs
Latest version of https://patchwork.freedesktop.org/series/46815/ , with one small change re: ilia Lyude Paul (5): drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement drm/nouveau: Remove duplicate poll_enable() in pmops_runtime_suspend() drm/nouveau: Fix deadlock with fb_helper with async RPM requests drm/nouveau: Use pm_runtime_get_noresume() in connector_detect()
2018 Aug 14
1
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...> } > > +void > +nouveau_fbcon_output_poll_changed(struct drm_device *dev) > +{ > + struct nouveau_drm *drm = nouveau_drm(dev); > + struct nouveau_fbdev *fbcon = drm->fbcon; > + int ret; > + > + if (!fbcon) > + return; > + > + mutex_lock(&fbcon->hotplug_lock); > + > + ret = pm_runtime_get(dev->dev); > + if (ret == 1 || ret == -EACCES) { > + drm_fb_helper_hotplug_event(&fbcon->helper); > + > + pm_runtime_mark_last_busy(dev->dev); > + pm_runtime_put_autosuspend(dev->dev); > + } else if (ret == 0) { > + /* If...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...erate work thread - */ - schedule_work(&drm->fbcon_work); -} - -void -nouveau_fbcon_output_poll_changed(struct drm_device *dev) -{ - struct nouveau_drm *drm = nouveau_drm(dev); - struct nouveau_fbdev *fbcon = drm->fbcon; - int ret; - - if (!fbcon) - return; - - mutex_lock(&fbcon->hotplug_lock); - - ret = pm_runtime_get(dev->dev); - if (ret == 1 || ret == -EACCES) { - drm_fb_helper_hotplug_event(&fbcon->helper); - - pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); - } else if (ret == 0) { - /* If the GPU was already in the process of suspen...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...con_output_poll_changed(struct drm_device *dev) > -{ > - struct nouveau_drm *drm = nouveau_drm(dev); > - struct nouveau_fbdev *fbcon = drm->fbcon; > - int ret; > - > - if (!fbcon) > - return; > - > - mutex_lock(&fbcon->hotplug_lock); > - > - ret = pm_runtime_get(dev->dev); > - if (ret == 1 || ret == -EACCES) { > - drm_fb_helper_hotplug_event(&fbcon->helper); > - > - pm_runtime_mark_last_busy(dev->dev); > - pm_runtime_put_autosuspend(dev-&g...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...evice *dev) >> -{ >> - struct nouveau_drm *drm = nouveau_drm(dev); >> - struct nouveau_fbdev *fbcon = drm->fbcon; >> - int ret; >> - >> - if (!fbcon) >> - return; >> - >> - mutex_lock(&fbcon->hotplug_lock); >> - >> - ret = pm_runtime_get(dev->dev); >> - if (ret == 1 || ret == -EACCES) { >> - drm_fb_helper_hotplug_event(&fbcon->helper); >> - >> - pm_runtime_mark_last_busy(dev->dev); >> - pm_ru...
2023 Jan 10
1
[PATCH v2] drm/nouveau: Remove file nouveau_fbcon.c
...erate work thread - */ - schedule_work(&drm->fbcon_work); -} - -void -nouveau_fbcon_output_poll_changed(struct drm_device *dev) -{ - struct nouveau_drm *drm = nouveau_drm(dev); - struct nouveau_fbdev *fbcon = drm->fbcon; - int ret; - - if (!fbcon) - return; - - mutex_lock(&fbcon->hotplug_lock); - - ret = pm_runtime_get(dev->dev); - if (ret == 1 || ret == -EACCES) { - drm_fb_helper_hotplug_event(&fbcon->helper); - - pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); - } else if (ret == 0) { - /* If the GPU was already in the process of suspen...
2018 Aug 15
5
[PATCH v8 0/5] Fix connector probing deadlocks from RPM bugs
Next version of https://patchwork.freedesktop.org/series/46815/ Same as previous version, but some small changes made to commit messages and acks/rbs have been added Lyude Paul (5): drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement drm/nouveau: Remove duplicate poll_enable() in pmops_runtime_suspend() drm/nouveau: Fix deadlock with fb_helper with async RPM requests
2018 Aug 07
19
[PATCH v5 00/13] Fix connector probing deadlocks from RPM bugs
This is the latest version of https://patchwork.freedesktop.org/series/46815/ I moved everything out of fb_helper and back into nouveau, because it seems that other drivers actually do have this handled already as far as I can tell. Lyude Paul (13): drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement drm/nouveau: Remove duplicate poll_enable() in pmops_runtime_suspend()
2020 Feb 06
0
[PATCH 2/4] drm/nouveau: Move struct nouveau_framebuffer.vma to struct nouveau_fbdev
..." +struct nouveau_vma; + struct nouveau_fbdev { struct drm_fb_helper helper; /* must be first */ unsigned int saved_flags; @@ -41,6 +43,7 @@ struct nouveau_fbdev { struct nvif_object gdi; struct nvif_object blit; struct nvif_object twod; + struct nouveau_vma *vma; struct mutex hotplug_lock; bool hotplug_waiting; diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index facd18564e0d..47428f79ede8 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c @@ -149,7 +149,6 @@ int nv50_fbcon_accel_init(struct fb_in...
2020 Jul 29
9
[PATCH 0/9] drm/nouveau/kms: A bunch of runtime_pm fixes
While working on refactoring how we handle connector hotplugging/probing + a bunch of misc DP stuff, I found a bunch of runtime_pm errors that were mostly introduced by me at one point. Oops. A lot of these aren't triggered consistently on a lot of systems, so it's not terribly surprising these got swept under the rug. Lyude Paul (9): drm/nouveau/kms: Handle -EINPROGRESS in
2020 Feb 06
5
[PATCH 0/4] drm/nouveau: Remove struct nouveau_framebuffer
All fields in struct nouveau_framebuffer appear to be obsolete. The data structure can be replaced by struct drm_framebuffer entirely. Patch 1 removes several unused fields from struct nouveau_framebuffer. Patch 2 moves the field vma to struct nouveau_fbdev. The information in vma is only relevant for fbdev emulation, and as such he field is only used there. Patch 3 removes nvbo from struct