From nobody Thu Dec 18 07:21:49 2025 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 D023F130E3F for ; Wed, 1 May 2024 15:43:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714578223; cv=none; b=D1+M8zvE5ZwOdZE7LZAHygNhWRIpUR8JK8oW7oqIr9rh1HiSPvZcwxwH2eSKhFNlw3nGR91D09A5Awt82rLNNxuNypJjY0DwQ7h4l6GBG7zxu+CuK+7D322pX5IgPlXrYDgXvyx3op4OlXGQuEMToQPhOeHj6x/ylasMww62A7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714578223; c=relaxed/simple; bh=Uvw40IbKeSWhLK+NjuypF20aKsTgiAMhV2D8hWWkqj8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s3T3TsLk49D1ulGJqCjR/rNO89D+7bz2J//MB+Zt+foh4tEZa6JE2vLBtd2GiMoRJ/okSLQR6yrV1L1HNPw+2svu4+XtAinBWqcVg5TwjNMiBoBVZ7R27d2phlhdEPjWRsVOwv6y8vn3ZsfVdi/Q2ydXgOz913jOmY9waedhku0= 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=PsQqBQN2; arc=none smtp.client-ip=209.85.210.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="PsQqBQN2" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6ed32341906so6374674b3a.1 for ; Wed, 01 May 2024 08:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714578219; x=1715183019; 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=RdAg9E8kEwJIx2CrAjITH8nAMNsaZShsSsrN3DTj8HQ=; b=PsQqBQN2ssjoSeqehO57JJZcx8mzuJBnFk72D98j1Jz4/fo7bTYpdgaNfghi/r3yaw O2TzX/oHZByjCKycwUPrVFllvdxTupGBfzG9ew1d78Csxah2I4/vjiPHeaURiwvqKIIj SJhZUooc+XQ8HcFioWAWSwEcBMUbaspn7E5Mw= 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=ga3FzgYJa1rFobtMioRdfkxt8Q2VBCZ/JspcKAz61ThLvBIkMiaZxi3bZRNq7rYxDC 2Si701CbgZqAju+VKUZ4htNdojhoRox1AqvJW9DNr2bgSi6L17tRDp/sb3C5EL4gIVyg qk0UyOhESjsTmo4wkvn6Wn8yekB3YMtJG2f8Nn+OfFptp0ohnnyVVeCPOvWEpeoG/X5C DY1D5gE15rzjNn/gqfyVnpKDG9yETJszEOA93Lk6+m21l0c5jd04724zDHcXR5atO9aL 4+ROPNoD+JV9lNDIYQST2h3N5mV4YQwFM7B1d/vMq2Hk+lFL4Gdc3VGgQ7bqDmjpnsn/ GxIA== X-Forwarded-Encrypted: i=1; AJvYcCXYKfRlKQl2KHaqf9OCoMSb6hMWz3eDYEEjJ7gt2rIktKtm3fzl/K889n+o015kW1m9dnxg5qRbZXhbg/FiTlhYng+DztODwkFHhtve X-Gm-Message-State: AOJu0YxWQKL+GsJTHWSZX/9REuQpoSo0XG/TdoMgCcvenSCKXhp7RRAX Sa4wXcO/0mP23suUFeWponDTL6Xggz9E1FxBunj0eBcrieWSdxnANYfArJ56bQ== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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=3D11928, After=3D10585, 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/dr= m/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 @@ =20 #include