Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2162751ybl; Thu, 29 Aug 2019 04:33:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGfaGgihFrHANLBtrZqIvG1fAJCOXpVBYUYno/SzZ1Z1NfANUSvm35TWISDulZb9tTfPwS X-Received: by 2002:a17:902:7842:: with SMTP id e2mr9172613pln.49.1567078415848; Thu, 29 Aug 2019 04:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567078415; cv=none; d=google.com; s=arc-20160816; b=tBIMKjHRAe60QeI+E6upWg+BSBGfjIhUS257q2t2cYmDTNRkbvAhoQVRXxD6ABLa7W TH+Jw29PAf/9019G/xWLdEjuAw2Kgz98dpOTV5sIlGAxtpr47w/yZbm/DFWpuC8P1+is nuwAN3lAbmODPozwBOV/6piWKmJLOfseVmGNgZ7awwH4E36usRLclX0CxeDmIjSy4TKI wrfyX5VRWlBcF+2+l4+YbcG6az6P/P3kgrZgec77CH+D3CLKNDstKzclwCbXKQRUSoVf dRqqn/zaOwiDNtUxn8QtK1CqH/nwEBff3Fw19ObLco0auOp8y2HI4inCFmJPNFgO6sxz vsaQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a0ZG5i5KRvPTwDT36nOYuKt/dDYUG/rLKJWCR3XbFus=; b=PY5wFQF4oDDtZAqV+a5LPdbeFUZxQ6umgVazsD2TAW4EdjobtRzUKLigZDx9BNqBzc ro/Us9/hN/hTcg9l5U0k+EBrd3OstbuovOBYYsH9x1wlaO3ZvHuPaRCPt06AKvSC6Gvw Ayc7qu7iflbIcmYkWtJ56KB1TzyqYswEtr0mX4J2RjY3BdaktEEzjbdN8sZZKbMqT++C rzAcCP6NbUQYGuZyomzWeLlaI4/8LMM1ipBRZ2zZwIJVSrhWkIduBUN+itWOiYgcwRAO B+0WjvJsvW3+4oGbJO0aZmQlrn2HsOetm8okvuQ62XPzgsB3Fw22xLilqauFmJWlNQ6U cMUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123si2499468pfy.61.2019.08.29.04.33.19; Thu, 29 Aug 2019 04:33:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727688AbfH2Lau (ORCPT + 99 others); Thu, 29 Aug 2019 07:30:50 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49894 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728096AbfH2Laa (ORCPT ); Thu, 29 Aug 2019 07:30:30 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 344F81A015C; Thu, 29 Aug 2019 13:30:28 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 318A31A0010; Thu, 29 Aug 2019 13:30:28 +0200 (CEST) Received: from fsr-ub1664-120.ea.freescale.net (fsr-ub1664-120.ea.freescale.net [10.171.82.81]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 318D020613; Thu, 29 Aug 2019 13:30:27 +0200 (CEST) From: Robert Chiras To: =?UTF-8?q?Guido=20G=C3=BCnther?= , Marek Vasut , Stefan Agner , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Pengutronix Kernel Team , NXP Linux Team , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 12/14] drm/mxsfb: Clear OUTSTANDING_REQS bits Date: Thu, 29 Aug 2019 14:30:13 +0300 Message-Id: <1567078215-31601-13-git-send-email-robert.chiras@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567078215-31601-1-git-send-email-robert.chiras@nxp.com> References: <1567078215-31601-1-git-send-email-robert.chiras@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bit 21 can alter the CTRL2_OUTSTANDING_REQS value right after the eLCDIF is enabled, since it comes up with default value of 1 (this behaviour has been seen on some imx8 platforms). In order to fix this, clear CTRL2_OUTSTANDING_REQS bits before setting its value. Signed-off-by: Robert Chiras Tested-by: Guido Günther --- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c index e727f5e..a12f53d 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c @@ -225,6 +225,13 @@ static void mxsfb_enable_controller(struct mxsfb_drm_private *mxsfb) clk_prepare_enable(mxsfb->clk); if (mxsfb->devdata->ipversion >= 4) { + /* + * On some platforms, bit 21 is defaulted to 1, which may alter + * the below setting. So, to make sure we have the right setting + * clear all the bits for CTRL2_OUTSTANDING_REQS. + */ + writel(CTRL2_OUTSTANDING_REQS(0x7), + mxsfb->base + LCDC_V4_CTRL2 + REG_CLR); writel(CTRL2_OUTSTANDING_REQS(REQ_16), mxsfb->base + LCDC_V4_CTRL2 + REG_SET); /* Assert LCD Reset bit */ -- 2.7.4