From patchwork Wed May 8 20:51:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13659163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0D5CC04FFE for ; Wed, 8 May 2024 20:53:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C92A112BB6; Wed, 8 May 2024 20:53:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="CZx+JJVI"; dkim-atps=neutral Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4375E1131DF for ; Wed, 8 May 2024 20:53:34 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5dca1efad59so168969a12.2 for ; Wed, 08 May 2024 13:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715201613; x=1715806413; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cUwifRVBPToieqjWacPbUdf5yseMdcFaqlaDibxgt4s=; b=CZx+JJVIVQLI+WdX7IvijoAefJlg1Wh8vOMA0VSPTCx2fk7KhBN5YxImBctuNhjOJ+ vgPQsLX+kiDSb+ZxA2XJXs/5CuE+wK+o+IwjOrg6iJErHja9GWpjwptF7k5KpVgocvZU ULzXk/H4oYn3i8YOgiD5gOndWdVkRVizQKbqA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715201613; x=1715806413; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cUwifRVBPToieqjWacPbUdf5yseMdcFaqlaDibxgt4s=; b=jhJ72LXDK7j6VsGr2tpQs28p4Ibm8z0lElhdIdNMH0QQEmE9xVlM+scShLDUkFwGZp hdFvixLLKUTxm/dJ2xgwNlTURqkfXAs43hwXXjMVT6tMG9us4K+HSGm3RTpMvblEv+U+ 2qofkwiIjxjfUW8O4OpJCFV1fOuPejZb4SRj+nmqLrkQ7sWSno1mwe8zTIDuj5+xo5QK YfEkqjiaiotKV2hY570SinPwLbaTsypCyQmNW+aiZBTwtDDkAChPA6lCCPG7VCMy3cfB 4GH+vd4Faspf5XcfuhHPPQWnMndKedThnF0KKUgJPK8pnp4sn/Y95ee95tW+p+Olsiof OMFA== X-Gm-Message-State: AOJu0YwVpNF5nJN/zzQnCkeLTP135rIV50VrAiY5l5aF5AU7P6fi4lQp j2vcaZWIZhmkdPChfioen7vLKj+pZkALQWfD1eTROAYvdwH8pmnTmFm7D7v9ljZ4vH4eRAFQ6j8 = X-Google-Smtp-Source: AGHT+IFMyxzdWkcZQygF37akniq9/x0yayh6Kz8V+5UyFTGH3SZDpbv1nxxrvthvVSN8GmTZvj7UOA== X-Received: by 2002:a05:6a20:12cb:b0:1af:a45a:a854 with SMTP id adf61e73a8af0-1afc8d1b1d7mr4388213637.13.1715201612964; Wed, 08 May 2024 13:53:32 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:40f4:feca:59e0:d3ca]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2b67126ad51sm6887a91.25.2024.05.08.13.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 13:53:30 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org Cc: lvzhaoxiong@huaqin.corp-partner.google.com, Jani Nikula , Hsin-Yi Wang , Linus Walleij , Javier Martinez Canillas , Neil Armstrong , Cong Yang , Sam Ravnborg , Dmitry Baryshkov , Joel Selvaraj , Brian Norris , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v4 8/9] drm/panel: ili9882t: Don't use a table for initting panels Date: Wed, 8 May 2024 13:51:50 -0700 Message-ID: <20240508135148.v4.8.I407b977f9508573103491df549dfaffc3688db13@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240508205222.2251854-1-dianders@chromium.org> References: <20240508205222.2251854-1-dianders@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. With the recently introduced mipi_dsi_dcs_write_seq_multi() this is not only clean/easy but also saves space. Measuring before/after this change: $ scripts/bloat-o-meter \ .../before/panel-ilitek-ili9882t.ko \ .../after/panel-ilitek-ili9882t.ko add/remove: 3/2 grow/shrink: 0/2 up/down: 6834/-8177 (-1343) Function old new delta starry_ili9882t_init - 6152 +6152 starry_ili9882t_init.d - 678 +678 ili9882t_disable.d - 4 +4 ili9882t_disable 260 228 -32 ili9882t_prepare 540 396 -144 .compoundliteral 681 - -681 starry_ili9882t_init_cmd 7320 - -7320 Total: Before=11928, After=10585, chg -11.26% Let's do the conversion. Since we're touching all the tables, let's also convert hex numbers to lower case as per kernel conventions. Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson --- (no changes since v3) Changes in v3: - New drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 794 ++++++++---------- 1 file changed, 368 insertions(+), 426 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c index 267a5307041c..58fc1d799371 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c @@ -15,6 +15,8 @@ #include