Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1205941lqh; Sun, 5 May 2024 23:22:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMT8BlSnSrs+x6hW83SjrMSw827MkMSHtcAj3UsZTZzxQMdONFTXqnuDxWqdDQOrOwAjwh4MgAPQS6GGche5Gcn9TgENWx5lyha4Payw== X-Google-Smtp-Source: AGHT+IEWUtqEjbJJ5Z2N2mITXDnlojwwkhXhIkbIbHHA+syiac+tzjPRSltiaU21HyvEPF1huVGC X-Received: by 2002:a05:6808:f13:b0:3c9:6992:8798 with SMTP id m19-20020a0568080f1300b003c969928798mr3266429oiw.40.1714976567513; Sun, 05 May 2024 23:22:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714976567; cv=pass; d=google.com; s=arc-20160816; b=CY6EKl3lVDDXdf09OcE6pkAT2JKtYW3Jm52cAiboDzIdKmGz1/o1DBQDc5sE5ZJe9m m03zMmx4SJe1hN88XCg0T5o4yqOxcxopJmkRK2jsF1cus4bCp954hjS+e6FcUPrRN6ga hi+Byl9oLBqMzS2m5ASfjFTrFQ3kpT2I8qzOdyk0QnkO7AcDDb997DiovJQWrC+VXXpw DhEtb0NlJkyd4rNK7Que4BPGpP74T9w0f2TakKeioosavkIE/bF7peAzvCaCaZssd7d7 6ugcxqcZjWMQ3h2xQFk3pwuKaGXj2LKBcovf5rcTGDtxKFwTbACAGEBe9IQg8W0j8b/B iabw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=FsyQW7L2aio+heYVCfqR/1RRN8HWBrCF5UqXa3eqZP0=; fh=352li4a55wDn7xRrIJYKVz2gVhvl7l9zlE7xx5QHCVc=; b=GL+nv5/QVsCX5JVPs7RYBFhGgoXq2hBPuPMsShXWHQgUAAG0kvYxR07iyCrJZO0d1v LBInVkMXfnPvV+OSWNbVogenlVgm3upqP1dTBuW2QM53Uwv5ikYHrOtq1oaYVxzn1Fe6 axXBb7fab6onV1SfUA2HQQ4gntdj9TUzkjNHEIzXIpET3SXlSg5Liw2l+wRV+q7NE2qx 5/iuYEuVSjt1dmPZYi57Bq7GWh5iAJOZMorrDyWOPOHnUxPCM6eE3QUts2M4hZotAYql 8X1bay7p7C0AdMEevqpmptbMWNgOMAtcNCA81rPu6a1UCQKTj1nNzg3ealCVlhvSnzD3 ZQWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XIqSHEK/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-169354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s9-20020a05620a0bc900b0078d6b9ec511si9224228qki.648.2024.05.05.23.22.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 23:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XIqSHEK/"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-169354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3024F1C21218 for ; Mon, 6 May 2024 06:22:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D78814D10A; Mon, 6 May 2024 06:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XIqSHEK/" Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B88E19479 for ; Mon, 6 May 2024 06:22:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714976561; cv=none; b=AMONVeaXfcxLcAtqRaAJLNPzcIfUWpEyLoZ5PoIgyMGsnPtYOz1RMwblbSrC21lsvkecQRqr9ub2aldFctor7pgGbkHbRiYYFnUNcCAuw7354hdEwUVxr3wf5tbLTF0oX1xcoUfJiuCG9whutIrbdw17VpCB7GBpkja4+fh57f0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714976561; c=relaxed/simple; bh=ASZY3sO9TthL1S1IUjkTKbcukLzic6teWrFlyJrkjt0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KhVlNKgR4So1EgCjLMA44+hSDsVesmtcDRCmvnaVw/J1Uq+TNvA+ppjEGAcazxNh2YIA7p9fxGaEoIjsP7Gta7DZmukCLj3FBanm7odSEJbu9rzm8URnbobhffxVLVgyKSWNPBklJRgEwArZAYqQbiZiliu3UB0W1KE7Udcej0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XIqSHEK/; arc=none smtp.client-ip=209.85.219.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-de45385a1b4so1407009276.3 for ; Sun, 05 May 2024 23:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714976558; x=1715581358; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FsyQW7L2aio+heYVCfqR/1RRN8HWBrCF5UqXa3eqZP0=; b=XIqSHEK/cCMaphhM7b2GRoVy+NTbYwITZ7A6kgN8/6DUMozv6TQcGHsAJrWZIWIKCQ q1F6l0/L4XxJ+O/f2zSGNuhek6kkK0d3xdnKIEovA462WTKJVp+AuwuumH4P4K/ou+58 HyBU01SdfJn87dyF323eU2FusCdaYwr8F7pqxgYs+8kepxZmVbKQA76uodU/qYXMKp3R xc9eiy/zt0iH+DgE4AUK3FFaS2efFi31kWAJJbR3tN78SE7ZY5pV9RFxBTKSR0ReWPSc CscFzXtF3Aql5Zf3iJp/F8JfauRj+Mo+c052C4CAd6y+xsu4mf9N3iKxhdd7DmyMj4ty 5ALw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714976558; x=1715581358; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FsyQW7L2aio+heYVCfqR/1RRN8HWBrCF5UqXa3eqZP0=; b=k9ugHfDvAKTT1ZpvcyLu+RiHL7fhOLDwdzbQR7UQ8EWQRmMpKuyd38e3ulls4tNtQG A4/a24U7g7PuFDlFx+2Zo1RbzhbPXp2NY/3BFAp4BRLAFFk4hl9LFvFZwQJ4LZJKwot2 QC0UOoYARYTWGCQUm/D62qYa8NU/G29dSnY9E1OkajjXiL2YeOuL79mb39BbxSH4GXmj t08AfhNRbEIbImg2s8j8XQd8SKR+/J/OEQnWckqxiu7A2LPopvCmbJlf0J7A5uvj59N9 I+CJ9tuMGOG9oKIsf7nw+pbsIP703Al0Op6uEXNaNlTBnAPXeBCyll7jUZUNmvzDWPxs /7+w== X-Forwarded-Encrypted: i=1; AJvYcCUu8Te/IDehdlmPFEojfxkqfYH0B2PBSXiis7sapX/HJOXpy4zKocNI9BOXURoukB2l8wQBQM7MhUGoii0f787HklGtjqWXoPxC7lcU X-Gm-Message-State: AOJu0YyrEZWBWhJjdeKZ5u7xkAH3MhJamtlaqMhfGIJEZ/nS0SeygxgA hpRPXiPvCyhMM8GqK8Pf1FG2Alc1/87JkyBgb4LiNRzZMKbJg5AQf2jX+McYePmtwHBLn3quNSr iZkmhJIkjw+9LtpFXp/wXRkgzrct7zbKwLO59zA== X-Received: by 2002:a25:6b47:0:b0:de6:17eb:3cb5 with SMTP id o7-20020a256b47000000b00de617eb3cb5mr9929018ybm.10.1714976558680; Sun, 05 May 2024 23:22:38 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240501154251.3302887-1-dianders@chromium.org> <20240501084109.v3.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid> In-Reply-To: <20240501084109.v3.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid> From: Linus Walleij Date: Mon, 6 May 2024 08:22:27 +0200 Message-ID: Subject: Re: [PATCH v3 5/9] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() To: Douglas Anderson Cc: dri-devel@lists.freedesktop.org, Jani Nikula , Dmitry Baryshkov , Cong Yang , Hsin-Yi Wang , Brian Norris , Sam Ravnborg , Neil Armstrong , Javier Martinez Canillas , Joel Selvaraj , lvzhaoxiong@huaqin.corp-partner.google.com, Daniel Vetter , David Airlie , Jonathan Corbet , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 1, 2024 at 5:43=E2=80=AFPM Douglas Anderson wrote: > The current mipi_dsi_*_write_seq() macros are non-intutitive because > they contain a hidden "return" statement that will return out of the > _caller_ of the macro. Let's mark them as deprecated and instead > introduce some new macros that are more intuitive. > > These new macros are less optimal when an error occurs but should > behave more optimally when there is no error. Specifically these new > macros cause smaller code to get generated and the code size savings > (less to fetch from RAM, less cache space used, less RAM used) are > important. Since the error case isn't something we need to optimize > for and these new macros are easier to understand and more flexible, > they should be used. > > After converting to use these new functions, one example shows some > nice savings while also being easier to understand. > > $ scripts/bloat-o-meter \ > ...after/panel-novatek-nt36672e.ko \ > ...ctx/panel-novatek-nt36672e.ko > add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-988 (-988) > Function old new delta > nt36672e_1080x2408_60hz_init 6236 5248 -988 > Total: Before=3D10651, After=3D9663, chg -9.28% > > Signed-off-by: Douglas Anderson Reviewed-by: Linus Walleij Yours, Linus Walleij