From patchwork Wed May 1 15:41:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13650966 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 8BF25C25B5C for ; Wed, 1 May 2024 15:43:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8960E112335; Wed, 1 May 2024 15:43:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XvXj4Uaj"; dkim-atps=neutral Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id 24ABC112333 for ; Wed, 1 May 2024 15:43:40 +0000 (UTC) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6f28bb6d747so5836597b3a.3 for ; Wed, 01 May 2024 08:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714578219; x=1715183019; 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=RdAg9E8kEwJIx2CrAjITH8nAMNsaZShsSsrN3DTj8HQ=; b=XvXj4UajHCj/is08veM8HWIRmscK9h1c9S681ka9VArP9EtMX+gKg2AxilZjWBaEqC kDik13GgIo14lOCSc/jg8twIfm1o2PuIYpmr204CWDbhdFNvcc5A3t0/5ygS/M3Ld0Yh eEFNY38bcoifNJ7//T62y0OkghtI7R+cGpw+0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714578219; x=1715183019; 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=RdAg9E8kEwJIx2CrAjITH8nAMNsaZShsSsrN3DTj8HQ=; b=E346Ec057b2hu7RwGehFgSSxrjHVX8o2uOZ2plCNTy3K+cPYF1D/3owJMSYsy4lB6P SA7YSOrcHpyU9X+TrGwR+4MhnF4qdhBABz0LJPeuVlbX9m1nUffvR0cYHIGReVKbFeNw eEE+CFK7GD+D6Zl8ntzWv8ZCMF6Xx0UXIdXO5qJAt/he3kiWVXGXusgDirgF51g0xhMh MAapmgVzg/RlkkaMQdzy6+3C+bf+kZgaGbkz6zOO7i0xJjycHpLu1oVALDOc+KFpdfyG xnZ0Npu3Ivz7dgUCadZM/Fj375jC/Dm8AJpK/J8z3edf8/VLjDLkXPylhgFDIxxrk7V+ hb2w== X-Gm-Message-State: AOJu0YzkdV/nz9H9/+nr3Kar42+CyXow2dwDpqb/MfzmD8FDB+sQoPwa 5h5wl2FK3BmhT3C5LsUQf+EbyLYyeh2Y/MnmqSf+w9OljRP/pkyl96ctbM0Py7LuYqLi+6Z9bEA = X-Google-Smtp-Source: AGHT+IGjpXrgViC1rNuDMiTdubCGLg7R+a30q/3MV/OFwOrMQiDstoFUyU5CfMCSN687RbnduSgHOA== X-Received: by 2002:a05:6a20:6a0c:b0:1ad:ab1:9a03 with SMTP id p12-20020a056a206a0c00b001ad0ab19a03mr4075871pzk.25.1714578217853; Wed, 01 May 2024 08:43:37 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:e886:8de:19a2:55b0]) by smtp.gmail.com with ESMTPSA id fb12-20020a056a002d8c00b006f3ec69bc09sm7717924pfb.75.2024.05.01.08.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 08:43:37 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org Cc: Linus Walleij , 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, Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v3 8/9] drm/panel: ili9882t: Don't use a table for initting panels Date: Wed, 1 May 2024 08:41:11 -0700 Message-ID: <20240501084109.v3.8.I407b977f9508573103491df549dfaffc3688db13@changeid> X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog In-Reply-To: <20240501154251.3302887-1-dianders@chromium.org> References: <20240501154251.3302887-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. Signed-off-by: Douglas Anderson Reviewed-by: Linus Walleij --- 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