Skip to content

Commit

Permalink
Merge tag 'fbdev-main-3.16' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/tomba/linux into next

Pull main fbdev changes from Tomi Valkeinen:
 "Mainly fixes and small improvements.  The biggest change seems to be
  backlight control support for mx3fb"

* tag 'fbdev-main-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (31 commits)
  drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap
  video: fbdev: s3fb.c: Fix for possible null pointer dereference
  video: fbdev: grvga.c: Fix for possible null pointer dereference
  matroxfb: perform a dummy read of M_STATUS
  video: of: display_timing: fix default native-mode setting
  video: delete unneeded call to platform_get_drvdata
  video: mx3fb: Add backlight control support
  video: omap: delete support for early fbmem allocation
  video: of: display_timing: remove two unsafe error messages
  fbdev: fbmem: remove positive test on unsigned values
  fbcon: Fix memory leak in con2fb_release_oldinfo()
  video: Kconfig: Add a dependency to the Goldfish framebuffer driver
  video: exynos: Add a dependency to the menu
  video: mx3fb: Use devm_kzalloc
  video/nuc900: allow modular build
  video: atmel needs FB_BACKLIGHT
  video: export fb_prepare_logo
  video/mbx: fix building debugfs support
  video/omap: fix modular build
  video: clarify I2C dependencies
  ...
  • Loading branch information
Linus Torvalds committed Jun 4, 2014
2 parents 4dc4226 + fbc6c4a commit d55696a
Show file tree
Hide file tree
Showing 29 changed files with 169 additions and 153 deletions.
1 change: 1 addition & 0 deletions drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo,
fbcon_del_cursor_timer(oldinfo);
kfree(ops->cursor_state.mask);
kfree(ops->cursor_data);
kfree(ops->cursor_src);
kfree(ops->fontbuffer);
kfree(oldinfo->fbcon_par);
oldinfo->fbcon_par = NULL;
Expand Down
11 changes: 8 additions & 3 deletions drivers/video/fbdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ config FB_CYBER2000_DDC
config FB_CYBER2000_I2C
bool "CyberPro 2000/2010/5000 I2C support"
depends on FB_CYBER2000 && I2C && ARCH_NETWINDER
depends on I2C=y || FB_CYBER2000=m
select I2C_ALGOBIT
help
Enable support for the I2C video decoder interface on the
Expand Down Expand Up @@ -966,6 +967,7 @@ config FB_S1D13XXX
config FB_ATMEL
tristate "AT91/AT32 LCD Controller support"
depends on FB && HAVE_FB_ATMEL
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down Expand Up @@ -1971,6 +1973,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_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
Expand All @@ -1993,7 +1996,7 @@ config FB_SH_MOBILE_HDMI

