Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09fd671c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull fbdev updates from Tomi Valkeinen:

 - Miscallaneous small fixes to various fbdev drivers

 - Remove fb_rotate, which was never used

 - pmag fb improvements

* tag 'fbdev-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (21 commits)
  xen kconfig: don't "select INPUT_XEN_KBDDEV_FRONTEND"
  video: fbdev: sis: remove unused variable
  drivers/video: make fbdev/sunxvr2500.c explicitly non-modular
  drivers/video: make fbdev/sunxvr1000.c explicitly non-modular
  drivers/video: make fbdev/sunxvr500.c explicitly non-modular
  video: exynos: fix modular build
  fbdev: da8xx-fb: fix videomodes of lcd panels
  fbdev: kill fb_rotate
  video: fbdev: bt431: Correct cursor format control macro
  video: fbdev: pmag-ba-fb: Optimize Bt455 colormap addressing
  video: fbdev: pmag-ba-fb: Fix and rework Bt455 colormap handling
  video: fbdev: bt455: Remove unneeded colormap helpers for cursor support
  video: fbdev: pmag-aa-fb: Report video timings
  video: fbdev: pmag-aa-fb: Enable building as a module
  video: fbdev: pmag-aa-fb: Adapt to current APIs
  video: fbdev: pmag-ba-fb: Fix the lower margin size
  fbdev: sh_mobile_lcdc: Use ARCH_RENESAS
  fbdev: n411: check return value
  fbdev: exynos: fix IS_ERR_VALUE usage
  video: Use bool instead int pointer for get_opt_bool() argument
  ...
parents bace3db5 13aa38e2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1808,8 +1808,8 @@ config FB_HIT
	  frame buffer card.

config FB_PMAG_AA
	bool "PMAG-AA TURBOchannel framebuffer support"
	depends on (FB = y) && TC
	tristate "PMAG-AA TURBOchannel framebuffer support"
	depends on FB && TC
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -1985,7 +1985,7 @@ config FB_W100

config FB_SH_MOBILE_LCDC
	tristate "SuperH Mobile LCDC framebuffer support"
	depends on FB && (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
	depends on FB && (SUPERH || ARCH_RENESAS) && HAVE_CLK
	depends on FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
	select FB_SYS_FILLRECT
	select FB_SYS_COPYAREA
@@ -2246,7 +2246,6 @@ config XEN_FBDEV_FRONTEND
	select FB_SYS_IMAGEBLIT
	select FB_SYS_FOPS
	select FB_DEFERRED_IO
	select INPUT_XEN_KBDDEV_FRONTEND if INPUT_MISC
	select XEN_XENBUS_FRONTEND
	default y
	help
+0 −3
Original line number Diff line number Diff line
@@ -313,9 +313,6 @@ extern unsigned char fontdata_8x16[];
 *	* Draws cursor *
 *	int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
 *
 *	* Rotates the display *
 *	void (*fb_rotate)(struct fb_info *info, int angle);
 *
 *	* wait for blit idle, optional *
 *	int (*fb_sync)(struct fb_info *info);
 *
+0 −22
Original line number Diff line number Diff line
@@ -334,27 +334,6 @@ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
	return 0;
}

/* fb_rotate
 * Rotate the display of this angle. This doesn't seems to be used by the core,
 * but as our hardware supports it, so why not implementing it...
 */
void au1100fb_fb_rotate(struct fb_info *fbi, int angle)
{
	struct au1100fb_device *fbdev = to_au1100fb_device(fbi);

	print_dbg("fb_rotate %p %d", fbi, angle);

	if (fbdev && (angle > 0) && !(angle % 90)) {

		fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;

		fbdev->regs->lcd_control &= ~(LCD_CONTROL_SM_MASK);
		fbdev->regs->lcd_control |= ((angle/90) << LCD_CONTROL_SM_BIT);

		fbdev->regs->lcd_control |= LCD_CONTROL_GO;
	}
}

/* fb_mmap
 * Map video memory in user space. We don't use the generic fb_mmap method mainly
 * to allow the use of the TLB streaming flag (CCA=6)
@@ -380,7 +359,6 @@ static struct fb_ops au1100fb_ops =
	.fb_fillrect		= cfb_fillrect,
	.fb_copyarea		= cfb_copyarea,
	.fb_imageblit		= cfb_imageblit,
	.fb_rotate		= au1100fb_fb_rotate,
	.fb_mmap		= au1100fb_fb_mmap,
};

+0 −23
Original line number Diff line number Diff line
@@ -554,28 +554,6 @@ static int bfin_lq035_fb_check_var(struct fb_var_screeninfo *var,
	return 0;
}

/* fb_rotate
 * Rotate the display of this angle. This doesn't seems to be used by the core,
 * but as our hardware supports it, so why not implementing it...
 */
static void bfin_lq035_fb_rotate(struct fb_info *fbi, int angle)
{
	pr_debug("%s: %p %d", __func__, fbi, angle);
#if (defined(UD) && defined(LBR))
	switch (angle) {

	case 180:
		gpio_set_value(LBR, 0);
		gpio_set_value(UD, 1);
		break;
	default:
		gpio_set_value(LBR, 1);
		gpio_set_value(UD, 0);
		break;
	}
#endif
}

static int bfin_lq035_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
	if (nocursor)
@@ -623,7 +601,6 @@ static struct fb_ops bfin_lq035_fb_ops = {
	.fb_open		= bfin_lq035_fb_open,
	.fb_release		= bfin_lq035_fb_release,
	.fb_check_var		= bfin_lq035_fb_check_var,
	.fb_rotate		= bfin_lq035_fb_rotate,
	.fb_fillrect		= cfb_fillrect,
	.fb_copyarea		= cfb_copyarea,
	.fb_imageblit		= cfb_imageblit,
+24 −19
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
 *	linux/drivers/video/bt431.h
 *
 *	Copyright 2003  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 *	Copyright 2016  Maciej W. Rozycki <macro@linux-mips.org>
 *
 *	This file is subject to the terms and conditions of the GNU General
 *	Public License. See the file COPYING in the main directory of this
@@ -9,6 +10,8 @@
 */
#include <linux/types.h>

#define BT431_CURSOR_SIZE	64

/*
 * Bt431 cursor generator registers, 32-bit aligned.
 * Two twin Bt431 are used on the DECstation's PMAG-AA.
@@ -60,7 +63,7 @@ static inline u8 bt431_get_value(u16 val)
#define BT431_CMD_CURS_ENABLE	0x40
#define BT431_CMD_XHAIR_ENABLE	0x20
#define BT431_CMD_OR_CURSORS	0x10
#define BT431_CMD_AND_CURSORS	0x00
#define BT431_CMD_XOR_CURSORS	0x00
#define BT431_CMD_1_1_MUX	0x00
#define BT431_CMD_4_1_MUX	0x04
#define BT431_CMD_5_1_MUX	0x08
@@ -196,27 +199,29 @@ static inline void bt431_position_cursor(struct bt431_regs *regs, u16 x, u16 y)
	bt431_write_reg_inc(regs, (y >> 8) & 0x0f); /* BT431_REG_CYHI */
}

static inline void bt431_set_font(struct bt431_regs *regs, u8 fgc,
				  u16 width, u16 height)
static inline void bt431_set_cursor(struct bt431_regs *regs,
				    const char *data, const char *mask,
				    u16 rop, u16 width, u16 height)
{
	u16 x, y;
	int i;
	u16 fgp = fgc ? 0xffff : 0x0000;
	u16 bgp = fgc ? 0x0000 : 0xffff;

	i = 0;
	width = DIV_ROUND_UP(width, 8);
	bt431_select_reg(regs, BT431_REG_CRAM_BASE);
	for (i = BT431_REG_CRAM_BASE; i <= BT431_REG_CRAM_END; i++) {
		u16 value;

		if (height << 6 <= i << 3)
			value = bgp;
		else if (width <= i % 8 << 3)
			value = bgp;
		else if (((width >> 3) & 0xffff) > i % 8)
			value = fgp;
	for (y = 0; y < BT431_CURSOR_SIZE; y++)
		for (x = 0; x < BT431_CURSOR_SIZE / 8; x++) {
			u16 val = 0;

			if (y < height && x < width) {
				val = mask[i];
				if (rop == ROP_XOR)
					val = (val << 8) | (val ^ data[i]);
				else
			value = fgp & ~(bgp << (width % 8 << 1));

		bt431_write_cmap_inc(regs, value);
					val = (val << 8) | (val & data[i]);
				i++;
			}
			bt431_write_cmap_inc(regs, val);
		}
}

Loading