Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3062971pxb; Mon, 18 Oct 2021 07:32:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTB75otEVNXJRPpIRk7SgB/Ck5W6A3de2bHLtBCjg17M/zW0uMfhTyZb1LnWv8UmTDVxx5 X-Received: by 2002:a17:906:f24c:: with SMTP id gy12mr29912336ejb.478.1634567528204; Mon, 18 Oct 2021 07:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634567528; cv=none; d=google.com; s=arc-20160816; b=CYb042nyytXl09AAmUrLo6qe4EHvjF83fDeaTf4qUii2fcnyWhHTl1VWDtW+pQ7VuV +/yn4YCMKsHAw4BQBhp2W3vTJcaZGLbu9rqQcWpXWx9jSBMr0NlM7t0uzPVyuFMO1OcK 0FeaVJ98k3JlyphGTCwj2FgbVo+fZsLMJq6oizT6TnYutQt3a3AZFiCh7p5cnWFgiuzR ihIOs3B8Z8taWKg1xn+z/dRmS+16ceng/Tc692zqXi8e96unC46iVNEXG6VndVU72wU/ qdd7ESpmuGA23CCltPToCO2YIDhePHuIDXPHbCfgMws/8styIc+yRQ/rW+qguNPiPc2Z e5/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lIVpyuu3eqZnfVh+BWlIEt1O3BS03uxO8GKG4EQyBdY=; b=Evo/m92BOav5HAG6I4/nS0qnIPb9TBDK+3l6TCEwvqk0CF5wbeJBN2iV2ammlf+6Rh 3TCKpUU0OA8e70QlitSS/FokjVOvkj9zpUY3a/dwK6qwZ46OPWz/p4lfmv6KIax10neg UXvr6WwV6Rcn8knwzEGc58WAbNOA3W9khchJl6Bgeh3b1LW/wGgxGXfHDlj27IVKGC33 XaZX4GndJg/+CxRCRfcVuJ1IZJzJ8Dwnk1o+jo2wqDVkgdayFrFYWsLQJeYJzLjMgRwc M4Jf5jy/AIVz/c3EcPf9ZWcPDceIB2xvMPsBPelWrNZVs7uVqiqDXByuVAhFoaSC6FKW y56Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="gH/1sgob"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de10si18657639ejc.33.2021.10.18.07.31.42; Mon, 18 Oct 2021 07:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="gH/1sgob"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232454AbhJROb3 (ORCPT + 99 others); Mon, 18 Oct 2021 10:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232059AbhJRObJ (ORCPT ); Mon, 18 Oct 2021 10:31:09 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4655FC061770 for ; Mon, 18 Oct 2021 07:28:55 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id r10so41718009wra.12 for ; Mon, 18 Oct 2021 07:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lIVpyuu3eqZnfVh+BWlIEt1O3BS03uxO8GKG4EQyBdY=; b=gH/1sgob/dAMXDnK1Zij+GCFUd7n9iU8KyIM0JWJOd9CN13vDFG9eQWDrkNMfK3uee aA2hbaiFfVm3iyuF3xUh9Wq/RbP9LJb6zb+qACAsNEa3JW/b5VYklxKXGGMVZiMbjhDd lNmoC9znCiWNaDokDrt2ZQUmSU00CENQqlrAYHXiGGpIDZw60grXFUL+ZU8XGXZ7jIj7 SMMXcz6RZTdp6vEy7vHj/8IfDVggwPNisSYbJD4lspL5uMTQxTtzWD8ZOZ8JE1WzmVIY zaX+/DMnL1hV7cEKr6LfeM1e3EylhE/Y19tu8oMkSnODkXTevV1vxwoP6qAUZdjvSOSa gG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lIVpyuu3eqZnfVh+BWlIEt1O3BS03uxO8GKG4EQyBdY=; b=1lxo+EPy06fg+MFBzgcY99li0ImfsZ9OZXbZ2shfqKe/N6QJ3A8qyJNlblAlOu3XXG bWtNBcBR8oaXT0f8CIR7DXhnIGTG9uUI0clvKsPgcXSLodYmayEUJ2pPyq7g/4H8Q7Mr cfuA3/XqtukwS/IDoQh4gHYqaNqqxI4Z2ZSeofKHiu7ygRoAkRwqjKfxBcTX7bYDDI2t JR/2HTG+/2huITxcwPHLaTwQEpCpP2SdlKyBkPZRSP0ORqyi4j2wNfEgeYSC/0mUteIt NxmeOv1jL3dGK5PK1AwzXn0wsXTVzJ0IeJlaqF3YngC0o+z8Gy06WF/l1tIg4cOl5Czf r6uA== X-Gm-Message-State: AOAM533dDFLo7sA284k+ihA0bfEpk3F4NHhB0benQ0254PGeuOSq32vH 4kSmXbTnGEofRTkHCJVvu0ueQw== X-Received: by 2002:a05:6000:184c:: with SMTP id c12mr36506967wri.127.1634567333786; Mon, 18 Oct 2021 07:28:53 -0700 (PDT) Received: from localhost.localdomain ([2001:861:44c0:66c0:2dd7:d5eb:6e87:f924]) by smtp.gmail.com with ESMTPSA id b3sm12908495wrp.52.2021.10.18.07.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 07:28:53 -0700 (PDT) From: Neil Armstrong To: tomba@kernel.org Cc: linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, Benoit Parrot , Neil Armstrong Subject: [PATCH v6 8/9] drm/omap: add plane_atomic_print_state support Date: Mon, 18 Oct 2021 16:28:41 +0200 Message-Id: <20211018142842.2511200-9-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211018142842.2511200-1-narmstrong@baylibre.com> References: <20211018142842.2511200-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1792; i=narmstrong@baylibre.com; h=from:subject; bh=WJUnfDMOqyIY/JyZJij5vnFH7gBqBRnpbS9bv6xbZYw=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBhbYSGNhJeWiEgCa74ngEwWcJR2N3i4688rynOukR8 uHZQBLWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCYW2EhgAKCRB33NvayMhJ0bFAEA CZPKHg2+39aPe3f5tZvn5JlQz4R0qTMoABfNZbVbQfeOVaG4gzYlXccrk592IxEZ0xovQT5MySrA0C 96Ncrj3I11amYmcLbSHtW+9jI5IoHTMvO/2BXFqC/HeQdJZMfb+D7Rmuw9+EAMGyjA5SKTLA2pvjdV yEzWHdIh3X10E0Pi1MtFk2qRAbTwMfEO0Nb2RJdPdrfenTb8Tx1K4dmE7cFVhzDVXdJs9UxeZViNN9 oq0H2wxSBkqnB5yZEeOXuNW/8zv3QyEufxUitip0H6jTgUQm7pAYQ0UOSarrnW7OLtQbYYwzDuSHd7 +hXrPld4d7pujE+zAhZan4YmyvQFJxF18xOqnh6LANTsvgriz4mCFrv2ylN/v+RDONOkSFe2Z2tMnh rlDGaFUnkiULCtObooXMZk0s2odxgPFLEPX0QIZc354DTERybRWGQKfLB6Ft0FFbBc8DN9UXyLGyqz fK5pWZiCiw7MKLJ9LkFATzR285rBnv419Z7ZA6L8XPrNdbmEcJJ5ZWAsrzkR3BRjkdR5oDpl7aqTnO ajKHJcvA4Gyz+Mt5LOTCOGe0wFDMQMOIzFAe2/JTF0CPOzIZRgtRUOhNFvhaGfY3lh3M7EMooJDY06 Oer5vjgRzt/R1IHLToLhMXFFi+TltDRYqYPWRZixUxR1TmGwrF7lnvoNrEPg== X-Developer-Key: i=narmstrong@baylibre.com; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benoit Parrot Now that we added specific item to our subclassed drm_plane_state we can add omap_plane_atomic_print_state() helper to dump out our own driver specific plane state. Signed-off-by: Benoit Parrot Signed-off-by: Neil Armstrong --- drivers/gpu/drm/omapdrm/omap_plane.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index ce5ed45401fb..5001c8354e4f 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -348,6 +348,21 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane) return &state->base; } +static void omap_plane_atomic_print_state(struct drm_printer *p, + const struct drm_plane_state *state) +{ + struct omap_plane_state *omap_state = to_omap_plane_state(state); + + drm_printf(p, "\toverlay=%s\n", omap_state->overlay ? + omap_state->overlay->name : "(null)"); + if (omap_state->overlay) { + drm_printf(p, "\t\tidx=%d\n", omap_state->overlay->idx); + drm_printf(p, "\t\toverlay_id=%d\n", + omap_state->overlay->id); + drm_printf(p, "\t\tcaps=0x%x\n", omap_state->overlay->caps); + } +} + static int omap_plane_atomic_set_property(struct drm_plane *plane, struct drm_plane_state *state, struct drm_property *property, @@ -387,6 +402,7 @@ static const struct drm_plane_funcs omap_plane_funcs = { .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_set_property = omap_plane_atomic_set_property, .atomic_get_property = omap_plane_atomic_get_property, + .atomic_print_state = omap_plane_atomic_print_state, }; static bool omap_plane_supports_yuv(struct drm_plane *plane) -- 2.25.1