search for: console_unlock

Displaying 20 results from an estimated 66 matches for "console_unlock".

2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...he OMAP UARTs */ if (!is_suspending()) - if (try_acquire_console_sem()) + if (!console_trylock()) goto no_sleep; omap_uart_prepare_idle(0); @@ -151,7 +151,7 @@ static void omap2_enter_full_retention(void) omap_uart_resume_idle(0); if (!is_suspending()) - release_console_sem(); + console_unlock(); no_sleep: if (omap2_pm_debug) { diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 8cbbead..a4aa192 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -398,7 +398,7 @@ void omap_sram_idle(void) if (!is_suspending()) if (per_next_...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...he OMAP UARTs */ if (!is_suspending()) - if (try_acquire_console_sem()) + if (!console_trylock()) goto no_sleep; omap_uart_prepare_idle(0); @@ -151,7 +151,7 @@ static void omap2_enter_full_retention(void) omap_uart_resume_idle(0); if (!is_suspending()) - release_console_sem(); + console_unlock(); no_sleep: if (omap2_pm_debug) { diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 8cbbead..a4aa192 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -398,7 +398,7 @@ void omap_sram_idle(void) if (!is_suspending()) if (per_next_...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...he OMAP UARTs */ if (!is_suspending()) - if (try_acquire_console_sem()) + if (!console_trylock()) goto no_sleep; omap_uart_prepare_idle(0); @@ -151,7 +151,7 @@ static void omap2_enter_full_retention(void) omap_uart_resume_idle(0); if (!is_suspending()) - release_console_sem(); + console_unlock(); no_sleep: if (omap2_pm_debug) { diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 8cbbead..a4aa192 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -398,7 +398,7 @@ void omap_sram_idle(void) if (!is_suspending()) if (per_next_...
2012 Sep 12
1
[PATCH] drm/nouveau: fix early vram corruption originating from vgacon
...@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) struct nouveau_drm *drm; int ret; + /* Blank initial console to prevent VRAM corruption while we initialize + * the HW. For vgacon it will move console memory from VGA VRAM to RAM. + */ + console_lock(); + do_blank_screen(1); + console_unlock(); + + /* Completely disable access to VGA IO/memory, just to be sure no one + * will change it. */ + pci_write_config_byte(pdev, NV_PCI_VGAMEM_ENABLE, 0); + ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm); if (ret) - return ret; + goto fail_cli; dev->d...
2018 Oct 02
1
[PATCH] qxl: fix null-pointer crash during suspend
...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->helper_private; > - if (crtc->enabled) > - (*crtc_funcs->disable)(crtc); >...
2013 Oct 03
2
[PATCH] drm/nouveau/fb: fix suspend/resume fbcon
...drm *drm = nouveau_drm(dev); console_lock(); if (state == 0) - nouveau_fbcon_save_disable_accel(dev); + nouveau_fbcon_restore_accel(dev); fb_set_suspend(drm->fbcon->helper.fbdev, state); if (state == 1) - nouveau_fbcon_restore_accel(dev); + nouveau_fbcon_save_disable_accel(dev); console_unlock(); } -- 1.7.10.4
2019 Feb 20
4
[PATCH] drm/qxl: unbind vgacon
...90,11 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) drm_kms_helper_poll_init(&qdev->ddev); + /* unbind vgacon to make sure it doesn't touch our vga registers */ + console_lock(); + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, true); + console_unlock(); + /* Complete initialization. */ ret = drm_dev_register(&qdev->ddev, ent->driver_data); if (ret) -- 2.9.3
2019 Feb 20
4
[PATCH] drm/qxl: unbind vgacon
...90,11 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) drm_kms_helper_poll_init(&qdev->ddev); + /* unbind vgacon to make sure it doesn't touch our vga registers */ + console_lock(); + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, true); + console_unlock(); + /* Complete initialization. */ ret = drm_dev_register(&qdev->ddev, ent->driver_data); if (ret) -- 2.9.3
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
2013 Oct 04
2
[PATCH] drm/nouveau/fb: fix suspend/resume fbcon
...ore suspending the fb. Please try the following > > - if (state == 0) > + if (state == 1) > nouveau_fbcon_save_disable_accel(dev); > fb_set_suspend(drm->fbcon->helper.fbdev, state); > - if (state == 1) > + if (state == 0) > nouveau_fbcon_restore_accel(dev); > console_unlock(); > > Cheers, > Emil Hi! That was my first try! I guessed the same but I got exactly one trap message on resume. So it's about first put the bucket and then open the water tap. ;) chris ps: just found these macros for the state in fb.h: FBINFO_STATE_RUNNING = 0 FBINFO_STATE_SU...
2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...It must be synchronous as we are + * about to suspend or unload the driver. + * + * Note that from within the work-handler, we cannot flush + * ourselves, so only flush outstanding work upon suspend! + */ if (state != FBINFO_STATE_RUNNING) - nouveau_fbcon_accel_save_disable(dev); - console_unlock(); + flush_work(&drm->fbdev_suspend_work); + console_lock(); + } else { + /* + * The console lock can be pretty contented on resume due + * to all the printk activity. Try to keep it out of the hot + * path of resume if possible. This also prevents a deadlock + * with FBIOPUT_C...
2020 Nov 12
0
[patch V3 10/37] ARM: highmem: Switch to generic kmap atomic
...xc4561fa8 to 0xc4561ff0) 1fa0:?????????????????? b6f2bab8 bef7dac4 bef7dac4 bef7d8fc 004b9b58 bef7dac8 1fc0: b6f2bab8 bef7dac4 bef7d8fc 0000000b 004b8000 004bac44 bef7da3c bef7d8dc 1fe0: 0000002f bef7d89c b6d6dc74 b6d6d65c irq event stamp: 1283 hardirqs last? enabled at (1293): [<c019f564>] console_unlock+0x430/0x6b0 hardirqs last disabled at (1302): [<c019f55c>] console_unlock+0x428/0x6b0 softirqs last? enabled at (1282): [<c0101768>] __do_softirq+0x528/0x674 softirqs last disabled at (1269): [<c012fed4>] irq_exit+0x1dc/0x1e8 ---[ end trace 6f32a2fb4294655f ]--- I can do more tes...
2019 Nov 08
0
[PATCH AUTOSEL 4.19 085/205] qxl: fix null-pointer crash during suspend
...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->helper_private; - if (crtc->enabled) - (*crtc_funcs->disable)(crtc); - } + ret = drm_mode_config_helper_suspe...
2017 Jan 12
0
[PATCH 2/2] drm/nouveau: Handle fbcon suspend/resume in seperate worker
...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 nouveau_fbcon_set_suspend(struct drm_device *dev, int state) { struct nouveau_drm *drm = nouveau_drm(dev); - if (drm->fbcon) { - console...
2013 Oct 03
0
[PATCH] drm/nouveau/fb: fix suspend/resume fbcon
...ock(); > if (state == 0) > - nouveau_fbcon_save_disable_accel(dev); > + nouveau_fbcon_restore_accel(dev); > fb_set_suspend(drm->fbcon->helper.fbdev, state); > if (state == 1) > - nouveau_fbcon_restore_accel(dev); > + nouveau_fbcon_save_disable_accel(dev); > console_unlock(); > } I'm not entirely sure this is correct. One needs to save and disable accleration before suspending the fb. Please try the following - if (state == 0) + if (state == 1) nouveau_fbcon_save_disable_accel(dev); fb_set_suspend(drm->fbcon->helper.fbdev, state); - if (state == 1)...
2019 Jul 03
0
[PATCH 3/5] drm/ast: Replace struct ast_fbdev with generic framebuffer emulation
...vers/gpu/drm/ast/ast_drv.c index 3811997e78c4..75f55ac1a218 100644 --- 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...
2015 Jan 05
2
drm/nouveau: dont switch vt on suspend
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com> --- diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 3ed12a8cfc91..a4a586807903 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -370,6 +370,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ret = -ENOMEM; goto
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...* about to suspend or unload the driver. > + * > + * Note that from within the work-handler, we cannot flush > + * ourselves, so only flush outstanding work upon suspend! > + */ > if (state != FBINFO_STATE_RUNNING) > - nouveau_fbcon_accel_save_disable(dev); > - console_unlock(); > + flush_work(&drm->fbdev_suspend_work); > + console_lock(); > + } else { > + /* > + * The console lock can be pretty contented on resume due > + * to all the printk activity. Try to keep it out of the hot > + * path of resume if possible. This also preve...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...* about to suspend or unload the driver. > + * > + * Note that from within the work-handler, we cannot flush > + * ourselves, so only flush outstanding work upon suspend! > + */ > if (state != FBINFO_STATE_RUNNING) > - nouveau_fbcon_accel_save_disable(dev); > - console_unlock(); > + flush_work(&drm->fbdev_suspend_work); > + console_lock(); > + } else { > + /* > + * The console lock can be pretty contented on resume due > + * to all the printk activity. Try to keep it out of the hot > + * path of resume if possible. This also preve...
2013 Nov 17
1
[PATCH] drm/nouveau/fb: fix suspend/resume fbcon
...t; - if (state == 0) >>> + if (state == 1) >>> nouveau_fbcon_save_disable_accel(dev); >>> fb_set_suspend(drm->fbcon->helper.fbdev, state); >>> - if (state == 1) >>> + if (state == 0) >>> nouveau_fbcon_restore_accel(dev); >>> console_unlock(); >>> >>> Cheers, >>> Emil >> >> Hi! >> >> That was my first try! I guessed the same but I got exactly one trap >> message on resume. >> > Hi Chris, > Hi Emil! > Just got around to playing with s2disk on my laptop(nv96) and...