Commit Graph

301 Commits

Author SHA1 Message Date
David Woodhouse f4d2781731 fix radeon setparam on 32/64 systems, harder.
Commit 9b01bd5b28 introduced a
compat_ioctl handler for RADEON_SETPARAM, the sole purpose of which was
to handle the fact that on i386, alignof(uint64_t)==4.

Unfortunately, this handler was installed for _all_ 64-bit
architectures, instead of only x86_64 and ia64.  And thus it breaks
32-bit compatibility on every other arch, where 64-bit integers are
aligned to 8 bytes in 32-bit mode just the same as in 64-bit mode.

Arnd has a cunning plan to use 'compat_u64' with appropriate alignment
attributes according to the 32-bit ABI, but for now let's just make the
compat_radeon_cp_setparam routine entirely disappear on 64-bit machines
whose 32-bit compat support isn't for i386.  It would be a no-op with
compat_u64 anyway.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-16 09:39:05 -07:00
Dave Airlie 9b01bd5b28 drm: fix radeon setparam on 32/64 bit systems.
The alignment on 64-bit is different for 64-bit values.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-06-10 16:00:27 +10:00
Wang Zhenyu dc7a93190c drm/i915: Add support for the G33, Q33, and Q35 chipsets.
These require that the status page be referenced by a pointer in GTT, rather
than phsyical memory.  So, we have the X Server allocate that memory and tell
us the address, instead.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-06-10 15:58:19 +10:00
Wang Zhenyu 2f4042b186 i915: add new pciids for 945GME, 965GME/GLE
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-06-10 14:31:30 +10:00
Linus Torvalds ad360bbbbe Merge branch 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: make sure the drawable code doesn't call malloc(0).
  drm/radeon: add more IGP chipset pci ids
  drm: Spinlock initializer cleanup
2007-05-31 09:08:49 -07:00
Martin Habets 5f81941c9d [SPARC]: Mark as emulating cmpxchg, add appropriate depends for DRM.
The DRM code depends on an atomic version of cmpxchg(), which is not
available on sparc32. Since other platforms besides sparc32 have this
issue a KCONFIG option is added for it.

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-29 02:51:24 -07:00
Michel Dänzer c4814f9001 drm: make sure the drawable code doesn't call malloc(0).
Signed-off-by: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-26 04:37:08 +10:00
Dave Airlie 777c7738a5 drm/radeon: add more IGP chipset pci ids
Add more IGP chipset PCI IDs

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-26 04:19:03 +10:00
Thomas Gleixner a6399bdd49 drm: Spinlock initializer cleanup
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-26 03:52:45 +10:00
Michael Opdenacker 59c51591a0 Fix occurrences of "the the "
Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 08:57:56 +02:00
Thomas Hellstrom ef68d29550 via: Make sure we flush write-combining using a follow-up read.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:48:39 +10:00
Thomas Hellstrom a0a6dd0b22 via: Try to improve command-buffer chaining.
Bump driver date and patchlevel.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:47:41 +10:00
Dave Airlie bc07dc7f07 drm: remove old taskqueue remnant
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:32:35 +10:00
Dave Airlie 0515b93c0e drm: rename badly named define and cleanup ioctl code spacing
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:28:15 +10:00
Michel Dänzer 453ff94ca5 radeon: Don't mess up page flipping when a file descriptor is closed.
There can still be other contexts that may use page flipping later on, so do
just unilaterally 'clean it up', which could lead to the wrong page being
displayed, e.g. when running 3D apps with a GLX compositing manager such as
compiz using page flipping.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:21:14 +10:00
Dave Airlie f2b04cd219 drm/radeon: upgrade to 1.27 - make PCI GART more flexible
radeon: make PCI GART aperture size variable, but making table size variable
    This is precursor to getting a TTM backend for this stuff, and also
    allows the PCI table to be allocated at fb 0
radeon: add support for reverse engineered xpress200m

    The IGPGART setup code was traced using mmio-trace on fglrx by myself
    and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.

    This code doesn't let the 3D driver work properly as the card has no
    vertex shader support.

    Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
    work on.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-08 15:19:23 +10:00
