From patchwork Wed May 1 15:41:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13650968 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 AB658C4345F for ; Wed, 1 May 2024 15:43:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A884D10F439; Wed, 1 May 2024 15:43:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Cs31/MSl"; dkim-atps=neutral Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by gabe.freedesktop.org (Postfix) with ESMTPS id 872B1112333 for ; Wed, 1 May 2024 15:43:38 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6f26588dd5eso5846560b3a.0 for ; Wed, 01 May 2024 08:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714578217; x=1715183017; 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=pkwrBbfCjOsJ2BvUtkk0pGwMNhz7eA01MHph4bkgbvM=; b=Cs31/MSl3xagGBmlvYIP3nRivFY/tG5AZuSTwDsnYBntgnek0fR4Koq/5V4GWbh/Da DK7ch5CfmcOdmp3UhiRDqkz6/582JGiyySQHuOQGYBc3oYI7vkWzmU1lE4/KPkhAkXCR b9vc6o0bQwUWxLsieiYgwl2TYNgttcF7OgcUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714578217; x=1715183017; 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=pkwrBbfCjOsJ2BvUtkk0pGwMNhz7eA01MHph4bkgbvM=; b=XPqDf0rkr28gfZCULIdv7prxLKz2My62s26ALlVWmxniCYOyyQaja8caOschsL+dKi J0vHoLx0CChf31GKOM79vtmL3LU1sfrOacXpThQz2fh/o3L5IO2JwPnJ3Mwup7CVqgCE qmclcZrLk9FI18gnngp+YH9HXt4O3jAnoJo2fr1x0QnGieHIMKbR/j+qh7BHYVFM8Oau ctGfu2MqPdXZqlYQamaKmKVJqth0Hi3/gB4NVcpdin0KbrgsvIEugHq7JKnkaIaC4ILj KBKPHO9AgI/z+U0WZceHXbAipPIHWFGBw5vWT2W9lRjX0EAJ8ifuQFuEt4ZcWxlWflMR Xo0A== X-Gm-Message-State: AOJu0YzkvZ0DrsYlaDw6IREIq12xK87GuE9Sx5+jYZwe/4aY1GmCVulL 3WmkZWf2QzE0NthtqMF2Ttky7WM6SopC0/2IluAriHZFBSe10wsOHWcItZih3sH7dyMHjx4SOUc = X-Google-Smtp-Source: AGHT+IE+cPAgO0n7Exj+VvhBDEtKKsPMuNMW75JMbnx9vpKOFii6L+/WmqUjuhC+NPnJKxrXWBYwCQ== X-Received: by 2002:a05:6a21:6d94:b0:1a7:7b92:e0ed with SMTP id wl20-20020a056a216d9400b001a77b92e0edmr2967637pzb.51.1714578215641; Wed, 01 May 2024 08:43:35 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 08:43:34 -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 7/9] drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels Date: Wed, 1 May 2024 08:41:10 -0700 Message-ID: <20240501084109.v3.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@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-boe-tv101wum-nl6.ko \ .../after/panel-boe-tv101wum-nl6.ko add/remove: 14/8 grow/shrink: 0/1 up/down: 27062/-31433 (-4371) Function old new delta inx_hj110iz_init - 7040 +7040 boe_tv110c9m_init - 6440 +6440 boe_init - 5916 +5916 starry_qfh032011_53g_init - 1944 +1944 starry_himax83102_j02_init - 1228 +1228 inx_hj110iz_init.d - 1040 +1040 boe_tv110c9m_init.d - 982 +982 auo_b101uan08_3_init - 944 +944 boe_init.d - 580 +580 starry_himax83102_j02_init.d - 512 +512 starry_qfh032011_53g_init.d - 180 +180 auo_kd101n80_45na_init - 172 +172 auo_b101uan08_3_init.d - 82 +82 auo_kd101n80_45na_init.d - 2 +2 auo_kd101n80_45na_init_cmd 144 - -144 boe_panel_prepare 592 440 -152 auo_b101uan08_3_init_cmd 1056 - -1056 starry_himax83102_j02_init_cmd 1392 - -1392 starry_qfh032011_53g_init_cmd 2256 - -2256 .compoundliteral 3393 - -3393 boe_init_cmd 7008 - -7008 boe_tv110c9m_init_cmd 7656 - -7656 inx_hj110iz_init_cmd 8376 - -8376 Total: Before=37297, After=32926, chg -11.72% 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: - Fix spacing of init function. - Remove an unneeded error print. - Squash boe-tv101wum-nl6 lowercase patch into main patch Changes in v2: - New .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2792 +++++++++-------- 1 file changed, 1442 insertions(+), 1350 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 0ffe8f8c01de..aab60cec0603 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -17,6 +17,8 @@ #include