diff options
author | Linus Torvalds | 2019-07-09 09:55:45 -0700 |
---|---|---|
committer | Linus Torvalds | 2019-07-09 09:55:45 -0700 |
commit | 2d41ef5432b76ae90dc0db93026f1d981f874ec4 (patch) | |
tree | dc97253d9328e8652614bfe8026748dd53c6561a /drivers/tty | |
parent | ed63b9c873601ca113da5c7b1745e3946493e9f3 (diff) | |
parent | 732146a3f1dc78ebb0d3c4b1f4dc6ea33cc2c58f (diff) |
Merge tag 'fbdev-v5.3' of git://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz:
- remove fbdev notifier usage for fbcon (as prep work to clean up the
fbcon locking), add locking checks in vt/console code and make
assorted cleanups in fbdev and backlight code (Daniel Vetter)
- add COMPILE_TEST support to atmel_lcdfb, da8xx-fb, gbefb, imxfb,
pvr2fb and pxa168fb drivers (me)
- fix DMA API abuse in au1200fb and jz4740_fb drivers (Christoph
Hellwig)
- add check for new BGRT status field rotation bits in efifb driver
(Hans de Goede)
- mark expected switch fall-throughs in s3c-fb driver (Gustavo A. R.
Silva)
- remove fbdev mxsfb driver in favour of the drm version (Fabio
Estevam)
- remove broken rfbi code from omap2fb driver (me)
- misc fixes (Arnd Bergmann, Shobhit Kukreti, Wei Yongjun, me)
- misc cleanups (Gustavo A. R. Silva, Colin Ian King, me)
* tag 'fbdev-v5.3' of git://github.com/bzolnier/linux: (62 commits)
video: fbdev: imxfb: fix a typo in imxfb_probe()
video: fbdev: s3c-fb: Mark expected switch fall-throughs
video: fbdev: s3c-fb: fix sparse warnings about using incorrect types
video: fbdev: don't print error message on framebuffer_alloc() failure
video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure
video: fbdev: s3c-fb: return -ENOMEM on framebuffer_alloc() failure
vga_switcheroo: Depend upon fbcon being built-in, if enabled
video: fbdev: omap2: remove rfbi
video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret
video: fbdev-MMP: Use struct_size() in devm_kzalloc()
video: fbdev: controlfb: fix warnings about comparing pointer to 0
efifb: BGRT: Add check for new BGRT status field rotation bits
jz4740_fb: fix DMA API abuse
video: fbdev: pvr2fb: fix link error for pvr2fb_pci_exit
video: fbdev: s3c-fb: add COMPILE_TEST support
video: fbdev: imxfb: fix sparse warnings about using incorrect types
video: fbdev: pvr2fb: fix build warning when compiling as module
fbcon: Export fbcon_update_vcs
backlight: simplify lcd notifier
staging/olpc_dcon: Add drm conversion to TODO
...
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/vt/vt.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 5c0ca1c24b6f..ec92f36ab5c4 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -3822,6 +3822,8 @@ int con_is_bound(const struct consw *csw) { int i, bound = 0; + WARN_CONSOLE_UNLOCKED(); + for (i = 0; i < MAX_NR_CONSOLES; i++) { if (con_driver_map[i] == csw) { bound = 1; @@ -3834,6 +3836,20 @@ int con_is_bound(const struct consw *csw) EXPORT_SYMBOL(con_is_bound); /** + * con_is_visible - checks whether the current console is visible + * @vc: virtual console + * + * RETURNS: zero if not visible, nonzero if visible + */ +bool con_is_visible(const struct vc_data *vc) +{ + WARN_CONSOLE_UNLOCKED(); + + return *vc->vc_display_fg == vc; +} +EXPORT_SYMBOL(con_is_visible); + +/** * con_debug_enter - prepare the console for the kernel debugger * @sw: console driver * @@ -4166,6 +4182,8 @@ void do_blank_screen(int entering_gfx) struct vc_data *vc = vc_cons[fg_console].d; int i; + might_sleep(); + WARN_CONSOLE_UNLOCKED(); if (console_blanked) { |