aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2017-01-07 03:52:11 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-01-09 05:24:16 -0500
commit931c670d209b64a6033c1a2857ff309eee88f9c8 (patch)
treeb2618de534e01cc501f10453e75c16d4df7aa2d5
parenta09759e82f2d60823027e9d3391bbea40f919604 (diff)
drm: add more document for drm_crtc_from_index()
Add a bit more document for function drm_crtc_from_index() to cross link it with drm_crtc_from_index(), and explain that the function is useful in vblank code. While at it, add cross link comment for drm_plane_from_index() as well. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1483779131-19935-1-git-send-email-shawnguo@kernel.org
-rw-r--r--drivers/gpu/drm/drm_crtc.c5
-rw-r--r--drivers/gpu/drm/drm_plane.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 75e0beeb3793..bd3c8b243447 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -52,7 +52,10 @@
52 * @idx: index of registered CRTC to find for 52 * @idx: index of registered CRTC to find for
53 * 53 *
54 * Given a CRTC index, return the registered CRTC from DRM device's 54 * Given a CRTC index, return the registered CRTC from DRM device's
55 * list of CRTCs with matching index. 55 * list of CRTCs with matching index. This is the inverse of drm_crtc_index().
56 * It's useful in the vblank callbacks (like &drm_driver.enable_vblank or
57 * &drm_driver.disable_vblank), since that still deals with indices instead
58 * of pointers to &struct drm_crtc."
56 */ 59 */
57struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx) 60struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx)
58{ 61{
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 7b7275f0c2df..eed66be18329 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -254,7 +254,7 @@ EXPORT_SYMBOL(drm_plane_cleanup);
254 * @idx: index of registered plane to find for 254 * @idx: index of registered plane to find for
255 * 255 *
256 * Given a plane index, return the registered plane from DRM device's 256 * Given a plane index, return the registered plane from DRM device's
257 * list of planes with matching index. 257 * list of planes with matching index. This is the inverse of drm_plane_index().
258 */ 258 */
259struct drm_plane * 259struct drm_plane *
260drm_plane_from_index(struct drm_device *dev, int idx) 260drm_plane_from_index(struct drm_device *dev, int idx)