03 Jun, 2015

1 commit

  • Convert the driver from using the x86 specific MTRR code to
    the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
    will avoid MTRR if write-combining is available, in order to
    take advantage of that also ensure the ioremap'd area is requested
    as write-combining.

    There are a few motivations for this:

    a) Take advantage of PAT when available

    b) Help bury MTRR code away, MTRR is architecture specific and on
    x86 its replaced by PAT

    c) Help with the goal of eventually using _PAGE_CACHE_UC over
    _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
    de33c442e titled "x86 PAT: fix performance drop for glx,
    use UC minus for ioremap(), ioremap_nocache() and
    pci_mmap_page_range()")

    The conversion done is expressed by the following Coccinelle
    SmPL patch, it additionally required manual intervention to
    address all the #ifdery and removal of redundant things which
    arch_phys_wc_add() already addresses such as verbose message
    about when MTRR fails and doing nothing when we didn't get
    an MTRR.

    @ mtrr_found @
    expression index, base, size;
    @@

    -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
    +index = arch_phys_wc_add(base, size);

    @ mtrr_rm depends on mtrr_found @
    expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
    @@

    -mtrr_del(index, base, size);
    +arch_phys_wc_del(index);

    @ mtrr_rm_zero_arg depends on mtrr_found @
    expression mtrr_found.index;
    @@

    -mtrr_del(index, 0, 0);
    +arch_phys_wc_del(index);

    @ mtrr_rm_fb_info depends on mtrr_found @
    struct fb_info *info;
    expression mtrr_found.index;
    @@

    -mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
    +arch_phys_wc_del(index);

    @ ioremap_replace_nocache depends on mtrr_found @
    struct fb_info *info;
    expression base, size;
    @@

    -info->screen_base = ioremap_nocache(base, size);
    +info->screen_base = ioremap_wc(base, size);

    @ ioremap_replace_default depends on mtrr_found @
    struct fb_info *info;
    expression base, size;
    @@

    -info->screen_base = ioremap(base, size);
    +info->screen_base = ioremap_wc(base, size);

    Generated-by: Coccinelle SmPL
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Tomi Valkeinen
    Cc: Laurent Pinchart
    Cc: Jingoo Han
    Cc: Suresh Siddha
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Juergen Gross
    Cc: Daniel Vetter
    Cc: Andy Lutomirski
    Cc: Dave Airlie
    Cc: Antonino Daplas
    Cc: linux-fbdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Luis R. Rodriguez
    Reviewed-by: Dave Airlie
    Signed-off-by: Tomi Valkeinen

    Luis R. Rodriguez
     

31 Mar, 2011

1 commit


17 Oct, 2008

1 commit


25 Jul, 2008

1 commit

  • Remove the xtimings structure which only stored some values to be used
    later (mostly once). Calculate and use these values in places they are
    needed.

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

    Krzysztof Helt
     

13 Feb, 2007

1 commit

  • Some of fb drivers uses atomic_t in bad manner, since there are still some
    race-prone gaps. Use mutexes to protect open/close code sections with
    ref_count testing and finally use simple uint.

    Signed-off-by: Jiri Slaby
    Acked-by: Denis Oliver Kropp
    Cc: James Simmons
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

16 Feb, 2006

1 commit

  • There were two mistakes in the register-read-on-(un)blank approach.

    - First, without proper register (un)locking the value read back will always
    be zero, and this is what I missed entirely until just now. Due to this,
    the logic could not be verified at all and I tried some bogus checks which
    are completely stupid.

    - Second, the LCD status bit will always be set to zero when the backlight
    has been turned off. Reading the value back during unblank will disable the
    LCD unconditionally, regardless of the state it is supposed to be in, since
    we set it to zero beforehand.

    So this is what we do now:

    - create a new variable in struct neofb_par, and use that to determine
    whether to read back registers (initialized to true)

    - before actually blanking the screen, read back the register to sense any
    possible change made through Fn key combo

    - use proper neoUnlock() / neoLock() to actually read something

    - every call to neofb_blank() determines if we read back next time: blanking
    disables readback, unblanking (FB_BLANK_UNBLANK) enables it

    This should give us a nice and clean state machine. Has been thoroughly
    tested on a Dell Latitude CPiA / NM220 Chip docked to a C/Dock2 with attached
    CRT in all possible combinations of LCD/CRT on/off. I changed the config via
    Fn key, let the console blank, unblanked by keypress - works flawlessly.

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

    Christian Trefzer
     

11 Jan, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds