Received: by 10.223.176.46 with SMTP id f43csp2685929wra; Mon, 22 Jan 2018 01:34:52 -0800 (PST) X-Google-Smtp-Source: AH8x226zDzCG+IKV5E1OEYSLgO6JwDrN00j808sI/GStdBV6em9gBiWJoG9pWl0CLXnSBTNNFNyq X-Received: by 10.99.164.74 with SMTP id c10mr6664652pgp.18.1516613692557; Mon, 22 Jan 2018 01:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516613692; cv=none; d=google.com; s=arc-20160816; b=omRDMACJBGMeHBp9fRS68tibPQGlTeHxefY5PF2vA3YUkopg8pCn4uC+1qLB1pgUj/ 8kVwrnykR7lK8V8oJ7wKRNoVKLcSMR37jO5IncK1WVeH8BOdkVxLU8tQdJJWFe/t3KkI pz1uE34dEivAFmjj9SoWpmRcqWEuFDLdW3dR5mpX3altgjhbJd+t0pYfV7wHSgnohRyS +789fEkHcVo41cmYm3lEFcT3cJbdfwmKZInD4gpuu92x04DPSjbsVJyC4WtFrvcaFaWK mbKpMCfUfb2t/o2szZhQpgJZfFiEO0VAtrf38Ptlz2VYRnxe2IGi1jJUGFVJuy2MxKrA ezTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=DYM+Q18xYI8toSomVemNI87JAQnm42XU07nADiej9dU=; b=Taa8m7JP7oB9gfYKqwnxkuR/huqdFek71VoFtrAmMBEHCTsr9LfbjgTXmcERxNZPlU LJ4egs4TKHYcc/rLbNdLiG4HbPqJ8rDv3dCXtDotlNpRnzJnHrxAXnABOfkAzhlePAo9 nql6kB+0F0t89PaX9XdLYIq9YFAqMZCvCmfQ8DYEPEq8GaCmsMtMfuONkodqRENbNhKa j6YUUZ1ROMjNYSnzRvzhGZy54Sly3FF7rcdaqpD4Fcn0u0rPxhI/6ha2J6sunQS8k6Gb ibwOFgB9Bo1dpL1Qn9wc5IZCfE+qXkWgW9dgeZcVlRCefY2YVChwo8rwBILv4msSuj7d j45A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61-v6si848810plr.132.2018.01.22.01.34.38; Mon, 22 Jan 2018 01:34:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752131AbeAVJde (ORCPT + 99 others); Mon, 22 Jan 2018 04:33:34 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:44091 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbeAVJZl (ORCPT ); Mon, 22 Jan 2018 04:25:41 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 47A9D206A4; Mon, 22 Jan 2018 10:25:40 +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 19257206F0; Mon, 22 Jan 2018 10:25:30 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com, thomas@vitsch.nl Subject: [PATCH v4 02/13] drm/sun4i: backend: Document the engine operations Date: Mon, 22 Jan 2018 10:25:16 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); }; -- git-series 0.9.1