diff mbox

[i-g-t,2/5] lib: add documentation for igt_display_init/fini

Message ID 1446485133-13529-2-git-send-email-thomas.wood@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Wood Nov. 2, 2015, 5:25 p.m. UTC
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 lib/igt_kms.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 51d735d..878e1fb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -962,6 +962,15 @@  static int get_drm_plane_type(int drm_fd, uint32_t plane_id)
 	return DRM_PLANE_TYPE_OVERLAY;
 }
 
+/**
+ * igt_display_init:
+ * @display: a pointer to an #igt_display_t structure
+ * @drm_fd: a drm file descriptor
+ *
+ * Initialize @display and allocate the various resources required. Use
+ * #igt_display_fini to release the resources when they are no longer required.
+ *
+ */
 void igt_display_init(igt_display_t *display, int drm_fd)
 {
 	drmModeRes *resources;
@@ -1160,6 +1169,13 @@  static void igt_output_fini(igt_output_t *output)
 	free(output->name);
 }
 
+/**
+ * igt_display_fini:
+ * @display: a pointer to an #igt_display_t structure
+ *
+ * Release any resources associated with @display. This does not free @display
+ * itself.
+ */
 void igt_display_fini(igt_display_t *display)
 {
 	int i;