diff mbox

drm: update the documentation of drm_framebuffer_unregister_private

Message ID 1477915196-100299-1-git-send-email-zourongrong@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rongrong Zou Oct. 31, 2016, 11:59 a.m. UTC
Add obvious description to drm_framebuffer_unregister_private()
to explain it is deprecated.

Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
---
 drivers/gpu/drm/drm_framebuffer.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Daniel Vetter Nov. 8, 2016, 9:39 a.m. UTC | #1
On Mon, Oct 31, 2016 at 07:59:56PM +0800, Rongrong Zou wrote:
> Add obvious description to drm_framebuffer_unregister_private()
> to explain it is deprecated.
> 
> Signed-off-by: Rongrong Zou <zourongrong@gmail.com>
> ---
>  drivers/gpu/drm/drm_framebuffer.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> index 398efd6..d2b0507 100644
> --- a/drivers/gpu/drm/drm_framebuffer.c
> +++ b/drivers/gpu/drm/drm_framebuffer.c
> @@ -751,6 +751,11 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
>   * those used for fbdev. Note that the caller must hold a reference of it's own,
>   * i.e. the object may not be destroyed through this call (since it'll lead to a
>   * locking inversion).
> + *
> + * NOTE: This function is deprecated. For driver-private framebuffers it is not
> + * recommended to embed a framebuffer struct info fbdev struct, instead, a
> + * framebuffer pointer is preferred and drm_framebuffer_unreference() should be
> + * called when the framebuffer is to be cleaned up.

Awesome, kerneldoc updates for stuff we discussed, I really like this.
Thanks for submitting your patch, applied to drm-misc.
-Daniel

>   */
>  void drm_framebuffer_unregister_private(struct drm_framebuffer *fb)
>  {
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 398efd6..d2b0507 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -751,6 +751,11 @@  struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
  * those used for fbdev. Note that the caller must hold a reference of it's own,
  * i.e. the object may not be destroyed through this call (since it'll lead to a
  * locking inversion).
+ *
+ * NOTE: This function is deprecated. For driver-private framebuffers it is not
+ * recommended to embed a framebuffer struct info fbdev struct, instead, a
+ * framebuffer pointer is preferred and drm_framebuffer_unreference() should be
+ * called when the framebuffer is to be cleaned up.
  */
 void drm_framebuffer_unregister_private(struct drm_framebuffer *fb)
 {