Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2832475lqo; Tue, 14 May 2024 10:23:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVnKLR2IZlaXg0xH+skab86pJ13vivmGGucZKn7nVB2xDOdw5+RNb1T6byBrB4PzyGy+stM+YyW5NA5F6bXwmdz6WPVVpnut0VpHAicnw== X-Google-Smtp-Source: AGHT+IGS9zi2woyO6MtbB7PX2WITcg4PZYvxzyRRpGJWaiRLQ8KZGOg+7vczu4BqYUw5ju4qnZOd X-Received: by 2002:a9d:77d1:0:b0:6f0:b48f:30d6 with SMTP id 46e09a7af769-6f0e92e9893mr15245653a34.31.1715707410946; Tue, 14 May 2024 10:23:30 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43e11421805si64952131cf.284.2024.05.14.10.23.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 10:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179002-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=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b="RE6x/lrw"; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-179002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.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 954FD1C21A05 for ; Tue, 14 May 2024 17:23:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 888ED181B88; Tue, 14 May 2024 17:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RE6x/lrw" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 036B9180A80 for ; Tue, 14 May 2024 17:22:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715707335; cv=none; b=gMe95yqyR7zzC1nHpqvf/gi9EFz7hH6+aHXKVu3VYIJEAj4mlexHtwoa6d0/SXc8dybF0IRSW+jET1iaSmzV+ErmIhG/j0SM3aViCd8KoDC8Tr7bOv3yfGClaf/oaCRDwkcp+mVSlEnH4v6egkqF1EfxGgJlTJv2LvM5GKGaa5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715707335; c=relaxed/simple; bh=Hnk2yNB1lk8QoEk3UID/mYGraVbR6TgS90r18gX3EIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rx3RaEEyB8p7ddilzaYwcvMRJmBb+BQxq2rgOyG+nBCNy0juWlgHb+x4LWHVOPF4Nh9Ub3ZYKmrMLHra4HyiQObFr2pL3YF4Cy3CwvtC4dIsGEZhY2C/ctO0fIlbD4iUOVjDPK7/FbJEvLISSEwAWz1YQvMCOeyiqjjEVWKCuYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=RE6x/lrw; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1f05b669b6cso31330545ad.3 for ; Tue, 14 May 2024 10:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715707332; x=1716312132; darn=vger.kernel.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=RE6x/lrwsIjnUFDfm8P0DBTTgjV8LaXGwaJE9Evtl01FiE0GTbxxeugSFHiiPE+SSF v2hPtLGK7FbBBETgKrxonn7ES4RIDbrqrbJ6eKC4Q1URiICUl874rjwL1T4R/3ho4SD/ uVNCka+iamNglYjJ/40KTwvLuke4WyZZiCSIY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715707332; x=1716312132; 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=WHzSxyXZ77Z9AtlpLJeUd2H8qbzCEEzJ+BG3Ik96Y21mWig0sJffz9OTsGPQdJ1apn /F9R4kh2BOKybjhqSpOkBlAUF8doxSW0EX2T2KNKRio65ciXY0WlZcTe/Ypv8ZvePoQc p2zax9JJlrbLqSIt1uWojBQMbNt1g4JKFOiuQ+XoTAE4PtknEmYL3Jha4tYwokog1mjQ Ic/g9HqrPPi7j28nd5vl7+7+hSKazIQkE2fyUawc7ENMcb1sWBExGl1OZpv51yfUoyX8 xCYJrQzdL1HPgo03DUijI7Z/pNpojDOa8sJBYVmMOPKzTJv+d/qPgKLuPqfdS7cqyS8I 33ag== X-Forwarded-Encrypted: i=1; AJvYcCWbTQ7K0KVWpByIx3am3cmjUpbRa3QGv4Pb4DFp1/KKmSzk7RKGCSea9KxNWQ6Jbz1WBXcAwxDqwQtyhNMILc4FLwqqlBT16XVgdkb5 X-Gm-Message-State: AOJu0YzkmOTFUIdEZmtDLIjH2t+s5wcO+k1Cfgh/N+k87bFR99ie4x6g uaAb4i/Vd6MMe+cBfPp7OJAH9XbxSW3VrcAbsg1q0E848tgTcMuR6WxE+sKpow== X-Received: by 2002:a17:902:ecc6:b0:1eb:5452:8606 with SMTP id d9443c01a7336-1ef440495a0mr163288595ad.48.1715707332059; Tue, 14 May 2024 10:22:12 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:ef10:6fdf:5041:421f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf3101csm100147575ad.121.2024.05.14.10.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 10:22:10 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org Cc: Javier Martinez Canillas , lvzhaoxiong@huaqin.corp-partner.google.com, Jani Nikula , Neil Armstrong , Brian Norris , Sam Ravnborg , Dmitry Baryshkov , Maxime Ripard , Joel Selvaraj , Hsin-Yi Wang , Cong Yang , Linus Walleij , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v5 8/9] drm/panel: ili9882t: Don't use a table for initting panels Date: Tue, 14 May 2024 10:20:58 -0700 Message-ID: <20240514102056.v5.8.I407b977f9508573103491df549dfaffc3688db13@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240514172136.1578498-1-dianders@chromium.org> References: <20240514172136.1578498-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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