15 Sep, 2011

1 commit


24 Aug, 2011

1 commit

  • This patch adds struct s3c_fb_driverdata s3c_fb_data_exynos4 for EXYNOS4
    and adds lcd clock gating support.

    FIMD driver needs two clocks for FIMD IP and LCD pixel clock. Previously,
    both clocks are provided by using bus clock such as HCLK. However, EXYNOS4
    can not select HCLK for LCD pixel clock because the EXYNOS4 FIMD IP does not
    have the CLKSEL bit of VIDCON0. So, FIMD driver should provide the lcd clock
    using SCLK_FIMD as LCD pixel clock for EXYNOS4.

    The driver selects enabling lcd clock according to has_clksel which means
    the CLKSEL bit of VIDCON0. If there is has_clksel, the driver will not
    enable the lcd clock using SCLK_FIMD because bus clock using HCLK is used
    a LCD pixel clock.

    Signed-off-by: Jingoo Han
    Signed-off-by: Florian Tobias Schandinat

    Jingoo Han
     

19 Aug, 2011

1 commit


09 Jun, 2011

3 commits

  • This patch moves enabling channel for window, because there should
    be enabling channel before enabling window. If the sequence is
    reversed, it makes the problem in displaying images to lcd panel.

    Signed-off-by: Jingoo Han
    Signed-off-by: Paul Mundt

    Jingoo Han
     
  • This patch fixes mishandling in virtual resolution checking.
    Previously, virtual resolution is changed to virtual_x and virtual_y
    which mean the size for buffer allocation, when s3c_fb_check_var is
    called by fb_check_var. However, it is meaningless, since virtual_x
    and virtual_y are fixed and user cannot change virtual resolution.
    Therefore, virtual resolution should be more than resolution
    such as xres and yres.

    Signed-off-by: Jingoo Han
    Signed-off-by: Paul Mundt

    Jingoo Han
     
  • This patch fixes misleading kfree in remove function.

    Signed-off-by: Jingoo Han
    Signed-off-by: Paul Mundt

    Jingoo Han
     

24 May, 2011

6 commits


12 Apr, 2011

2 commits


07 Apr, 2011

1 commit

  • This patch fixes the checkpatch errors listed below:

    ERROR: space required before the open parenthesis '('
    ERROR: need consistent spacing around '+' (ctx:WxV)
    ERROR: space prohibited before that close parenthesis ')'

    Also, following warning is fixed by adding 'platid' variable
    which can reduce number of lines exceeding 80 characters.

    WARNING: line over 80 characters

    Signed-off-by: Jingoo Han
    Signed-off-by: Paul Mundt

    Jingoo Han
     

22 Mar, 2011

1 commit


21 Dec, 2010

1 commit

  • This patch adds support for runtime pm using the functions.
    - pm_runtime_get_sync()
    - pm_runtime_put_sync()

    pm_runtime_get_sync() and pm_runtime_put_sync() are called when
    open or release function of framebufer driver is called to inform
    the system if hardware is idle or not.

    Signed-off-by: Jingoo Han
    Signed-off-by: Paul Mundt

    Jingoo Han
     

11 Aug, 2010

17 commits

  • Add a simple algorithm which calculates the pixel clock based on the video
    mode parameters. This is only done when no pixel clock is supplied
    through the platform data.

    This allows drivers to omit the pixel clock data and thus share the
    algorithm used for calculating it.

    Signed-off-by: Maurus Cuelenaere
    Cc: Pawel Osciak
    Cc: Marek Szyprowski
    Cc: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Russell King
    Tested-by: Donghwa Lee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maurus Cuelenaere
     
  • S5PV210 SoCs allow enabling/disabling DMA channels per window. For a
    window to display data from framebuffer memory, its channel has to be
    enabled.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • This patch fixes the following section mismatch errors:

    WARNING: vmlinux.o(.data+0x20b40): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
    The variable s3c_fb_driver_ids references
    the (unknown reference) __devinitdata (unknown)
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: vmlinux.o(.data+0x20b58): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
    The variable s3c_fb_driver_ids references
    the (unknown reference) __devinitdata (unknown)
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    WARNING: vmlinux.o(.data+0x20b70): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown)
    The variable s3c_fb_driver_ids references
    the (unknown reference) __devinitdata (unknown)
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marek Szyprowski
     
  • Newer hardware (S3C6410, S5P) have the ability to block updates from
    shadow registers during reconfiguration. Add protect calls for set_par
    and clear protection when resetting.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • S3C64xx and S5P OSD registers for OSD size and alpha are as follows:
    VIDOSDC: win 0 - size, win 1-4: alpha
    VIDOSDD: win 1-2 - size; not present for windows 0, 3 and 4

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • S5PV210 allows per-window locking of register value updates from shadow
    registers.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • Add VSYNC interrupt support and an ioctl that allows waiting for it.
    Interrupts are turned on only when needed.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • Supports all bpp modes.

    The PRTCON register is used to disable in-hardware updates of registers
    that store start and end addresses of framebuffer memory. This prevents
    display corruption in case we do not make it before VSYNC with updating
    them atomically. With this feature there is no need to wait for a VSYNC
    interrupt before each such update.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • S5PC100 and S5PV210 framebuffer devices differ slightly in terms of
    available registers and their driver data structures have to be separate.
    Those differences include dissimilar ways to control shadow register
    updates.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • The following problems were found in the above situation:

    sfb->windows[win] was being assigned at the end of s3c_fb_probe_win only.
    This resulted in passing a NULL to s3c_fb_release_win if probe_win
    returned early and a memory leak.

    dma_free_writecombine does not allow its third argument to be NULL.

    fb_dealloc_cmap does not verify whether its argument is not NULL.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Cc: InKi Dae
    Cc: Ben Dooks
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     
  • Remove the palette setup code from the header files and put it into the
    main driver.

    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: InKi Dae
    Cc: KyungMin Park
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Update the variant and window variant structures with the necessary
    changes to support the older style of hardware where these are not in the
    same place.

    Add the support for the s3c2443/s3c2416 hardware by using the
    platform-device s3c2443 to cover both, and add the initialisation data for
    these.

    Also change to including just the v4 header files for the moment until the
    last of the merging of these is sorted out.

    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: InKi Dae
    Cc: KyungMin Park
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Remove the various header files that configure this driver and use the
    platform device name to select the correct configuration at probe time.

    Currently this does not remove the header files, only updates the driver
    and the relevant platform files.

    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: InKi Dae
    Cc: KyungMin Park
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • The driver clears all windows, but also sets the windows' colour key
    controls at the same time. However, the last window does not have these
    registers as it is always blended into the previous window.

    Move the colour key initialisation into the probe, and run it for only
    nr_win-1 windows.

    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: InKi Dae
    Cc: KyungMin Park
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • It has been working fine at 16bpp but in case of pixel format more then
    24bpp it would occur distortedness situation on that mode. so this patch
    set the word swap control bit of WINCONx to 1 as default value. but it
    should be set to 0 in case that each ENLOCAL bit of WINCON0 ~ 2 registers
    is enabled. this issue would be solved with local path feature soon.

    Signed-off-by: InKi Dae
    Reviewed-by: KyungMin Park
    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    InKi Dae
     
  • s5pv210 has five window layers (window0 ~ 4), among them, window0 ~ 2
    could be used for local path with fimc(capture device) and fimd writeback
    feature so this patch makes default window layer for UI to be set at
    machine code.

    Signed-off-by: InKi Dae
    Reviewed-by: KyungMin Park
    Signed-off-by: Ben Dooks
    Signed-off-by: Pawel Osciak
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    InKi Dae
     

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
     

