Commit Graph

70 Commits (a1345338feb7af25c0a9fe02ec16c2b9cce83a9e)

Author SHA1 Message Date
Thomas Hellstrom f1edb7ad91 Simplify the fencing code and differentiate between flushes and
waiting types.
Add a "command_stream_barrier" method to the bo driver.
2008-01-30 22:06:02 +01:00
Jesse Barnes 0cd4cbc9a6 Merge branch 'master' into vblank-rework, including mach64 support
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/mga_irq.c
	shared-core/radeon_irq.c
	shared-core/via_irq.c

Mostly trivial conflicts.

mach64 support from Mathieu Bérard.
2008-01-22 09:42:37 -08:00
Keith Packard d1187641d6 Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
Flags pending validation were stored in a misleadingly named field, 'mask'.
As 'mask' is already used to indicate pieces of a flags field which are
changing, it seems better to use a name reflecting the actual purpose of
this field. I chose 'proposed_flags' as they may not actually end up in
'flags', and in an case will be modified when they are moved over.

This affects the API, but not ABI of the user-mode interface.
2007-12-21 12:16:29 -08:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Jesse Barnes 91aae7e683 Merge branch 'master' into vblank-rework, fixup remaining drivers
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_irq.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/mga_drv.h
	shared-core/mga_irq.c
	shared-core/radeon_drv.h
	shared-core/radeon_irq.c

Merge in the latest master bits and update the remaining drivers (except
mach64 which math_b is working on).  Also remove the 9xx hack from the i915
driver; it seems to be correct.
2007-10-30 12:52:46 -07:00
Thomas Hellstrom da63f4ba0f Add fence error member.
Modify the TTM backend bind arguments.
Export a number of functions needed for driver-specific super-ioctls.
Add a function to map buffer objects from the kernel, regardless of where they're
currently placed.
A number of error fixes.
2007-09-22 13:57:13 +02:00
Eric Anholt 5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07:00
Eric Anholt c1119b1b09 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 everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Dave Airlie be85ad0333 drm: detypedef ttm/bo/fence code 2007-07-16 13:37:02 +10:00
Dave Airlie 6dce9e0735 drm: remove hashtab/sman and object typedefs 2007-07-16 12:48:44 +10:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Thomas Hellstrom b6b5df24b9 Try to make buffer object / fence object ioctl args 64-bit safe.
Introduce tile members for future tiled buffer support.
Allow user-space to explicitly define a fence-class.
Remove the implicit fence-class mechanism.
64-bit wide buffer object flag member.
2007-06-12 12:21:38 +02:00
Thomas Hellstrom e0f53e59be Simple fence object sample driver for via, based on idling the GPU.
Buffer object driver for via.
Some changes to buffer object driver callbacks.
Improve fence flushing.
2007-02-16 20:22:24 +01:00
Thomas Hellstrom 6c04185857 via: Try to improve command-buffer chaining.
Bump driver date and patchlevel.
2007-02-02 09:22:30 +01:00
Thomas Hellstrom a16a8a47cd Add some new via chipsets.
Disable 3D functionality and AGP DMA for chipsets with the DX9 3D engine.
2006-12-28 22:17:08 +01:00
Dave Airlie 9b984b34e9 drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
2006-08-28 11:31:43 +10:00
Thomas Hellstrom ca1a77683d via:
-Remove out of memory error message.
-Move sman cleanup from final_context to lastclose.
-Add the P4VM800PRO (?) PCI ID.
2006-06-15 18:37:05 +00:00
Thomas Hellstrom 6bacb180ce Merge in the drm-sman-branch 2006-06-06 14:19:00 +00:00
Dave Airlie 8c8f937b3d make some functions static in via driver 2006-03-19 07:52:53 +00:00
Thomas Hellstrom 659e9a091d via: Change via_drm.h versioning scheme after lenghty discussion on
unichrome-users.
2006-02-17 17:25:41 +00:00
Thomas Hellstrom d394c9fa08 via: direction bug in get_user_pages call in via_dmablit.c fixed. Bumped
minor since this causes the via DDX to fail with vlc video player.
2006-01-12 19:08:16 +00:00
Thomas Hellstrom a019c10c30 via: Last commit really required a bump of minor. Fix. 2006-01-06 11:52:01 +00:00
Thomas Hellstrom 661004544c via: Combine PCI DMA transfers with stride==width (Idea from Luc
Verhaegen). A somewhat saner PCI DMA transfer size check. Fix some
    typos. Bump patchlevel.
2006-01-06 11:19:06 +00:00
Dave Airlie 42cd50fa90 Realign via driver with changes in Linux kernel (mainly whitespace) 2006-01-02 03:25:49 +00:00
Thomas Hellstrom a5747964ec Fixed long standing 64-bit bug in via memory manager. Bumped via date and
patchlevel.
2005-11-16 10:55:53 +00:00
Thomas Hellstrom c8261e3d24 Loosen via dmablit alignment checks somewhat. Adapt stride check to maximum
sceen size for EXA.
2005-11-15 11:20:47 +00:00
Dave Airlie 9a91674d45 cleanup ioctl/max_ioctl to use header file for extern symbols 2005-11-11 07:45:46 +00:00
Thomas Hellstrom b63b771285 via: Sync via_drm.h with 3D driver. Bump via patchlevel and date. 2005-10-22 15:12:05 +00:00
Thomas Hellstrom cf8ce0888a via: PCI DMA bugfixes and DOS due to too many mapped pages checks. 2005-10-20 17:37:32 +00:00
Thomas Hellstrom 903e5701ff Add the via PCI DMA blit code. 2005-09-25 12:54:12 +00:00
Eric Anholt 8c21b783c3 Port the VIA DRM to FreeBSD. Original patch by Jake, with some cleanup by
me to match other drivers and avoid ifdeffing. The linux via_drv.c will
    be moved from shared-core to linux-core soon by repocopy.
Submitted by: Jake Burkholder <jake@FreeBSD.org> Tested by: unichrome
2005-08-15 18:07:12 +00:00
Thomas Hellstrom 4f5961eeee VIA bugvixes by Joris van Rantwijk Initial commit. 2005-08-14 09:52:09 +00:00
Thomas Hellstrom cdf49e5732 Reverting the previous via security-fix commit, since the assumption of
contexts registered with the callers filp was wrong.
2005-08-12 14:19:33 +00:00
Thomas Hellstrom d5e8ab13ff Security fix on via: Checking that the specified context belongs to the
caller on fb / agp memory alloc and free. Otherwise malicious clients
    can register allocations on other clients or free memory used by other
    clients which will lead to severe memory manager inconsistensies.
2005-08-10 19:46:46 +00:00
Thomas Hellstrom 567113788c VIA: Fix sparse warnings (Alexey Dobriyan) 2005-07-15 21:22:51 +00:00
Thomas Hellstrom e1fd79b31e VIA:
64-bit fixes. Bumped driver date and patchlevel.
2005-05-23 20:56:54 +00:00
Thomas Hellstrom e0fc400b68 VIA: Fix for oops when AGP ring-buffer initialization is called and there
is no AGP memory acquired.
2005-05-08 20:33:04 +00:00
Thomas Hellstrom 2b8dc25dc5 VIA: Interrupt handler bugfixes. Bumped patchlevel to 2.6.2. 2005-04-20 10:16:52 +00:00
Thomas Hellstrom a08343e3e0 VIA:
1) Security fix: Stopped possible MMIO access to PCI DMA area for the
    unichrome Pro.
2) Fixed an odd cpu usage problem by padding small AGP DMA submissions.
    Bumped patchlevel.
2005-04-18 08:26:00 +00:00
Thomas Hellstrom 532ccb98b5 Via updates:
New PCI command parser. Moved from via_dma.c to via_verifier.c so functions
    with similar functionality are close to eachother.
Moved video related functions to via_video.c, which might be extended in
    the future, as new video functionality is added.
New device-specific generic IRQ IOCTL, similar to the general VBLANK IOCTL,
    but with support for multiple device IRQ sources and functionality.
Support for Unichrome Pro PM800/CN400 video DMA commands in verifier and
    PCI parser.
Support for Unichrome Pro PM800/CN400 HQV IRQs in the new generic IRQ
    IOCTL.
Bumped minor. New version 2.6.0.
2005-03-28 21:21:42 +00:00
Thomas Hellstrom d2fd920095 via changes:
1. Initialize futex locks to zero on device init.
2. Remove some stray defines from via_drm.h
3. Prepare via_drm.h for drm client inclusion. The goal is to share a
    common file with common definitions.
4. Sync shared / shared-core via_drm.h
5. Bump minor, because of the futex lock initialization.
2005-03-14 22:50:21 +00:00
Thomas Hellstrom 650c0fe391 Fixed Futex release bug. Bumped driver date and patchlevel. 2005-02-13 23:03:48 +00:00
Thomas Hellstrom 270ca5f3ce Via driver: Add missing drm_poll function to via driver in core. 2005-02-03 10:51:22 +00:00
Dave Airlie 0d6b7fcb79 cleanup patch from Adrian Bunk <bunk@stusta.de> 2005-02-01 11:08:31 +00:00
Thomas Hellstrom cd9ef39c76 Fixed multiple devices DMA bug. Fixed PCI path FIRE command detection 2005-01-27 22:48:47 +00:00
Thomas Hellstrom fb6a4d0a7d via updates: moved the verifier state struct to dev_priv. Implemented AGP
alignment check.
2005-01-07 11:37:01 +00:00
Thomas Hellstrom ca2b94cfa2 Updated via DRM with check for stray FIRE commands primitive list. 2005-01-07 08:21:29 +00:00
Thomas Hellstrom 50a6ffa878 via DRM: Updated the verifier to check the vertex lists more thorough. This
should hopefully stop it from getting out of sync.
The PCI command parser is still not updated.
2005-01-06 15:53:38 +00:00
Thomas Hellstrom 4818014ab1 Bumped driver date and minor version. 2005-01-05 17:46:34 +00:00
Thomas Hellstrom e34b560191 VIA update:
Release video futexes when context is destroyed (This was previously done
    by the X server).
Added New Unichrome Pro VIDEO DMA commands to the verifier.
Added Quiescent heavyweight lock mode.
2005-01-05 17:44:43 +00:00