21 May, 2011

1 commit

  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 May, 2011

1 commit


15 May, 2011

3 commits

  • * fbmem:
    Further fbcon sanity checking
    fbmem: fix remove_conflicting_framebuffers races

    Linus Torvalds
     
  • This moves the

    if (num_registered_fb == FB_MAX)
    return -ENXIO;

    check _AFTER_ the call to do_remove_conflicting_framebuffers() as this
    would (now in a safe way) allow a native driver to replace the
    conflicting one even if all slots in registered_fb[] are taken.

    This also prevents unregistering a framebuffer that is no longer
    registered (vga16f will unregister at module unload time even if the
    frame buffer had been unregistered earlier due to being found
    conflicting).

    Signed-off-by: Bruno Prémont
    Signed-off-by: Linus Torvalds

    Bruno Prémont
     
  • When a register_framebuffer() call results in us removing old
    conflicting framebuffers, the new registration_lock doesn't protect that
    situation. And we can't just add the same locking to the function,
    because these functions call each other: register_framebuffer() calls
    remove_conflicting_framebuffers, which in turn calls
    unregister_framebuffer for any conflicting entry.

    In order to fix it, this just creates wrapper functions around all three
    functions and makes the versions that actually do the work be called
    "do_xxx()", leaving just the wrapper that gets the lock and calls the
    worker function.

    So the rule becomes simply that "do_xxxx()" has to be called with the
    lock held, and now do_register_framebuffer() can just call
    do_remove_conflicting_framebuffers(), and that in turn can call
    _do_unregister_framebuffer(), and there is no deadlock, and we can hold
    the registration lock over the whole sequence, fixing the races.

    It also makes error cases simpler, and fixes one situation where we
    would return from unregister_framebuffer() without releasing the lock,
    pointed out by Bruno Prémont.

    Tested-by: Bruno Prémont
    Tested-by: Anca Emanuel
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

13 May, 2011

1 commit


12 May, 2011

2 commits

  • read/write/ioctl on a fbcon file descriptor has traditionally used the
    fbcon not when it was opened, but as it was at the time of the call.
    That makes no sense, but the lack of sense is much more obvious now that
    we properly ref-count the usage - it means that the ref-counting doesn't
    actually protect operations we do on the frame buffer.

    This changes it to look at the fb_info that we got at open time, but in
    order to avoid using a frame buffer long after it has been unregistered,
    we do verify that it is still current, and return -ENODEV if not.

    Acked-by: Tim Gardner
    Tested-by: Daniel J Blueman
    Tested-by: Anca Emanuel
    Cc: Bruno Prémont
    Cc: Alan Cox
    Cc: Paul Mundt
    Cc: Dave Airlie
    Cc: Andy Whitcroft
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This just adds the refcount and the new registration lock logic. It
    does not (for example) actually change the read/write/ioctl routines to
    actually use the frame buffer that was opened: those function still end
    up alway susing whatever the current frame buffer is at the time of the
    call.

    Without this, if something holds the frame buffer open over a
    framebuffer switch, the close() operation after the switch will access a
    fb_info that has been free'd by the unregistering of the old frame
    buffer.

    (The read/write/ioctl operations will normally not cause problems,
    because they will - illogically - pick up the new fbcon instead. But a
    switch that happens just as one of those is going on might see problems
    too, the window is just much smaller: one individual op rather than the
    whole open-close sequence.)

    This use-after-free is apparently fairly easily triggered by the Ubuntu
    11.04 boot sequence.

    Acked-by: Tim Gardner
    Tested-by: Daniel J Blueman
    Tested-by: Anca Emanuel
    Cc: Bruno Prémont
    Cc: Alan Cox
    Cc: Paul Mundt
    Cc: Dave Airlie
    Cc: Andy Whitcroft
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 May, 2011

