From patchwork Tue Jan 9 10:09:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 123854 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp266678edr; Tue, 9 Jan 2018 02:10:15 -0800 (PST) X-Google-Smtp-Source: ACJfBourXRoahX3OWdrvV9Dz7kSFCPGjXxJwj4/cGnr+p21MEcIu1rRfFQ2UoSKRph3UibQKZ7RY X-Received: by 10.98.214.7 with SMTP id r7mr1511252pfg.213.1515492615428; Tue, 09 Jan 2018 02:10:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515492615; cv=none; d=google.com; s=arc-20160816; b=sXure7LIy5A/IIMHy6f7I+Dj06OBS1NW/UZz3sVwhqOeRUTgbhj4DtCm57uEOuoU7O Gkn9/3c7ix9HjVe2C45ccFZsdt8p3IX4pposogZt/VH/knCd7sfnQw1yFtf7061j7NTz KIKVoUK97sKtHApPFv7qNbAY4UP+SuQ7br7M3c/p376cdRuKaogpVhn7TCA7mH0NHODz iSAiM2vqDRCej1+6Q1Jp4Dpotc2nyrZlaW1JAylkjBPxv/w+Izd+0PF4nFg4z/eFHji3 Bes3EoiOLyCpstFisWt1HCbJzbV3G9Os+dfOXwSCxyWfrIBikjSdAzSIThe+dX0kmjqw fQBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=93wVv08wTZJT2vYZVRD1BeAsyyyD3HWl0sPxin0Y7k4=; b=zrWl5oLBkETg4jWDApIsW912q6IBSvU1+37Mzmf4QsU79OGSrRauA/+NLVJwrQGAr0 kLgZGpqsC6w9U8Yu8Nv3mWOO+oexgmAtfaD440hYCIfQtOeyOmCHnRz59kajDk+KDAwU yhmdC66ZvjwudiSPMTz6hij1l9s+6Hf4CIHojOJN70SVnd9quk17ziIi8BPyYmtb7tr3 +qlI4fzAbgC1VAhItbQIGLkncnoKR6I2EwN+JtF+fxbix5chuujYDNa/sgMCuXsMu0P2 aG2OrpBKK6rAJr9VhrQ9+b8etlSXFjTQlrhcEhW5gbcXFS3+LkD1oHmWR6NaFmdpPymJ DsvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g11si8852902pgu.683.2018.01.09.02.10.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 02:10:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52B1B6E01C; Tue, 9 Jan 2018 10:09:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 30A696E0B8 for ; Tue, 9 Jan 2018 10:09:42 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id A7387203B7; Tue, 9 Jan 2018 11:09:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 740C52046F; Tue, 9 Jan 2018 11:09:29 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 02/13] drm/sun4i: backend: Document the engine operations Date: Tue, 9 Jan 2018 11:09:15 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Thomas Petazzoni , narmstrong@baylibre.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl 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" Our operations were missing some documentation to explain what was expected from them. Let's make that clearer. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sunxi_engine.h | 46 +++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h index 4cb70ae65c79..b374e074c7c3 100644 --- a/drivers/gpu/drm/sun4i/sunxi_engine.h +++ b/drivers/gpu/drm/sun4i/sunxi_engine.h @@ -15,12 +15,58 @@ struct drm_device; struct sunxi_engine; +/** + * struct sunxi_engine_ops - helper operations for sunXi engines + * + * These hooks are used by the common part of the DRM driver to + * implement the proper behaviour. + */ struct sunxi_engine_ops { + /** + * @commit: + * + * This callback will trigger the hardware switch to commit + * the new configuration that has been setup during the next + * vblank period. + * + * This function is optional. + */ void (*commit)(struct sunxi_engine *engine); + + /** + * @layers_init: + * + * This callback is used to allocate, initialize and register + * the layers supported by that engine. + * + * This function is mandatory. + * + * RETURNS: + * + * The array of struct drm_plane backing the layers, or an + * error pointer on failure. + */ struct drm_plane **(*layers_init)(struct drm_device *drm, struct sunxi_engine *engine); + /** + * @apply_color_correction: + * + * This callback will enable the color correction in the + * engine. This is useful only for the composite output. + * + * This function is optional. + */ void (*apply_color_correction)(struct sunxi_engine *engine); + + /** + * @disable_color_correction: + * + * This callback will stop the color correction in the + * engine. This is useful only for the composite output. + * + * This function is optional. + */ void (*disable_color_correction)(struct sunxi_engine *engine); };