Commit graph android_kernel_sony_sdm845/drivers/char/drm/drm_vm.c
Message SHA1
drm: reorganise minor number handling using backported modesetting code.
rips out the head crap and replaces it with an idr and drm_minor structure

Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie   commited 2008-04-26 17:55:07 +10:00
2c14f28be2
drm: Fix mismerge of non-coherent DMA patch
The patch for supporting non coherent PCI DMA in the DRM was mismerged
causing the page protection to be updated for the wrong type of
mapping.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>

Benjamin Herrenschmidt   authored and   Dave Airlie   commited 2008-04-26 17:48:17 +10:00
5ff6461133
drm: fix for non-coherent DMA PowerPC
This patch fixes bits of the DRM so to make the radeon DRI work on
non-cache coherent PCI DMA variants of the PowerPC processors.

It moves the few places that needs change to wrappers to that
other architectures with similar issues can easily add their
own changes to those wrappers, at least until we have more useful
generic kernel API.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Benjamin Herrenschmidt   authored and   Dave Airlie   commited 2008-03-30 07:57:57 +10:00
6876b3baca
drm: convert drm from nopage to fault.
Remove redundant vma range checks.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Nick Piggin   authored and   Dave Airlie   commited 2008-02-20 09:37:12 +10:00
ca0b07d9a9
drm: cleanup DRM_DEBUG() parameters
As DRM_DEBUG macro already prints out the __FUNCTION__ string (see
drivers/char/drm/drmP.h), it is not worth doing this again. At some
other places the ending "\n" was added.

airlied:- I cleaned up a few that this patch missed also

Signed-off-by: Dave Airlie <airlied@linux.ie>

Márton Németh   authored and   Dave Airlie   commited 2008-02-07 15:09:39 +10:00
3e684eae58
vm audit: add VM_DONTEXPAND to mmap for drivers that need it
Drivers that register a ->fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.

I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Nick Piggin   authored and   Linus Torvalds   commited 2008-02-04 07:55:38 -08:00
2f98735c9c
drm: Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everyth
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct
went the other direction.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Eric Anholt   authored and   Dave Airlie   commited 2007-10-15 10:38:20 +10:00
6c340eac02
drm: detypedef the hashtab and more of sman
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-12 10:26:44 +10:00
e0be428e66
drm: detypedeffing continues...
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:53:40 +10:00
55910517af
drm: detypef waitlist/freelist/buf_entry/device_dma/drm_queue structs
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:32:08 +10:00
cdd55a294c
drm: drop drm_vma_entry_t, drm_magic_entry_t
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 16:21:47 +10:00
8fc2fdf4c9
drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 15:53:27 +10:00
84b1fd103d
drm: remove a bunch of typedefs on the userspace interface
This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace
API compatiblity, it changes all internal usages to structs/enum/unions.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 15:27:12 +10:00
c60ce623bd
drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used and uses them
in some more places.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-07-11 11:58:02 +10:00
bd1b331fae
Fix occurrences of "the the "
Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

Michael Opdenacker   authored and   Adrian Bunk   commited 2007-05-09 08:57:56 +02:00
59c51591a0
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>

Dave Airlie   commited 2007-03-24 18:00:31 +11:00
9e9c1326a5
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>

Hugh Dickins   authored and   Dave Airlie   commited 2007-03-24 18:00:28 +11:00
38315878a5
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>

Thomas Hellstrom   authored and   Dave Airlie   commited 2007-03-24 18:00:22 +11:00
d7d8aac79d
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>

Adrian Bunk   authored and   Dave Airlie   commited 2007-03-11 12:08:15 +11:00
0bead7cdc9
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>

Dave Airlie   commited 2007-03-11 12:07:17 +11:00
54ba2f76e2
drm: move protection stuff into separate function
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2007-03-11 12:07:17 +11:00
5cc7f9abec
drm: Allow for 44 bit user-tokens (or drm_file offsets)
Thomas Hellstrom   authored and   Dave Airlie   commited 2007-02-08 16:14:05 +11:00
1545085a28
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>

Christoph Hellwig   authored and   Dave Airlie   commited 2007-02-08 13:24:26 +11:00
004a772742
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (21 commits)
  Fix http://bugzilla.kernel.org/show_bug.cgi?id=7606
  drm: add flag for mapping PCI DMA buffers read-only.
  drm: fix up irqflags in drm_lock.c
  drm: i915 updates
  drm: i915: fix up irqflags arg
  drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
  drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
  drm: i915: Add SAREA fileds for determining which pipe to sync window buffer swaps to.
  drm: Make handling of dev_priv->vblank_pipe more robust.
  drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
  drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
  drm: Core vsync: Don't clobber target sequence number when scheduling signal.
  drm: Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
  drm: Make locked tasklet handling more robust.
  drm: drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
  drm: Change first valid DRM drawable ID to be 1 instead of 0.
  drm: drawable locking + memory management fixes + copyright
  drm: Add support for interrupt triggered driver callback with lock held to DRM core.
  drm: Add support for tracking drawable information to core
  drm: add support for secondary vertical blank interrupt to i915
  ...

Linus Torvalds   commited 2006-12-09 12:26:37 -08:00
9b3a89f8b0
[PATCH] mm: incorrect VM_FAULT_OOM returns from drivers
Some drivers are returning OOM when it is not in response to a memory
shortage.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Nick Piggin   authored and   Linus Torvalds   commited 2006-12-07 08:39:20 -08:00
cd54e7e543
drm: add flag for mapping PCI DMA buffers read-only.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.

Signed-off-by: Dave Airlie <airlied@linux.ie>

George Sapountzis   authored and   airlied   commited 2006-12-07 15:53:31 +11:00
3417f33e76
drm: update user token hashing and map handles
Keep hashed user tokens, with the following changes:
32-bit physical device addresses are mapped directly to user-tokens. No
    duplicate maps are allowed, and the addresses are assumed to be outside
    of the range 0x10000000 through 0x30000000. The user-token is identical
    to the 32-bit physical start-address of the map.
64-bit physical device addressed are mapped to user-tokens in the range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.
Other map types, like upcoming TTM maps are mapped to user-tokens in the
    range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.

Implement hashed map lookups.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Thomas Hellstrom   authored and   Dave Airlie   commited 2006-09-22 05:32:31 +10:00
8d153f7107
drm: cleanup old compat code and DRM fns from Linux only code
This patch removes some of the old compatibility macros from the DRM,
and removes use of DRM wrappers from Linux specific code.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-09-22 05:32:30 +10:00
3d77461ecd
[SPARC]: Respect vm_page_prot in io_remap_page_range().
Make sure the callers do a pgprot_noncached() on
vma->vm_page_prot.

Pointed out by Hugh Dickens.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2006-03-22 01:15:13 -08:00
14778d9072
sem2mutex: drivers/char/drm/
From: Arjan van de Ven <arjan@infradead.org>

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2006-02-02 19:37:46 +11:00
30e2fb1881
merge linus head to drm-mm branch
Dave Airlie   commited 2005-10-22 15:25:01 +10:00
5fb4dc9bf5
drm: lindent the drm directory.
I've been threatening this for a while, so no point hanging around.
This lindents the DRM code which was always really bad in tabbing department.
I've also fixed some misnamed files in comments and removed some trailing
whitespace.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-09-25 14:28:13 +10:00
b5e89ed53e
drm: missing drm_vm.c changes for consistent maps
This adds a missing change from CVS for consistent maps.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-09-11 19:37:29 +10:00
70dfcfea4b
drm: fixes for powerpc
Remove a bogus check on whether an area is memory (we need a better interface)
also change pgprot flags for powerpc
don't check on x86-64 either

From: Paul Mackerras <paulus@samba.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-08-20 17:43:33 +10:00
88f399cd0a
drm: remove version.h and any version checks..
This patch removes all the drm kernel conditionals from the kernel DRM tree.

Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-08-07 15:19:58 +10:00
d27c9b548a
drm: updated DRM map patch for 32/64 bit systems
I basically combined Paul's patches with additions that I had made
for PCI scatter gather.
I also tried more carefully to avoid problems with the same token
assigned multiple times while trying to use the base address in the
token if possible to gain as much backward compatibility as possible
for broken DRI clients.

From: Paul Mackerras <paulus@samba.org> and Egbert Eich <eich@suse.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-08-05 22:11:22 +10:00
d1f2b55ad2
drm: update support for drm pci buffers
The DRM needs to change the drm_pci interface for FreeBSD compatiblity,
this patch introduces the drm_dma_handle_t and uses it in the Linux code.

From: Tonnerre Lombard, Eric Anholt, and Sergey Vlasov
Signed-off-by: David Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-07-10 15:38:56 +10:00
9c8da5ebbf
drm: add _DRM_CONSISTENT map type
Added a new DRM map type _DRM_CONSISTENT for consistent PCI memory. It
uses drm_pci_alloc/free for allocating/freeing the memory.

From: Felix Kuhling <fxkuehl@gmx.de>
Signed-off-by: David Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-07-10 14:34:13 +10:00
2d0f9eaff8
drm: misc cleanup
This patch contains the following cleanups:
- make needlessly global functions static
- remove the following unused global functions:
 - drm_fops.c: drm_read
 - i915_dma.c: i915_do_cleanup_pageflip

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>

Dave Airlie   commited 2005-07-07 21:03:38 +10:00
c94f702985
Linux-2.6.12-rc2
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   commited 2005-04-16 15:20:36 -07:00
1da177e4c3