Skip to content

Commit

Permalink
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/lethal/fbdev-2.6

* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  sisfb: delete osdef.h
  sisfb: move the CONFIG warning to sis_main.c
  sisfb: replace SiS_SetMemory with memset_io
  sisfb: remove InPort/OutPort wrappers
  sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H
  sisfb: delete redudant #define SIS_LINUX_KERNEL
  sisfb: delete dead SIS_XORG_XF86 code
  sisfb: delete fallback code for pci_map_rom()
  sisfb: delete obsolete PCI ROM bug workaround
  fbdev: Update documentation index file.
  lxfb: Program panel v/h sync output polarity correctly
  fbcmap: integer overflow bug
  fbcmap: cleanup white space in fb_alloc_cmap()
  MAINTAINERS: Add fbdev patchwork entry, tidy up file patterns.
  fbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define
  fbdev: sh_mobile_lcdcfb: fix bug in reconfig()
torvalds committed Nov 24, 2010
2 parents 3070fb8 + c07a1c6 commit e5fa506
Showing 17 changed files with 285 additions and 1,281 deletions.
32 changes: 25 additions & 7 deletions Documentation/fb/00-INDEX
Original file line number Diff line number Diff line change
@@ -4,33 +4,41 @@ please mail me.
Geert Uytterhoeven <[email protected]>

00-INDEX
- this file
- this file.
arkfb.txt
- info on the fbdev driver for ARK Logic chips.
aty128fb.txt
- info on the ATI Rage128 frame buffer driver.
cirrusfb.txt
- info on the driver for Cirrus Logic chipsets.
cmap_xfbdev.txt
- an introduction to fbdev's cmap structures.
deferred_io.txt
- an introduction to deferred IO.
efifb.txt
- info on the EFI platform driver for Intel based Apple computers.
ep93xx-fb.txt
- info on the driver for EP93xx LCD controller.
fbcon.txt
- intro to and usage guide for the framebuffer console (fbcon).
framebuffer.txt
- introduction to frame buffer devices.
imacfb.txt
- info on the generic EFI platform driver for Intel based Macs.
gxfb.txt
- info on the framebuffer driver for AMD Geode GX2 based processors.
intel810.txt
- documentation for the Intel 810/815 framebuffer driver.
intelfb.txt
- docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver.
internals.txt
- quick overview of frame buffer device internals.
lxfb.txt
- info on the framebuffer driver for AMD Geode LX based processors.
matroxfb.txt
- info on the Matrox framebuffer driver for Alpha, Intel and PPC.
metronomefb.txt
- info on the driver for the Metronome display controller.
modedb.txt
- info on the video mode database.
matroxfb.txt
- info on the Matrox frame buffer driver.
pvr2fb.txt
- info on the PowerVR 2 frame buffer driver.
pxafb.txt
@@ -39,13 +47,23 @@ s3fb.txt
- info on the fbdev driver for S3 Trio/Virge chips.
sa1100fb.txt
- information about the driver for the SA-1100 LCD controller.
sh7760fb.txt
- info on the SH7760/SH7763 integrated LCDC Framebuffer driver.
sisfb.txt
- info on the framebuffer device driver for various SiS chips.
sstfb.txt
- info on the frame buffer driver for 3dfx' Voodoo Graphics boards.
tgafb.txt
- info on the TGA (DECChip 21030) frame buffer driver
- info on the TGA (DECChip 21030) frame buffer driver.
tridentfb.txt
info on the framebuffer driver for some Trident chip based cards.
uvesafb.txt
- info on the userspace VESA (VBE2+ compliant) frame buffer device.
vesafb.txt
- info on the VESA frame buffer device
- info on the VESA frame buffer device.
viafb.modes
- list of modes for VIA Integration Graphic Chip.
viafb.txt
- info on the VIA Integration Graphic Chip console framebuffer driver.
vt8623fb.txt
- info on the fb driver for the graphics core in VIA VT8623 chipsets.
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
@@ -2444,10 +2444,12 @@ F: drivers/net/wan/sdla.c
FRAMEBUFFER LAYER
L: [email protected]
W: http://linux-fbdev.sourceforge.net/
Q: http://patchwork.kernel.org/project/linux-fbdev/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
S: Orphan
F: Documentation/fb/
F: drivers/video/fb*
F: drivers/video/
F: include/video/
F: include/linux/fb.h

