From patchwork Mon Nov 7 10:03:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9414661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24C726048F for ; Mon, 7 Nov 2016 10:24:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15A7C28C7B for ; Mon, 7 Nov 2016 10:24:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A71328D04; Mon, 7 Nov 2016 10:24:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 89DBD28C7B for ; Mon, 7 Nov 2016 10:23:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D74CD6E35B; Mon, 7 Nov 2016 10:23:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7FA5D6E352 for ; Mon, 7 Nov 2016 10:23:57 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id n85so15793429pfi.3 for ; Mon, 07 Nov 2016 02:23:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bwGz5WiV29IUjnd5cHPYb8IrH3XOE4OuBqA6sEQg7EI=; b=DO0ELh1YDMN/+WMzh9/XdSXX5xH5//a4BrVbTIbaMaVuuXC2w7sDKPqlxciE13o3Un aYDmV0277fYgcOVzPvfmsfbIGIcg36t02qWBsDlnFynTrOwirOu77S6mRg+QdjeOpnTq B6e0pSOueXxRP3/aGnstodJikwKktVdMCV4JcfEjyj44OtUffiOZRGha8c1j5ztUrpaL Q7sPds+xENyLSsNpEUHFxsd7Y6zx9JJk03a+7BDHlq5whJ81GvtI4uXZ0wAAAC4DI40r fw1jl/DVS1RjPnotC8sQDUo+mIrvRSorDQMMhc2yQXqUKOMIEIBhDLztLY3/2us6zMpn L5+Q== X-Gm-Message-State: ABUngveXIU/eSTx3coq3X1GAWTT2LrQKUITwgJ5LA8czA/DclN4FULaJC4JlFhx+BVt52A== X-Received: by 10.99.217.21 with SMTP id r21mr9598214pgg.78.1478513026773; Mon, 07 Nov 2016 02:03:46 -0800 (PST) Received: from jade.nodan1.kt.home.ne.jp (122-255-138-194.koalanet.ne.jp. [122.255.138.194]) by smtp.gmail.com with ESMTPSA id 188sm38992638pfd.9.2016.11.07.02.03.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 02:03:46 -0800 (PST) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 4/4] drm/plane: add inline doc for struct drm_plane Date: Mon, 7 Nov 2016 19:03:33 +0900 Message-Id: <1478513013-3221-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478513013-3221-1-git-send-email-gustavo@padovan.org> References: <1478513013-3221-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan 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 --- include/drm/drm_plane.h | 61 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 68f6d22..683b170 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -32,11 +32,6 @@ struct drm_crtc; /** * struct drm_plane_state - mutable plane state * @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_h: height of visible portion of plane on crtc * @src_x: left position of visible portion of plane within @@ -51,18 +46,56 @@ struct drm_crtc; * where N is the number of active planes for given crtc * @src: clipped source coordinates of the plane (in 16.16) * @dst: clipped destination coordinates of the plane - * @visible: visibility of the plane * @state: backpointer to global drm_atomic_state */ struct drm_plane_state { 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 write directly, use drm_atomic_set_crtc_for_plane() + */ + struct drm_crtc *crtc; + + /** + * @fb: + * + * currently bound framebuffer + * + * do not write 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 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; /* Source values are 16.16 fixed point */ @@ -79,7 +112,11 @@ struct drm_plane_state { /* Clipped coordinates */ struct drm_rect src, dst; - /* + /** + * @visible: + * + * visibility of the plane + * * Is the plane actually visible? Can be false even * if fb!=NULL and crtc!=NULL, due to clipping. */