From nobody Sun May 24 20:33:20 2026 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (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 7329922157B for ; Sat, 23 May 2026 03:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779508665; cv=none; b=HdDoJGptn1PlcKkaybut2iDRb2PvgKX48m55F9ckqdjTNFc40DlqHFCiUP/PWUPecnP1c4w0DEuvBID/vMegxQXF8l++Rrz2UExjVxSmFUsWBZQQPVjeuS+dYkv06lD+YSOD/XR5d6V2e3mO5ufr6JvkMZ2y6QMyqeLRrA2ceIs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779508665; c=relaxed/simple; bh=iedao6Ygs4sHh2fxSj1MwXr8IXw5fQoHXVO5DORa55Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JLKVU+Ti/PIhw8PRsCWlU+VqN4oPJbk8OxO95aYK2p+R7dZ+oq3e/246pyk3XTgtHhjQPp4TzvkuEGjqX727y39cSnji1W5nR/tlL0C+eqpt3pdJ5BfdjF3a7HXO1PRbdj9/T5SZGUOPM0CKUKNEV2wdRliaLKzG08Odtg9tWDw= 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=B5v919ys; arc=none smtp.client-ip=209.85.216.47 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="B5v919ys" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-367cbac9cb1so7586214a91.3 for ; Fri, 22 May 2026 20:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779508663; x=1780113463; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zaTsiEXwtDm0P7DS42R5+7UDMEhgxJ2oBOfUIkmvUIk=; b=B5v919ysoPB0j1tkgb9nYLN0InUVPpskoFGpP/6uN4LBGHF9ZVaIlljiw3ux86UD/W Y/SGvrB6gjwEEFjs01N0zYymyfU5ZHi3iUKp2nVRtSPN/0p7E/fOUFwJfK+nVX/qJ7rE U7oCIEuClnh2rn3K+Xn6yY/UJOQ59w85ocFsI/LKy/F4I/fheWiim+l2dSokRsmhvxaV TRYkiuMHSytcKi2D9WPS5PKGcB9GgsX1DrnEHoxARWRve12N3FPXfMADF68gA40viMSU gr5tGXJHyqPWec+MHiyD3GjySaQz1n22PrXtijoB6ViMzgOtS+t7irE6p8IdnV+gm6QY oQCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779508663; x=1780113463; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zaTsiEXwtDm0P7DS42R5+7UDMEhgxJ2oBOfUIkmvUIk=; b=CwE7iuJiylUrDlU8U5qmADXyRNOjX81BJTcYg8aqspe5lwfmAbVO0ba09OLH71Oyfh c0C6tuuMjhjY/zCP6IhGQNxeAh2L4Pmt67foNTmiW8bUoPO3fadghNr64stK7PDGvYbf oEKp7++V4zEOcDTqizM4ctaXCJvTtRBvx5VDUIUy40MecbmWoY+6gxzvzXxMkqbaUSvh 0wziFnxuZGyUl4VdX1AsWQbQHqmyS7dCA72kYwYkVmAfONqGD+RAdj70CNF3unJBvtNz hm+72Cn7C8Jd9Lln0NrRPCvHwJXJ/Xtg2kDrriL6FgHOeBqP8Ox4E/pwuFRItg0+DukF MRCw== X-Forwarded-Encrypted: i=1; AFNElJ8s8cOZ4loQlAOUeg2AApExpKuVjH8HZ8TZa83dJYhH6g8axlP/fZo7C+8gMkXvdspDMYG3quyfMhAVBjo=@vger.kernel.org X-Gm-Message-State: AOJu0YxEUvTL4HmKcP1YQsdpCcvLWkejIeQhKNW0rxJ2R/PiwnPbtCAk sd7XGrv9wpbr7BJ4vCQBasHN4UE1pDVf/Z9hvN3G0+Xf9JhkDbZoivZN X-Gm-Gg: Acq92OGE6SJGP/a3IgfU/KNtN20gyC4cd/WMsrV640hgIyM+63zcpax3u8jrwEa0FIu KwcdhQiJ8xTStcOKFHAm5t+rNkeS9g6ZFYrRY7syTznp857AVPn3mWN5+w2q8JAdpGZ0HKqZ+zI YkE+3OJA3gp0BDn3ySPHaGU9iFxWriqM4jb+WidS7htE/ciExjkHBA4PwDy5O/T6WXxnfx/3Lj+ fiW3FutkpWzt8OJrFCwh68q0kouHA2P1FfrzE1m2pPpzn0iQq4UcCw4uW9V7neXXZLs7Q/w4vOX FQjO1btTxA8WYGwv5whQscjYpy60hZBcruntR5QDNc1Oqxsc4pKCLOIaNcbL9xXvk1gjVm7K64F 236KKS7XGGa9sjzUpfQF8Xn90d5rslGmqsPty5SsD/02ITmHPuWDNYo9EAZL1F16Wf0+adOCQlM RfQYyRuSmu+6w0xwyB9ECoH1/MRYMlltWh5aJ2eO35zzeyxErdAZ3ckS9r/KAjTXNBfSjczmPpQ DsLat1LKuNhAVXVv6U07dl/uKYaCgpdi5LvRE9bkQllu4ilLGFF7XNwoW++v8iLsc4nVX8u/RX0 nFvTsqNaK4R3Aw== X-Received: by 2002:a17:90b:3791:b0:36a:a16b:5f65 with SMTP id 98e67ed59e1d1-36aa16b65e4mr391911a91.11.1779508662455; Fri, 22 May 2026 20:57:42 -0700 (PDT) Received: from cmpatel-home.hsd1.or.comcast.net ([2601:1c0:5780:9200:108d:469b:1b:5f15]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36a721c7cf9sm3280702a91.10.2026.05.22.20.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2026 20:57:42 -0700 (PDT) From: Chintan Patel To: sumit.semwal@linaro.org, neil.armstrong@linaro.org Cc: dianders@chromium.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, Chintan Patel Subject: [PATCH v3] drm/panel: novatek-nt36672a: Inline panel init sequences Date: Fri, 22 May 2026 20:57:34 -0700 Message-ID: <20260523035734.6602-1-chintanlike@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Inline the panel initialization command sequences and remove the table-based command abstraction used by the NT36672A panel driver. Replace the nt36672a_panel_cmd tables and nt36672a_send_cmds() helper with explicit initialization functions using mipi_dsi_dcs_write_seq_multi() and mipi_dsi_dcs_write_var_seq_multi() directly. This improves readability by making the panel programming sequence explicit in code and allows future sharing of common command subsequences between panels. It also removes an unnecessary wrapper around the MIPI DSI helpers. Additionally, compress repeated register writes into small loops where appropriate to reduce duplication in the initialization sequences. Add: tianma_fhd_video_send_init_cmds_1() tianma_fhd_video_send_init_cmds_2() tianma_fhd_video_send_deinit_cmds() Update nt36672a_panel_desc to use function pointers for panel init sequences and invoke them directly from prepare/unprepare paths. Signed-off-by: Chintan Patel Reviewed-by: Douglas Anderson --- Changes in v3: - Rename on_init_1/on_init_2/off_init to send_init_cmds_1/send_init_cmds_2/= send_deinit_cmds - Convert all hex values to lowercase (0xFF =E2=86=92 0xff) per kernel codi= ng standards Changes in v2: - Replace command tables with explicit init functions - Remove nt36672a_send_cmds() helper entirely - Use mipi_dsi_dcs_write_seq_multi() directly - Use mipi_dsi_dcs_write_var_seq_multi() loops for repeated register writes - Convert nt36672a_panel_desc command table fields to function pointers --- .../gpu/drm/panel/panel-novatek-nt36672a.c | 522 +++++++----------- 1 file changed, 186 insertions(+), 336 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/d= rm/panel/panel-novatek-nt36672a.c index 7e8b5e059575..464d9ce47d87 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c @@ -28,10 +28,6 @@ =20 #include