From mboxrd@z Thu Jan 1 00:00:00 1970 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 10C8FCD343F for ; Mon, 18 May 2026 03:43:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38ECB10E2C2; Mon, 18 May 2026 03:43:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Gc/AkvYg"; dkim-atps=neutral Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E4AC10E2C2 for ; Mon, 18 May 2026 03:43:13 +0000 (UTC) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-83f674f978fso207994b3a.3 for ; Sun, 17 May 2026 20:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779075793; x=1779680593; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TUA3cPtzM9uPcBkOLN0h00OZZHnDRsQ9uXVemg5h2Eg=; b=Gc/AkvYgQZ/6Pyh0LzGvb11uCrbd2FgKcpafP2L6HsSFDzpSY2nI8vSH85A6iYLtyd fyWApJK79Py/68jA8s+1CJG5ygNuVvILoXVMMSabqqgeDYxtJLEoN5SWvjnAZObVWvOx 0L9P71FsyDIlAooGf8Lbjv+svMFIjEnLPf4NqLYfEoXPu1DdU3ZJ1I+9OMeeN0bdk5/C eYf6G/kGWJXTzNUtsG1bXu9EoX5XEdws4jsq3T3eNxh1uqf0Yfn6o8UQkiNdazwp4xrH EirS7kKGM6mVZ6NBMfdDDvMGHo0mBcs7elVIYHkWmr/Gxjr5OdMzdFzsmw2AJZ6ZXmfI pyZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779075793; x=1779680593; 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=TUA3cPtzM9uPcBkOLN0h00OZZHnDRsQ9uXVemg5h2Eg=; b=U50wLaP+dWOkfzyBzX1zAcgswX54MmpXUUcyjL2+ZTpQYuVBDsY2QxLB/geaKQhhQx GzakkkT5g9RI9wih+cznHDmgpts9X+L/qx/BG3u6/ciHmoRfhs/U8HncAGqljRSAE+yy YrsdEBUo7VN91bBMgFnq/rVoTD/oIFnuebukGIV8B6uoOb0lPUdEThR0XRRvHz/Eedls dFkYRFljLQMJvaNApI8ObDq8C+qTVQSQQTCVATafoPVd75+Z4KVICaqLM2Y5Zj2zbEtF 8jxHOfvkwQquJT29EFdNPeH66l47jiVKS647hp1d+9cE6Ki0y+aorLo3unYD95FWFfHb Bqpw== X-Forwarded-Encrypted: i=1; AFNElJ8hRhc7OqqYu1yTOP/4HUgKwJScuYVPtrF+aPsc4guhdKyUmMUdai36mqxRms1TRBdxc8QTEaaPuKw=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yy7v8j0p/O3kjYL85uxGS4IkJuJZk2MQvCQCzq+acZhgi9jFnXU 8Gx5DHR4nrH6Q6qCk1A8b1id0AN12P1Xh8sAffb62mahnPbIAX1r178M X-Gm-Gg: Acq92OEs9E84clUuEcpUZGMfIhXVAbcdBwkwKSqAtrZMWb31xlcDFd7qfm34+l0QDYQ uK1OODwPuYBwXxLVz6FEEWYKNL9TKSAo6whOBsGl+Wawbcxn0zBQuBWUJBG87LUBaV38HX9zNlt gocHFieiBHOEZC+TBJ7mNNnom9WWAG+Zly4VRJwsfrdPuazKVIpuW4ZIzWF/vf9bD3ACqmfMTWZ ncwpqM9JsFfk6ovu+FIYxKSN7HOBdjl/CAN5eEh7CrZzAdCnTy27ga5NJa2JXQ7A9RxEP1ca/Iz w3lm06GOCzDHfuLmYjuh8mXeFy5ixh5++FxwflSKU+nMqVnvchYVHYBMTjS/P4D29FbmZQiZ4bS +9IJXfzwTq8Voe/OJ5JmfnzVvWH5FZWGf0JqINbXtiZZSfAbV+8FhlkV3Mn+opk71CXfVoDi5GD tuK7tYSmjt9oyNV8QAhgQ1/siVq/WwXaytPzdKf3TSxKwPDyIrLPTHvJquJSSqnB1cLi4h0jNHS ymcuVhelU2EZUwLkv2umcHLD1fVqHC3HGAumGQyyGyQKeMc1MNfhXQc0Y/IhUj2zUofcBi1oqnz z5guZ/2/nldRhOOF X-Received: by 2002:a05:6a00:1709:b0:82f:9aa:d63d with SMTP id d2e1a72fcca58-83f33d3337amr12698207b3a.49.1779075792455; Sun, 17 May 2026 20:43:12 -0700 (PDT) Received: from cmpatel-home.hsd1.or.comcast.net ([2601:1c0:5780:9200:790e:a8df:c769:91e7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83f196660f9sm15808366b3a.10.2026.05.17.20.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 20:43:11 -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 v2] drm/panel: novatek-nt36672a: Inline panel init sequences Date: Sun, 17 May 2026 20:42:52 -0700 Message-ID: <20260518034252.16337-1-chintanlike@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" 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_on_init_1() tianma_fhd_video_on_init_2() tianma_fhd_video_off_init() 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 --- 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/drm/panel/panel-novatek-nt36672a.c index 7e8b5e059575..4c706c6e9b1c 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c @@ -28,10 +28,6 @@ #include