Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp902255rdb; Wed, 6 Dec 2023 03:21:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnUYSwbvWpB6j0BTG30SEaIlrnsIUvoCv3NH4zarZQTIHF+M9PzN8SinrpFCQUQCLuJGDj X-Received: by 2002:a17:90a:1d6:b0:286:77c2:6027 with SMTP id 22-20020a17090a01d600b0028677c26027mr732131pjd.36.1701861679822; Wed, 06 Dec 2023 03:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701861679; cv=none; d=google.com; s=arc-20160816; b=H2WiID+QrCxSeD1B0yydbZ7xMKiIDnAKLFMmh7IzJUcn4x4oWQqfDpy1lMmDY4dDqD p/Lf1GDvZAGSM3xHDUBRbg9jCKmNQhaCCShFkZELFSOPFs2BcYin67iRtRGQ2n5asWcg sd8fsoK43Gx8SXRZvnRo/1tleY7iKfwxrmnkmJjRqwqdb/H+JymAEhYK+L7UWZEbaCiX 7a8yGdsJW389CiwAFChyvme6PyE5aJe6JQ24JKfkrgJq8kS+UIX93WUYpI+yJts3u8lg I0WzL4vcMkkk7sd6IbCYPaPS41YdHAVdueMrMrRbAkT+jbbMUbFlqFGySogwm+RNTW2Y 1Xig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=sSdTv0i4bUliSboAjjcoXHAOvyJ/eKu+nTjzoGCOVms=; fh=XQFg0SWwAuqFJ1ucPzyzcHdnkajPg2WZzF19M+/Btxg=; b=l6jmKcPio70bfedtJlGZ6Xt90SMRFTMjkHXbbkLcOwJmlukelpKmxKOVoiWFzrtGMg 5wZ3Bh61/kC3gcVLq1l1KZyQkVRho29vGF1N41SXPcIXmsGX4KWKKWUWP2UvRMnM5U77 nzjZwy9Avs72I/JaenpQjpgBoFu8dz2gyWMuOnbieMGu4qzqOAFPMCMjzSR6oYokkq0W Kio+ostjTN3+1n3npAe6ABHhHSDfzdidw/HJprZrRBETbhaE50H1zcdzTsn+cA4kXF5z GNYPLZLA2bcIw9KAL464yhnleUpz32Pwoep4uAy32TKNNJGZ9VoP01L+OiuFruHxeLDh Vcgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id d21-20020a170902aa9500b001cfdb94ee48si5350705plr.376.2023.12.06.03.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 03:21:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 06D8481A73F0; Wed, 6 Dec 2023 03:21:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378173AbjLFLVD (ORCPT + 99 others); Wed, 6 Dec 2023 06:21:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378049AbjLFLVC (ORCPT ); Wed, 6 Dec 2023 06:21:02 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDFC9C3 for ; Wed, 6 Dec 2023 03:21:04 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rApxY-0001hA-I4; Wed, 06 Dec 2023 12:20:56 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rApxV-00Dwmh-8D; Wed, 06 Dec 2023 12:20:53 +0100 Received: from sha by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rApxV-005XuA-5K; Wed, 06 Dec 2023 12:20:53 +0100 Date: Wed, 6 Dec 2023 12:20:53 +0100 From: Sascha Hauer To: Andy Yan Cc: Andy Yan , heiko@sntech.de, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, kever.yang@rock-chips.com, chris.obbard@collabora.com Subject: Re: [PATCH v3 12/14] drm/rockchip: vop2: Add debugfs support Message-ID: <20231206112053.GA1318922@pengutronix.de> References: <20231130122001.12474-1-andyshrk@163.com> <20231130122449.13432-1-andyshrk@163.com> <20231205091541.GV1057032@pengutronix.de> <593f1092-3f5b-42ab-bc6e-dbd0fc8fb8ba@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <593f1092-3f5b-42ab-bc6e-dbd0fc8fb8ba@rock-chips.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 06 Dec 2023 03:21:17 -0800 (PST) On Wed, Dec 06, 2023 at 06:20:58PM +0800, Andy Yan wrote: > Hi Sascha: > > > > + unsigned int n = vop2->data->regs_dump_size; > > > > 'n' is used only once, it might be clearer just to use the value where > > needed and drop the extra variable. > > Okay, will do. > > > > > + unsigned int i; > > > + > > > + drm_modeset_lock_all(drm_dev); > > > + > > > + if (vop2->enable_count) { > > > + for (i = 0; i < n; i++) { > > > + dump = &vop2->data->regs_dump[i]; > > > + vop2_regs_print(vop2, s, dump, false); > > > + } > > > + } else { > > > + seq_printf(s, "VOP disabled:\n"); > > > > There's nothing following after the ':', right? Then this should be > > "VOP: disabled\n" or without the colon at all. > > the colon will be droped in next versin. > > > > > > + } > > > + drm_modeset_unlock_all(drm_dev); > > > > This code is repeated in vop2_active_regs_show() below. Maybe factor > > this out to a common function? > > > > > Do you mean all the code between drm_modeset_lock_all and drm_modeset_unlock_all ? Including drm_modeset_lock_all() and drm_modeset_unlock_all(), yes. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |