Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp642789ybl; Wed, 14 Aug 2019 03:50:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrtvE4cWN1hHoa2nI+k8xBZvUeITNrJCPng96XIPaEHduia9C4OR/lguU5cqYwtZ7+1EAp X-Received: by 2002:a17:90a:9202:: with SMTP id m2mr6578253pjo.16.1565779819409; Wed, 14 Aug 2019 03:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565779819; cv=none; d=google.com; s=arc-20160816; b=bQyt6GUojD6YaCS0aTZhgXHoZqNMbKVposRHEnaPqZfv/PUutH4q9JvjJsHiHD7IKr XZPAyvcQU8luuoHl8m7C1pBJvAbyTH0azbIkJP1ZBLYnWLnxWuLhdXECT85WGo+bEQG/ fyCtz0IZbcrDN5u4gQRkENaxMkkFGUP3XGttV90+0UTp5vZ4cMeEPRfh40NbfIiTWUkq GfGZHzcOV0jjiWFqaZk1ExMWIcsY0B7VYMrDYjkypT18LiFpOiw2Ev5j+3H1+CkoGRKo rY5XtSXCoUC50MnANbFGSmn/KbUBtMdCL4w8WRt75IY0l7Uo4gI26zepTbeohcA0426w M8/g== 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=qRCSx43aWfPdbAFE2Ykq0OGfgTu/VPBwsS5FfdRN6go=; b=ZkpTitCgkUXnpiv0TE5EL8EzP63uiVFADrXJFKISsNonTPFbxgfXRkOgdeQkOpufH+ BUcKZ1DJEUhtOTowwApr541A/7Wn4TOulsdYpcmK1YGYSWarHwyfx4AU/3BhBRHmN/fN Xvsq61VwoGKKRq08VxQ5v4GcJH+7t8FYM8tgjXmZ/kjHqJhoy+mJLV1OmUXjUr8ToNvS 6jpZH6959UvK21FdlEV9LIUhWRHZT0uAc3DUP2+9wSj2ofQGZn7MIf0ZaHri42XvSFlV B09MbN/T68HyUMl+Ll5F3DgWzrL9wdCOR1UtBOFH7jLxNhfZa9q0bLzMGIibyX/13Z7V HINQ== 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 y192si68992003pfg.172.2019.08.14.03.50.04; Wed, 14 Aug 2019 03:50:19 -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 S1728037AbfHNKtP (ORCPT + 99 others); Wed, 14 Aug 2019 06:49:15 -0400 Received: from inva020.nxp.com ([92.121.34.13]:55452 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728008AbfHNKtM (ORCPT ); Wed, 14 Aug 2019 06:49:12 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 786D81A03A7; Wed, 14 Aug 2019 12:49:10 +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 6C8771A039F; Wed, 14 Aug 2019 12:49:10 +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 5F81F2060E; Wed, 14 Aug 2019 12:49:09 +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 v2 13/15] drm/mxsfb: Clear OUTSTANDING_REQS bits Date: Wed, 14 Aug 2019 13:48:49 +0300 Message-Id: <1565779731-1300-14-git-send-email-robert.chiras@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565779731-1300-1-git-send-email-robert.chiras@nxp.com> References: <1565779731-1300-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 | 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