FREESCALE DMA DRIVER
68 changes: 43 additions & 25 deletions drivers/video/fbcmap.c
Original file line number Diff line number Diff line change
@@ -88,34 +88,48 @@ static const struct fb_cmap default_16_colors = {
*
*/

int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags)
{
int size = len*sizeof(u16);

if (cmap->len != len) {
fb_dealloc_cmap(cmap);
if (!len)
return 0;
if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
goto fail;
if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
goto fail;
if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
goto fail;
if (transp) {
if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
int size = len * sizeof(u16);
int ret = -ENOMEM;

if (cmap->len != len) {
fb_dealloc_cmap(cmap);
if (!len)
return 0;

cmap->red = kmalloc(size, flags);
if (!cmap->red)
goto fail;
cmap->green = kmalloc(size, flags);
if (!cmap->green)
goto fail;
cmap->blue = kmalloc(size, flags);
if (!cmap->blue)
goto fail;
if (transp) {
cmap->transp = kmalloc(size, flags);
if (!cmap->transp)
goto fail;
} else {
cmap->transp = NULL;
}
}
cmap->start = 0;
cmap->len = len;
ret = fb_copy_cmap(fb_default_cmap(len), cmap);
if (ret)
goto fail;
} else
cmap->transp = NULL;
}
cmap->start = 0;
cmap->len = len;
fb_copy_cmap(fb_default_cmap(len), cmap);
return 0;
return 0;

fail:
fb_dealloc_cmap(cmap);
return -ENOMEM;
fb_dealloc_cmap(cmap);
return ret;
}

int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
{
return fb_alloc_cmap_gfp(cmap, len, transp, GFP_ATOMIC);
}

/**
@@ -250,8 +264,12 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
int rc, size = cmap->len * sizeof(u16);
struct fb_cmap umap;

if (size < 0 || size < cmap->len)
return -E2BIG;

memset(&umap, 0, sizeof(struct fb_cmap));
rc = fb_alloc_cmap(&umap, cmap->len, cmap->transp != NULL);
rc = fb_alloc_cmap_gfp(&umap, cmap->len, cmap->transp != NULL,
GFP_KERNEL);
if (rc)
return rc;
if (copy_from_user(umap.red, cmap->red, size) ||
4 changes: 2 additions & 2 deletions drivers/video/geode/lxfb_ops.c
Original file line number Diff line number Diff line change
@@ -276,10 +276,10 @@ static void lx_graphics_enable(struct fb_info *info)
write_fp(par, FP_PT1, 0);
temp = FP_PT2_SCRC;

if (info->var.sync & FB_SYNC_HOR_HIGH_ACT)
if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT))
temp |= FP_PT2_HSP;

if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
temp |= FP_PT2_VSP;

write_fp(par, FP_PT2, temp);
4 changes: 2 additions & 2 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
@@ -860,15 +860,15 @@ static void sh_mobile_fb_reconfig(struct fb_info *info)
/* Couldn't reconfigure, hopefully, can continue as before */
return;

info->fix.line_length = mode2.xres * (ch->cfg.bpp / 8);
info->fix.line_length = mode1.xres * (ch->cfg.bpp / 8);

/*
* fb_set_var() calls the notifier change internally, only if
* FBINFO_MISC_USEREVENT flag is set. Since we do not want to fake a
* user event, we have to call the chain ourselves.
*/
event.info = info;
event.data = &mode2;
event.data = &mode1;
fb_notifier_call_chain(evnt, &event);
}

Loading

0 comments on commit e5fa506

Please sign in to comment.