From patchwork Tue May 14 17:20:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13664296 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 A6545C04FFE for ; Tue, 14 May 2024 17:22:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96FB310E6EF; Tue, 14 May 2024 17:22:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="W2YWUpuu"; dkim-atps=neutral Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 60DB610E5A3 for ; Tue, 14 May 2024 17:22:13 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1eca195a7c8so48101235ad.2 for ; Tue, 14 May 2024 10:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715707332; x=1716312132; 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=W2YWUpuuDxC2zTgHlYEysg+tDmZoMIflbUCFC/yG6yp8qVbOZBlfhkSuuBAeaa6Q93 y+lUKsFdq9IcwSW+kiKtEbQkjVzgLowkUDACBPDLJYqCTIzsBheqpwz5EjDeuTr+cLH0 5eTP4ZXNzK9zoguk1oFEmBWGXgqHgnIQpRQR8= 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=itgN56xwYIKqsHPCP359jvr2ThQe/exN0PMm9Hr4/+MkP5oyNT6OVu+zET/UPbb157 QSOJGr38fSh8A/fq3DmDmXGJwR3MCC3AVd8j/JJZr0RmjjSGZ0gwmuMyoPdM7PxDy9Zq AVq0IPiEsY6yjMBwcG1TyNA+AGgLJafKY9V1SaVOvnZQmSGXu3JWfQB30CsQv9Rx7abf W7/gKXVImkCOg+CIWFLfObfidSmX7pHYpdH6S6yxpMM4wjbu1mFIEwWGGKQTv1FyrsDt rES5HjRYtkEodjEkc7FGSUzoju63RC5vNmaJJnJh8S7xGYqAvtRw8musYx//i8o42Cg0 k6wQ== X-Gm-Message-State: AOJu0Ywf1BpMy57XYGZZWxSbnekLRjsjiKG1/o96XZWuVlfAKWrJJpZ7 ax99pP038rUffq3LKJdA4FvaFLdufXwjl4Qf/y6Gi0xvRnOE+Y0j0WTlptHzDimCT1M4ZCyrHY8 = X-Google-Smtp-Source: AGHT+IFDIcOdOIsdhGycFfZwlJY/iBl9TJE0tDVxzro7+twWjWm6z0FYV49eQJzFLKO0/zNWuDI+vw== 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> 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