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 91A8E1714A8; Thu, 15 Aug 2024 13:43:16 +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=1723729396; cv=none; b=sgRX3kECBdhO1pPUHej/Ovz1vrjqVMBzNcpkT+YMMc0/Pc9w1nZ6/BIlkeMHjmK6xuBm+rhi36zl8KwfiNGv1eODmS9TmEX8OcPDVy9ydksQDuTyWdu7ZsLalpBP+FhrbL1WxRxQI448UV4ofgB3LFei/dZxt7RYrakf15HaIOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723729396; c=relaxed/simple; bh=/jJ4YgOPyFxNybTgSXqcSA45TFDMuKHLRS1NAifUbWs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TxhNfjUnmAWe2gJLRvEVbjBEUOtH5hl/y3wis4HcotXBSFIqo/eeGhujL0r7Hv1QLlv5oliS6Gl87Op3nBUc1UObqt6ROf6rH5RuSLPPNUn2J7VO2p6+OEeKAnehT+xytZ57l43vVAJRx3WZPVqn7wHlWWQmC2celiDGAN7XpHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lkURTO/5; 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="lkURTO/5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CC27C32786; Thu, 15 Aug 2024 13:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723729396; bh=/jJ4YgOPyFxNybTgSXqcSA45TFDMuKHLRS1NAifUbWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lkURTO/5lNIaM37v40S0HdqAKGcLLE2T+zvfc/iEdJM2lEHVtKIJSIgOHRGWI8o9o 4MT3MzCdZVhBr33jv38Qk3BgniFUSx09pzM5kA+Iq11gHbJMqzEyGJ70udSXbIGyud X3wxyTTy96q3JinSN7gJuFDAAt9WsqsDHO8Ds/ok= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Douglas Anderson , AngeloGioacchino Del Regno , Dmitry Baryshkov , Linus Walleij , Neil Armstrong , Sasha Levin Subject: [PATCH 5.15 084/484] drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare() Date: Thu, 15 Aug 2024 15:19:02 +0200 Message-ID: <20240815131944.532469091@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131941.255804951@linuxfoundation.org> References: <20240815131941.255804951@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Douglas Anderson [ Upstream commit 6320b9199dd99622668649c234d4e8a99e44a9c8 ] The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in boe_panel_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too. Found by code inspection. Fixes: 812562b8d881 ("drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence") Signed-off-by: Douglas Anderson Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index c448be3d01d16..0a2d5f461aee8 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -553,7 +553,11 @@ static int boe_panel_prepare(struct drm_panel *panel) usleep_range(5000, 10000); if (boe->desc->lp11_before_reset) { - mipi_dsi_dcs_nop(boe->dsi); + ret = mipi_dsi_dcs_nop(boe->dsi); + if (ret < 0) { + dev_err(&boe->dsi->dev, "Failed to send NOP: %d\n", ret); + goto poweroff; + } usleep_range(1000, 2000); } gpiod_set_value(boe->enable_gpio, 1); -- 2.43.0