config FB_TMIO
tristate "Toshiba Mobile IO FrameBuffer support"
depends on FB && MFD_CORE
depends on FB && (MFD_TMIO || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down Expand Up @@ -2062,7 +2065,7 @@ config FB_S3C2410_DEBUG
through sysfs

config FB_NUC900
bool "NUC900 LCD framebuffer support"
tristate "NUC900 LCD framebuffer support"
depends on FB && ARCH_W90X900
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
Expand Down Expand Up @@ -2169,7 +2172,7 @@ config FB_XILINX

config FB_GOLDFISH
tristate "Goldfish Framebuffer"
depends on FB && HAS_DMA
depends on FB && HAS_DMA && (GOLDFISH || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down Expand Up @@ -2295,6 +2298,7 @@ endchoice
config FB_MB862XX_I2C
bool "Support I2C bus on MB862XX GDC"
depends on FB_MB862XX && I2C
depends on FB_MB862XX=m || I2C=y
default y
help
Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter
Expand Down Expand Up @@ -2332,6 +2336,7 @@ config FB_MX3
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select BACKLIGHT_CLASS_DEVICE
default y
help
This is a framebuffer device for the i.MX31 LCD Controller. So
Expand Down
2 changes: 0 additions & 2 deletions drivers/video/fbdev/bf54x-lq043fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,6 @@ static int bfin_bf54x_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int bfin_bf54x_suspend(struct platform_device *pdev, pm_message_t state)
{
struct fb_info *fbinfo = platform_get_drvdata(pdev);

bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() & ~EPPI_EN);
disable_dma(CH_EPPI0);
bfin_write_EPPI0_STATUS(0xFFFF);
Expand Down
7 changes: 4 additions & 3 deletions drivers/video/fbdev/core/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ 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 && image->dx >= 0; x++) {
for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image);
image->dx -= image->width + 8;
}
Expand All @@ -445,7 +445,7 @@ 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 && image->dy >= 0; x++) {
for (x = 0; x < num; x++) {
info->fbops->fb_imageblit(info, image);
image->dy -= image->height + 8;
}
Expand Down Expand Up @@ -674,6 +674,7 @@ int fb_show_logo(struct fb_info *info, int rotate)
int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }
int fb_show_logo(struct fb_info *info, int rotate) { return 0; }
#endif /* CONFIG_LOGO */
EXPORT_SYMBOL(fb_prepare_logo);
EXPORT_SYMBOL(fb_show_logo);

static void *fb_seq_start(struct seq_file *m, loff_t *pos)
Expand Down Expand Up @@ -1179,7 +1180,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return -EFAULT;
if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
if (con2fb.framebuffer >= FB_MAX)
return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
Expand Down
9 changes: 8 additions & 1 deletion drivers/video/fbdev/core/fbmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,13 +1012,20 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
while (pos < edid[2]) {
u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7;
pr_debug("Data block %u of %u bytes\n", type, len);
if (type == 2)
if (type == 2) {
for (i = pos; i < pos + len; i++) {
u8 idx = edid[pos + i] & 0x7f;
svd[svd_n++] = idx;
pr_debug("N%sative mode #%d\n",
edid[pos + i] & 0x80 ? "" : "on-n", idx);
}
} else if (type == 3 && len >= 3) {
/* Check Vendor Specific Data Block. For HDMI,
it is always 00-0C-03 for HDMI Licensing, LLC. */
if (edid[pos + 1] == 3 && edid[pos + 2] == 0xc &&
edid[pos + 3] == 0)
specs->misc |= FB_MISC_HDMI;
}
pos += len + 1;
}

Expand Down
14 changes: 14 additions & 0 deletions drivers/video/fbdev/da8xx-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,20 @@ static struct fb_videomode known_lcd_panels[] = {
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.flag = 0,
},
[3] = {
/* Densitron 84-0023-001T */
.name = "Densitron_84-0023-001T",
.xres = 320,
.yres = 240,
.pixclock = KHZ2PICOS(6400),
.left_margin = 0,
.right_margin = 0,
.upper_margin = 0,
.lower_margin = 0,
.hsync_len = 30,
.vsync_len = 3,
.sync = 0,
},
};

static bool da8xx_fb_is_raster_enabled(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

menuconfig EXYNOS_VIDEO
bool "Exynos Video driver support"
depends on ARCH_S5PV210 || ARCH_EXYNOS
help
This enables support for EXYNOS Video device.

Expand All @@ -15,7 +16,6 @@ if EXYNOS_VIDEO

config EXYNOS_MIPI_DSI
bool "EXYNOS MIPI DSI driver support."
depends on ARCH_S5PV210 || ARCH_EXYNOS
select GENERIC_PHY
help
This enables support for MIPI-DSI device.
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/fbdev/fb-puv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/mm.h>

#include <asm/sizes.h>
#include <asm/pgtable.h>
#include <mach/hardware.h>

/* Platform_data reserved for unifb registers. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/gbefb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ static struct fb_ops gbefb_ops = {

static ssize_t gbefb_show_memsize(struct device *dev, struct device_attribute *attr, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d\n", gbe_mem_size);
return snprintf(buf, PAGE_SIZE, "%u\n", gbe_mem_size);
}

static DEVICE_ATTR(size, S_IRUGO, gbefb_show_memsize, NULL);
Expand Down
3 changes: 2 additions & 1 deletion drivers/video/fbdev/grvga.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ static int grvga_probe(struct platform_device *dev)
static int grvga_remove(struct platform_device *device)
{
struct fb_info *info = dev_get_drvdata(&device->dev);
struct grvga_par *par = info->par;
struct grvga_par *par;

if (info) {
par = info->par;
unregister_framebuffer(info);
fb_dealloc_cmap(&info->cmap);

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/matrox/matroxfb_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);

#define mga_fifo(n) do {} while ((mga_inl(M_FIFOSTATUS) & 0xFF) < (n))

#define WaitTillIdle() do {} while (mga_inl(M_STATUS) & 0x10000)
#define WaitTillIdle() do { mga_inl(M_STATUS); do {} while (mga_inl(M_STATUS) & 0x10000); } while (0)

/* code speedup */
#ifdef CONFIG_FB_MATROX_MILLENIUM
Expand Down
3 changes: 1 addition & 2 deletions drivers/video/fbdev/mbx/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Makefile for the 2700G controller driver.

obj-$(CONFIG_FB_MBX) += mbxfb.o
obj-$(CONFIG_FB_MBX_DEBUG) += mbxfbdebugfs.o
obj-y += mbxfb.o
2 changes: 1 addition & 1 deletion drivers/video/fbdev/mbx/mbxdebugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct mbxfb_debugfs_data {

static int open_file_generic(struct inode *inode, struct file *file)
{
file->private_data = inode->u.generic_ip;
file->private_data = inode->i_private;
return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/video/fbdev/mbx/mbxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,8 @@ static int mbxfb_resume(struct platform_device *dev)
#ifndef CONFIG_FB_MBX_DEBUG
#define mbxfb_debugfs_init(x) do {} while(0)
#define mbxfb_debugfs_remove(x) do {} while(0)
#else
#include "mbxdebugfs.c"
#endif

#define res_size(_r) (((_r)->end - (_r)->start) + 1)
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/mmp/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
menuconfig MMP_DISP
tristate "Marvell MMP Display Subsystem support"
depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
depends on CPU_PXA910 || CPU_MMP2
help
Marvell Display Subsystem support.

Expand Down
9 changes: 2 additions & 7 deletions drivers/video/fbdev/mmp/fb/mmpfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ static void fb_info_clear(struct fb_info *info)
static int mmpfb_probe(struct platform_device *pdev)
{
struct mmp_buffer_driver_mach_info *mi;
struct fb_info *info = 0;
struct mmpfb_info *fbi = 0;
struct fb_info *info;
struct mmpfb_info *fbi;
int ret, modes_num;

mi = pdev->dev.platform_data;
Expand All @@ -569,10 +569,6 @@ static int mmpfb_probe(struct platform_device *pdev)
if (info == NULL)
return -ENOMEM;
fbi = info->par;
if (!fbi) {
ret = -EINVAL;
goto failed;
}

/* init fb */
fbi->fb_info = info;
Expand Down Expand Up @@ -667,7 +663,6 @@ static int mmpfb_probe(struct platform_device *pdev)
fbi->fb_start_dma);
failed_destroy_mutex:
mutex_destroy(&fbi->access_ok);
failed:
dev_err(fbi->dev, "mmp-fb: frame buffer device init failed\n");

framebuffer_release(info);
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/fbdev/mmp/hw/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ if MMP_DISP

config MMP_DISP_CONTROLLER
bool "mmp display controller hw support"
depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
depends on CPU_PXA910 || CPU_MMP2
default n
help
Marvell MMP display hw controller support
this controller is used on Marvell PXA910,
MMP2, MMP3, PXA988 chips
this controller is used on Marvell PXA910 and
MMP2 chips

config MMP_DISP_SPI
bool "mmp display controller spi port"
Expand Down
32 changes: 0 additions & 32 deletions drivers/video/fbdev/mmp/hw/mmp_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@ struct lcd_regs {
PN2_IOPAD_CONTROL) : LCD_TOP_CTRL)

/* dither configure */
#ifdef CONFIG_CPU_PXA988
#define LCD_DITHER_CTRL (0x01EC)
#else
#define LCD_DITHER_CTRL (0x00A0)
#endif

#define DITHER_TBL_INDEX_SEL(s) ((s) << 16)
#define DITHER_MODE2(m) ((m) << 12)
Expand All @@ -186,23 +182,13 @@ struct lcd_regs {
#define DITHER_EN1 (1)

/* dither table data was fixed by video bpp of input and output*/
#ifdef CONFIG_CPU_PXA988
#define DITHER_TB_4X4_INDEX0 (0x6e4ca280)
#define DITHER_TB_4X4_INDEX1 (0x5d7f91b3)
#define DITHER_TB_4X8_INDEX0 (0xb391a280)
#define DITHER_TB_4X8_INDEX1 (0x7f5d6e4c)
#define DITHER_TB_4X8_INDEX2 (0x80a291b3)
#define DITHER_TB_4X8_INDEX3 (0x4c6e5d7f)
#define LCD_DITHER_TBL_DATA (0x01F0)
#else
#define DITHER_TB_4X4_INDEX0 (0x3b19f7d5)
#define DITHER_TB_4X4_INDEX1 (0x082ac4e6)
#define DITHER_TB_4X8_INDEX0 (0xf7d508e6)
#define DITHER_TB_4X8_INDEX1 (0x3b194c2a)
#define DITHER_TB_4X8_INDEX2 (0xc4e6d5f7)
#define DITHER_TB_4X8_INDEX3 (0x082a193b)
#define LCD_DITHER_TBL_DATA (0x00A4)
#endif

/* Video Frame 0&1 start address registers */
#define LCD_SPU_DMA_START_ADDR_Y0 0x00C0
Expand Down Expand Up @@ -933,16 +919,9 @@ struct lcd_regs {
#define LCD_PN2_SQULN2_CTRL (0x02F0)
#define ALL_LAYER_ALPHA_SEL (0x02F4)

/* pxa988 has different MASTER_CTRL from MMP3/MMP2 */
#ifdef CONFIG_CPU_PXA988
#define TIMING_MASTER_CONTROL (0x01F4)
#define MASTER_ENH(id) (1 << ((id) + 5))
#define MASTER_ENV(id) (1 << ((id) + 6))
#else
#define TIMING_MASTER_CONTROL (0x02F8)
#define MASTER_ENH(id) (1 << (id))
#define MASTER_ENV(id) (1 << ((id) + 4))
#endif

#define DSI_START_SEL_SHIFT(id) (((id) << 1) + 8)
#define timing_master_config(path, dsi_id, lcd_id) \
Expand Down Expand Up @@ -1312,19 +1291,8 @@ struct dsi_regs {
#define DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_MASK (0xff)
#define DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_SHIFT 0

/*
* DSI timings
* PXA988 has diffrent ESC CLK with MMP2/MMP3
* it will be used in dsi_set_dphy() in pxa688_phy.c
* as low power mode clock.
*/
#ifdef CONFIG_CPU_PXA988
#define DSI_ESC_CLK 52 /* Unit: Mhz */
#define DSI_ESC_CLK_T 19 /* Unit: ns */
#else
#define DSI_ESC_CLK 66 /* Unit: Mhz */
#define DSI_ESC_CLK_T 15 /* Unit: ns */
#endif

/* LVDS */
/* LVDS_PHY_CTRL */
Expand Down
Loading

0 comments on commit d55696a

Please sign in to comment.