Displaying 2 results from an estimated 2 matches for "nouveau_dmabuf_ops".
2012 Nov 22
0
[resend PATCH] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...buf *nouveau_gem_prime_export(struct drm_device *dev,
{
struct nouveau_bo *nvbo = nouveau_gem_object(obj);
int ret = 0;
+ struct dma_buf *buf;
/* pin buffer into GTT */
ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT);
if (ret)
return ERR_PTR(-EINVAL);
- return dma_buf_export(nvbo, &nouveau_dmabuf_ops, obj->size, flags);
+ buf = dma_buf_export(nvbo, &nouveau_dmabuf_ops, obj->size, flags);
+ if (IS_ERR(buf))
+ nouveau_bo_unpin(nvbo);
+ return buf;
}
struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev,
2012 Oct 12
0
[PATCH 3/3, resend with fixed to field] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...buf *nouveau_gem_prime_export(struct drm_device *dev,
{
struct nouveau_bo *nvbo = nouveau_gem_object(obj);
int ret = 0;
+ struct dma_buf *buf;
/* pin buffer into GTT */
ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT);
if (ret)
return ERR_PTR(-EINVAL);
- return dma_buf_export(nvbo, &nouveau_dmabuf_ops, obj->size, flags);
+ buf = dma_buf_export(nvbo, &nouveau_dmabuf_ops, obj->size, flags);
+ if (IS_ERR(buf))
+ nouveau_bo_unpin(nvbo);
+ return buf;
}
struct drm_gem_object *nouveau_gem_prime_import(struct drm_device *dev,