summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_gem.h
Commit message (Collapse)AuthorAgeFilesLines
* drm: Update GEM refcounting docsDaniel Vetter2015-11-241-14/+92
| | | | | | | | | | | | | | I just realized that I've forgotten to update all the gem refcounting docs. For pennance also add pretty docs for the overall drm_gem_object structure, with a few links thrown in fore good. As usually we need to make sure the kerneldoc reference is at most a sect2 for otherwise it won't be listed. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1445533889-7661-1-git-send-email-daniel.vetter@ffwll.ch Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/gem: Check locking in drm_gem_object_unreferenceDaniel Vetter2015-10-191-1/+4
| | | | | | | | | | | | | Pretty soon only some drivers will need dev->struct_mutex in their gem_free_object callbacks. Hence it's really important to make sure everything still keeps getting this right. v2: Don't check for locking before we check for non-NULL obj. Spotted by Dan Carpenter. Link: http://mid.gmane.org/1444894601-5200-10-git-send-email-daniel.vetter@ffwll.ch Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* drm: Use kref_put_mutex in drm_gem_object_unreference_unlockedMaarten Lankhorst2015-04-071-6/+8
| | | | | | | | | | If kref_put_mutex returns true then the caller or the put function is responsible for unlocking the mutex. The usual pattern assumes that the free callback unlocks the mutex, but since that is shared with the locked variant we need to explicitly unlock here. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Revert "drm/gem: Warn on illegal use of the dumb buffer interface v2"Dave Airlie2014-12-241-7/+0
| | | | | | | | | This reverts commit 355a70183848f21198e9f6296bd646df3478a26d. This had some bad side effects under normal operation, and should have been dropped earlier. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/gem: Warn on illegal use of the dumb buffer interface v2Thomas Hellstrom2014-11-211-0/+7
| | | | | | | | | | | | | | | | | | | It happens on occasion that developers of generic user-space applications abuse the dumb buffer API to get hold of drm buffers that they can both mmap() and use for GPU acceleration, using the assumptions that dumb buffers and buffers available for GPU are a) The same type and can be aribtrarily type-casted. b) fully coherent. This patch makes the most widely used drivers warn nicely when that happens, the next step will be to fail. v2: Move drmP.h changes to drm_gem.h. Fix Radeon dumb mmap breakage. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Extract <drm/drm_gem.h>Daniel Vetter2014-09-241-0/+183
v2: Don't forget git add, noticed by David. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud