Skip to content

Commit

Permalink
drm/prime: add a bit of documentation about gem_obj->import_attach
Browse files Browse the repository at this point in the history
Lifetime rules seem to be solid around ->import_attach. So this patch
just properly documents them.

Note that pointing directly at the attachment might have issues for
devices that have multiple struct device *dev parts constituting the
logical gpu and so might need multiple attachment points. Similarly
for drm devices which don't need a dma attachment at all (like udl).

But fixing that up is material for different patches.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Aug 19, 2013
1 parent 01ce605 commit 7106bf9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,16 @@ struct drm_gem_object {
/* dma buf exported from this GEM object */
struct dma_buf *export_dma_buf;

/* dma buf attachment backing this object */
/**
* import_attach - dma buf attachment backing this object
*
* Any foreign dma_buf imported as a gem object has this set to the
* attachment point for the device. This is invariant over the lifetime
* of a gem object.
*
* The driver's ->gem_free_object callback is responsible for cleaning
* up the dma_buf attachment and references acquired at import time.
*/
struct dma_buf_attachment *import_attach;
};

Expand Down

0 comments on commit 7106bf9

Please sign in to comment.