18 May, 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
     

14 Apr, 2009

1 commit


01 Apr, 2009

21 commits

  • Fix calculations of timings for interlaced modes.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Fix threshold register mask for Laguna chips otherwise some 8bpp modes are
    garbled after selecting a 24bpp mode.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Fix handling of the Cirrus Logic GD5434 chip. Distinguish this chip from the
    GD5430. It allows detecting memory size for both models correctly.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • A memory clock (MCLK) is set at various places. Move the setting into one
    place.

    Set the MCLK only for Zorro cards as the x86 cards should be initialized by
    BIOS.

    Improve handling of the GD5434 (SD64).

    Kill one annoying debug output "virtual offset: ...".

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Add an accelerator constant so almost all Cirrus are recognized as
    accelerators by the fbset command.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Cirrus' Alpine and Picasso4 chips uses DAC clock doubling to achieve full
    range of pixclock frequencies.

    [akpm@linux-foundation.org: fix spelling, use usual comment layout]
    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • The 32bpp is supported only on the latest Cirrus Logic chips. Use the
    24bpp which is supported at least since Alpine chips (GD543x).

    Change 32bpp mode setting to 24bpp mode. Change acceleration as well.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Various fixes to make Cirrus GD5446 chip work.

    Another Cirrus chip works with the cirrusfb. The gd5446 seems very
    similar to Alpine chips.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Balance iomap and iounmap and alloc and free calls in case of error druing
    device register (probing).

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Add hardware color expansion (imageblit) function. It roughly doubles
    scrolling speed of my Alpine card (GD5430).

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • - Fix color expansion for 16bpp and 32bpp modes in the
    cirrusfb_RectFill().

    - Make a function with a common blitter code (cirrusfb_set_blitter).

    - Add fb_sync function to allow a higher layer synchronize with the
    blitter.

    - Kill one redundant blitter reset.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • - The Laguna GD5465 (AGP) has one register more than non-AGP chips.
    Recognize the AGP version and write a tile control register only on the
    AGP version. Tested only on an AGP card.

    - Bump up RAMDAC frequencies after X11 code. This allow to drive a flat
    panel resolution 1680x1050 at 16bpp from the 4MB card.

    - Fix screen start address overflow bits on Laguna cards (CRT1D
    register).

    - Fix exit path in the cirrusfb_pci_register() in case of error.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Break cirrusfb_decode_var() function into two parts:
    cirrusfb_check_pixclock() which can be called from the
    cirrusfb_check_var() aand merge rest into the cirrusfb_set_par_foo().
    This allows rejecting modes with too high pixclock before before any
    change to hardware state (and a console is messed up).

    Also, fix RGB field's lengths for 8bpp modes to correct ones so X11 works
    with fbdev driver with cirrusfb.

    Kill some redundant function calls or register loads.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Fix 8bpp mode by adding handling of the Laguna chipsets to various places
    and stop trashing a HDR register which probably does not exist on the
    Laguna.

    Fix compilation warnings about uninitialized variables also.

    Finally, all 8bpp, 16bpp and 32bpp modes work on the Laguna chipset.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Various improvements to the code:
    - kill a structure with only one
    field: multiplexing and use the
    field directly
    - move the cirrusfb_ops structure
    down the file to kill forward
    declarations
    - move cirrusfb_init() to kill
    forward declaration
    - kill register loads done already
    in the init_vgachip()
    - kill assigments done by higher
    layer in the cirrusfb_pan_display()
    - do not overwrite line pitch bit in
    the CL_CRT1D register
    - kill btype variables if they were
    used only once or twice
    - add cpu_relax() in the busy waiting
    loop

    The fix to the CL_CRT1D register handling makess the 1024x768 32bpp mode
    work. Previously, only lower resolution modes have worked with 32bpp.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Use the 5-6-5 RGB mode instead of the 5-5-5 mode at 16bpp depth.

    It fixes colors in the 16bpp modes on Cirrus Laguna chips.

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Cc: Arthur Marsh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • A line length is calculated twice: first in the cirrusfb_decode_var() then
    in the cirrusfb_set_par_foo().

    Use the first calculated value. A nice side effect is that 32bpp mode
    works now.

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Cc: Arthur Marsh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • The Laguna chipsets use special registers which are available through the
    mmio area. The cirrusfb driver does not use memory mapped registers for
    the PCI cards.

    Add the memory mapped area for Laguna chipsets and add basic usage of the
    special Laguna registers after SVGALIB code.

    This gives readable console at 16bpp on the GD-5465 (Laguna AGP). The
    8bpp and 32bpp depths are still broken.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Add additional overflow register setting for Laguna chips.

    Also, simplify some code in the cirrusfb_pan_display() and
    cirrusfb_blank().

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven

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

    Krzysztof Helt
     
  • Fix memory detection and clock setting for Cirrus Laguna chipsets
    (GD5464/GD5465). The changes are done after the Xorg code.

    The driver still does not display anything on the GD5465 but it switches
    resolutions correctly at least.

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Convert all printks to dev_dbg, dev_info or dev_err. Kill some excessive
    debug information and code in the process.

    [akpm@linux-foundation.org: printk fixes]
    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     

20 Nov, 2008

1 commit

  • After commit a1d35a7a (cirrusfb: use modedb and add mode_option
    parameter), these variables are no longer used, so remove them to fix
    compilation warning.

    Signed-off-by: Vlada Periæ
    Acked-by: Krzysztof Helt
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlada Peric
     

02 Nov, 2008

1 commit

  • cirrusfb_zorro_unmap() may be called both from __devexit and (on
    cleanup path) from __devinit. So it needs to be a normal function,
    same as for cirrusfb_pci_unmap()

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

17 Oct, 2008

11 commits


03 Sep, 2008

1 commit

  • 1. Check if virtual resolution fits into memory.
    Otherwise, Linux hangs during panning.
    2. When selected use all available memory to
    maximize yres_virtual to speed up panning
    (previously also xres_virtual was increased).
    3. Simplify memory restriction calculations.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     

13 Jun, 2008

1 commit

  • In the cirrusfb driver, the RAM address printk has a superfluous 'x' that
    could be interpreted as "don't care", while it is actually a typo. Fix
    that.

    [akpm@linux-foundation.org: join the two printk strings to make it atomic]
    Signed-off-by: Philippe De Muyter
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philippe De Muyter
     

28 Apr, 2008

1 commit

  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Cc: "Antonino A. Daplas"
    Cc: Krzysztof Helt
    Cc: Antonino Daplas
    Cc: Antonino A. Daplas
    Cc: Antonino Daplas
    Cc: Richard Purdie
    Cc: Jean Delvare
    Cc: Adrian Bunk
    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison