From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D901A1F706B; Tue, 3 Dec 2024 15:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733238418; cv=none; b=T6XU/a5NMqHIekulJDbo+n8GMpwkM2jxWekqryfdCsE/l5E0qNEDXoIVzsuX23sKPUH5ZjNQNr2UpNyjD7AQRV8umjkYb1IYqKsmOYkOpCVrxR88Uv0BHNV4wve3Gmf0tVbUQb9KDaVk+YqMGS8QgAUZARzipcbiPyKdjEFWe7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733238418; c=relaxed/simple; bh=x5IxqqW8Mc5rhppTTlNvo5Y8m/0aP6UeWiDR4YQoQjs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bDHSgG54ClNFSbZBBOgu2WRt/lTa6JnDVRipttPlM+W4rsYrtpVt6FSQDJgJKSHk+VB5pEC5JOGn/sZLJwiQnmImeKAZ9tRLmqvQp/iqHEhJMNOeQKokwkcRrjLZ4Ybgn8MMY+cuc+R5zixSS9kpck0CpP5xk+d4Larqp1J7JxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2iuCqY5h; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2iuCqY5h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 641BAC4CECF; Tue, 3 Dec 2024 15:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733238418; bh=x5IxqqW8Mc5rhppTTlNvo5Y8m/0aP6UeWiDR4YQoQjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2iuCqY5hgKRZme6PCgM1jHA9BazcXzZmOFj8zT72OstHcTwsdayQy6ImGamdlyjKH wH++IXV0jaLYBzo9iaW6wBkBQVbHmscMYbxTBIBdQOpqoPC8KrHHOQxCpUbGs014MH UA71QFbI+NZ4JBTCaYdD5WXah1+IRVmcfu/YvMKQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Stefan Hansson , Jessica Zhang , Linus Walleij , Sasha Levin Subject: [PATCH 6.11 239/817] drm/panel: nt35510: Make new commands optional Date: Tue, 3 Dec 2024 15:36:51 +0100 Message-ID: <20241203144005.088316883@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241203143955.605130076@linuxfoundation.org> References: <20241203143955.605130076@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Linus Walleij [ Upstream commit 2418aa8516b26c5e332a1a8c216d4d620f965a56 ] The commit introducing the Frida display started to write the SETVCMOFF registers unconditionally, and some (not all!) Hydis display seem to be affected by ghosting after the commit. Make SETVCMOFF optional and only send these commands on the Frida display for now. Reported-by: Stefan Hansson Fixes: 219a1f49094f ("drm/panel: nt35510: support FRIDA FRD400B25025-A-CTK") Acked-by: Jessica Zhang Tested-by: Stefan Hansson Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20240908-fix-nt35510-v2-1-d4834b9cdb9b@linaro.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c index d3bfdfc9cff64..f54e0fa429378 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -38,6 +38,7 @@ #define NT35510_CMD_CORRECT_GAMMA BIT(0) #define NT35510_CMD_CONTROL_DISPLAY BIT(1) +#define NT35510_CMD_SETVCMOFF BIT(2) #define MCS_CMD_MAUCCTR 0xF0 /* Manufacturer command enable */ #define MCS_CMD_READ_ID1 0xDA @@ -721,11 +722,13 @@ static int nt35510_setup_power(struct nt35510 *nt) if (ret) return ret; - ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVCMOFF, - NT35510_P1_VCMOFF_LEN, - nt->conf->vcmoff); - if (ret) - return ret; + if (nt->conf->cmds & NT35510_CMD_SETVCMOFF) { + ret = nt35510_send_long(nt, dsi, NT35510_P1_SETVCMOFF, + NT35510_P1_VCMOFF_LEN, + nt->conf->vcmoff); + if (ret) + return ret; + } /* Typically 10 ms */ usleep_range(10000, 20000); @@ -1319,7 +1322,7 @@ static const struct nt35510_config nt35510_frida_frd400b25025 = { }, .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM, - .cmds = NT35510_CMD_CONTROL_DISPLAY, + .cmds = NT35510_CMD_CONTROL_DISPLAY | NT35510_CMD_SETVCMOFF, /* 0x03: AVDD = 6.2V */ .avdd = { 0x03, 0x03, 0x03 }, /* 0x46: PCK = 2 x Hsync, BTP = 2.5 x VDDB */ -- 2.43.0