17 Jan, 2010

1 commit

  • Fix divide by zero and broken output. Commit 600ce1a0fa ("fix clock
    setting for Samsung SoC Framebuffer") introduced a mandatory refresh
    parameter to the platform data for the S3C framebuffer but did not
    introduce any validation code, causing existing platforms (none of which
    have refresh set) to divide by zero whenever the framebuffer is
    configured, generating warnings and unusable output.

    Ben Dooks noted several problems with the patch:

    - The platform data supplies the pixclk directly and should already
    have taken care of the refresh rate.
    - The addition of a window ID parameter doesn't help since only the
    root framebuffer can control the pixclk.
    - pixclk is specified in picoseconds (rather than Hz) as the patch
    assumed.

    and suggests reverting the commit so do that. Without fixing this no
    mainline user of the driver will produce output.

    [akpm@linux-foundation.org: don't revert the correct bit]
    Signed-off-by: Mark Brown
    Cc: InKi Dae
    Cc: Kyungmin Park
    Cc: Krzysztof Helt
    Cc: Marek Szyprowski
    Cc: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Brown
     

23 Sep, 2009

1 commit

  • Fixes `s3c_fb_remove' referenced in section `.data' of
    drivers/built-in.o: defined in discarded section `.devexit.text' of
    drivers/built-in.o

    With CONFIG_HOTPLUG=n, functions marked with __devexit gets removed,
    so make sure we use __devexit_p when referencing pointers to them.

    Signed-off-by: Peter Korsgaard
    Acked-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Korsgaard
     

30 Jul, 2009

1 commit

  • Fixed off-by-one bug in loop indexes - some elements beyond windows' array
    were accessed, which might result in memory access violations when
    removing/suspending the device.

    Signed-off-by: Pawel Osciak
    Reviewed-by: Kyungmin Park
    Signed-off-by: Marek Szyprowski
    Cc: Krzysztof Helt
    Cc: Ben Dooks
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pawel Osciak
     

07 Jul, 2009

1 commit

  • Correct the CLKVAL_F field value of VIDEO MAIN CONTROLLER 0 REGITSTER.

    Frame Rate is 1 / [ { (VSPW+1) + (VBPD+1) + (LIINEVAL + 1) + (VFPD+1)
    } x {(HSPW+1) + (HBPD +1)
    + (HFPD+1) + (HOZVAL + 1) } x { ( CLKVAL+1 ) / ( Frequency of Clock
    source ) } ] and VCLK = Video Clock Source / (CLKVAL +1).

    therefore CLKVAL_F should be "CLKVAL_F = Frequency of Clock source / pixel
    clock * refresh".

    for this, I added refresh value in platform data like below.

    static struct s3c_fb_pd_win xxx_fb_win0 = {
    /* this is to ensure we use win0 */
    .win_mode = {
    .refresh = 60,
    .pixclock = (66+4+2+480)*(15+5+3+800),
    .left_margin = 66,
    .right_margin = 2,
    .upper_margin = 15,
    .lower_margin = 3,
    .hsync_len = 4,
    .vsync_len = 5,
    .xres = 480,
    .yres = 800,
    },
    .max_bpp = 32,
    .default_bpp = 24,
    };

    static struct s3c_fb_platdata xxx_lcd_pdata __initdata = {
    .win[0] = &xxx_fb_win0,
    .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
    .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC
    | VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
    .setup_gpio = s5pc1xx_fb_gpio_setup_24bpp,
    };

    xxx_machine_init()
    {
    .
    .
    .
    s3c_fb_set_platdata(&xxx_lcd_pdata);
    }

    platform data defined in machine code should be setting using
    s3c_fb_set_platdata().

    Signed-off-by: InKi Dae
    Cc: Kyungmin Park
    Cc: Krzysztof Helt
    Cc: Marek Szyprowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    InKi Dae
     

17 Jun, 2009

1 commit