summaryrefslogtreecommitdiff
path: root/libdrm
AgeCommit message (Collapse)Author
2009-08-17radeon: fix bo wait at map time.Dave Airlie
2009-08-15radeon: fix GTT writing space checkDave Airlie
Noticed by vehemens on irc. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-05link libdrm_intel with -lrt for new use of clock_gettime().Anssi Hannula
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-08-01libdrm_radeon: add tiling supportDave Airlie
2009-08-01radeon: don't map/unmap explicitly.Dave Airlie
This caches the mapping and just use mapping as a sync point
2009-07-28nouveau: don't overwrite user-specified bo size needlesslyBen Skeggs
2009-07-28nouveau: user buffers need to be mappableBen Skeggs
2009-07-28nouveau: drm api 0.0.15, update object header, remove fake bo supportBen Skeggs
2009-07-27libdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which ↵Maarten Maathuis
inbalances cpu_prep/cpu_finish - The bo was mapped with sysmem == NULL, so this means cpu prep is called. - The bo was unmapped with sysmem != NULL, so this means cpu finish is not called. - This can lead to a non-zero "cpu writers" count in ttm_bo.
2009-07-09intel: Free buffers in the BO cache that haven't been reused in a while.Eric Anholt
The goal of the BO cache is to keep buffers on hand for fast continuous use, as in every frame of a game or every batchbuffer of the X Server. Keeping older buffers on hand not only doesn't serve this purpose, it may hurt performance by resulting in disk cache getting kicked out, or even driving the system to swap. Bug #20766.
2009-07-09nouveau: fix pin for buffers created with bo_wrapBen Skeggs
2009-07-06libdrm: Make chown check for return valuePauli Nieminen
If call was interrupted by signal we have to make call again. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-07-06intel: Fix up math errors when allocating very large BOs.Eric Anholt
The logbase2 would overflow and wrap the size around to 0, making the code allocate a 4kb object instead. By simplifying the code to just walk the 14-entry bucket array comparing sizes instead of indexing on ffs(1 << logbase2(size)), we avoid silly math errors and have code of approximately the same speed. Many thanks to Simon Farnsworth for debugging and providing a working patch. Bug #27365.
2009-07-06intel: fix compiler warning about returning a void value.Edward O'Callaghan
bug #21999
2009-07-06libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned ↵Pauli Nieminen
integers.
2009-07-06strcasecmp is in strings.h.Ian Romanick
Based on patch by Pauli Nieminen. Thanks.
2009-07-06radeon: move cs space checking code to libdrm_radeon.Dave Airlie
This ports a lot of the space checking code into a the common library, so that the DDX and mesa can use it.
2009-07-03radeon: fix cs buffer realloc paddingJerome Glisse
We always realloc at least 0x1000 dwords (page on most system) when growing the cs buffer this is to avoid having to realloc at each cs_begin.
2009-07-03radeon: fix realloc of packets.Dave Airlie
This should use ndw not cdw, using cdw leads to realloc alignment going wrong
2009-07-02radeon: add buffer naming functionDave Airlie
2009-06-30radeon: add support for write followed by read relocs.Dave Airlie
the DDX does this and used to handle it internally
2009-06-17libdrm/radeon: add initial libdrm_radeonDave Airlie
requires --enable-radeon-experimental-api for now
2009-06-05nouveau: 0.0.14 + extend bo interface to support subrange mappingBen Skeggs
Normal map() should operate as before, and map_range()/map_flush() should give correct results but lacking any performance difference from map(). Nothing exiting being done here yet, but the interface is a good start.
2009-06-04nouveau: fix bo mapping issueBen Skeggs
2009-06-03nouveau: fill in bo->tiled field for referenced buffersBen Skeggs
Fixes the dri1 gallium driver if the front buffer happens to be non-linear.
2009-05-26nouveau: bump for 0.0.13Ben Skeggs
2009-05-19intel: quiet a warning.Eric Anholt
2009-05-19intel: Only do BO caching up to 64MB objects.Eric Anholt
This avoids making objects significantly bigger than they would be otherwise, which would result in some failing at binding to the GTT. Found from firefox hanging on: http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg due to a software fallback trying to do a GTT-mapped copy between two 73MB BOs that were instead each 128MB, and failing because both couldn't fit simultaneously. The cost here is that we get no opportunity to cache these objects and avoid the mapping. But since the objects are a significant percentage of the aperture size, each mapped access is likely having to fault and rebind the object most of the time anyway. Bug #20152 (2/3)
2009-05-14libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure.Keith Packard
The convention is that all APIs are per-bufmgr, so make this one the same. Then, have it return -1 on failure so that the application can know what's going on and do something sensible. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-14Add new drm_intel_get_pipe_from_crtc_id function.Carl Worth
This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl, allowing applications to discover the pipe number corresponding to a given CRTC ID. This is necessary for doing pipe-specific operations such as waiting for vblank on a given CRTC.
2009-05-12libdrm/intel: add drm_intel_bo_disable_reuse apiKeith Packard
Scanout buffers need to be freed through the kernel as it holds a reference to them; exposing this API allows applications allocating scanout buffers to flag them as not reusable. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2009-05-09Delete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.amAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-01libdrm/intel: assert that clients are using bo refcounting correctlyKeith Packard
Add assertions to drm_intel_gem_bo_reference, drm_intel_gem_bo_reference_locked and drm_intel_gem_bo_unreference_locked that the object has not been freed (refcount > 0). Mistakes in refcounting lead to attempts to insert a bo into a free list more than once which causes application failure as empty free lists are dereferenced as buffer objects. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-04-27intel: NULL fake bo block when freeing in evict_allJesse Barnes
Fixes assertion failures on later use of the object.
2009-04-22libdrm/mode: align subpixel resultsDave Airlie
2009-04-17nouveau: write posting got lost somewhere, bring it backBen Skeggs
2009-04-15nouveau: store bo handle in public struct in bo_ref_handleBen Skeggs
2009-04-10Revert "libdrm: speed up connector & mode fetching"Jesse Barnes
This reverts commit cd5c66c659168cbe2e3229ebf8be79f764ed0ee1. It broke too many kernel assumptions about the double ioctl (connector status, mode fetching, etc.)
2009-03-30libdrm: speed up connector & mode fetchingJesse Barnes
This patch speeds up drmModeGetConnector by pre-allocating mode & property info space before calling into the kernel.  In many cases this pre-allocation will be sufficient to hold the returned values (it's easy enough to tweak if the common case becomes larger), which means we don't have to make the second call, which saves a lot of time. Acked-by: Jakob Bornecrantz <wallbraker@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-03-26libdrm/intel: support GTT maps correctlyJesse Barnes
libdrm has some support for GTT mapping already, but there are bugs with it (no surprise since it hasn't been used much). In fixing 20803, I found that sharing bo_gem->virtual was a bad idea, since a previously mapped object might not end up getting GTT mapped, leading to corruption. So this patch splits the fields according to use, taking care to unmap both at free time (but preserving the map caching). There's still a risk we might run out of mappings (there's a sysctl tunable for max number of mappings per process, defaulted to 64k or so it looks like) but at least GTT maps will work with these changes (and some others for fixing PAT breakage in the kernel). Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-03-25libdrm/nouveau: fix typo in nouveau_device_close()Ben Skeggs
2009-03-20libdrm/nouveau: ask the kernel for vram/gart aperture sizesBen Skeggs
2009-03-20libdrm/nouveau: remove unneccesary null ptr checksBen Skeggs
2009-03-20libdrm/nouveau: incr refcount on ref fence before decr on old fenceBen Skeggs
2009-03-20libdrm/nouveau: unref fences when deleting boMaarten Maathuis
- This was causing a significant memory leak.
2009-03-18libdrm/nouveau: implement bo_handle_get for !mm_enabledBen Skeggs
bo_handle_ref on !mm_enabled treats handle as an offset, make bo_handle_get do the same rather than failing.
2009-03-16libdrm_nouveau: The handle that is passed to mmap needs to be drm_handle_tRobert Noland
drm_handle_t is defined to be a u32 on linux and a u64 on everything else. This addresses an issue on FreeBSD amd64 where the map offsets may be greater than 32bits. When the handle is cast to 32bit, mmap cannot match the requested map and causes X to crash. This should be a NOOP on linux since drm_handle_t is always 32bit. Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-02-27intel: Update reloc_tree_size of the first buffer when we count the tree size.Eric Anholt
This helps avoid the n^2 performance cost of counting tree size when we get a lot of relocations into our batch buffer. rgb10text on keithp's laptop went from 136k glyphs/sec to 234k glyphs/sec.
2009-02-24intel: Don't copy dirty data out when freeing a BO in the fake bufmgr.Eric Anholt
2009-02-24nouveau: Dist nouvea_dma.h as well.Kristian Høgsberg
Oops. Disting is hard.