Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp819730ybd; Wed, 26 Jun 2019 06:33:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxazzP0C9HFAis4BE8/LRhYMKNEafb/+f614HBvZr3qOfWOa0gccEI+NzZoGURiCRiiONbE X-Received: by 2002:a63:5247:: with SMTP id s7mr2905532pgl.29.1561555994674; Wed, 26 Jun 2019 06:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561555994; cv=none; d=google.com; s=arc-20160816; b=zpCbquPiGozsL9TNZv3jd0o89kImsMedCXaNYpo2LyyINhOP+jd+Sl0YeNedRu1k9D hqwM1LrSdmYugmns0MGq03eriHFeClQ06isiH2bCU8ZbajpVzNtJukdAr5hSiE4/s+oZ tUP5WivJH5o1qgsI2qY3xMugdVmFrG9gqThA1PBImDr/r+yc5u2gpPMJbmgUaag9gNzu FP4VSG8X66TN+F7vtFhOf6ZMXUTBhevoXrHgY/hECnT9j3pz6xUscimcBqnrjqmGTIs+ MZdRsTYqX3dDc2aZT4L0lcP2QT1yXh/nVSjiIKoYJTgy//JrzTSe30LhRqJ0LiUfBhHD T+DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=iNI8OupQYMOZPwppgKHzgZHVv2dGyusyBXCkqTdt0io=; b=IaE89jUXfl/1FIQ2j3M80514kCcA8VSN9PkzNDVBhlJ9TK972Hpm4NAKXCA/9YqOk3 I5QWl8iSwjPRIdmh/Z4NyuJnvYyn1sD5DgVn7nQSdd7QcYCYrh0zvg5Arkeajk+48f+3 koZyVH7ayRPmrpF0bE9+okith6X11r8fS2utwJw1doVzU2XrM5vGWxQbQv3D5iPWHnLn yLLNs2oYIq+Mx6fEma3I8FqPzeONIX1D6XJJlT1XuOXvfnBtwnpde2pyR7+SUTVNDfbU nBO+iEzQVkWH3qKqW0G3fUQctNC2S2qcYljDdmnSHZDT9bJSq0EciMSHRKFQCgWmOAg9 1zsQ== 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 19si2234086pfc.239.2019.06.26.06.32.58; Wed, 26 Jun 2019 06:33:14 -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 S1727837AbfFZNcl (ORCPT + 99 others); Wed, 26 Jun 2019 09:32:41 -0400 Received: from inva021.nxp.com ([92.121.34.21]:57602 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbfFZNcb (ORCPT ); Wed, 26 Jun 2019 09:32:31 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DEFAA2009A8; Wed, 26 Jun 2019 15:32:28 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D1C802009B2; Wed, 26 Jun 2019 15:32: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 24DA1205DB; Wed, 26 Jun 2019 15:32:28 +0200 (CEST) From: Robert Chiras To: 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, Robert Chiras Subject: [PATCH 09/10] drm/mxsfb: Clear OUTSTANDING_REQS bits Date: Wed, 26 Jun 2019 16:32:17 +0300 Message-Id: <1561555938-21595-10-git-send-email-robert.chiras@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561555938-21595-1-git-send-email-robert.chiras@nxp.com> References: <1561555938-21595-1-git-send-email-robert.chiras@nxp.com> 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 --- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c index 45ca16b..02a5684 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c @@ -223,7 +223,14 @@ static void mxsfb_enable_controller(struct mxsfb_drm_private *mxsfb) clk_prepare_enable(mxsfb->clk); if (mxsfb->devdata->ipversion >= 4) { - writel(CTRL2_OUTSTANDING_REQS__REQ_16, + /* + * 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 */ writel(CTRL2_LCD_RESET, mxsfb->base + LCDC_V4_CTRL2 + REG_SET); -- 2.7.4