1. 27 7月, 2007 4 次提交
    • A
      f191f144
    • Z
      intel_agp: really fix 945/965GME · dde47876
      Zhenyu Wang 提交于
      Fix some missing places to check with device id info, which
      should probe the device gart correctly.
      Signed-off-by: NWang Zhenyu <zhenyu.z.wang@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dde47876
    • N
      agp: don't lock pages · a51b3459
      Nick Piggin 提交于
      AGP should not need to lock pages. They are not protecting any race
      because there is no lock_page calls, only SetPageLocked.
      
      This is causing hangs with d00806b1.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a51b3459
    • J
      Fix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages · 190644e1
      Jesper Juhl 提交于
      Hi,
      
      Coverity spotted a "use after free" bug in
      drivers/char/agp/ati-agp.c::ati_create_gatt_pages().
      
      The same one that was in
        drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages()
      
      The problem is this:
             If "entry = kzalloc(sizeof(struct ati_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
      ati_generic_private.gatt_pages and 'retval' is set to -ENOMEM which
      causes ati_free_gatt_pages(); to be called at the end of the function.
      The problem with this is that ati_free_gatt_pages() will then loop
      'ati_generic_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 ati_create_gatt_pages() and
      instead relies entirely on the call to ati_free_gatt_pages() to free
      everything we allocated in case of an error. It also sets
      ati_generic_private.num_tables to the actual number of entries
      allocated instead of just using the value passed in from the caller -
      this ensures that ati_free_gatt_pages() will only attempt to free
      stuff that was actually allocated.
      
      Note: I'm in no way intimate with this code and I have no way to
      actually test this patch (besides compile test it), so while I've
      tried to be careful in reading the code and make sure the patch
      does the right thing an ACK from someone who actually knows the
      code in-depth would be very much appreciated.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      190644e1
  2. 12 7月, 2007 1 次提交
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      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: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  3. 10 7月, 2007 1 次提交
    • D
      [AGPGART] Hand off AGP maintainence. · 70e8992e
      Dave Jones 提交于
      Most of the AGP changes recently have been done in lock-step with
      DRM updates, so it's probably easier to have airlied pushing
      AGP changes at the same time he does DRM updates.
      
      [Also remove my name from the boot messages.
       Cautionary tale to others: Never do this, when computers
       don't boot, people assume you're responsible even if 15
       other subsystems initialised after yours. :-) ]
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      70e8992e
  4. 22 6月, 2007 1 次提交
  5. 15 6月, 2007 1 次提交
  6. 07 6月, 2007 5 次提交
  7. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  8. 14 5月, 2007 1 次提交
    • G
      [AGPGART] Fix wrong ID in via-agp.c · bbdfff86
      Gabriel Mansi 提交于
      there is a wrong id in drivers/char/agp/via-agp.c
      #define PCI_DEVICE_ID_VIA_CX700         0x8324
      It must be 0x0324
      
      Notice that PCI_DEVICE_ID_VIA_CX700 is also used in
      drivers/i2c/busses/i2c-viapro.c and
      drivers/ide/pci/via82cxxx.c
      
      So, I think that constant must be renamed to avoid conflicting.
      I attached a proposed patch.
      Signed-off-by: NDave Jones <davej@redhat.com>
      bbdfff86
  9. 12 5月, 2007 1 次提交
  10. 03 5月, 2007 2 次提交
  11. 02 5月, 2007 1 次提交
  12. 27 4月, 2007 7 次提交
  13. 26 4月, 2007 1 次提交
  14. 13 4月, 2007 1 次提交
  15. 10 4月, 2007 1 次提交
  16. 09 4月, 2007 1 次提交
  17. 27 2月, 2007 2 次提交
    • R
      [AGPGART] fix compile errors · e047d1cf
      Ryusuke Konishi 提交于
      This fixes the following compile failures of agpgart drivers.
      These errors were inserted by the recent AGPGART constification patch.
      
      drivers/char/agp/uninorth-agp.c:492: error: expected '{' before 'const'
      drivers/char/agp/uninorth-agp.c:517: error: expected '{' before 'const'
      drivers/char/agp/uninorth-agp.c: In function 'agp_uninorth_probe':
      drivers/char/agp/uninorth-agp.c:634: error: 'u3_agp_driver' undeclared (first use in this function)
      drivers/char/agp/uninorth-agp.c:634: error: (Each undeclared identifier is reported only once
      drivers/char/agp/uninorth-agp.c:634: error: for each function it appears in.)
      drivers/char/agp/uninorth-agp.c:636: error: 'uninorth_agp_driver' undeclared (first use in this function)
      Signed-off-by: NRyusuke Konishi <ryusuke@osrg.net>
      Signed-off-by: NDave Jones <davej@redhat.com>
      e047d1cf
    • K
      [PARISC] parisc-agp: Fix thinko const-ifying · fb55a0de
      Kyle McMartin 提交于
      Can't really blame davej for mucking this up... static-ify
      it while we're at it, which would have prevented this...
      Signed-off-by: NKyle McMartin <kyle@parisc-linux.org>
      fb55a0de
  18. 23 2月, 2007 1 次提交
  19. 21 2月, 2007 1 次提交
  20. 11 2月, 2007 1 次提交
  21. 07 2月, 2007 1 次提交
  22. 05 2月, 2007 2 次提交
  23. 04 2月, 2007 2 次提交
    • T
      [AGPGART] Allow drm-populated agp memory types · a030ce44
      Thomas Hellstrom 提交于
      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: NThomas Hellstrom <thomas@tungstengraphics.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      a030ce44
    • Z
      [AGPGART] compat ioctl · 0316fe83
      Zwane Mwaikambo 提交于
      The following video card requires the agpgart driver ioctl
      interface in order to detect video memory.
      
      00:02.0 VGA compatible controller: Intel Corporation Mobile
      945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
      
      Tested on a Thinkpad Z61t, Xorg.0.log from a 32bit debian Xorg is at;
      
      http://montezuma.homeunix.net/Xorg.0.logSigned-off-by: NZwane Mwaikambo <zwane@infradead.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      0316fe83