浏览代码

drm/plane: add inline doc for struct drm_plane

Some of the members of struct drm_plane had extra comments so for these
add inline kernel comment to consolidate all documentation in one place.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
[danvet: Bikeshed a bit more to have real paragraphs with real
sentences.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-4-git-send-email-gustavo@padovan.org
Gustavo Padovan 8 年之前
父节点
当前提交
3835b46e55
共有 1 个文件被更改,包括 44 次插入14 次删除
  1. 44 14
      include/drm/drm_plane.h

+ 44 - 14
include/drm/drm_plane.h

@@ -32,11 +32,6 @@ struct drm_crtc;
 /**
 /**
  * struct drm_plane_state - mutable plane state
  * struct drm_plane_state - mutable plane state
  * @plane: backpointer to the plane
  * @plane: backpointer to the plane
- * @crtc: currently bound CRTC, NULL if disabled
- * @fb: currently bound framebuffer
- * @fence: optional fence to wait for before scanning out @fb
- * @crtc_x: left position of visible portion of plane on crtc
- * @crtc_y: upper position of visible portion of plane on crtc
  * @crtc_w: width of visible portion of plane on crtc
  * @crtc_w: width of visible portion of plane on crtc
  * @crtc_h: height of visible portion of plane on crtc
  * @crtc_h: height of visible portion of plane on crtc
  * @src_x: left position of visible portion of plane within
  * @src_x: left position of visible portion of plane within
@@ -51,18 +46,51 @@ struct drm_crtc;
  *	where N is the number of active planes for given crtc
  *	where N is the number of active planes for given crtc
  * @src: clipped source coordinates of the plane (in 16.16)
  * @src: clipped source coordinates of the plane (in 16.16)
  * @dst: clipped destination coordinates of the plane
  * @dst: clipped destination coordinates of the plane
- * @visible: visibility of the plane
  * @state: backpointer to global drm_atomic_state
  * @state: backpointer to global drm_atomic_state
  */
  */
 struct drm_plane_state {
 struct drm_plane_state {
 	struct drm_plane *plane;
 	struct drm_plane *plane;
 
 
-	struct drm_crtc *crtc;   /* do not write directly, use drm_atomic_set_crtc_for_plane() */
-	struct drm_framebuffer *fb;  /* do not write directly, use drm_atomic_set_fb_for_plane() */
-	struct dma_fence *fence; /* do not write directly, use drm_atomic_set_fence_for_plane() */
+	/**
+	 * @crtc:
+	 *
+	 * Currently bound CRTC, NULL if disabled. Do not this write directly,
+	 * use drm_atomic_set_crtc_for_plane()
+	 */
+	struct drm_crtc *crtc;
+
+	/**
+	 * @fb:
+	 *
+	 * Currently bound framebuffer. Do not write this directly, use
+	 * drm_atomic_set_fb_for_plane()
+	 */
+	struct drm_framebuffer *fb;
+
+	/**
+	 * @fence:
+	 *
+	 * Optional fence to wait for before scanning out @fb. Do not write this
+	 * directly, use drm_atomic_set_fence_for_plane()
+	 */
+	struct dma_fence *fence;
+
+	/**
+	 * @crtc_x:
+	 *
+	 * Left position of visible portion of plane on crtc, signed dest
+	 * location allows it to be partially off screen.
+	 */
+
+	int32_t crtc_x;
+	/**
+	 * @crtc_y:
+	 *
+	 * Upper position of visible portion of plane on crtc, signed dest
+	 * location allows it to be partially off screen.
+	 */
+	int32_t crtc_y;
 
 
-	/* Signed dest location allows it to be partially off screen */
-	int32_t crtc_x, crtc_y;
 	uint32_t crtc_w, crtc_h;
 	uint32_t crtc_w, crtc_h;
 
 
 	/* Source values are 16.16 fixed point */
 	/* Source values are 16.16 fixed point */
@@ -79,9 +107,11 @@ struct drm_plane_state {
 	/* Clipped coordinates */
 	/* Clipped coordinates */
 	struct drm_rect src, dst;
 	struct drm_rect src, dst;
 
 
-	/*
-	 * Is the plane actually visible? Can be false even
-	 * if fb!=NULL and crtc!=NULL, due to clipping.
+	/**
+	 * @visible:
+	 *
+	 * Visibility of the plane. This can be false even if fb!=NULL and
+	 * crtc!=NULL, due to clipping.
 	 */
 	 */
 	bool visible;
 	bool visible;