Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1250239pxa; Thu, 20 Aug 2020 06:46:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9t+tLCzp5glRVdnGguY/AytpMmVnqX9kLrEZDqhG54fLdfTx/R7Aial+9nLJEsfMjhtEN X-Received: by 2002:a17:906:3c10:: with SMTP id h16mr3295721ejg.233.1597931188134; Thu, 20 Aug 2020 06:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597931188; cv=none; d=google.com; s=arc-20160816; b=Jx4iOCVfPXatg2/ZpaLHLcFfVIg8UByXB/9ZVgGaRyT/6tSybd6iys3CJW2b1qHDW1 f3iX93CAx5Yf71sgsBNEidmXjeoGLHru00a4wBhTT+zxCVC3W44IJvtZwborAt7/DK9c 0XL4dmRUkmSp7/7hz/CzEtgHj/Wpb1UQPEoszOgssO/orQc9yzwJVKdXvd3ghfZgbXjz ybj4T5AFf737zUEa1GVwNCbRcmPFl9HmXBktlhLm9Fz7O3mjJF2l/WowvzoUIHX51zLk vUmRwLm9GkG7Yeqf6PycGn4bK7JsqCw7oe/3QBPdAtbAxqAbOgFgUJ1HjXmVFFFluyW9 B60Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hokt81rrabj6Eyq4h5aCiMu9RVsnmMUk5nU7zcfABoA=; b=zPFjWqh/vAyhqXry5787w6TEZn31rE9wwSiJN5gmzhTL1xdwwJSglAeVQtAe07DWtK tQ0NrSLhZCE7sH67MRGET4DGKcAQ8UO5QZLAMeRHzGhn2cWRwyGJ7HlhFGCeK3v2XnR3 fxvgsl2ees1e5KPgYUiwzmTv8AJXZPvGBryKhBIAapS6uroUgiW/Gln2If4nn/P8z989 YprERRQagkJGFiQOyBTw+6zrprHf5s4yoX2iN0Sp6rA3YqLmhW2o8XrVymmTmjohcW7t w4s9oS0znR5+TNg/k6KfhyAJs6caMozNGSf/86NQ3Z3/MTnCEswpOLhVrlqtk70kuFsb HF2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TBYeawwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z61si1277875ede.593.2020.08.20.06.46.04; Thu, 20 Aug 2020 06:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TBYeawwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730287AbgHTNoy (ORCPT + 99 others); Thu, 20 Aug 2020 09:44:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727783AbgHTJ2o (ORCPT ); Thu, 20 Aug 2020 05:28:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB6B222CF6; Thu, 20 Aug 2020 09:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915724; bh=0Nb43DrjVKO1y1MBAI0fWzrUgr9mwDATSa8eCr+UOgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TBYeawwJcjwARGKmHbnEhVa5Gv2fGBSn6zEuAMhYmsz/hWNXhZ2jwIWmJaVIJk4fu bS/w53QvbKn8qJVE2qeA3PKC9DI8cK3sFJ33vVdK925N/fmZ9ymVs6mbI+CwRAbUPp itZHpQROG+6XHv4NA9IUb8xJCAynPyS+2wv3pcFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Zabel , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , Liu Ying Subject: [PATCH 5.8 112/232] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() Date: Thu, 20 Aug 2020 11:19:23 +0200 Message-Id: <20200820091618.244122765@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liu Ying commit 3b2a999582c467d1883716b37ffcc00178a13713 upstream. Both of the two LVDS channels should be disabled for split mode in the encoder's ->disable() callback, because they are enabled in the encoder's ->enable() callback. Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging") Cc: Philipp Zabel Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/imx/imx-ldb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -304,18 +304,19 @@ static void imx_ldb_encoder_disable(stru { struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder); struct imx_ldb *ldb = imx_ldb_ch->ldb; + int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN; int mux, ret; drm_panel_disable(imx_ldb_ch->panel); - if (imx_ldb_ch == &ldb->channel[0]) + if (imx_ldb_ch == &ldb->channel[0] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; - else if (imx_ldb_ch == &ldb->channel[1]) + if (imx_ldb_ch == &ldb->channel[1] || dual) ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK; regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl); - if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) { + if (dual) { clk_disable_unprepare(ldb->clk[0]); clk_disable_unprepare(ldb->clk[1]); }