Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp968341lqm; Thu, 2 May 2024 00:50:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6OflQ1ki6kh+7e7G5pNc1uZCUcOspCFkbG63Ni+BfmxOYdb1yPAzB/84GqmwHVsKj7Z6YK6tHB6/3NvPAD1ENZpI5lym3n7bqalDKcw== X-Google-Smtp-Source: AGHT+IHfoGa2I835Ju8R09R8gHERKjdjG2TU5EkbLWJjWfPbfjY0VwTby4kPNt8RwQGzwxYJamfY X-Received: by 2002:a17:903:249:b0:1eb:788:b424 with SMTP id j9-20020a170903024900b001eb0788b424mr6080332plh.43.1714636207571; Thu, 02 May 2024 00:50:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714636207; cv=pass; d=google.com; s=arc-20160816; b=09j271fc0fTi55p6QvbO4OKD0x3J4YmpgKR79/c8oK3RyExnRG4NH6DSPBwH9ReQGc YjY5IjS0gGimH+XbRo4D9B55m7yYi0r1cUSOR6wkOkIdVt/TX79GeE7M8Nd+5FemW4H4 SYVpJqvu6SPqAiGHVnH5isO7jPT9P5Jkvb65hPwz/daveeS7Bb/+8mbbGU/1ylG8tuU3 PDryyYD8EhKMlrgnsbI6oBHquoTqLhUjDNYGS71LuOgku1dLoIaSXfDTwnKU8fDGaxuw d3skodpOHZOSvY5innYKwrstnNKfqrvPnqTfUKlxuF8eQ08tOarkbOtQWKui2y2KmaUQ +TyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=3BX9W08JmhUFPTdQQggPd87vyyhpP+MKlPGyZ3mfavs=; fh=DRJyX5UhserkaQ/GiPiPE37vbWXdf5yy34pnd1pdpqc=; b=Fqn8ihJbmN3ktr2Gx6KJpIw9cpnbJK+SCcUHCPxQCrZd9E1x4D5RcamHea3IlXsVN+ 0uFcHd4CDuYurxtx1FT6MsjsmapdVbQTlI4OkABdgW3Hcha58MmSoiD7dmX4HugIdYLn 9yYO8FYQ6F8VAM5rM/JVdwxDPRuxGqzL8aoEKEy+Gjz9Ok3kS1F3wIWcPYN9eVkaDlw8 ISjf+ph/IVp15e8dskOFrmY2azuP+JVPiKoWY7cT0SB87Mr4Ti9al610v+vw6WtGazf0 ED59lWasrv7bCST8xgkVhYXzgXn50BkMKucAce7151E/2Av6nE05H7XgvOnil1dyLfQb sinw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLYGR6a8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mb14-20020a170903098e00b001eb246bf701si528798plb.43.2024.05.02.00.50.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 00:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hLYGR6a8; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-166074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5AA4BB21F3A for ; Thu, 2 May 2024 07:49:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A28D123769; Thu, 2 May 2024 07:48:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hLYGR6a8" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 0B204225AE for ; Thu, 2 May 2024 07:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714636137; cv=none; b=G/VRFS9AsMbOvFD4G8r2HReWSUuYxU86dXE4ibdb8nGiWK3+ycU9vwBdDcWn7VCsMhvfLpqtTtciEhhou8c3Id40Hz2yOd8LN+oCOfnPF56plP6UA1pFYfBzaD8GUKoGSPNWh7HJC0MrPkaTSdAiEPRzCcmE/pzblP7pBDrgb6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714636137; c=relaxed/simple; bh=YnErUF2MNKugI/b9UXB92WK1VSQ9+Td+hA0TBAdfc9A=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=KL106Nwavlwz2/QvWspfFYeti6KxkhNbuJsTCPOdbMplhLgsWNbBfZlrOSSizFwrET0Rm1iR2sRsQtWDpfpF3NK3U6M+QsO2FDZ1XSCLmCqq7YQZjXrhXs8J8vHKmaumfsPt2XnfNuc1ME21BRmk4HpE54g/PNhKQUbSh+ImRAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hLYGR6a8; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-51f0feae50fso589501e87.2 for ; Thu, 02 May 2024 00:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714636133; x=1715240933; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=3BX9W08JmhUFPTdQQggPd87vyyhpP+MKlPGyZ3mfavs=; b=hLYGR6a8/S7BHwOrzCRfJIw+Xx6+R00Y5rY8XGJpExRHThXJm4PHU88Qg9Q1+Cs0Rr RQoS+NOxQYyihgLB5JZom3EHRyimasmSqtX2JBdo8XTeF++A7Y2NUPUbSDb2Zhh4pTRe +FcL2l+o1pXiOqjTl59MJTeNrS6vj3st0IMf9UjDrTbwy01ywA62nHpKfvjCMcqlxX1v Ioqhnfx8nZRTMgpnQiHtbPJ2HjztnGgSClxx61njymoOLk1mF8xJ06KZwhdCv6SZeNfK lFjSDCLcHwZA0xrWLwDewp2XKMgJxqeQri62fpvboM2rbUQ/tHPVUYlJIuqGfvoqsdbf NXrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714636133; x=1715240933; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=3BX9W08JmhUFPTdQQggPd87vyyhpP+MKlPGyZ3mfavs=; b=hEtPqelVmDsq9kLZJbW/YBn35qgqoBNJg7c/KP0qsU8g711Z/ALIatyMOMzgHjOywM L6G8ldRqyGdMfRQ7z8qKlj7t1SWOGwwJ+mAP57AaB2wANyaIvffxbcYgga/vB2LOMZP5 u5pKrL5uaPRxyn1ht1Q8XjeOhfneXLMGEejLHf6y19PQblqhtvWlUNcq+P2G6a5v7eCe 1rlkhVLXcr/Xo7WmMPRN32AgVH+cr8UiU2BtXmRI5HbIoQtwojWJcpeRF07hGkIuiVi8 XioHhMGY2y8pMynZqcBYVva8ZsOvmYrA39TawSfR+RfbuxCw9M5mFP3z76WfuBeeYRSF TPkA== X-Forwarded-Encrypted: i=1; AJvYcCWoBIF1qp4H5G6UV9oKiZQaRXXAtceN9Dzf5gWjPAyUbuoWGmRbHE7AgAPOArXoSlwxdwE7cTytOI5cvHg/idSALEu27FOzZtTny4F7 X-Gm-Message-State: AOJu0Yy6eH28/0SuX6D8X6ykDl1OqQal44pbVZK2If38P2/53u9Us28D IUS7fuW549HKXKYqCwXuyyCvbcFz4Jsot2pfV/COQ5Qp1I3AZbDH4TEkiq+ADGI= X-Received: by 2002:a05:6512:2144:b0:51d:804a:232 with SMTP id s4-20020a056512214400b0051d804a0232mr782827lfr.11.1714636132970; Thu, 02 May 2024 00:48:52 -0700 (PDT) Received: from ?IPV6:2a01:e0a:cad:2140:67e2:5e2:652b:4129? ([2a01:e0a:cad:2140:67e2:5e2:652b:4129]) by smtp.gmail.com with ESMTPSA id s20-20020adfa294000000b0034e285d818dsm584976wra.32.2024.05.02.00.48.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 May 2024 00:48:52 -0700 (PDT) Message-ID: Date: Thu, 2 May 2024 09:48:51 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v3 0/9] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs To: Douglas Anderson , dri-devel@lists.freedesktop.org Cc: Linus Walleij , Jani Nikula , Dmitry Baryshkov , Cong Yang , Hsin-Yi Wang , Brian Norris , Sam Ravnborg , Javier Martinez Canillas , Joel Selvaraj , lvzhaoxiong@huaqin.corp-partner.google.com, Daniel Vetter , David Airlie , Jessica Zhang , Jonathan Corbet , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240501154251.3302887-1-dianders@chromium.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk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bM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20240501154251.3302887-1-dianders@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 01/05/2024 17:41, Douglas Anderson wrote: > The consensus of many DRM folks is that we want to move away from DSI > drivers defining tables of init commands. Instead, we want to move to > init functions that can use common DRM functions. The issue thus far > has been that using the macros mipi_dsi_generic_write_seq() and > mipi_dsi_dcs_write_seq() bloats the driver using them. > > While trying to solve bloat, we realized that the majority of the it > was easy to solve. This series solves the bloat for existing drivers > by moving the printout outside of the macro. > > During discussion of my v1 patch to fix the bloat [1], we also decided > that we really want to change the way that drivers deal with init > sequences to make it clearer. In addition to being cleaner, a side > effect of moving drivers to the new style reduces bloat _even more_. > > This series also contains a few minor fixes / cleanups that I found > along the way. > > This series converts four drivers over to the new > mipi_dsi_dcs_write_seq_multi() function. Not all conversions have been > tested, but hopefully they are straightforward enough. I'd appreciate > testing. > > NOTE: In v3 I tried to incorporate the feedback from v2. I also > converted the other two panels I could find that used table-based > initialization. > > [1] https://lore.kernel.org/r/20240424172017.1.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid > > Changes in v3: > - ("mipi_dsi_*_write functions don't need to ratelimit...") moved earlier. > - Add a TODO item for cleaning up the deprecated macros/functions. > - Fix spacing of init function. > - Inline kerneldoc comments for struct mipi_dsi_multi_context. > - Rebased upon patch to remove ratelimit of prints. > - Remove an unneeded error print. > - Squash boe-tv101wum-nl6 lowercase patch into main patch > - Use %zd in print instead of casting errors to int. > - drm/panel: ili9882t: Don't use a table for initting panels > - drm/panel: innolux-p079zca: Don't use a table for initting panels > > Changes in v2: > - Add some comments to the macros about printing and returning. > - Change the way err value is handled in prep for next patch. > - Modify commit message now that this is part of a series. > - Rebased upon patches to avoid theoretical int overflow. > - drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() > - drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq() > - drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() > - drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints > - drm/panel: boe-tv101wum-nl6: Convert hex to lowercase > - drm/panel: boe-tv101wum-nl6: Don't use a table for initting commands > - drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() > > Douglas Anderson (9): > drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() > drm/mipi-dsi: Fix theoretical int overflow in > mipi_dsi_generic_write_seq() > drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit > prints > drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() > drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() > drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() > drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels > drm/panel: ili9882t: Don't use a table for initting panels > drm/panel: innolux-p079zca: Don't use a table for initting panels Thanks Doug! I think we all agree on the core changes, now I think we can wait a few weeks and try to get some test feedbacks on the indirectly and directly affected panels, drm-misc-next won't be merged into linux-next until v6.10-rc1 anyway so we have some time to test on our boards. Neil > > Documentation/gpu/todo.rst | 18 + > drivers/gpu/drm/drm_mipi_dsi.c | 112 + > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2792 +++++++++-------- > drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 794 +++-- > drivers/gpu/drm/panel/panel-innolux-p079zca.c | 284 +- > .../gpu/drm/panel/panel-novatek-nt36672e.c | 576 ++-- > include/drm/drm_mipi_dsi.h | 101 +- > 7 files changed, 2451 insertions(+), 2226 deletions(-) >