04 Dec, 2011

1 commit

  • This patch converts the drivers in drivers/video/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Ben Dooks
    Cc: Manuel Lauss
    Signed-off-by: Axel Lin
    Acked-by: Wan ZongShun
    Acked-by: Sascha Hauer
    Acked-by: Lennert Buytenhek
    Acked-by: Alexey Charkov
    Acked-by: Damian Hobson-Garcia
    Acked-by: Jingoo Han
    Signed-off-by: Florian Tobias Schandinat

    Axel Lin
     

19 Aug, 2011

1 commit


24 Jun, 2011

1 commit

  • Fix section mismatch warning in sm501fb:

    WARNING: drivers/video/sm501fb.o(.text+0x21d6): Section mismatch in reference from the function sm501fb_init_fb() to the variable .devinit.data:sm501_default_mode
    The function sm501fb_init_fb() references
    the variable __devinitdata sm501_default_mode.
    This is often because sm501fb_init_fb lacks a __devinitdata
    annotation or the annotation of sm501_default_mode is wrong.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Paul Mundt

    Randy Dunlap
     

24 May, 2011

1 commit


31 Mar, 2011

1 commit


22 Mar, 2011

3 commits

  • - add binding to OF, compatible name "smi,sm501"

    Signed-off-by: Heiko Schocher
    cc: linux-fbdev@vger.kernel.org
    cc: devicetree-discuss@ozlabs.org
    cc: Ben Dooks
    cc: Vincent Sanders
    cc: Samuel Ortiz
    cc: linux-kernel@vger.kernel.org
    cc: Randy Dunlap
    cc: Paul Mundt
    Signed-off-by: Paul Mundt

    Heiko Schocher
     
  • - add commandline options:
    sm501fb.mode:
    Specify resolution as "x[-][@]"
    sm501fb.bpp:
    Specify bit-per-pixel if not specified mode

    - Add support for encoding display mode information
    in the device tree using verbatim EDID block.

    If the "edid" entry in the "smi,sm501" node is present,
    the driver will build mode database using EDID data
    and allow setting the display modes from this database.

    Signed-off-by: Heiko Schocher
    cc: linux-fbdev@vger.kernel.org
    cc: devicetree-discuss@ozlabs.org
    cc: Ben Dooks
    cc: Vincent Sanders
    cc: Samuel Ortiz
    cc: linux-kernel@vger.kernel.org
    cc: Randy Dunlap
    cc: Paul Mundt
    Signed-off-by: Paul Mundt

    Heiko Schocher
     
  • - add read/write functions for using this driver
    also on powerpc plattforms

    Signed-off-by: Heiko Schocher
    cc: linux-fbdev@vger.kernel.org
    cc: devicetree-discuss@ozlabs.org
    cc: Ben Dooks
    cc: Vincent Sanders
    cc: Samuel Ortiz
    cc: linux-kernel@vger.kernel.org
    cc: Randy Dunlap
    cc: Paul Mundt
    Acked-by: Samuel Ortiz
    Signed-off-by: Paul Mundt

    Heiko Schocher
     

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
     

09 Feb, 2010

1 commit

  • In particular, several occurances of funny versions of 'success',
    'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
    'beginning', 'desirable', 'separate' and 'necessary' are fixed.

    Signed-off-by: Daniel Mack
    Cc: Joe Perches
    Cc: Junio C Hamano
    Signed-off-by: Jiri Kosina

    Daniel Mack
     

16 Dec, 2009

3 commits

  • This patch provides the acceleration entry points for the SM501
    framebuffer driver.

    This patch provides the sync, copyarea and fillrect entry points, using
    the SM501's 2D acceleration engine to perform the operations in-chip
    rather than across the bus.

    Signed-off-by: Ben Dooks
    Signed-off-by: Simtec Linux Team
    Signed-off-by: Vincent Sanders
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vincent Sanders
     
  • Fix the old style use of by replacing it with .

    Signed-off-by: Ben Dooks
    Signed-off-by: Simtec Linux Team
    Cc: Vincent Sanders
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • There are several places in the SM501 fb driver that could do with using
    resource_size() to calculate the size of a resource.

    Also fix a bug where request_mem_region() is being passed one too few
    bytes when requesting the register memory region, which was causing the
    following in /proc/iomem:

    13e80000-13e8ffff : sm501-fb.0
    13e80000-13e8fffe : sm501-fb

    fixed, this reads:

    13e80000-13e8ffff : sm501-fb.0
    13e80000-13e8ffff : sm501-fb

    Signed-off-by: Ben Dooks
    Signed-off-by: Simtec Linux Team
    Cc: Vincent Sanders
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

10 Jul, 2009

1 commit


09 Jul, 2009

1 commit


07 Jul, 2009

