summaryrefslogtreecommitdiff
path: root/linux-core/drm_gem.c
AgeCommit message (Collapse)Author
2008-08-11drm: add OS_HAS_GEM option.Dave Airlie
To build i915 driver pass OS_HAS_GEM=1 to make for now
2008-06-13[intel-gem] add gtt and pin counts to /proc/dri/*/gem_objectsKeith Packard
Not quite portable, but these are useful for intel. Some more general mechanism could be done...
2008-06-11[gem] Move potentially device-specific ioctls to the intel driver.Eric Anholt
This is the create (may want location flags), pread/pwrite/mmap (performance tuning hints), and set_domain (will 32 bits be enough for everyone?) ioctls. Left in the generic set are just flink/open/close. The 2D driver must be updated for this change, and API but not ABI is broken for 3D. The driver version is bumped to mark this.
2008-06-10[gem] Manage the ringbuffer from the kernel in the GEM case.Eric Anholt
This requires that the X Server use the execbuf interface for buffer submission, as it no longer has direct access to the ring. This is therefore a flag day for the gem interface. This also adds enter/leavevt ioctls for use by the X Server. These would get stubbed out in a modesetting implementation, but are required while in an environment where the device's state is only managed by the DRM while X has the VT.
2008-05-27[intel-gem] Replace idlelock usage with real lock acquisition.Eric Anholt
2008-05-22[gem] Use CPU domain for new or pageable objectsKeith Packard
Newly allocated objects need to be in the CPU domain as they've just been cleared by the CPU. Also, unmapping objects from the GTT needs to put them into the CPU domain, both to flush rendering as well as to ensure that any paging action gets flushed before we remap to the GTT.
2008-05-15[gem] Hold dev->struct_mutex to protect structure data.Eric Anholt
2008-05-15[gem] typo fix in comment.Eric Anholt
2008-05-12[gem] Set write domain to CPU when doing pwrite.Keith Packard
Leave the flush call in place, which can fix domains up if necessary.
2008-05-11[GEM] Make pread/pwrite manage memory domains. No luck with movnti though.Keith Packard
pread and pwrite must update the memory domains to ensure consistency with the GPU. At some point, it should be possible to avoid clflush through this path, but that isn't working for me.
2008-05-09[gem] API cleanup. allocate->create unreference->close name->flinkKeith Packard
Make the API names a bit more consistent.
2008-05-08Clean up whinging from checkpatch.pl in drm_gem.cKeith Packard
Whitespace changes, a few too-long-lines and some extra braces.
2008-05-08[intel-gem] Move domains to relocation records. add set_domain ioctl.Keith Packard
Domain information is about buffer relationships, not buffer contents. That means a relocation contains the domain information as it knows how the source buffer references the target buffer. This also adds the set_domain ioctl so that user space can move buffers to the cpu domain.
2008-05-07Apply a few stylistic cleanups to match kernel code.Arjan van de Ven
2008-05-06[intel-GEM] Add memory domain support.Keith Packard
Memory domains allow the kernel to track which caches to flush and how to move objects before buffer execution.
2008-05-06Start coding up memory domainsKeith Packard
2008-05-02Check for do_mmap errorsKeith Packard
2008-05-02Add a bit of /proc/dri/*/gem support. Clean up some refcount/pagelock issues.Keith Packard
Track named objects in /proc/dri/0/gem_names. Track total object count in /proc/dri/0/gem_objects. Initialize device gem data. return -ENODEV for gem ioctls if the driver doesn't support gem. Call unlock_page when unbinding from gtt. Add numerous misssing calls to drm_gem_object_unreference.
2008-05-02Add name/open ioctls, separate handle and pointer ref counts.Keith Packard
Names are just another unique integer set (from another idr object). Names are removed when the user refernces (handles) are all destroyed -- this required that handles for objects be counted separately from internal kernel references (so that we can tell when the handles are all gone).
2008-05-02Remove drm_driver argument to functions taking drm_gem_object.Keith Packard
Now that drm_gem_object has a drm_driver * in it, functions don't need both parameters.
2008-05-01Fix gem ioctls to be 32/64-bit clean.Keith Packard
mixed 32/64 bit systems need 'special' help for ioctl where the user-space and kernel-space datatypes differ. Fixing the datatypes to be the same size, and align the same way for both 32 and 64-bit ppc and x86 environments will elimiante the need to have magic 32/64-bit ioctl translation code.
2008-05-01Use krefs for refcounting.Keith Packard
krefs are way easier than a custom-coded spinlock+int combo.
2008-05-01Fix missing member settings in obj/obj_priv, and some error paths.Eric Anholt
2008-05-01Make GEM object handles be nonzero.Eric Anholt
2008-05-01Remove _args from gem ioctl argument structure tags.Eric Anholt
2008-05-01checkpoint: relocations support.Eric Anholt
2008-05-01checkpoint: gtt binding written.Eric Anholt
2008-05-01checkpoint: rename to GEM and a few more i915 bits.Eric Anholt