From patchwork Thu May 12 12:58:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 9080711 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA3CF9F1C3 for ; Thu, 12 May 2016 12:58:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB1F020218 for ; Thu, 12 May 2016 12:58:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D1942201EC for ; Thu, 12 May 2016 12:58:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5CF3F6E881; Thu, 12 May 2016 12:58:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D7AA6E87F for ; Thu, 12 May 2016 12:58:53 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 12 May 2016 05:58:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,610,1455004800"; d="scan'208";a="978352254" Received: from unknown (HELO ivy.ger.corp.intel.com) ([10.252.41.38]) by fmsmga002.fm.intel.com with ESMTP; 12 May 2016 05:58:28 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Thu, 12 May 2016 13:58:12 +0100 Message-Id: <1463057892-26178-7-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1463057892-26178-1-git-send-email-lionel.g.landwerlin@intel.com> References: <1463057892-26178-1-git-send-email-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 6/6] lib/igt_kms: add some missing documentation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v2: Fix comment typo Signed-off-by: Lionel Landwerlin --- lib/igt_kms.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 85755b9..10a8cf9 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -2164,6 +2164,13 @@ void igt_output_override_mode(igt_output_t *output, drmModeModeInfo *mode) output->use_override_mode = true; } +/** + * igt_output_set_pipe: + * @output: Output which the pipe will be attached to + * @pipe: Pipe to attach to the output + * + * Attach a pipe to an output. + */ void igt_output_set_pipe(igt_output_t *output, enum pipe pipe) { igt_display_t *display = output->display; @@ -2186,6 +2193,13 @@ igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane plane) return igt_pipe_get_plane(pipe, plane); } +/** + * igt_plane_set_fb: + * @plane: Plane which the framebuffer with be attached to + * @fb: Framebuffer to attach to the plane + * + * Attach a framebufer to a plane. + */ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) { igt_pipe_t *pipe = plane->pipe; @@ -2215,6 +2229,14 @@ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) plane->size_changed = true; } +/** + * igt_plane_set_position: + * @plane: A plane + * @x: New X position of the plane + * @y: New Y position of the plane + * + * Set position of a plane. + */ void igt_plane_set_position(igt_plane_t *plane, int x, int y) { igt_pipe_t *pipe = plane->pipe; @@ -2304,6 +2326,15 @@ void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane, plane->fb_changed = true; } +/** + * igt_pipe_set_panning: + * @plane: A plane on which to set the panning + * @x: X panning + * @y: Y panning + * + * Sets the panning of a plane. The new panning will be committed at + * plane commit time via drmModeSetCrtc(). + */ void igt_plane_set_panning(igt_plane_t *plane, int x, int y) { igt_pipe_t *pipe = plane->pipe; @@ -2335,6 +2366,13 @@ static const char *rotation_name(igt_rotation_t rotation) } } +/** + * igt_pipe_set_rotation: + * @plane: A plane on which to set the rotation + * @rotation: + * + * Sets the rotation of a plane. + */ void igt_plane_set_rotation(igt_plane_t *plane, igt_rotation_t rotation) { igt_pipe_t *pipe = plane->pipe; @@ -2366,6 +2404,17 @@ igt_pipe_replace_blob(igt_pipe_t *pipe, uint64_t *blob, void *ptr, size_t length *blob = blob_id; } +/** + * igt_pipe_set_degamma_lut: + * @pipe: A pipe on which to set a gamma LUT + * @ptr: A pointer to an array of #drm_color_lut elements + * @size: The length of the array in bytes or 0 + * + * Sets a degamma LUT onto the pipe. A new DRM blob is created to hold + * the degamma LUT and the data pointed by ptr is copied into it. The + * previous DRM blob set on the pipe is destroyed. Call this function + * with size = 0 to disable the degamma LUT on @pipe. + */ void igt_pipe_set_degamma_lut(igt_pipe_t *pipe, void *ptr, size_t length) { @@ -2373,6 +2422,18 @@ igt_pipe_set_degamma_lut(igt_pipe_t *pipe, void *ptr, size_t length) pipe->color_mgmt_changed = 1; } +/** + * igt_pipe_set_ctm_matrix: + * @pipe: A pipe on which to set a transformation matrix + * @ptr: A pointer to a #drm_color_ctm structure + * @size: The size of the #drm_color_ctm structure or 0 + * + * Sets a transformation matrix onto the pipe. A new DRM blob is + * created to hold the matrix and the data pointed by ptr is copied + * into it. The previous DRM blob set on the pipe is destroyed. Call + * this function with size = 0 to disable the transformation matrix on + * @pipe. + */ void igt_pipe_set_ctm_matrix(igt_pipe_t *pipe, void *ptr, size_t length) { @@ -2380,6 +2441,17 @@ igt_pipe_set_ctm_matrix(igt_pipe_t *pipe, void *ptr, size_t length) pipe->color_mgmt_changed = 1; } +/** + * igt_pipe_set_gamma_lut: + * @pipe: A pipe on which to set a gamma LUT + * @ptr: A pointer to an array of #drm_color_lut elements + * @size: The length of the array in bytes or 0 + * + * Sets a gamma LUT onto the pipe. A new DRM blob is created to hold + * the gamma LUT and the data pointed by ptr is copied into it. The + * previous DRM blob set on the pipe is destroyed. Call this function + * with size = 0 to disable the gamma LUT on @pipe. + */ void igt_pipe_set_gamma_lut(igt_pipe_t *pipe, void *ptr, size_t length) {