31 Mar, 2011

1 commit


04 Feb, 2011

1 commit


19 Oct, 2010

1 commit


23 Apr, 2010

1 commit

  • Convert most AGP chipset to use scratch page as default entries.
    This help avoiding GPU querying 0 address and trigger computer
    fault. With KMS and memory manager we bind/unbind AGP memory
    constantly and it seems that some GPU are still doing AGP
    traffic even after GPU report being idle with the memory segment.

    Tested (radeon GPU KMS + Xorg + compiz + glxgears + quake3) on :
    - SIS 1039:0001 & 1039:0003
    - Intel 865 8086:2571

    Compile tested for other bridges

    V2 enable scratch page on uninorth
    V3 fix unbound check in uninorth insert memory (Michel Dänzer)
    V4 rebase on top of drm-next branch with the lastest intel AGP
    changeset (stable should use version V3 of the patch)

    Signed-off-by: Jerome Glisse
    Signed-off-by: Michel Dänzer
    Signed-off-by: Dave Airlie

    Jerome Glisse
     

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
     

03 Aug, 2009

2 commits


19 Jun, 2009

1 commit


17 Oct, 2008

1 commit


16 Oct, 2008

1 commit


22 Aug, 2008

1 commit

  • The pageattr-array patch that you currently have in tip/master only
    enables it for intel-agp, not the others. The attached enables it for
    all drivers currently directly using agp_generic_alloc_page() and
    agp_generic_destroy_page() (ocal driver is amd-k7-agp).

    The new agp_generic_alloc_pages() interface uses the also new
    pageattr array interface API. This makes all AGP drivers that
    up to now used generic_{alloc,destroy}_page() use it.

    Signed-off-by: Rene Herman
    Signed-off-by: Ingo Molnar

    Rene Herman
     

12 Aug, 2008

1 commit


19 Jun, 2008

1 commit


26 Apr, 2008

1 commit

  • Introduced between 2.6.25-rc2 and -rc3
    drivers/char/agp/amd-k7-agp.c:439:6: warning: symbol 'cap_ptr' shadows an
    earlier one
    drivers/char/agp/amd-k7-agp.c:414:5: originally declared here

    cap_ptr is never used again in this function, don't bother redeclaring.

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Harvey Harrison
     

20 Feb, 2008

1 commit


19 Feb, 2008

1 commit

  • Several AGP drivers right now use ioremap_nocache() on kernel ram in order
    to turn a page of regular memory uncached.

    There are two problems with this:

    1) This is a total nightmare for the ioremap() implementation to keep
    various mappings of the same page coherent.

    2) It's a total nightmare for the AGP code since it adds a ton of
    complexity in terms of keeping track of 2 different pointers to
    the same thing, in terms of error handling etc etc.

    This patch fixes this by making the AGP drivers use the new
    set_memory_XX APIs instead.

    Note: amd-k7-agp.c is built on Alpha too, and generic.c is built
    on ia64 as well, which do not yet have the set_memory_*() APIs,
    so for them some we have a few ugly #ifdefs - hopefully they'll
    be fixed soon.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Dave Airlie

    Arjan van dev Ven
     

05 Feb, 2008

1 commit

  • pci_get_class implicitly does a pci_dev_put on its second argument, so
    pci_dev_put is only needed if there is a break out of the loop.

    The semantic match detecting this problem is as follows:

    //
    @@
    expression dev;
    expression E;
    @@

    * pci_dev_put(dev)
    ... when != dev = E
    (
    * pci_get_device(...,dev)
    |
    * pci_get_device_reverse(...,dev)
    |
    * pci_get_subsys(...,dev)
    |
    * pci_get_class(...,dev)
    )
    //

    Signed-off-by: Julia Lawall
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Julia Lawall
     

15 Oct, 2007