1 commit

  • WARNING: drivers/video/built-in.o(.devinit.text+0x38): Section mismatch in reference from the function acornfb_probe() to the function .init.text:acornfb_setup()
    The function __devinit acornfb_probe() references
    a function __init acornfb_setup().
    If acornfb_setup is only used by acornfb_probe then
    annotate acornfb_setup with a matching annotation.

    WARNING: drivers/video/built-in.o(.devinit.text+0x3c): Section mismatch in reference from the function acornfb_probe() to the function .init.text:acornfb_init_fbinfo()
    The function __devinit acornfb_probe() references
    a function __init acornfb_init_fbinfo().
    If acornfb_init_fbinfo is only used by acornfb_probe then
    annotate acornfb_init_fbinfo with a matching annotation.

    WARNING: drivers/video/built-in.o(.devinit.text+0x4c0): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
    The function __devinit acornfb_probe() references
    a (unknown reference) __initdata (unknown).
    If (unknown) is only used by acornfb_probe then
    annotate (unknown) with a matching annotation.

    WARNING: drivers/video/built-in.o(.devinit.text+0x4c8): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
    The function __devinit acornfb_probe() references
    a (unknown reference) __initdata (unknown).
    If (unknown) is only used by acornfb_probe then
    annotate (unknown) with a matching annotation.

    WARNING: drivers/video/built-in.o(.devinit.text+0x4cc): Section mismatch in reference from the function acornfb_probe() to the (unknown reference) .init.data:(unknown)
    The function __devinit acornfb_probe() references
    a (unknown reference) __initdata (unknown).
    If (unknown) is only used by acornfb_probe then
    annotate (unknown) with a matching annotation.

    Signed-off-by: Russell King

    Russell King
     

12 Apr, 2011

1 commit

  • In case CONFIG_FB_PXA_OVERLAY is not defined, the pxafb_freq_transition()
    function tests nonexistent member of pxafb_info (since the member is not
    part of the structure).

    Fix this by wraping the test in ifdef, even if I don't really like how the code
    looks now. The check doesn't have to happen if overlays are disabled at all as
    the check is always true then.

    Signed-off-by: Marek Vasut
    Acked-by: Vasily Khoruzhick
    Signed-off-by: Eric Miao

    Marek Vasut
     

08 Apr, 2011

2 commits

  • …l/git/lethal/fbdev-2.6

    * 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
    efifb: Add override for 11" Macbook Air 3,1
    efifb: Support overriding fields FW tells us with the DMI data.
    fb: Reduce priority of resource conflict message
    savagefb: Remove obsolete else clause in savage_setup_i2c_bus
    savagefb: Set up I2C based on chip family instead of card id
    savagefb: Replace magic register address with define
    drivers/video/bfin-lq035q1-fb.c: introduce missing kfree
    video: s3c-fb: fix checkpatch errors and warning
    efifb: support AMD Radeon HD 6490
    s3fb: fix Virge/GX2
    fbcon: Remove unused 'display *p' variable from fb_flashcursor()
    fbdev: sh_mobile_lcdcfb: fix module lock acquisition
    fbdev: sh_mobile_lcdcfb: add blanking support
    viafb: initialize margins correct
    viafb: refresh rate bug collection
    sh: mach-ap325rxa: move backlight control code
    sh: mach-ecovec24: support for main lcd backlight

    Linus Torvalds
     
  • * 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
    Fix common misspellings

    Linus Torvalds
     

07 Apr, 2011

8 commits


04 Apr, 2011

1 commit


02 Apr, 2011

1 commit


31 Mar, 2011

4 commits

  • Fixes generated by 'codespell' and manually reviewed.

    Signed-off-by: Lucas De Marchi

    Lucas De Marchi
     
  • This patch enables the framebuffer for the AMD Radeon 6490 found in the new MacBook Pro 8,2 generation.
    The framebuffer's base is located at 0x90010000, the method for obtaining it was found in the same way mentioned in https://patchwork.kernel.org/patch/91704/

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Jonathan Gonzalez
    Signed-off-by: Paul Mundt

    Davidlohr Bueso
     
  • Fix Virge/GX2 support in s3fb:
    - fix IDs: 86C357 is GX2, 86C359 is GX2+, 86C356 probably does not exist
    - add memory size detection
    - drive it the same way as Trio3D/2X

    The original IDs most likely came from S3 website which claims that:
    - 356 is Virge/GX2 with ID=8A10, driver included in Windows 2K, XP
    - 357 is Virge/GX2+ with ID=8A11, driver included in Windows ME
    - 359 is Virge/GX2+ with ID=8A12, driver included in Windows ME
    but:
    - google search for 86C356 only reveals references to Trio3D (probably
    because of a typo - Trio3D is 86C365)
    - my card is clearly marked as 86C357, Virge/GX2 and has ID=8A10
    - there is no driver for IDs 8A11 and 8A12 in Windows ME
    - there is a driver for ID 8A10 in Windows ME that says it's GX2 (357)

    Tested with #9 Reality 334 (86C357 Virge/GX2, ID=0x8A10).

    Signed-off-by: Ondrej Zary
    Signed-off-by: Paul Mundt

    Ondrej Zary
     
  • Signed-off-by: Sergey Senozhatsky
    Signed-off-by: Paul Mundt

    Sergey Senozhatsky
     

29 Mar, 2011

3 commits


26 Mar, 2011

1 commit


25 Mar, 2011

2 commits

  • Paul Mundt
     
  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits)
    [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
    [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
    [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
    [media] v4l: soc-camera: Store negotiated buffer settings
    [media] rc: interim support for 32-bit NEC-ish scancodes
    [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
    [media] lirc_zilog: error out if buffer read bytes != chunk size
    [media] lirc: silence some compile warnings
    [media] hdpvr: use same polling interval as other OS
    [media] ir-kbd-i2c: pass device code w/key in hauppauge case
    [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
    [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
    [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
    [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
    [media] rc-rc5-hauppauge-new: Add support for the old Black RC
    [media] rc-rc5-hauppauge-new: Add the old control to the table
    [media] rc-winfast: Fix the keycode tables
    [media] a800: Fix a few wrong IR key assignments
    [media] opera1: Use multimedia keys instead of an app-specific mapping
    [media] dw2102: Use multimedia keys instead of an app-specific mapping
    ...

    Fix up trivial conflicts (remove/modify and some real conflicts) in:
    arch/arm/mach-omap2/devices.c
    drivers/staging/Kconfig
    drivers/staging/Makefile
    drivers/staging/dabusb/dabusb.c
    drivers/staging/dabusb/dabusb.h
    drivers/staging/easycap/easycap_ioctl.c
    drivers/staging/usbvideo/usbvideo.c
    drivers/staging/usbvideo/vicam.c

    Linus Torvalds
     

24 Mar, 2011

3 commits

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (90 commits)
    mfd: Push byte swaps out of wm8994 bulk read path
    mfd: Rename ab8500 gpadc header
    mfd: Constify WM8994 write path
    mfd: Push byte swap out of WM8994 bulk I/O
    mfd: Avoid copying data in WM8994 I2C write
    mfd: Remove copy from WM831x I2C write function
    mfd: Staticise WM8994 PM ops
    regulator: Add a subdriver for TI TPS6105x regulator portions v2
    mfd: Add a core driver for TI TPS61050/TPS61052 chips v2
    gpio: Add Tunnel Creek support to sch_gpio
    mfd: Add Tunnel Creek support to lpc_sch
    pci_ids: Add Intel Tunnel Creek LPC Bridge device ID.
    regulator: MAX8997/8966 support
    mfd: Add WM8994 bulk register write operation
    mfd: Append additional read write on 88pm860x
    mfd: Adopt mfd_data in 88pm860x input driver
    mfd: Adopt mfd_data in 88pm860x regulator
    mfd: Adopt mfd_data in 88pm860x led
    mfd: Adopt mfd_data in 88pm860x backlight
    mfd: Fix MAX8997 Kconfig entry typos
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (140 commits)
    MAINTAINERS: de-orphan fbdev.
    MAINTAINERS: Add file pattern for fb dt bindings.
    video: Move sm501fb devicetree binding documentation to a better place.
    fbcon: fix situation where fbcon gets deinitialised and can't reinit.
    video, sm501: add OF binding to support SM501
    video, sm501: add edid and commandline support
    video, sm501: add I/O functions for use on powerpc
    video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
    fbcon: Bugfix soft cursor detection in Tile Blitting
    video: add missing framebuffer_release in error path
    video: metronomefb: add __devexit_p around reference to metronomefb_remove
    video: hecubafb: add __devexit_p around reference to hecubafb_remove
    drivers:video:aty:radeon_base Fix typo occationally to occasionally
    atmel_lcdfb: add fb_blank function
    atmel_lcdfb: implement inverted contrast pwm
    video: s3c-fb: return proper error if clk_get fails
    uvesafb,vesafb: create WC or WB PAT-entries
    video: ffb: fix ffb_probe error path
    radeonfb: Let hwmon driver probe the "monid" I2C bus
    fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
    ...

    Linus Torvalds
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (35 commits)
    ARM: Update (and cut down) mach-types
    ARM: 6771/1: vexpress: add support for multiple core tiles
    ARM: 6797/1: hw_breakpoint: Fix newlines in WARNings
    ARM: 6751/1: vexpress: select applicable errata workarounds in Kconfig
    ARM: 6753/1: omap4: Enable ARM local timers with OMAP4430 es1.0 exception
    ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime
    ARM: pgtable: add pud-level code
    ARM: 6673/1: LPAE: use phys_addr_t instead of unsigned long for start of membanks
    ARM: Use long long format when printing meminfo physical addresses
    ARM: integrator: add Integrator/CP sched_clock support
    ARM: realview/vexpress: consolidate SMP bringup code
    ARM: realview/vexpress: consolidate localtimer support
    ARM: integrator/versatile: consolidate FPGA IRQ handling code
    ARM: rationalize versatile family Kconfig/Makefile
    ARM: realview: remove old AMBA device DMA definitions
    ARM: versatile: remove old AMBA device DMA definitions
    ARM: vexpress: use new init_early for clock tree and sched_clock init
    ARM: realview: use new init_early for clock tree and sched_clock init
    ARM: versatile: use new init_early for clock tree and sched_clock init
    ARM: integrator: use new init_early for clock tree init
    ...

    Linus Torvalds
     

23 Mar, 2011

5 commits

  • Copy 88pm860x platform data into different mfd_data structure for
    backlight driver. So move the identification of device node from
    backlight driver to mfd driver.

    Signed-off-by: Haojian Zhuang
    Signed-off-by: Samuel Ortiz

    Haojian Zhuang
     
  • This silences warnings such as

    drivers/video/tmiofb.c: In function 'tmiofb_hw_init':
    drivers/video/tmiofb.c:270: warning: initialization discards qualifiers from pointer target type

    These were added by me in commit 2a79bb1d.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     
  • Use mfd_data for passing information from mfd drivers to mfd
    clients. The mfd_cell's driver_data field is being phased out.

    Clients that were using driver_data now access .mfd_data
    via mfd_get_data(). This changes tmio-fb only; mfd drivers with
    other cells are not modified.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     
  • No need to explicitly set the cell's platform_data/data_size.

    Modify clients to use mfd_get_cell helper function instead of
    accessing platform_data directly.

    Signed-off-by: Andres Salomon
    Signed-off-by: Samuel Ortiz

    Andres Salomon
     
  • 1. simple_strto*() do not contain overflow checks and crufty,
    libc way to indicate failure.
    2. strict_strto*() also do not have overflow checks but the name and
    comments pretend they do.
    3. Both families have only "long long" and "long" variants,
    but users want strtou8()
    4. Both "simple" and "strict" prefixes are wrong:
    Simple doesn't exactly say what's so simple, strict should not exist
    because conversion should be strict by default.

    The solution is to use "k" prefix and add convertors for more types.
    Enter
    kstrtoull()
    kstrtoll()
    kstrtoul()
    kstrtol()
    kstrtouint()
    kstrtoint()

    kstrtou64()
    kstrtos64()
    kstrtou32()
    kstrtos32()
    kstrtou16()
    kstrtos16()
    kstrtou8()
    kstrtos8()

    Include runtime testsuite (somewhat incomplete) as well.

    strict_strto*() become deprecated, stubbed to kstrto*() and
    eventually will be removed altogether.

    Use kstrto*() in code today!

    Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
    they'll be unused at runtime. This is temporarily solution,
    because I don't want to hardcode list of archs where these
    functions aren't needed. Current solution with sizeof() and
    __alignof__ at least always works.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan