提交 f46640b9 编写于 作者: M Maarten Lankhorst

drm/atomic: Return commit in drm_crtc_commit_get for better annotation

This will allow code to do x->commit = drm_crtc_commit_get(commit),
making it clearer where references are used.
Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-5-maarten.lankhorst@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 b44d5c0c
......@@ -1633,8 +1633,7 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock)
return -EBUSY;
}
} else if (i == 1) {
stall_commit = commit;
drm_crtc_commit_get(stall_commit);
stall_commit = drm_crtc_commit_get(commit);
break;
}
......
......@@ -252,10 +252,14 @@ void __drm_crtc_commit_free(struct kref *kref);
* @commit: CRTC commit
*
* Increases the reference of @commit.
*
* Returns:
* The pointer to @commit, with reference increased.
*/
static inline void drm_crtc_commit_get(struct drm_crtc_commit *commit)
static inline struct drm_crtc_commit *drm_crtc_commit_get(struct drm_crtc_commit *commit)
{
kref_get(&commit->ref);
return commit;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册