1 commit

  • This way they'll be properly initialized early enough for users that may
    touch them before the framebuffer has been registered.

    Drivers that allocate their fb_info structure some other way (like
    matrocfb's broken static allocation) need to be fixed up appropriately.

    Signed-off-by: Paul Mundt
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

05 Jul, 2009

1 commit

  • Commit 537a1bf059fa312355696fa6db80726e655e7f17 (fbdev: add mutex for
    fb_mmap locking) introduces a ->mm_lock mutex for protecting smem
    assignments. Unfortunately in the case of sm501fb these happen quite
    early in the initialization code, well before the mutex_init() that takes
    place in register_framebuffer(), leading to:

    Badness at kernel/mutex.c:207

    Pid : 1, Comm: swapper
    CPU : 0 Not tainted (2.6.31-rc1-00284-g529ba0d-dirty #2273)

    PC is at __mutex_lock_slowpath+0x72/0x1bc
    PR is at __mutex_lock_slowpath+0x66/0x1bc
    ...

    matroxfb appears to have the same issue and has solved it with an early
    mutex_init(), so we do the same for sm501fb.

    Signed-off-by: Paul Mundt
    Cc: Krzysztof Helt
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

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
     

01 Apr, 2009

1 commit


07 Jan, 2009

1 commit


25 Jul, 2008

3 commits

  • As pointed out by Andrew Morton, we have a problem when setting the 64bit
    resources option. Alter the allocation routines to remove the need to use
    the start and end fields, use the proper HEAD_PANEL/HEAD_CRT and update
    the comments.

    Note, we also fix the bug where we failed to check the size of the
    CRT memory allocation.

    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Add the ability to register only one of the two possible main framebuffer
    devices on the SM501 by passing platform data for only the framebuffer
    that you are interested in having.

    As a side note, we update the init sequence to commonise the code that is
    executed twice, and fix a pair of missing frees that we didn't do on
    framebuffer exit, such as freeing the fb's cmap.

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

    Ben Dooks
     
  • Add flags to allow the driver to invert the sense of both VBIASEN and FPEN
    signals comming from the SM501.

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

    Ben Dooks
     

25 May, 2008

1 commit

  • To keep backwards compatibility, reverse the meanings of these flags so
    that when they are not set, the driver uses the original behvaiour.

    Signed-off-by: Ben Dooks
    Cc: Arnaud Patard
    Acked-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     

05 Mar, 2008

4 commits


07 Feb, 2008

3 commits

  • Move the console suspend to before we save the state of
    the framebuffer to ensure that it does not try and change
    the fb state again once we have copied it out.

    Signed-off-by: Ben Dooks
    Cc: "Antonino A. Daplas"
    Cc: Vincent Sanders
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Avoid displaying garbage on unused framebuffers. For most users a single
    framebuffer is used together with fbcon. sm501fb supports two framebuffers
    where one often is assigned to fbcon and the other one is left unused during
    the boot.

    The problem here is that framebuffers not in use by fbcon happen to display
    garbage. This can easily be solved by making sure that framebuffer memory and
    palette ram are cleared.

    The problem can be observed by using looking at the panel output (fb1) after
    booting the kernel with fbcon on crt (fb0). This is the default
    configuration. It's also possible to watch the garbage on the crt framebuffer
    by passing "fbcon=map:1" on the kernel cmdline. This will assign fbcon to the
    panel (fb1) and leave the crt (fb0) unused.

    Signed-off-by: Magnus Damm
    Cc: "Antonino A. Daplas"
    Cc: Paul Mundt
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • This patch makes it possible to control panel pins usage with flags passed
    from the platform data. Without this patch the sm501fb driver always controls
    the VBIASEN and FPEN pins. The polarity and use of these pins are very
    platform specific, so this patch introduces the flags
    SM501FB_FLAG_PANEL_USE_VBIASEN and SM501FB_FLAG_PANEL_USE_FPEN which enable
    the use of these pins.

    This patch is needed to support the a Sharp LQ104V1DG21 lcd panel on SuperH
    platforms such as R2D-1 and R2D-PLUS boards. Letting the sm501fb driver
    control the FPEN and VBIASEN pins like today just results in lcd panel
    flicker.

    Signed-off-by: Magnus Damm
    Cc: "Antonino A. Daplas"
    Cc: Paul Mundt
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     

03 Feb, 2008

1 commit


17 Oct, 2007

3 commits

  • When we setup the panel interface whilst configuring the
    framebuffer, we should ensure the panel interface is not
    in tristate, in case the bootloader or previous setup has
    not enabled it.

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

    Ben Dooks
     
  • Call the fb_set_suspend() over suspend and resume.

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

    Ben Dooks
     
  • The suspend and resume code is failing to restore the CRT control
    register, thus causing the CRT data-path to get changed if the
    SM501 experiences a reset over suspend.

    Also move some of the debug messages to dev_dbg() level and ensure
    that the suspend code does not try and restore anything it did not
    manage to save.

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

    Ben Dooks
     

09 May, 2007

1 commit

  • drivers/video/sm501fb.c: In function 'sm501fb_cursor':
    drivers/video/sm501fb.c:992: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
    drivers/video/sm501fb.c:992: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'long unsigned int'

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

    Andrew Morton
     

05 Mar, 2007

1 commit

  • Currently sm501fb_crtsrc_store() won't allow the routing to be changed via
    echos from userspace in to the sysfs file. The reason for this is that the
    strnicmp() for both heads uses a sizeof() for the string length, which ends
    up being strlen() + 1 (\0 in the normal case, but the echo gives a newline,
    which is where the issue occurs), this then causes a mismatch and
    subsequently bails with the -EINVAL.

    In addition to this, the hardcoded lengths were then used for the store
    length that was returned, which ended up being erroneous and resulting in a
    write error. There's also no point in returning anything but the full
    length since it will -EINVAL out on a mismatch well before then anyways.

    sizeof("string") is great for making sure you have space in your buffer,
    but rather less so for string comparisons :-)

    Signed-off-by: Paul Mundt
    Acked-by: Ben Dooks
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

02 Mar, 2007

1 commit


21 Feb, 2007

1 commit

  • Driver for the Silicon Motion SM501 multifunction device framebuffer
    subsystem.

    This driver supports both the CRT and LCD panel heads, with some simple
    acceleration for the cursor plotting and support for screen panning. There
    is no current support for bitblt/drawing engines, which should be added at
    a later date.

    This has been tested on a number of configurations, including PCI and
    generic-bus, on PPC, ARM and SH4

    [akpm@linux-foundation.org: fix warnings]
    Signed-off-by: Ben Dooks
    Signed-off-by: Vincent Sanders
    Acked-by: James Simmons
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks