Skip to content

Commit 2d41ef5

Browse files
committed
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 ...
2 parents ed63b9c + 732146a commit 2d41ef5

82 files changed

Lines changed: 582 additions & 3259 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/mach-pxa/am200epd.c‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,17 @@ int __init am200_init(void)
347347
{
348348
int ret;
349349

350-
/* before anything else, we request notification for any fb
351-
* creation events */
350+
/*
351+
* Before anything else, we request notification for any fb
352+
* creation events.
353+
*
354+
* FIXME: This is terrible and needs to be nuked. The notifier is used
355+
* to get at the fb base address from the boot splash fb driver, which
356+
* is then passed to metronomefb. Instaed of metronomfb or this board
357+
* support file here figuring this out on their own.
358+
*
359+
* See also the #ifdef in fbmem.c.
360+
*/
352361
fb_register_client(&am200_fb_notif);
353362

354363
pxa2xx_mfp_config(ARRAY_AND_SIZE(am200_pin_config));

‎drivers/gpu/vga/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config VGA_SWITCHEROO
2323
depends on X86
2424
depends on ACPI
2525
depends on PCI
26+
depends on (FRAMEBUFFER_CONSOLE=n || FB=y)
2627
select VGA_ARB
2728
help
2829
Many laptops released in 2008/9/10 have two GPUs with a multiplexer

‎drivers/gpu/vga/vga_switcheroo.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/debugfs.h>
3636
#include <linux/fb.h>
3737
#include <linux/fs.h>
38+
#include <linux/fbcon.h>
3839
#include <linux/module.h>
3940
#include <linux/pci.h>
4041
#include <linux/pm_domain.h>
@@ -736,14 +737,8 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
736737
if (!active->driver_power_control)
737738
set_audio_state(active->id, VGA_SWITCHEROO_OFF);
738739

739-
if (new_client->fb_info) {
740-
struct fb_event event;
741-
742-
console_lock();
743-
event.info = new_client->fb_info;
744-
fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event);
745-
console_unlock();
746-
}
740+
if (new_client->fb_info)
741+
fbcon_remap_all(new_client->fb_info);
747742

748743
mutex_lock(&vgasr_priv.mux_hw_lock);
749744
ret = vgasr_priv.handler->switchto(new_client->id);

‎drivers/hid/hid-picolcd_fb.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,8 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
512512
sizeof(struct fb_deferred_io) +
513513
sizeof(struct picolcd_fb_data) +
514514
PICOLCDFB_SIZE, dev);
515-
if (info == NULL) {
516-
dev_err(dev, "failed to allocate a framebuffer\n");
515+
if (!info)
517516
goto err_nomem;
518-
}
519517

520518
info->fbdefio = info->par;
521519
*info->fbdefio = picolcd_fb_defio;

‎drivers/media/pci/ivtv/ivtvfb.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,11 +1256,7 @@ static int ivtvfb_callback_cleanup(struct device *dev, void *p)
12561256
itv->streams[IVTV_DEC_STREAM_TYPE_MPG].vdev.device_caps &=
12571257
~V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
12581258
itv->v4l2_cap &= ~V4L2_CAP_VIDEO_OUTPUT_OVERLAY;
1259-
if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) {
1260-
IVTVFB_WARN("Framebuffer %d is in use, cannot unload\n",
1261-
itv->instance);
1262-
return 0;
1263-
}
1259+
unregister_framebuffer(&itv->osd_info->ivtvfb_info);
12641260
IVTVFB_INFO("Unregister framebuffer %d\n", itv->instance);
12651261
itv->ivtvfb_restore = NULL;
12661262
ivtvfb_blank(FB_BLANK_VSYNC_SUSPEND, &oi->ivtvfb_info);

‎drivers/staging/fbtft/fbtft-core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,9 @@ int fbtft_unregister_framebuffer(struct fb_info *fb_info)
891891
if (par->fbtftops.unregister_backlight)
892892
par->fbtftops.unregister_backlight(par);
893893
fbtft_sysfs_exit(par);
894-
return unregister_framebuffer(fb_info);
894+
unregister_framebuffer(fb_info);
895+
896+
return 0;
895897
}
896898
EXPORT_SYMBOL(fbtft_unregister_framebuffer);
897899

‎drivers/staging/olpc_dcon/TODO‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
TODO:
2+
- complete rewrite:
3+
1. The underlying fbdev drivers need to be converted into drm kernel
4+
modesetting drivers.
5+
2. The dcon low-power display mode can then be integrated using the
6+
drm damage tracking and self-refresh helpers.
7+
This bolted-on self-refresh support that digs around in fbdev
8+
internals, but isn't properly integrated, is not the correct solution.
29
- see if vx855 gpio API can be made similar enough to cs5535 so we can
310
share more code
411
- convert all uses of the old GPIO API from <linux/gpio.h> to the

‎drivers/staging/olpc_dcon/olpc_dcon.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,7 @@ static bool dcon_blank_fb(struct dcon_priv *dcon, bool blank)
250250
int err;
251251

252252
console_lock();
253-
if (!lock_fb_info(dcon->fbinfo)) {
254-
console_unlock();
255-
dev_err(&dcon->client->dev, "unable to lock framebuffer\n");
256-
return false;
257-
}
253+
lock_fb_info(dcon->fbinfo);
258254

259255
dcon->ignore_fb_events = true;
260256
err = fb_blank(dcon->fbinfo,

‎drivers/tty/vt/vt.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3822,6 +3822,8 @@ int con_is_bound(const struct consw *csw)
38223822
{
38233823
int i, bound = 0;
38243824

3825+
WARN_CONSOLE_UNLOCKED();
3826+
38253827
for (i = 0; i < MAX_NR_CONSOLES; i++) {
38263828
if (con_driver_map[i] == csw) {
38273829
bound = 1;
@@ -3833,6 +3835,20 @@ int con_is_bound(const struct consw *csw)
38333835
}
38343836
EXPORT_SYMBOL(con_is_bound);
38353837

3838+
/**
3839+
* con_is_visible - checks whether the current console is visible
3840+
* @vc: virtual console
3841+
*
3842+
* RETURNS: zero if not visible, nonzero if visible
3843+
*/
3844+
bool con_is_visible(const struct vc_data *vc)
3845+
{
3846+
WARN_CONSOLE_UNLOCKED();
3847+
3848+
return *vc->vc_display_fg == vc;
3849+
}
3850+
EXPORT_SYMBOL(con_is_visible);
3851+
38363852
/**
38373853
* con_debug_enter - prepare the console for the kernel debugger
38383854
* @sw: console driver
@@ -4166,6 +4182,8 @@ void do_blank_screen(int entering_gfx)
41664182
struct vc_data *vc = vc_cons[fg_console].d;
41674183
int i;
41684184

4185+
might_sleep();
4186+
41694187
WARN_CONSOLE_UNLOCKED();
41704188

41714189
if (console_blanked) {

‎drivers/video/backlight/backlight.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int fb_notifier_callback(struct notifier_block *self,
4747
int fb_blank = 0;
4848

4949
/* If we aren't interested in this event, skip it immediately ... */
50-
if (event != FB_EVENT_BLANK && event != FB_EVENT_CONBLANK)
50+
if (event != FB_EVENT_BLANK)
5151
return 0;
5252

5353
bd = container_of(self, struct backlight_device, fb_notif);

0 commit comments

Comments
 (0)