From patchwork Fri Apr 26 23:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13645485 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 59D46C04FFE for ; Fri, 26 Apr 2024 23:59:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EB3311AB4B; Fri, 26 Apr 2024 23:59:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oOdjusVM"; dkim-atps=neutral Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id E039811A0CD for ; Fri, 26 Apr 2024 23:59:23 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2ac16b59fbeso2389682a91.2 for ; Fri, 26 Apr 2024 16:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714175962; x=1714780762; 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=6dlue2iwDfflC7NvkUReEv0gDm2tpEeiUAwYd6UUu6I=; b=oOdjusVMHXcQ1WP+X6PUcd45WE0z4iV4IiMVYa6fJcVRSuLigscQkVJJn7FIfPiICi Xre3KjkfX4RevDbDQDel29st20cpLXS2QZnxbpXJpBwh262/UCJzsvtMwrydPbpDpOY+ kG0VTb03vtoMO5U/WYUgegOmowoxTpsvv6xJI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714175962; x=1714780762; 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=6dlue2iwDfflC7NvkUReEv0gDm2tpEeiUAwYd6UUu6I=; b=LTtOCzDvRN/qFq29gPZlvJpYrStCXoA/W1me/nvEfIoCkMwu7cm11knPuQxA2gBxtN 8Lpec03ajOHBRgncyDz+90F76d/pwmHrCkqX5YotXFBvfwKFEx0toxo0KdSui7i83B2+ aZLl2jugY/3y2G4+bpgj1jVzeSypOPMm09Jz7Q8dNQCzAKJnHenBdAAyev5nHWfsymWJ BeMSd8Vo9cFfvOPslVl+ohBvzACaFjJdPOAnfWZPwodqIhRJwDKofq+XJplFOCci7X+M i5Gfh1npIn9HSm+/CxagzJfADf0uf1onVpTKWEG4r+bjqvYvKvIceN9zBVFzzXkeLAnc 5dFw== X-Gm-Message-State: AOJu0Yz20oHxD1AtKU3ri61cfgPDPem/JlZwDPYDyxLv+PECn9+7vCcg psLwSFru2OXZ7sn555rURXKc6a08JInuGGwvdbwM5HwTBfsUkZpROQFMRf4ugRXO+HwZrYfqMAs = X-Google-Smtp-Source: AGHT+IGIK7O0ZshRwZbd9y5mAZjepQZqZoTBToQrEtL+VDbotdTYwJxQ5LO5oNXZfRLFhyCNRHSjeg== X-Received: by 2002:a17:90b:4ac8:b0:2a2:dd53:828b with SMTP id mh8-20020a17090b4ac800b002a2dd53828bmr3989707pjb.43.1714175960467; Fri, 26 Apr 2024 16:59:20 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:fca:3ae2:20e6:82bb]) by smtp.gmail.com with ESMTPSA id n4-20020a17090aab8400b002af41bd563esm5111939pjq.33.2024.04.26.16.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 16:59:19 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org Cc: Linus Walleij , lvzhaoxiong@huaqin.corp-partner.google.com, Jani Nikula , Hsin-Yi Wang , Javier Martinez Canillas , Neil Armstrong , Joel Selvaraj , Dmitry Baryshkov , Cong Yang , Sam Ravnborg , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v2 7/8] drm/panel: boe-tv101wum-nl6: Don't use a table for initting commands Date: Fri, 26 Apr 2024 16:58:40 -0700 Message-ID: <20240426165839.v2.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@changeid> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240426235857.3870424-1-dianders@chromium.org> References: <20240426235857.3870424-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. Signed-off-by: Douglas Anderson --- Changes in v2: - New .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2712 +++++++++-------- 1 file changed, 1365 insertions(+), 1347 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..a3ed33f660cb 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