From patchwork Wed Mar 23 11:38:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 8649351 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8631C0553 for ; Wed, 23 Mar 2016 11:38:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB7E320340 for ; Wed, 23 Mar 2016 11:38:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E55FC203B0 for ; Wed, 23 Mar 2016 11:38:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2964A6E078; Wed, 23 Mar 2016 11:38:25 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id 111C16E078 for ; Wed, 23 Mar 2016 11:38:21 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 23 Mar 2016 04:38:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,382,1455004800"; d="scan'208";a="71754827" Received: from twilberg-mobl3.ger.corp.intel.com (HELO ivy.ger.corp.intel.com) ([10.252.35.168]) by fmsmga004.fm.intel.com with ESMTP; 23 Mar 2016 04:38:20 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Mar 2016 11:38:10 +0000 Message-Id: <1458733090-25768-8-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1458733090-25768-1-git-send-email-lionel.g.landwerlin@intel.com> References: <1458733090-25768-1-git-send-email-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 7/7] 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 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 1e0585f..ded614f 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -2092,6 +2092,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; @@ -2114,6 +2121,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; @@ -2143,6 +2157,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; @@ -2232,6 +2254,15 @@ void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane, plane->fb_changed = true; } +/** + * igt_pipe_set_rotation: + * @plane: A plane on which to set the panning + * @x: x + * @y: y + * + * 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; @@ -2263,6 +2294,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; @@ -2294,6 +2332,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) { @@ -2301,6 +2350,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) { @@ -2308,6 +2369,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) {