Dear Rob,
Am Montag, den 23.07.2012, 18:07 -0500 schrieb Rob Clark: > From: Rob Clark <r...@ti.com> > > The GEM handle takes the reference. If a driver is actually importing a > foreign dmabuf, rather than just re-importing it's own dmabuf, it needs > to do a get_dma_buf(). > > Signed-off-by: Rob Clark <r...@ti.com> > --- > drivers/gpu/drm/drm_prime.c | 7 +++++++ > drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 4 ++++ > drivers/gpu/drm/i915/i915_gem_dmabuf.c | 4 ++++ > drivers/gpu/drm/nouveau/nouveau_prime.c | 5 +++++ > drivers/gpu/drm/radeon/radeon_prime.c | 4 ++++ > drivers/gpu/drm/udl/udl_gem.c | 4 ++++ > 6 files changed, 28 insertions(+) > > diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c > index 4f80374..088e018 100644 > --- a/drivers/gpu/drm/drm_prime.c > +++ b/drivers/gpu/drm/drm_prime.c > @@ -185,6 +185,13 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev, > mutex_unlock(&file_priv->prime.lock); > drm_gem_object_unreference_unlocked(obj); > > + /* > + * Drop the ref we obtained w/ dma_buf_get() for the benefit of > + * drivers simply re-importing their own dma-buf.. if drivers Is that supposed to be an ellipse or a full stop? > + * import a foreign dma-buf, they should get_dma_buf(). Would s,should,should use, be better? > + */ > + dma_buf_put(dma_buf); > + > return 0; > > fail: […] Thanks, Paul
signature.asc
Description: This is a digitally signed message part
_______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel