13 Mar, 2010

40 commits

  • This patch adds waveform storing capability to broadsheetfb. It uses the
    firmware class to retrieve the waveform, and the request to initiate the
    waveform storing is done via a driver sysfs entry, loadstore_waveform.

    Broadsheet is a framebuffer device. It is slightly different from a
    typical framebuffer controller that drives a normal TFT-LCD display. Most
    E-Ink display panels require a waveform in order to function. That is, in
    order to drive the state of a pixel to black, gray, or white, a specific
    waveform is utilized. Basically, that waveform represents the specific
    E-field wiggling needed to get the pixel to its optimal state given
    current temperature, and its previous state. TN/IPS-LCDs use a similar
    concept but the driving waveform is sufficiently simple that it is
    internalized in the TFT source/gate driver.

    These E-Ink waveforms are specific to a production batch. That is, a
    batch of display films are produced, then they get characterized and a
    waveform is generated for that batch. Broadsheet, typically, is attached
    to its private SPI flash which is then flashed with this waveform.

    Users won't be able to see the waveform and typically won't ever need to
    know about it. If however, the display panel attached to broadsheet is
    changed out, then they will need to update their waveform. That would
    typically be done at a factory or repair facility rather than by a user.

    [akpm@linux-foundation.org: fix printk warning]
    Signed-off-by: Jaya Kumar
    Cc: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaya Kumar
     
  • Allow boards with GP-MMIO controllers to provide hooks to broadsheetfb in
    order to offload cmd/data writes and data reads instead of relying only on
    host based GPIO wiggling.

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

    Jaya Kumar
     
  • Add support for the color depth 15 on IGA1 and 30 on IGA1 and IGA2. To
    allow the usage of those the driver now refuses color depth that are
    totally off and otherwise the selection in viafb_check_var is used.
    Therefore the first call to this for the first framebuffer was delayed a
    bit. It only enables the new formats if they are requested exactly
    (viafb_bpp=15|30).

    As this is a new feature, no regressions are expected. The color depth 15
    was successfully tested. Didn't get anything usable for 30 but that might
    be the programs fault. I would like to get some feedback whether it works
    as expected or not if somebody knows a program/configuration where it
    should.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • This is a rewritten version of viafb_setcolreg. The hardware register
    writes were split up and moved to hw.c where they belong as this is really
    low level stuff. It was made dual fb aware.

    Furthermore viafb_setcmap was removed as the problem with 8bpp originated
    from a bug in writing multiple color registers at once. The removal of
    viafb_setcmap might introduce a small performance regression but its
    certainly better to receive the correct result a bit slower than a garbled
    picture fast. It should give us a working 8bpp mode and is more
    extensible than the old hardcoded code. No other regressions are expected
    but as the hardware might be a bit picky it might cause some regressions
    in 8bpp mode on some hardware although I doubt that.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Do not require the virtual_xres to be aligned as line length is for such
    purposes. Calculate always the smallest line length required.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Make color checking a bit more tolerant in what values it allows and more
    fine grained to later support 15 and 30 bits formats. It splits the
    filling of the color information in var to a seperate function and sets
    some color related values in var that where previously untouched.

    This could be a bug fix but at least I don't know any applications that
    was fooled by not correctly setting the fields in var. At least no
    regressions are expected.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Move some variables closer to their usage.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Some code depended on IGA1_IGA2 which was never set (at least with the
    symbolic name). Remove this dead code although it might one day be useful
    to get a hint on how some things might work. However as this is dead it
    is likely full of bugs and would prevent a clean structure (as it has some
    very strange things).

    Dead code -> no regressions, at least if VIA doesn't do anything very ugly.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • This patch splits color mode setting up in seperate functions. Some
    hardware initialization that was previously mixed with it is moved to
    viafb_setmode. As are the calls to the newly created function. This is
    yet another little step towards controlling each IGA on its own.

    As this patch really aims too mimic the old behaviour no regressions are
    expected. However I noticed that 8bpp (or 6bpp?) seems actually a bit
    broken before and after the patch.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Refuse to work if wrong parameters are given. This should improve the
    user experience as it will be clear that something is wrong and not
    silently ignored.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • This patch is an attempt to make viafb_set_par work correctly with more
    than one framebuffer. As modesetting is not (yet/easily) possible for
    each individual IGA it uses the (normally to be avoided) global variables
    viafbinfo{,1} to ensure that each function is called with the correct
    values.

    This patch (finally) allows usable dual framebuffer setups and should not
    affect non dual fb ones. It works in some (most?) configurations as
    sometimes the driver still gets device connections wrong. It can be worth
    to try the devices in reverse order (in viafb_active_dev).

    The user experience is still not very nice as:

    - on the second fb you'll normally have a garbled picture as long as
    no application draws to it
    goal: auto on/off devices depending on reference counting
    - as the whole machinery is always done you can see mode changes also
    in an unaffected framebuffer
    goal: split modesetting up for each individual IGA

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Set always the correct video address. Especially do panning right on
    multiple IGAs.

    This should have no effect on single monitor mode (no SAMM, no dual fb).
    For SAMM without dual fb this might break something as I really cannot
    image what we are supposed to do for different resolutions with a single
    framebuffer as we can't get data out of nowhere (no, they are not set up
    in something one would call "expanded"). Previously I got for that funny
    colored pictures as the second IGA pointed to video memory that was never
    written to. After the patch it'll work as cloning if the first and second
    mode are identical (this was working already without SAMM). Finally for
    dual fb this should push us a step in the right direction.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • This patch reorders the initialization for dual framebuffer mode to not
    ignore the settings for the first mode. Previously they were overwritten
    with the settings for the second one before they were applied.

    This should have no effect on non dual framebuffer mode and do what the
    user intended (initalization to desired modes) in dual framebuffer mode.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Remove some functions that were never executed and a related undocumented
    module parameter.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Scott Fang
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Remove some unused variables, move some dvi code around and store the
    detected maximum resolution for later use. The vertical resolution is
    handled as the old code did it but I hope it can be read from the hardware
    some day.

    No runtime change expected.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Remove the rest of the VIA_RES_* use cases. Obviously this was no longer
    useful. Keep the related infrastructure/functions for later use.

    No runtime impact expected.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • This is the first step to remove an artificial global index that was used
    in two ways:

    1. As a pseudo index in the mode table. Pseudo as you had to search
    through the table to find the referenced entry. This was replaced by
    using a pointer to the entry.

    2. As a shortcut to compare a combination of horizontal and vertical
    resolution at the same time.

    This was replaced by a "(hres<
    Cc: Joseph Chan
    Cc: Scott Fang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Remove a completly unused function.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Print a warning when viafb ioctls are called. Those should not be used as
    their exact meaning is sometimes unknown and they in parts duplicate
    functionality present in the framebuffer interface.

    There is no known user of these ioctls.

    Signed-off-by: Florian Tobias Schandinat
    Cc: Joseph Chan
    Cc: Scott Fang
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Florian Tobias Schandinat
     
  • Update broadsheetfb to add support for multiple panel types. The 3.7" and
    6" are known to work but the 9.7" is untested due to lack of hardware.

    Signed-off-by: Jaya Kumar
    Cc: Geert Uytterhoeven
    Cc: Krzysztof Helt
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaya Kumar
     
  • The common Blackfin code implements the get_fb_unmapped_area() function,
    so we no longer need to have our own mmap() handler. The common fb code
    will take care of everything for us now.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hennerich
     
  • Ftarget, Fret, n and m are unsigned so the tests did not work.

    Signed-off-by: Roel Kluin
    Cc: Andres Salomon
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • Convert outparam to const void *.
    Cast outparam to const char * for strlen().

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Just code the test directly

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Make debugt messages a little neater.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Reduces indent.
    Makes a bit more readable and intelligible.
    Return value now at bottom of function.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Remove char/void __user * use.
    Remove kmalloc cast.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Print the function name not the pointer address where useful and possible

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add and use __func__ to is_alive.
    Use __func__ in some DPRINTs.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Move DPRINT macro definition above 1st use Consolidate a format string
    (>80 columns) Add a newline to an unterminated message Comment neatened

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The code could not be compiled without the #define, so just remove it and
    the #ifdef/#endif lines.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Prior to patch "drivers/block/floppy.c: Use pr_" only
    reschedule_timeout(,"request done"...) printed a numeric value after a
    reschedule_timeout event message.

    Restore that behavior and remove the now unnecessary argument.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Change for(;;) with continue; to label: goto label
    Reduces indentation and adds a bit of clarity.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Macros with hidden flow changes aren't nice.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Used a couple of times, might simplify the code a bit.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Don't initialize initialized either. Default is false.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Use it directly in the one place it's used.

    Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Signed-off-by: Joe Perches
    Cc: Stephen Hemminger
    Cc: Jens Axboe
    Cc: Marcin Slusarz
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches