search for: drm_fb_helper_set_suspend

Displaying 20 results from an estimated 30 matches for "drm_fb_helper_set_suspend".

2016 Jul 13
2
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...200, Peter Wu wrote: > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > while nouveau was runtime suspended, a deadlock would occur due to > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > i915 code (which was done for performance reasons though). > > > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > > Signed-off-by: Peter Wu <peter at lekensteyn.nl> > >...
2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called while nouveau was runtime suspended, a deadlock would occur due to nouveau_fbcon_set_suspend also trying to obtain console_lock(). Fix this by delaying the drm_fb_helper_set_suspend call. Based on the i915 code (which was done for performance reasons though). Cc: Chris Wilson <chris at chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter at ffwll.ch> Signed-off-by: Peter Wu <peter at lekensteyn.nl> --- Tested on top of v4.7-rc5, the deadlock is gone. --- dr...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons though). > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > Signed-off-by: Peter Wu <peter at lekensteyn.nl> > --- > Tested on top of v4.7...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...UT_CON2FBMAP ioctl takes a console_lock(). When this is called > > > > while nouveau was runtime suspended, a deadlock would occur due to > > > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > > > i915 code (which was done for performance reasons though). > > > > > > > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > > > > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > > > > Signed-off-by:...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...> > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > > while nouveau was runtime suspended, a deadlock would occur due to > > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > > i915 code (which was done for performance reasons though). > > > > > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > > > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > > > Signed-off-by: Peter Wu <peter at lek...
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons though). > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > Signed-off-by: Peter Wu <peter at lekensteyn.nl> > --- > Tested on top of v4.7...
2017 Jan 12
2
[PATCH v2 1/2] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already calling drm_kms_helper_poll_enable(drm_dev) from nouveau_display_resume() before we call it in nouveau_pmops_runtime_resume(). This leads us to accidentally trying to enable polling twice, which results in a potential deadlock between the RPM locks and drm_dev->mode_config.mutex if we end up trying to enable polling
2017 Jan 12
0
[PATCH 2/2] drm/nouveau: Handle fbcon suspend/resume in seperate worker
...struct nouveau_drm *drm = container_of(work, typeof(*drm), fbcon_work); + int state = drm->fbcon_new_state; + + if (state == FBINFO_STATE_RUNNING) + pm_runtime_get_sync(drm->dev->dev); + + console_lock(); + if (state == FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_restore(drm->dev); + drm_fb_helper_set_suspend(&drm->fbcon->helper, state); + if (state != FBINFO_STATE_RUNNING) + nouveau_fbcon_accel_save_disable(drm->dev); + console_unlock(); + + if (state == FBINFO_STATE_RUNNING) { + pm_runtime_mark_last_busy(drm->dev->dev); + pm_runtime_put_sync(drm->dev->dev); + } +} + void...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons though). > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > Signed-off-by: Peter Wu <peter at lekensteyn.nl> > --- > Tested on top of v4.7...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...200, Peter Wu wrote: > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > while nouveau was runtime suspended, a deadlock would occur due to > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > i915 code (which was done for performance reasons though). > > > > Cc: Chris Wilson <chris at chris-wilson.co.uk> > > Cc: Daniel Vetter <daniel.vetter at ffwll.ch> > > Signed-off-by: Peter Wu <peter at lekensteyn.nl> > >...
2019 Jul 03
0
[PATCH 3/5] drm/ast: Replace struct ast_fbdev with generic framebuffer emulation
...--- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c @@ -103,25 +103,29 @@ static int ast_drm_freeze(struct drm_device *dev) pci_save_state(dev->pdev); - console_lock(); - ast_fbdev_set_suspend(dev, 1); - console_unlock(); + if (dev->fb_helper) { + console_lock(); + drm_fb_helper_set_suspend(dev->fb_helper, 1); + console_unlock(); + } + return 0; } static int ast_drm_thaw(struct drm_device *dev) { - int error = 0; - ast_post_gpu(dev); drm_mode_config_reset(dev); drm_helper_resume_force_mode(dev); - console_lock(); - ast_fbdev_set_suspend(dev, 0); - console_unlock()...
2019 Jul 03
11
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enougth space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2019 Jul 03
11
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enougth space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2018 Sep 07
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...108 drm_kms_helper_poll_disable(drm_dev); b8ccd70f Gerd Hoffmann 2014-04-14 109 b8ccd70f Gerd Hoffmann 2014-04-14 @110 if (bochs->fb.initialized) { b8ccd70f Gerd Hoffmann 2014-04-14 111 console_lock(); 6a752972 Archit Taneja 2015-07-31 112 drm_fb_helper_set_suspend(&bochs->fb.helper, 1); b8ccd70f Gerd Hoffmann 2014-04-14 113 console_unlock(); b8ccd70f Gerd Hoffmann 2014-04-14 114 } b8ccd70f Gerd Hoffmann 2014-04-14 115 b8ccd70f Gerd Hoffmann 2014-04-14 116 return 0; b8ccd70f Gerd Hoffmann 2...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...veau_drm *drm = container_of(work, typeof(*drm), fbcon_work); - int state = READ_ONCE(drm->fbcon_new_state); - - if (state == FBINFO_STATE_RUNNING) - pm_runtime_get_sync(drm->dev->dev); - - console_lock(); - if (state == FBINFO_STATE_RUNNING) - nouveau_fbcon_accel_restore(drm->dev); - drm_fb_helper_set_suspend(&drm->fbcon->helper, state); - if (state != FBINFO_STATE_RUNNING) - nouveau_fbcon_accel_save_disable(drm->dev); - console_unlock(); - - if (state == FBINFO_STATE_RUNNING) { - nouveau_fbcon_hotplug_resume(drm->fbcon); - pm_runtime_mark_last_busy(drm->dev->dev); - pm_runtime...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...>fbcon_new_state); > - > - if (state == FBINFO_STATE_RUNNING) > - pm_runtime_get_sync(drm->dev->dev); > - > - console_lock(); > - if (state == FBINFO_STATE_RUNNING) > - nouveau_fbcon_accel_restore(drm->dev); > - drm_fb_helper_set_suspend(&drm->fbcon->helper, state); > - if (state != FBINFO_STATE_RUNNING) > - nouveau_fbcon_accel_save_disable(drm->dev); > - console_unlock(); > - > - if (state == FBINFO_STATE_RUNNING) { > - nouveau_fbcon_hotplug_resume(drm-&g...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...>> - if (state == FBINFO_STATE_RUNNING) >> - pm_runtime_get_sync(drm->dev->dev); >> - >> - console_lock(); >> - if (state == FBINFO_STATE_RUNNING) >> - nouveau_fbcon_accel_restore(drm->dev); >> - drm_fb_helper_set_suspend(&drm->fbcon->helper, state); >> - if (state != FBINFO_STATE_RUNNING) >> - nouveau_fbcon_accel_save_disable(drm->dev); >> - console_unlock(); >> - >> - if (state == FBINFO_STATE_RUNNING) { >> - nouveau_fbc...
2023 Jan 10
1
[PATCH v2] drm/nouveau: Remove file nouveau_fbcon.c
...veau_drm *drm = container_of(work, typeof(*drm), fbcon_work); - int state = READ_ONCE(drm->fbcon_new_state); - - if (state == FBINFO_STATE_RUNNING) - pm_runtime_get_sync(drm->dev->dev); - - console_lock(); - if (state == FBINFO_STATE_RUNNING) - nouveau_fbcon_accel_restore(drm->dev); - drm_fb_helper_set_suspend(&drm->fbcon->helper, state); - if (state != FBINFO_STATE_RUNNING) - nouveau_fbcon_accel_save_disable(drm->dev); - console_unlock(); - - if (state == FBINFO_STATE_RUNNING) { - nouveau_fbcon_hotplug_resume(drm->fbcon); - pm_runtime_mark_last_busy(drm->dev->dev); - pm_runtime...
2018 Aug 01
12
[PATCH v4 0/8] Fix connector probing deadlocks from RPM bugs
This is the latest version of https://patchwork.freedesktop.org/series/46815/ With a bunch of fixes to the new fb_helper to prevent it from breaking module loading/unloading with nouveau. Also; lots of documentation fixes and one fix in response to a kbuild bot. Lyude Paul (8): drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement drm/nouveau: Enable polling even if we have runtime
2019 Apr 03
0
[PATCH] drm/cirrus: rewrite and modernize driver.
...gt; - struct drm_device *drm_dev = pci_get_drvdata(pdev); > - struct cirrus_device *cdev = drm_dev->dev_private; > - > - drm_kms_helper_poll_disable(drm_dev); > - > - if (cdev->mode_info.gfbdev) { > - console_lock(); > - drm_fb_helper_set_suspend(&cdev->mode_info.gfbdev->helper, 1); > - console_unlock(); > - } > - > - return 0; > -} > - > -static int cirrus_pm_resume(struct device *dev) > -{ > - struct pci_dev *pdev = to_pci_dev(dev); > - struct drm_device *drm_de...