From patchwork Wed May 8 20:51:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13659164 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 E25FEC25B5F for ; Wed, 8 May 2024 20:53:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C20B1131DC; Wed, 8 May 2024 20:53:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fmPXxm9+"; dkim-atps=neutral Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75C9A1129A5 for ; Wed, 8 May 2024 20:53:32 +0000 (UTC) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5c229dabbb6so159069a12.0 for ; Wed, 08 May 2024 13:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715201610; x=1715806410; 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=fmPXxm9+ZEOE//spXAVX500uPkwtT1Js0XrfG8zLgdzWDS4DaY7UlzElj6x+vsWzC7 edGBroOr9vfgIkpWfgY+P8QI4VL0QuuNi8xGBMwNnYSi1tfro8fJeFWMU+zr2TzSUWuN ZmAnBoefb3EFkl5FMADt6AKFFXY9WmeauPw2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715201610; x=1715806410; 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=G0lxyYor48dtQtCq93Y8uUfiOXBRsZK4ZDitLIu5pv34Lg7Ds1yY6QdUDCUbnd0Rzq ZWPW9OniNualhlDbTpOoZxwojNuSPcZvsmZTFsQ/5FzbVVukLzTURcbI0G9kLvJ8nHH6 pVNRYIRBo01Rs2axSdSLY7bDh+ynUAGouePy9fqpJwNZ5BK5ONu4zYVmJYzHAkOdcdYN 5F2Wc3ITZ8hn7Q+0h63GTIt/OZeZFEEY+iIjKIQTZ/AftHPGJEWRWqQT1CbjVLKdcymi V1egbHViF7hkPXNfdjTEC+ycL267nkMOSS8iayzrocpZ3wSK83ykr+OKjchrga1VdA7R 1tgw== X-Gm-Message-State: AOJu0YwjQffWgsG7pq/V0CLcOpxdcYIntkxVHcCl7sm++ck8dVXEnnb6 wBtrD1uY5x9hspJzoj0Sq3rp8koJUgrn/3tA0iOxdQC2M7EyjzmiQ+N1Mk+2ZS6TpS/wLuFzq38 = X-Google-Smtp-Source: AGHT+IHD4sRU7g4qrVg5LXPV2O2j74LHij4kjl0HkfDAkZtodwD5Pg7s8OXCmegHhzAEAx7vvF0JJA== X-Received: by 2002:a05:6a20:564e:b0:1af:8104:46e0 with SMTP id adf61e73a8af0-1afc8dea254mr3378322637.49.1715201609337; Wed, 08 May 2024 13:53:29 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:40f4:feca:59e0:d3ca]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2b67126ad51sm6887a91.25.2024.05.08.13.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 13:53:28 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org Cc: lvzhaoxiong@huaqin.corp-partner.google.com, Jani Nikula , Hsin-Yi Wang , Linus Walleij , Javier Martinez Canillas , Neil Armstrong , Cong Yang , Sam Ravnborg , Dmitry Baryshkov , Joel Selvaraj , Brian Norris , Douglas Anderson , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [PATCH v4 7/9] drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels Date: Wed, 8 May 2024 13:51:49 -0700 Message-ID: <20240508135148.v4.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240508205222.2251854-1-dianders@chromium.org> References: <20240508205222.2251854-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