1 commit

  • Coverity spotted a "use after free" bug in
    drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages().

    The problem is this:
    If "entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);"
    fails, then there's a loop in the function to free all entries
    allocated so far and break out of the allocation loop. That in itself
    is pretty sane, but then the (now freed) 'tables' is assigned to
    amd_irongate_private.gatt_pages and 'retval' is set to -ENOMEM which
    causes amd_free_gatt_pages(); to be called at the end of the function.
    The problem with this is that amd_free_gatt_pages() will then loop
    'amd_irongate_private.num_tables' times and try to free each entry in
    tables[] - this is bad since tables has already been freed and
    furthermore it will call kfree(tables) at the end - a double free.

    This patch removes the freeing loop in amd_create_gatt_pages() and
    instead relies entirely on the call to amd_free_gatt_pages() to free
    everything we allocated in case of an error. It also sets
    amd_irongate_private.num_tables to the actual number of entries
    allocated instead of just using the value passed in from the caller -
    this ensures that amd_free_gatt_pages() will only attempt to free
    stuff that was actually allocated.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Jesper Juhl
     

25 Aug, 2007

1 commit

  • patchset against 2.6.23-rc3.
    corrects missing ioremap return checks and balancing on iounmap calls, integrated changes per list
    recommendations on the original set of patches..

    Signed-off-by: Scott Thompson hushmail.com>
    Signed-off-by: Dave Airlie

    Scott Thompson
     

12 Jul, 2007

1 commit

  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     

23 Feb, 2007

1 commit


04 Feb, 2007

1 commit

  • This patch allows drm to populate an agpgart structure with pages of its own.
    It's needed for the new drm memory manager which dynamically flips pages in and out of AGP.

    The patch modifies the generic functions as well as the intel agp driver. The intel drm driver is
    currently the only one supporting the new memory manager.

    Other agp drivers may need some minor fixing up once they have a corresponding memory manager enabled drm driver.

    AGP memory types >= AGP_USER_TYPES are not populated by the agpgart driver, but the drm is expected
    to do that, as well as taking care of cache- and tlb flushing when needed.

    It's not possible to request these types from user space using agpgart ioctls.

    The Intel driver also gets a new memory type for pages that can be bound cached to the intel GTT.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Jones

    Thomas Hellstrom
     

29 Jan, 2007

1 commit


27 Jun, 2006

1 commit

  • acquired (aquired)
    contiguous (contigious)
    successful (succesful, succesfull)
    surprise (suprise)
    whether (weather)
    some other misspellings

    Signed-off-by: Andreas Mohr
    Signed-off-by: Adrian Bunk

    Andreas Mohr
     

11 Nov, 2005

1 commit


25 Oct, 2005

1 commit

  • From: Laurent Riffard

    This updates .owner field of struct pci_driver.

    This allows SYSFS to create the symlink from the driver to the module which
    provides it.

    $ tree /sys/bus/pci/drivers/agpgart-via/
    /sys/bus/pci/drivers/agpgart-via/
    |-- 0000:00:00.0 -> ../../../../devices/pci0000:00/0000:00:00.0
    |-- bind
    |-- module -> ../../../../module/via_agp
    |-- new_id
    `-- unbind

    Signed-off-by: Laurent Riffard
    Signed-off-by: Dave Jones
    Signed-off-by: Andrew Morton

    Dave Jones
     

21 Oct, 2005

1 commit


08 Jun, 2005

1 commit

  • When Linux is running on the Xen virtual machine monitor, physical
    addresses are virtualised and cannot be directly referenced by the AGP
    GART. This patch fixes the GART driver for Xen by adding a layer of
    abstraction between physical addresses and 'GART addresses'.

    Architecture-specific functions are also defined for allocating and freeing
    the GATT. Xen requires this to ensure that table really is contiguous from
    the point of view of the GART.

    These extra interface functions are defined as 'no-ops' for all existing
    architectures that use the GART driver.

    Signed-off-by: Keir Fraser
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Jones

    Keir Fraser
     

01 May, 2005

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