Commit a8a6b118 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'fbdev-v4.21' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:
 "This time the pull request is really small.

  The most notable changes are fixing fbcon to not cause crash on
  unregister_framebuffer() operation when there is more than one
  framebuffer, adding config option to center the bootup logo and making
  FB_BACKLIGHT config option tristate (which in turn uncovered incorrect
  FB_BACKLIGHT usage by DRM's nouveau driver).

  Summary:

   - fix fbcon to not cause crash on unregister_framebuffer() when there
     is more than one framebuffer (Noralf Trønnes)

   - improve support for small rotated displays (Peter Rosin)

   - fix probe failure handling in udlfb driver (Dan Carpenter)

   - add config option to center the bootup logo (Peter Rosin)

   - make FB_BACKLIGHT config option tristate (Rob Clark)

   - remove superfluous HAS_DMA dependency for goldfishfb driver (Geert
     Uytterhoeven)

   - misc fixes (Alexey Khoroshilov, YueHaibing, Colin Ian King, Lubomir
     Rintel)

   - misc cleanups (Yangtao Li, Wen Yang)

  also there is DRM's nouveau driver fix for wrong FB_BACKLIGHT config
  option usage (FB_BACKLIGHT is for internal fbdev subsystem use only)"

* tag 'fbdev-v4.21' of git://github.com/bzolnier/linux:
  drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig
  fbdev: fbcon: Fix unregister crash when more than one framebuffer
  fbdev: Remove depends on HAS_DMA in case of platform dependency
  pxa168fb: trivial typo fix
  fbdev: fsl-diu: remove redundant null check on cmap
  fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE
  fbdev: uvesafb: fix spelling mistake "memoery" -> "memory"
  fbdev: fbmem: add config option to center the bootup logo
  fbdev: fbmem: make fb_show_logo_line return the end instead of the height
  video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"
  fbdev: fbmem: behave better with small rotated displays and many CPUs
  video: clps711x-fb: release disp device node in probe()
  fbdev: make FB_BACKLIGHT a tristate
  udlfb: fix some inconsistent NULL checking
parents 7671c14e 399382f8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ config DRM_NOUVEAU
        select FW_LOADER
	select DRM_KMS_HELPER
	select DRM_TTM
	select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
	select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
	select BACKLIGHT_LCD_SUPPORT if DRM_NOUVEAU_BACKLIGHT
	select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT
	select X86_PLATFORM_DEVICES if ACPI && X86
	select ACPI_WMI if ACPI && X86
+3 −2
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ config FB_MACMODES
       depends on FB

config FB_BACKLIGHT
	bool
	tristate
	depends on FB
	select BACKLIGHT_LCD_SUPPORT
	select BACKLIGHT_CLASS_DEVICE
@@ -2037,7 +2037,8 @@ config FB_XILINX

config FB_GOLDFISH
	tristate "Goldfish Framebuffer"
	depends on FB && HAS_DMA && (GOLDFISH || COMPILE_TEST)
	depends on FB
	depends on GOLDFISH || COMPILE_TEST
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
+4 −1
Original line number Diff line number Diff line
@@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device *pdev)
	}

	ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE);
	if (ret)
	if (ret) {
		of_node_put(disp);
		goto out_fb_release;
	}

	of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale);
	cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert");

	ret = of_property_read_u32(disp, "bits-per-pixel",
				   &info->var.bits_per_pixel);
	of_node_put(disp);
	if (ret)
		goto out_fb_release;

+1 −1
Original line number Diff line number Diff line
@@ -3064,7 +3064,7 @@ static int fbcon_fb_unbind(int idx)
	for (i = first_fb_vc; i <= last_fb_vc; i++) {
		if (con2fb_map[i] != idx &&
		    con2fb_map[i] != -1) {
			new_idx = i;
			new_idx = con2fb_map[i];
			break;
		}
	}
+33 −6
Original line number Diff line number Diff line
@@ -436,7 +436,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
			image->dx += image->width + 8;
		}
	} else if (rotate == FB_ROTATE_UD) {
		for (x = 0; x < num; x++) {
		u32 dx = image->dx;

		for (x = 0; x < num && image->dx <= dx; x++) {
			info->fbops->fb_imageblit(info, image);
			image->dx -= image->width + 8;
		}
@@ -448,7 +450,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
			image->dy += image->height + 8;
		}
	} else if (rotate == FB_ROTATE_CCW) {
		for (x = 0; x < num; x++) {
		u32 dy = image->dy;

		for (x = 0; x < num && image->dy <= dy; x++) {
			info->fbops->fb_imageblit(info, image);
			image->dy -= image->height + 8;
		}
@@ -502,8 +506,25 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
		fb_set_logo(info, logo, logo_new, fb_logo.depth);
	}

#ifdef CONFIG_FB_LOGO_CENTER
	{
		int xres = info->var.xres;
		int yres = info->var.yres;

		if (rotate == FB_ROTATE_CW || rotate == FB_ROTATE_CCW) {
			xres = info->var.yres;
			yres = info->var.xres;
		}

		while (n && (n * (logo->width + 8) - 8 > xres))
			--n;
		image.dx = (xres - n * (logo->width + 8) - 8) / 2;
		image.dy = y ?: (yres - logo->height) / 2;
	}
#else
	image.dx = 0;
	image.dy = y;
#endif
	image.width = logo->width;
	image.height = logo->height;

@@ -521,7 +542,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
		info->pseudo_palette = saved_pseudo_palette;
	kfree(logo_new);
	kfree(logo_rotate);
	return logo->height;
	return image.dy + logo->height;
}


@@ -573,7 +594,7 @@ static int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
	unsigned int i;

	for (i = 0; i < fb_logo_ex_num; i++)
		y += fb_show_logo_line(info, rotate,
		y = fb_show_logo_line(info, rotate,
				      fb_logo_ex[i].logo, y, fb_logo_ex[i].n);

	return y;
@@ -600,6 +621,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
{
	int depth = fb_get_color_depth(&info->var, &info->fix);
	unsigned int yres;
	int height;

	memset(&fb_logo, 0, sizeof(struct logo_data));

@@ -661,7 +683,12 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
 		}
 	}

	return fb_prepare_extra_logos(info, fb_logo.logo->height, yres);
	height = fb_logo.logo->height;
#ifdef CONFIG_FB_LOGO_CENTER
	height += (yres - fb_logo.logo->height) / 2;
#endif

	return fb_prepare_extra_logos(info, height, yres);
}

int fb_show_logo(struct fb_info *info, int rotate)
Loading