13 Jan, 2012

1 commit


20 Dec, 2011

1 commit

  • The driver says "module_param(ddc3, bool, 0);". But it's not a used
    as a bool, it's used as a count.

    Make it a bool.

    Cc: Antonino Daplas
    Cc: linux-fbdev@vger.kernel.org
    Signed-off-by: Rusty Russell
    Signed-off-by: Florian Tobias Schandinat

    Rusty Russell
     

21 Jul, 2011

1 commit

  • All these are instances of
    #define NAME value;
    or
    #define NAME(params_opt) value;

    These of course fail to build when used in contexts like
    if(foo $OP NAME)
    while(bar $OP NAME)
    and may silently generate the wrong code in contexts such as
    foo = NAME + 1; /* foo = value; + 1; */
    bar = NAME - 1; /* bar = value; - 1; */
    baz = NAME & quux; /* baz = value; & quux; */

    Reported on comp.lang.c,
    Message-ID:
    Initial analysis of the dangers provided by Keith Thompson in that thread.

    There are many more instances of more complicated macros having unnecessary
    trailing semicolons, but this pile seems to be all of the cases of simple
    values suffering from the problem. (Thus things that are likely to be found
    in one of the contexts above, more complicated ones aren't.)

    Signed-off-by: Phil Carmody
    Signed-off-by: Jiri Kosina

    Phil Carmody
     

31 Mar, 2011

1 commit


26 Jan, 2011

1 commit

  • The -rt patches change the console_semaphore to console_mutex. As a
    result, a quite large chunk of the patches changes all
    acquire/release_console_sem() to acquire/release_console_mutex()

    This commit makes things use more neutral function names which dont make
    implications about the underlying lock.

    The only real change is the return value of console_trylock which is
    inverted from try_acquire_console_sem()

    This patch also paves the way to switching console_sem from a semaphore to
    a mutex.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
    Signed-off-by: Torben Hohn
    Cc: Thomas Gleixner
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Torben Hohn
     

06 Jan, 2011

1 commit

  • These patch fix a longstanding bug in the i810 frame buffer driver.

    The handling of the i2c bus is wrong: A 1 bit should not written to the
    i2c, these will be done by switch the i2c to input. Driving an 1 bit
    active is against the i2c spec.

    An active driven of a 1 bit will result in very strange error, depending
    which side is the more powerful one. In my case it depends on the
    temperature of the Display-Controller-EEprom: With an cold eprom a got
    the correct EDID datas, with a warm one some of the 1 bits was 0 :-(

    The same bug is also in the intelfb driver in the file
    drivers/video/intelfb/intelfb_i2c.c. The functions intelfb_gpio_setscl()
    and intelfb_gpio_setsda() do drive the 1 bit active to the i2c bus. But
    since i have no card which is used by the intelfb driver i cannot fix
    it.

    Signed-off-by: Stefani Seibold
    Cc: Paul Mundt
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mundt

    Stefani Seibold
     

25 Oct, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

16 Dec, 2009

1 commit


09 Jul, 2009

1 commit


01 Jul, 2009

1 commit

  • Add a mutex to avoid a circular locking problem between the mm layer
    semaphore and fbdev ioctl mutex through the fb_mmap() call.

    Also, add mutex to all places where smem_start and smem_len fields change
    so the mutex inside the fb_mmap() is actually used. Changing of these
    fields before calling the framebuffer_register() are not mutexed.

    This is 2.6.31 material. It removes one lockdep (fb_mmap() and
    register_framebuffer()) but there is still another one (fb_release() and
    register_framebuffer()). It also cleans up handling of the smem_start and
    smem_len fields used by mutexed section of the fb_mmap().

    Signed-off-by: Krzysztof Helt
    Cc: Peter Zijlstra
    Cc: "Rafael J. Wysocki"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     

11 Mar, 2009

1 commit

  • Prevent the kernel from being crashed by a divide-by-zero operation when
    supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

    Previously i810_main.c:1005 (i810_check_params) was using the global
    'yres' symbol previously defined at i810_main.c:145 as a module parameter
    value holder (i810_main.c:2174). If i810fb is compiled-in or if this
    param doesn't get a default value, this direct usage leads to a
    divide-by-zero at i810_main.c:1005 (i810_check_params). The patch simply
    replace the 'yres' global, perhaps undefined symbol usage by a given
    parameter structure lookup.

    This problem occurs with directfb, mplayer -vo fbdev, SDL library.
    It was also reported ( but non solved ) at:

    http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

    Signed-off-by: Samuel CUELLA
    Cc: Jiri Kosina
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel CUELLA
     

27 Jan, 2009

1 commit


07 Jan, 2009

1 commit

  • Fix this sparse warnings:

    drivers/video/i810/i810_accel.c:305:3: warning: returning void-valued expression
    drivers/video/i810/i810_accel.c:331:3: warning: returning void-valued expression
    drivers/video/i810/i810_accel.c:370:3: warning: returning void-valued expression

    Signed-off-by: Hannes Eder
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hannes Eder
     

20 Mar, 2008

1 commit

  • Since 4c7ffe0b9f7f40bd818fe3af51342f64c483908e ("fbdev: prevent drivers that
    have hardware cursors from calling software cursor code") every call of
    i810fb_cursor fails with -ENXIO because of a incorrect "!".

    This hasn't struck until eaa0ff15c30dc9799eb4d12660edb73aeb6d32c5 ("fix !
    versus & precedence in various places") surrounded the expression with braces,
    so that the intended behavior was inverted. That caused 'pixel waste' - the
    same line of multi-colored pixels repeated over the whole screen - during
    console switch.

    This switches back to the original pre-4c7ffe0 behavior.

    Signed-off-by: Stefan Bauer
    Tested-by: Stefan Bauer
    Signed-off-by: Geert Uytterhoeven
    Cc: Antonino Daplas
    Cc: Henrique de Moraes Holschuh
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefan Bauer
     

07 Feb, 2008

1 commit

  • Fix various instances of

    if (!expr & mask)

    which should probably have been

    if (!(expr & mask))

    Signed-off-by: Alexey Dobriyan
    Cc: Jens Axboe
    Cc: Peter Osterlund
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: "Antonino A. Daplas"
    Cc: Mark Fasheh
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

18 Jul, 2007

1 commit


09 May, 2007

2 commits


21 Feb, 2007

1 commit

  • WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference
    to .init.data: from .text between 'i810_check_params' (at offset
    0x1123) and 'encode_fix'

    yres cannot be declared __devinitdata as it is used in
    i810_check_params(), which isn't __devinit.

    Signed-off-by: Jean Delvare
    Acked-by: James Simmons
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

3 commits


11 Dec, 2006

1 commit


09 Dec, 2006

1 commit


03 Oct, 2006

2 commits


27 Sep, 2006

1 commit

  • i2c-algo-bit: Discard the mdelay data struct member

    The i2c_algo_bit_data structure has an mdelay member, which is not
    used by the algorithm code (the code has always been ifdef'd out.)
    Let's discard it to save some code and memory.

    Signed-off-by: Jean Delvare
    Acked-by: Mauro Carvalho Chehab
    Cc: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

26 Sep, 2006

1 commit

  • Video drivers which explicitly test for messages reporting PM_EVENT_FREEZE
    will now handle PM_EVENT_PRETHAW the same way.

    Signed-off-by: David Brownell
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     

11 Jul, 2006

1 commit

  • MAX_NR_CONSOLES, fg_console, want_console and last_console are more of a
    function of the VT layer than the TTY one. Moving these to vt.h and vt_kern.h
    allows all of the framebuffer and VT console drivers to remove their
    dependency on tty.h.

    [akpm@osdl.org: fix alpha build]
    Signed-off-by: Jon Smirl
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Smirl
     

01 Jul, 2006

1 commit


27 Jun, 2006

1 commit

  • Detaching fbcon allows individual drivers to be unloaded. However several
    drivers call pci_disable_device() upon exit. This function will disable the
    BAR's which will kill VGA text mode and/or affect X/DRM.

    To prevent this, remove calls to pci_disable_device() from several drivers.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     

22 May, 2006

1 commit

  • WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_fix_offsets' (at offset 0x1b88) and 'i810_alloc_agp_mem'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_fix_offsets' (at offset 0x1b8f) and 'i810_alloc_agp_mem'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_fix_offsets' (at offset 0x1ba3) and 'i810_alloc_agp_mem'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_fix_offsets' (at offset 0x1bb5) and 'i810_alloc_agp_mem'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_fix_offsets' (at offset 0x1bc6) and 'i810_alloc_agp_mem'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_init_defaults' (at offset 0x1dd8) and 'i810_init_device'
    WARNING: drivers/video/i810/i810fb.o - Section mismatch: reference to .init.data: from .text between 'i810_init_defaults' (at offset 0x1dfb) and 'i810_init_device'

    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

28 Mar, 2006

1 commit


22 Mar, 2006

1 commit


02 Feb, 2006

1 commit

  • Some time before 2.6.15, a third DDC channel was added to i810fb. On
    systems where these ddc pins are not connected, the probe takes about 10
    seconds.

    Add a boot/module option for i810fb to explicitly probe for the 3rd ddc bus
    if needed.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manuel Lauss
     

11 Jan, 2006

3 commits

  • This patch contains the possible cleanups including the following:
    - every file should #include the headers containing the prototypes for
    it's global functions
    - make needlessly global functions static
    - kyro/STG4000Interface.h: #include video/kyro.h and linux/pci.h
    instead of a manual "struct pci_dev"
    - i810_main.{c,h}: prototypes for static functions belong to the
    C file

    Signed-off-by: Adrian Bunk
    Acked-by: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • The i810fb suspend and resume hooks have suffered bitrot over time. Update to
    current framework, but functionality still not guaranteed to work.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • - remove redundant casts

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas