summaryrefslogtreecommitdiff
path: root/linux-core/drm_objects.h
AgeCommit message (Collapse)Author
2008-03-30[i915] Report buffer state _after_ fence submission to user-space.Thomas Hellstrom
This fixes a problem where the wrong bo->fence_type was reported, and also saves some memory space. [bo core] export the drm_bo_fill_rep_arg function.
2008-03-06ttm: make sure userspace can't destroy kernel create memory managersDave Airlie
this adds something to say the kernel initialised the memory region not the userspace. and blocks userspace from deallocating kernel areas
2008-03-06drm/ttm: add ioctl to get back memory managed area sizedDave Airlie
taken from modesetting branch but could be useful outside it.
2008-03-05i915: Evict if relocatee buffer is CACHED_MAPPED beforeXiang, Haihao
writting relocations, otherwise the GPU probably sees some inconsistent data. Fix fd.o bug#14656
2008-03-04Clarify through the names what drm_ttm_alloc_pages() and friend actually did.Eric Anholt
These are all about the page directory (pointers to pages) rather than the actual pages backing the allocation.
2008-02-28Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps ofThomas Hellstrom
PCI- or high memory. This is substantially more efficient than drm_bo_kmap, since the mapping only lives on a single processor. Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry. Add a support utility int drm_bo_pfn_prot() that returns the pfn and desired page protection for a given bo offset. This is all intended for relocations in bound TTMS or vram. Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros or a spinlock.
2008-01-31Add an fence_class_manager::last_queued_sequence member, since aThomas Hellstrom
sequence number may actually turn up before the corresponding fence object has been queued on the ring. Fence drivers can use this member to determine whether a sequence number must be re-reported.
2008-01-30Simplify the fencing code and differentiate between flushes andThomas Hellstrom
waiting types. Add a "command_stream_barrier" method to the bo driver.
2007-12-21Change drm_bo_type_dc to drm_bo_type_device and comment usage of this value.Keith Packard
I couldn't figure out what drm_bo_type_dc was for; Dave Airlie finally clued me in that it was the 'normal' buffer objects with kernel allocated pages that could be mmapped from the drm device file. I thought that 'drm_bo_type_device' was a more descriptive name. I also added a bunch of comments describing the use of the type enum values and the functions that use them.
2007-12-21Rename inappropriately named 'mask' fields to 'proposed_flags' instead.Keith Packard
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-21Use dummy_read_page for unpopulated kernel-allocated ttm pages.Keith Packard
Previously, dummy_read_page was used only for read-only user allocations; it filled in pages that were not present in the user address map (presumably, these were allocated but never written to pages). This patch allows them to be used for read-only ttms allocated from the kernel, so that applications can over-allocate buffers without forcing every page to be allocated.
2007-12-21Move dummy_read_page from drm_ttm_set_user to drm_ttm_create.Keith Packard
I'm hoping to use the dummy_read_page for kernel allocated buffers to avoid allocating extra pages for read-only buffers (like vertex and batch buffers). This also eliminates the 'write' parameter to drm_ttm_set_user and just has DRM_TTM_PAGE_WRITE passed into drm_ttm_create.
2007-12-21Clean up and document drm_ttm.c APIs. drm_bind_ttm -> drm_ttm_bind.Keith Packard
Aside from changing drm_bind_ttm to drm_ttm_bind, this patch adds only documentation and fixes the functions inside drm_ttm.c to all be prefixed with drm_ttm_.
2007-12-15Document drm_bo_handle_validate. Match drm_bo_do_validate parameter order.Keith Packard
Document parameters and usage for drm_bo_handle_validate. Change parameter order to match drm_bo_do_validate (fence_class has been moved to after flags, hint and mask values). Existing users of this function have been changed, but out-of-tree users must be modified separately.
2007-12-15Document drm_bo_do_validate. Remove spurious 'do_wait' parameter.Keith Packard
Add comments about the parameters to drm_bo_do_validate, along with comments for the DRM_BO_HINT options. Remove the 'do_wait' parameter as it is duplicated by DRM_BO_HINT_DONT_BLOCK.
2007-12-15Make ttm create/destroy APIs consistent. Pass page_flags in create.Keith Packard
Creating a ttm was done with drm_ttm_init while destruction was done with drm_destroy_ttm. Renaming these to drm_ttm_create and drm_ttm_destroy makes their use clearer. Passing page_flags to the create function will allow that to know whether user or kernel pages are needed, with the goal of allowing kernel ttms to be saved for later reuse.
2007-11-15mm fixups.Thomas Hellstrom
2007-11-05drm/ttm: kernel coding style for bo.c and objects.hDave Airlie
2007-11-05drm: remove lots of spurious whitespace.Dave Airlie
Kernel "cleanfile" script run.
2007-11-02User buffer support.Thomas Hellstrom
2007-10-30drm/i915: add driver cache flush entry pointDave Airlie
Use clflush on Intel hardware to flush cached objects.
2007-10-26Buffer flags and masks are 64-bit.Thomas Hellstrom
don't mask off the high dword. Signed-off-by: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
2007-10-25Buffer manager:Thomas Hellstrom
Implement a version check IOCTL for drivers that don't use drmMMInit from user-space. Remove the minor check from the kernel code. That's really up to the driver. Bump major.
2007-10-20Simple replacement for hardware lock in some cases.Thomas Hellstrom
Fix i915 since last commit.
2007-10-19No fence_class argument on drmBOSetStatus since it's notThomas Hellstrom
associated with a particular command submission.
2007-10-17Remove the op ioctl, and replace it with a setuser ioctl.Thomas Hellstrom
Remove need for lock for now. May create races when we clean memory areas or on takedown. Needs to be fixed. Really do a validate on buffer creation in order to avoid problems with fixed memory buffers.
2007-10-17Revert "Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to ↵Thomas Hellstrom
set pinning." This reverts cf2d569daca6954d11a796f4d110148ae2e0c827 commit.
2007-10-16Revert part of earlier commit that caused an unresolved symbol for i915.Michel Dänzer
2007-10-16Drop destroy ioctls for fences and buffer objects.Kristian Høgsberg
We now always create a drm_ref_object for user objects and this is then the only things that holds a reference to the user object. This way unreference on will destroy the user object when the last drm_ref_object goes way.
2007-10-16Take bo type argument out of the ioctl interface.Kristian Høgsberg
The buffer object type is still tracked internally, but it is no longer part of the user space visible ioctl interface. If the bo create ioctl specifies a non-NULL buffer address we assume drm_bo_type_user, otherwise drm_bo_type_dc. Kernel side allocations call drm_buffer_object_create() directly and can still specify drm_bo_type_kernel. Not 100% this makes sense either, but with this patch, the buffer type is no longer exported and we can clean up the internals later on.
2007-09-25Merge branch 'master' into pre-superioctl-branchThomas Hellstrom
Conflicts: linux-core/drm_bo.c linux-core/drm_fence.c linux-core/drm_objects.h shared-core/drm.h
2007-09-25drm/ttm: fixup fence class naming and interfacesDave Airlie
This is some code for nouveau that Ben Skeggs worked on, and also fixes the naming (having class in a system header file == C++ keyword == bad plan)
2007-09-22Add fence error member.Thomas Hellstrom
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-08-16Merge branch 'master' into bo-set-pinEric Anholt
2007-08-06Export some useful ttm functions to drivers.Ben Skeggs
2007-07-26Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning.Eric Anholt
This cleans up the create/validate interfaces for this very uncommon path, and makes pinned object creation much easier to use for the X Server.
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt
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-16drm: remove drm_ref_tDave Airlie
2007-07-16drm: detypedef ttm/bo/fence codeDave Airlie
2007-07-16drm: remove hashtab/sman and object typedefsDave Airlie
2007-07-16drm: remove drmP.h internal typedefsDave Airlie
2007-07-16drm: remove ttm userspace typedefsDave Airlie
2007-07-11Merge branch 'master' into cleanupDave Airlie
Conflicts: libdrm/xf86drm.c linux-core/drm_bo.c linux-core/drm_fence.c
2007-06-29Fence object reference / dereference cleanup.Thomas Hellstrom
Buffer object dereference cleanup. Add a struct drm_device member to fence objects: This can simplify code, particularly in drivers.
2007-06-15Locking fixes and instrumentation.Thomas Hellstrom
2007-06-13Make sure we read fence->signaled while spinlocked.Thomas Hellstrom
2007-06-12Try to make buffer object / fence object ioctl args 64-bit safe.Thomas Hellstrom
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-05-26Revert "drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls."Dave Airlie
This reverts commit 3fdef0dc2000308b16907b95f637c60acde80a74. ditto not on master yet
2007-05-26Revert "drm/ttm: cleanup most of fence ioctl split out"Dave Airlie
This reverts commit 3dfc1400e9fc58c69292d7cf7c2e1653fa5e6991. this shouldn't have gone on master yet
2007-05-26drm/ttm: cleanup most of fence ioctl split outDave Airlie