From patchwork Sun Nov 17 02:40:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 11247985 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44FC117E6 for ; Sun, 17 Nov 2019 02:41:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24BA82082E for ; Sun, 17 Nov 2019 02:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbfKQCly (ORCPT ); Sat, 16 Nov 2019 21:41:54 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49428 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfKQClx (ORCPT ); Sat, 16 Nov 2019 21:41:53 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 3820F28FA57 Received: by earth.universe (Postfix, from userid 1000) id 5934C3C0CB1; Sun, 17 Nov 2019 03:41:40 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Laurent Pinchart , Tomi Valkeinen Cc: Tony Lindgren , Merlijn Wajer , "H. Nikolaus Schaller" , linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Sebastian Reichel Subject: [RFCv1 37/42] drm/omap: panel-dsi-cm: fix remove() Date: Sun, 17 Nov 2019 03:40:23 +0100 Message-Id: <20191117024028.2233-38-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191117024028.2233-1-sebastian.reichel@collabora.com> References: <20191117024028.2233-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The remove function should disable the panel by calling the unprepare() function before the panel is disconnected from MIPI bus instead of trying to reset it. Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index f607b3dfa31f..90132d1d1f5d 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -604,6 +604,8 @@ static int dsicm_remove(struct mipi_dsi_device *dsi) dev_dbg(&dsi->dev, "remove\n"); + drm_panel_unprepare(&ddata->panel); + mipi_dsi_detach(dsi); drm_panel_remove(&ddata->panel); @@ -613,9 +615,6 @@ static int dsicm_remove(struct mipi_dsi_device *dsi) if (ddata->extbldev) put_device(&ddata->extbldev->dev); - /* reset, to be sure that the panel is in a valid state */ - dsicm_hw_reset(ddata); - return 0; }