Linus Torvalds 5f757f91e7 Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Add 965GM pci id update
  drm: just use io_remap_pfn_range on all archs..
  drm: fix DRM_CONSISTENT mapping
  drm: fix up mmap locking in preparation for ttm changes
  drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
  drm: fix warning in drm_fops.c
  drm: allow for more generic drm ioctls
  drm: fix alpha domain handling
  via: fix CX700 pci id
  drm: make drm_io_prot static.
  drm: remove via_mm.h
  drm: add missing NULL assignment
  drm/radeon: Fix u32 overflows when determining AGP base address in card space.
  drm: port over use_vmalloc code from git hashtab
  drm: fix crash with fops lock and fixup sarea/page size locking
  drm: bring bufs code from git tree.
  drm: move protection stuff into separate function
  drm: Use ARRAY_SIZE macro when appropriate
  drm: update README.drm (bugzilla #7933)
  drm: remove unused exports
2007-05-07 12:24:07 -07:00
Wang Zhenyu ce7dd06372 drm/i915: Add 965GM pci id update
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-04-26 07:42:56 +10:00
David S. Miller b82f87f6d4 [DRM]: Delete sparc64 FFB driver code that never gets built.
The Kconfig bits were removed long ago, so we should kill off the
driver too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-26 21:49:11 -07:00
Dave Airlie 9e9c1326a5 drm: just use io_remap_pfn_range on all archs..
Move the sparc64 ifdef around to clean this up.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:31 +11:00
Hugh Dickins 38315878a5 drm: fix DRM_CONSISTENT mapping
This patch got lost in the DRM git tree for ages, bring it back to life.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:28 +11:00
Thomas Hellstrom d7d8aac79d drm: fix up mmap locking in preparation for ttm changes
This change is needed to protect againt disappearing maps which aren't common.
The map lists are protected using sturct_mutex but drm_mmap never locked it.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-24 18:00:22 +11:00
Thomas Hellstrom 040ac32048 drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
Bugzilla Bug #9457

Add refcounting of user waiters to the DRM hardware lock, so that we can use
DRM_LOCK_CONT flag more conservatively.

Also add a kernel waiter refcount that if nonzero transfers the lock for the
kernel context when it is released. This is useful when waiting for idle and can be used for very simple fence object driver implementations for the new memory manager

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-23 13:28:33 +11:00
Andrew Morton 4b560fde06 drm: fix warning in drm_fops.c
drivers/char/drm/drm_fops.c: In function 'drm_setup':
drivers/char/drm/drm_fops.c:60: warning: comparison of distinct pointer types lacks a cast

Unfortunately PAGE_SIZE has different types on different architectures.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-19 09:08:21 +11:00
Thomas Hellstrom 99da6d861c drm: allow for more generic drm ioctls
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-19 08:52:17 +11:00
Jay Estabrook 6244270ef6 drm: fix alpha domain handling
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:21 +11:00
Thomas Hellstrom 74be8e3b37 via: fix CX700 pci id
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:18 +11:00
Adrian Bunk 0bead7cdc9 drm: make drm_io_prot static.
This patch makes the needlessly global drm_io_prot() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:15 +11:00
Robert P. J. Day 5379397182 drm: remove via_mm.h
Delete apparently unused header file drivers/char/drm/via_mm.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:08:10 +11:00
Dave Airlie c1185ccdfb drm: add missing NULL assignment
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Michel Dänzer 80b2c386f3 drm/radeon: Fix u32 overflows when determining AGP base address in card space.
The overflows could lead to the AGP aperture overlapping the framebuffer are    in the card's address space when the latter is located at the very end of th    32 bit address space, which would result in a freeze on X server startup,
probably because the card read commands from the framebuffer instead of from    AGP.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392915 .

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie cd839d0048 drm: port over use_vmalloc code from git hashtab
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 11d9c2fd0a drm: fix crash with fops lock and fixup sarea/page size locking
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 54ba2f76e2 drm: bring bufs code from git tree.
This checks the AGP mappings are in a valid place and also fixes the size
check in the vm..

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Dave Airlie 5cc7f9abec drm: move protection stuff into separate function
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:17 +11:00
Ahmed S. Darwish 8311d570bc drm: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Randy Dunlap f54d1e40b2 drm: update README.drm (bugzilla #7933)
Update URLs in drivers/char/drm/README.drm, to take care of kernel bugzilla

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Adrian Bunk 41ed5de971 drm: remove unused exports
This patch removes two unused exports.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-03-11 12:07:16 +11:00
Tim Schmielau cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Arjan van de Ven 2b8693c061 [PATCH] mark struct file_operations const 3
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Jiri Slaby 40565f1962 [PATCH] Char: timers cleanup
- Use timer macros to set function and data members and to modify
  expiration time.
- Use DEFINE_TIMER for global timers and do not init them at run-time in
  these cases.
- del_timer_sync is common in most cases -- we want to wait for timer
  function if it's still running.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Dmitry Torokhov <dtor@mail.ru>	(Input bits)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:30 -08:00
Thomas Hellstrom 1545085a28 drm: Allow for 44 bit user-tokens (or drm_file offsets) 2007-02-08 16:14:05 +11:00
Thomas Hellstrom 756db73df7 drm/via: Disable AGP DMA for chips with the new 3D engine. 2007-02-08 13:24:26 +11:00
Thomas Hellstrom 1d58420bad drm: update core memory manager from git drm tree
Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Fix buggy aligned allocations.
Remove the stupid root_node field from the core memory manager.
Support multi-page buffer offset alignments
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Christoph Hellwig 004a772742 drm: remove drm_ioremap and drm_ioremapfree
hch originally submitted this for paravirt ops work, airlied took it
and cleaned up a lot of unused code caused by using this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Dave Airlie b9094d3aaa i810/i830: use drm_core_ioremap instead of drm_ioremap
This makes the i810/i830 use the drm_core_ioremap functions.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Thomas Hellstrom f239b7b0ca drm: use vmalloc_user instead of vmalloc_32 for DRM_SHM
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 9b8d9d0e01 via: allow for npot texture pitch alignment
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 689692e73e via: add some new chipsets
Disable 3D functionality and AGP DMA for chipsets with the DX9 3D engine.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 76f625511e via: some PCI posting flushes
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00