Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp753124lqo; Wed, 8 May 2024 13:54:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4pXRXk20qLTaJ2x9rC9HXU0TRc1q8y40+i1/kjEal6IcclcFcp2EAB6VxMIwuMwYaEfVGeJ9KLVQBEBRtOQyPbpXb490TvwUZEFKGlA== X-Google-Smtp-Source: AGHT+IFFUjH3g4Ve/DCkBL9iHeudoV1tkNLF28Xc5Hk2JLhtLfTNvd/p9Ip96C69PBkH/IreQmxf X-Received: by 2002:a05:6e02:148e:b0:36c:532c:d0ac with SMTP id e9e14a558f8ab-36caeb36a32mr37211315ab.0.1715201694006; Wed, 08 May 2024 13:54:54 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e14-20020a63500e000000b005dc8a33fcc3si13799694pgb.653.2024.05.08.13.54.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 13:54:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=O2xgwuts; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-173820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173820-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 88EEEB23646 for ; Wed, 8 May 2024 20:54:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E137A133982; Wed, 8 May 2024 20:53:38 +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="O2xgwuts" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 CB42D1332BC for ; Wed, 8 May 2024 20:53:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715201616; cv=none; b=gqpuGgdmlynflSz7aNQdAVerz4oE5v3D7AttdAaGwOHFSKeG6iKmyZaCqDRwbYEdo8HrUKLcd3uQ5kz4HruTpSypuwEkvDOS3RB7on0xvE2TtZKTTIoC8++eeA09QTrdVyuoECkPMFduEG2QOPdJWdGJ/LigBqPwbatFd6j1PVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715201616; c=relaxed/simple; bh=Hnk2yNB1lk8QoEk3UID/mYGraVbR6TgS90r18gX3EIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B/5zH5T7iEmRFZZ1gNTWQH/yx++fZIAYYBxTDBcNre9dShJsSeAgDu9PYC16HL7db/xgnIp4LBWlBvlvF7BKxiFKwM8M8zLohkZKj/dtXAf3UsLKvyO3OcD3AVUwU5lfZ2ljFmujChWTL4UDDg9kH8Y7sBaWmD1d2a25rAtzo7E= 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=O2xgwuts; arc=none smtp.client-ip=209.85.210.177 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-pf1-f177.google.com with SMTP id d2e1a72fcca58-6f447260f9dso228307b3a.0 for ; Wed, 08 May 2024 13:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715201613; x=1715806413; 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=O2xgwuts/7ZD13TQCWYmGGiBd6gRSqe5Gmz9uWZpvqFYG6lWoqCikPboenhnigra2i wBsvTDsxPNHTclfl5GxC7b/L8S88ygTTumw3nVnJxW1JRV3Fw9M2dcCATUhx9ZHn30pN /1A10CYxl24QyHYBfCp31vGSl6S7QjaQhDLw8= 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=Rh2TDca76t85oijDXRZkHze6HXyCNnxb7eqIfplVFyc8h7y4F3Wmy1UGWE6nB0kLxK l6utkwy5qMeHYSlsZsFHmULpT6vTRYnorr8ZA2FfJTyZLYe3nFXlwhm9fHnqksw0ek7R yyscFVj600Qkz2M0R//VEGDkemcv0/1p4NrOJ4NpVg+23BKQ2hpIJ0ydkm/+XF4AqWXG 9wREvwNLCYdRVT38Cl8hXdOMdBdGHlz1d8gZc8TrNRp5Es+x3p9Bf+PcOxag39NHwkFK K43R04gS0hwmJiDk/wd96DhBfT5Gi10jQ/t3mLQAMhQ7PsWhb+HpCH6b3/zFUcNHtCk+ 0PTw== X-Forwarded-Encrypted: i=1; AJvYcCVo2KcvsnseBeNzRc5Wz0R2dlktkE1PNSgplyhMjdv8/e808n+6cYAZyfNyUiZl0apBm+Q4lFZyIoNQpGWQ+TpkUFGcgD707fKSlEVk X-Gm-Message-State: AOJu0Yz3to7SSnPLsWBTkz2X2DhWCsVycnxWHRXFA/8z+lTmhoqaSKb4 cfbTt7mdVy11ZU4TZ5pPTxfUijnVNs6zHkoSHOVr+NvakRE71y7EsyeotOg8Xg== 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> 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