mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
drm: Update drm_device docs about embedding.
It's supported now! Spotted while reviewing Chris' patch to add a release hook. Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20161208102847.3063-1-daniel.vetter@ffwll.ch
This commit is contained in:
parent
72a93e8dd5
commit
d82faafd81
1 changed files with 7 additions and 4 deletions
|
@ -323,9 +323,8 @@ void drm_minor_release(struct drm_minor *minor)
|
||||||
* historical baggage. Hence use the reference counting provided by
|
* historical baggage. Hence use the reference counting provided by
|
||||||
* drm_dev_ref() and drm_dev_unref() only carefully.
|
* drm_dev_ref() and drm_dev_unref() only carefully.
|
||||||
*
|
*
|
||||||
* Also note that embedding of &drm_device is currently not (yet) supported (but
|
* It is recommended that drivers embed struct &drm_device into their own device
|
||||||
* it would be easy to add). Drivers can store driver-private data in the
|
* structure, which is supported through drm_dev_init().
|
||||||
* dev_priv field of &drm_device.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -462,7 +461,11 @@ static void drm_fs_inode_free(struct inode *inode)
|
||||||
* Note that for purely virtual devices @parent can be NULL.
|
* Note that for purely virtual devices @parent can be NULL.
|
||||||
*
|
*
|
||||||
* Drivers that do not want to allocate their own device struct
|
* Drivers that do not want to allocate their own device struct
|
||||||
* embedding struct &drm_device can call drm_dev_alloc() instead.
|
* embedding struct &drm_device can call drm_dev_alloc() instead. For drivers
|
||||||
|
* that do embed struct &drm_device it must be placed first in the overall
|
||||||
|
* structure, and the overall structure must be allocated using kmalloc(): The
|
||||||
|
* drm core's release function unconditionally calls kfree() on the @dev pointer
|
||||||
|
* when the final reference is released.
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
* 0 on success, or error code on failure.
|
* 0 on success, or error code on failure.
|
||||||
|
|
Loading…
Reference in a new issue