From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (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 250483C465 for ; Sat, 18 Apr 2026 01:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776477074; cv=none; b=D5oqLglOcGYvVO1X00HcXmmartAFfPxgiQT9yTCTUQscB/rtpHQoEsitGGYkbYqgHjJTnMJAFGExl5vPk/ICJz0vzV7q69/QY3ptuRENjI8Gi0SWwRwYFBjhzUS+u0cRlfKzz+eEAbM8wGFfpsTaKlpIxM0UkRFFVdu4n/K7u4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776477074; c=relaxed/simple; bh=EKcFQtbmVEbmGVdFWZPrugEdlT+NJ0B0U/31ylwdxek=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VbqYIqHIoriOOLUEf1HjLc7KO7u9RjMh5REfNOm0MyhmzAcB0R56PRu53FWOKk9j62ncTop5jyRtUSrJEc0/ILwPElKEMIyHGE1VOzZHfQevDPSFQLNdfar8RqTtcEcEDkgygwU1LQH4MJWG+/Mpk/y3zZpYTub90WX+MWMAIZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z6TdixxZ; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z6TdixxZ" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-82f6b592fc7so614035b3a.3 for ; Fri, 17 Apr 2026 18:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776477072; x=1777081872; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Gj7SAePflqB3SH6bEs3kSf8AjrLM/HJ0qal797EEMsU=; b=Z6TdixxZ62ZoFBSTCLaf/TvZGRvVYmF1pPDWYYh+cuAACQq6tsQBCtNdJvFbHaV/Sx I1Q9QcZDvnz0zaVEoJ7pE7Ja+0jamX5rRQNIwJKzIxI0vTwT+g2Asxru+UBc02PwukAJ uqsWK4+VNMvFfKUQt4k0SY4PDVKByaj1Wcm74JLV52NZsOEoIrofQG+qLW35/6nmUz3Z 0CGk1rRDz8i4oxC2VKF0vE3kSq0enq6oQgIqoPjtMii1PQdzwhewoeOvS7AJ9qFl3Rbn RqHT9TUWs1ufocakfLPXxrKRmupwT5JuHyzUgEZK0n3ZGjYhX2LdhhxsY8bUes1AD2Th V6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776477072; x=1777081872; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Gj7SAePflqB3SH6bEs3kSf8AjrLM/HJ0qal797EEMsU=; b=CudvIfw0FftUUqCreu+5WUqsz0eaAOPNuBh3q/FrxLQXpo7QSv5f1OOvXn5I2XA3QG o78J5cQoC5ieEA9QZi2L5+x0JENfRKcFKoketA5XhnvJQXttRj+LD3xWSwBIJ5l8tDLY 6VNBAPinW7xzOtz3NbAIjMVmzugV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c:b0:82c:24d5:63e6 with SMTP id d2e1a72fcca58-82f8c831e32mr5309850b3a.15.1776477072365; Fri, 17 Apr 2026 18:51:12 -0700 (PDT) Received: from ?IPV6:2601:1c0:5780:9200:6937:998c:4c76:85cd? ([2601:1c0:5780:9200:6937:998c:4c76:85cd]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8e9d2fa9sm3345589b3a.16.2026.04.17.18.51.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2026 18:51:12 -0700 (PDT) Message-ID: <9947777e-ad0e-4af2-ac43-a2bb91339966@gmail.com> Date: Fri, 17 Apr 2026 18:51:11 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/panel: novatek-nt36672a: Inline command sequences To: Doug Anderson Cc: sumit.semwal@linaro.org, neil.armstrong@linaro.org, jesszhan0024@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260415235608.8138-1-chintanlike@gmail.com> Content-Language: en-US From: Chintan Patel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Doug, > > While that may seem a lot less efficient, the design of > mipi_dsi_dcs_write_seq_multi() limits the inefficiency. Writing things > like the above also allows you to share code better. For instance, if > a second panel is added to the driver that uses the same sequence of > commands for "dimming enable", or setting the resolution, or turning > on "UI" mode, you could create a helper function to share the code. > That is impossible / awkward with the tables-based approach. > > Eyeballing the table, you could also potentially optimize things a > little bit if it matters. For instance, I see a big sequence of 0x80 > going to lots of registers (without seeing the panel datasheet, I > don't know why). Potentially, you could do things like: > > for (uint8_t reg = 0x8b, i < 0xa0, i++) > mipi_dsi_dcs_write_var_seq_multi(dsi_ctx, reg, 0x80); > > I dunno if it's worth it. You could try running bloat-o-meter to see > if the code is smaller, I guess... > > [1] https://lore.kernel.org/r/CAD=FV=WtjW5WWmjeb2zwF2PjiJeZv1jZS_UKZ0bT1658=CkwVA@mail.gmail.com/ Thank you for the clarification and patience. I apologize for misunderstanding your initial feedback—I appreciate you taking the time to explain that the goal was to inline the command sequences as functions rather than simply removing the helper. I will send v2.