From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794912240; b=obWxmTefU9fuaQY6nLY1GOMVFIOeTZBo6zqyaIk4jbX65b1km13Ifi6eawRbZpko2WEp lhCkytre39splTv5YVOAS08h1bOM/aqC3nJos+8hOKmGtSr2X+SF4fEHi/4UbfIWc4KDV q9QRrQW+NuIb79hfef/aFjgjwDSpFg5E/guAjyrG5CN/3W0yIw60iGLszUKmBKfVrmfRe wJQi1qDrC7EUWPEZh8KTr9X2uBPy5yXPFdpSZz7EELs9SeeiMN+rQOx+ta8ZI0ESs2nXn Si2QYLpNpkX/HFLEpllihY2wglFwJaqb49v6SDqfn2L4OsMalk16bWb5wk1IArWl2jQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794912240; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=YwpqfN8lJu8asLWP5aaIGvd4SFUE7wK2TlSTg22KEc8=; b=nViT+uYOxy/S/x8oIBdRaA/XZKSxsk0D6KPq5XvNJKHrBxvg4FxFHZAwC+5PsAvTHisU 1+AuT8Q/lBBuZz9JMrJ9Sf5RfsSew+uCKeisuc+BCkiyIiyJnft+wZmIOUSozFOaMxRk7 1Wz1/++ro5qVs4+kPsAUa6lj6Y7mooCukMT0i2qmR6iW4bF+pHW7Pab2hxjDe0ujZVQ9/ ZBF/sORxVLxOQnYkhqluuLvU7vkkNxxrxb7Ox5rTc39EQpFLWb/yz1UmUZGfcnaS3ubmT 76S0bgMoGjUCTtINQ6AnVz+ZzdXHiZF7byaEwPdun+DjybO6sIeVo7HJB4EN0Y1hWgg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=nrYm8E5C; arc=none smtp.remote-ip=209.85.128.45 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4D7D606A893 for ; Tue, 17 Nov 2026 10:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E4D7D606A893 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.a=rsa-sha256 header.s=20260707 header.b=nrYm8E5C Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4bb702a7548so19305025e9.1 for ; Tue, 17 Nov 2026 02:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794912238; x=1795517038; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=YwpqfN8lJu8asLWP5aaIGvd4SFUE7wK2TlSTg22KEc8=; b=nrYm8E5CEEDa4Bm+kq4nu1wpOkgAc/F9LT+8hzJqusSmk03reneXmb2S2Y73wCs5W6 W2+FcuHh2jICFn54lc22fr1g+kRxWeQHZwmiqNSSlUy+lEGc0Im9fo/ii56A/eh0MXz2 oVckHtvG7q3c0dolDxh7NgSmNBKOSYWCiJgxi8qMPMA7K/pRYYM6/L4hSMcfvFa9FnjG 91r3XwjGcqca4+whc2KWkNXWRPwQEWseVaioLsj8KEW5Oj5j/ZKo6M7Jy7O1oaZ/hPuT DnaO5+IovLGQyU3pe0vjSxUKXEG/rCr2tNwIwJ2Ik7ygj7XimHv9+FNDbszX18JKBtOT Fnnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794912238; x=1795517038; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YwpqfN8lJu8asLWP5aaIGvd4SFUE7wK2TlSTg22KEc8=; b=XMGgJbRu4AQLlTZ39WialWxUcQ33rZ60lhOH668M24vRrhlhKyY1OiWHmYrmdtwBJn OwhCbjlS46Wx7DvJpDiJLdok5YuGm34Ca45z6UXDGVWVYD4xFsyZUHM/oGUJGAAswSvr E7YYghy4iUVvSNX2dvJVxx9izEdXyZ3nq0qMUAxOf6a3atLo7w+OMoIppQDDscYxWmMn X5qxqVdyKRako/lZCRjSMppHb6ix5JUwW/W+9UxcMacjiFkqVLFnH55BZ9g1FV5nbDYa 54ep6AE5RIeCnqLGciDCP7CZ5vnJm1uZWUdKYCGIJ3HIVkTFdyeqjXxOFIUyJEhO1/UO T0VQ== X-Forwarded-Encrypted: i=1; AL+hErEQ1MK8Cdk2TD1OnctOHWwusitiX7TQg0L/UOp81zzsfzdA4jQVRJQX20hncKI7BELAxZfYVl1qiG192P8=@vger.kernel.org X-Gm-Message-State: APuU4Z//Vlzux5TXlXac0c9Tx4HgmFrXwAH+7opjXGLrEyYyCLgDdc4T pKc0uVyYfHu23wRlBB1UD+sbqg8UhCptgtHK0ckzGO/UPB54/yN5sDhK X-Gm-Gg: AYBFou1GtBXn/tTSQwQHl9sTDm/qiYmEtl6HD+kRAljTZQUUNOkWavazap670Md7+2Y sR89ExdR5nvxGkEEK+fJuax6qP2Tb+VD0T4jHwQWNzrXsoaBGoYuG6kM9nGufAZRxzapc7mEc5o H31Bf6PcAG6BY1KYvZZwarsrOCJ1awPb58PZWeuaX3tuFKr2+NBB5eoD/cPl17yv6iKQ+EH2RXw qS61nQRURxpFjhcab0tSj8OkVhE/5zcOsJXq55/+r1+4sj4jbF0drn3PTxg9eNJxq3R3HLVoD5g qGDyAtoUJtNLhpz/t4AbWNKGVekyZHl1+CMoL7pzIioiDZmk7qPwPxMePoMPUBf7wc/9Kkl8o80 8Hij3lhbkX6QtQzeRrRDmfroTesGn+Ob8vDQQyjVy4mXRqb4WfkT7uDMta6y/zgWA2ZGDEgLhiS TSm9jr4eTXwnZsw8QW2cbpjE2Bdfah/xTb8DssjmvSQg/qgUKaBTeUDTWgoRLCxmkZspWLMGQiQ jMsLImdbwNoyvmZ+5wzG9ySbc0esRbbsgiFVkz69TJWWOULTs9H8+f8RjJkw3kuUdb4Vs4p52xG OAHtf6Ra5tUx X-Received: by 2002:a05:600c:6099:b0:4ab:cc03:7f60 with SMTP id 5b1f17b1804b1-4bb55a753f8mr256550145e9.18.1794912238087; Tue, 17 Nov 2026 02:43:58 -0800 (PST) Received: from dl360p ([130.61.107.245]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb783f7eecsm104578445e9.3.2026.11.17.02.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2026 02:43:57 -0800 (PST) From: =?UTF-8?q?Adil=20H=C3=BCsrev=20Tepe?= To: neil.armstrong@linaro.org, jesszhan0024@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Adil=20H=C3=BCsrev=20Tepe?= Subject: [PATCH v2 2/2] drm/panel: novatek-nt36525: fix v1 review issues Date: Tue, 17 Nov 2026 13:43:53 +0300 Message-ID: <20261117104353.1180634-2-tadilhusrev@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261117104353.1180634-1-tadilhusrev@gmail.com> References: <20261116070212.314228-1-tadilhusrev@gmail.com> <20261117104353.1180634-1-tadilhusrev@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses the issues Sashiko AI flagged on v1 (https://sashiko.dev/#/patchset/20261116070212.314228-1-tadilhusrev@gmail.com?part=2): - Set prepare_prev_first = true before drm_panel_add(). Without it, drm_atomic_bridge_chain_pre_enable()/post_disable() call this panel's prepare()/unprepare() on the wrong side of the DSI host bridge's own enable/disable, which host_transfer() rejects on bridge-based hosts (e.g. samsung-dsim). - Fix the reset_gpio polarity: the driver drove the physical level directly instead of using gpiod logical values, which inverts under the GPIO_ACTIVE_LOW DT flag added in the matching binding patch. RESX is active-low (the 1-0-1 physical pulse the vendor sequence describes); switch the DT flag and all gpiod_set_value_cansleep()/ devm_gpiod_get() calls to logical values with the same physical outcome. - Request the "vpos" and "vneg" regulators the driver already needed (matching the binding fix) so dtbs_check and probe agree. - Use drm_connector_helper_get_modes_fixed() in nt36525_get_modes() instead of open-coding drm_mode_duplicate() + drm_mode_set_name() + manual display_info updates and returning -ENOMEM on failure (which drm_helper_probe_get_modes() logs as an error; the helper returns 0 instead). - Rename the compatible string to novatek,nt36525-xcover5, matching the fixed binding; the old samsung,xcover5-nt36525 never matched this driver's of_match_table. Tested on a Samsung Galaxy XCover5 running 7.4-rc1 plus this driver and the matching DTS/binding fixes: debugfs now reports the reset gpio as ACTIVE LOW, and the DSI panel connector probes and reports "connected". Signed-off-by: Adil Hüsrev Tepe --- drivers/gpu/drm/panel/panel-novatek-nt36525.c | 419 +++++++++++++----- 1 file changed, 306 insertions(+), 113 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36525.c b/drivers/gpu/drm/panel/panel-novatek-nt36525.c index d6d805791..ba3e003e6 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36525.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36525.c @@ -1,21 +1,16 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Novatek NT36525 MIPI DSI panel driver — Samsung Galaxy XCover5 + * Novatek NT36525 MIPI DSI panel driver for the Samsung Galaxy XCover5 * - * Panel timing + DCS init stream from Samsung GPL kernel - * (SM-G525F_EUR_14/kernel/drivers/video/fbdev/exynos/panel/nt36525/ - * nt36525_xcover5_panel.h) — 207 packets, 220 ordered steps. - * - * The DCS table is included from "panel-novatek-nt36525-init.h", which - * is generated from Samsung's header (see scripts/panel/gen-nt36525.py - * in the project tree; the lab tree ships the generated file at - * drivers/gpu/drm/panel/panel-novatek-nt36525-init.h). + * Panel timing and the DCS initialisation sequence are taken from the + * Samsung GPL kernel release for the SM-G525F + * (drivers/video/fbdev/exynos/panel/nt36525/nt36525_xcover5_panel.h). */ #include #include #include -#include +#include #include #include