From patchwork Tue May 14 17:20:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13664298 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 ACF18C25B79 for ; Tue, 14 May 2024 17:22:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55FF710EB0E; Tue, 14 May 2024 17:22:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PfWyN55d"; dkim-atps=neutral Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id B74ED10E5A3 for ; Tue, 14 May 2024 17:22:12 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1edfc57ac0cso47823835ad.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=1715707331; x=1716312131; 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=vLidwqUpHr187hGFcEiCCAyDeHC6n0W/LwS7hTKYWys=; b=PfWyN55dNNkphFvTXyxrjevlTEhuCcsRhSHXfv3wvLT9b1jWA1vSeoh+/6HPk9MrbL +BHzkj8+GXuj2LLBbGesRCNKsQKjg9bfFD7qoo9lrWlAMfU9x5Jv1Lms90voFEy3wi0k I6H/uXiOVG3Witi6aEue0q9f0iSGcg4AQ0WOM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715707331; x=1716312131; 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=vLidwqUpHr187hGFcEiCCAyDeHC6n0W/LwS7hTKYWys=; b=omvqtZ5CUiEWDyDf5f7aWT3J3EGIuPHCL2BY4Hpbn6ovctQTtFEgt1MPFSD5gWLQ7C BCDXLoF2nkq3izPVaEuGHn/dHK5tSd8F5C8+T7b3AnKfAWryEBItbiqAXP3QNLjzDlEr d5WQXTDUWZOjgGPTP34YZaFEFaiIYhqj04ufwGKLl385/OJTinE560jGS5u68n2ktKnm 3SUhugH5v3eLUBn6M/4yzLiNQrYVErtCjg/GDl5BBPpr2H80grezJgRwWnJMBt/hcfJ/ nmUXPXjMoi4oZSDrdQrPfCNKMNFp5+1M1Wq/5+Qjvz+JT5iIt0Xkdmenv+o49ooNgwIW c8Kg== X-Gm-Message-State: AOJu0Ywbe/L3KpbX9UmFmkQJKU4S1svJNjlD5ohP82bd41V89bNSAPRu nSYJ7gsMIxL2ygbbdLwihi2tndHUEl6r64aqcPf/wsioaJQl/e2pjLKMTrQvMr46vDl4HP1cNtk = X-Google-Smtp-Source: AGHT+IHQbee5Xr83dFRZYKlkMM+RELiWcz1JNVZafhHBH7FkLbHsdZ5LuEgq/P2XiZ4kLg/59oTrvg== X-Received: by 2002:a17:902:e5d0:b0:1ee:1912:a9fc with SMTP id d9443c01a7336-1ef43f4d30amr162009955ad.53.1715707329188; Tue, 14 May 2024 10:22:09 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 10:22:08 -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 7/9] drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels Date: Tue, 14 May 2024 10:20:57 -0700 Message-ID: <20240514102056.v5.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@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-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. Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson --- (no changes since v3) 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