From patchwork Sun Feb 26 15:52:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9592713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A652604AB for ; Mon, 27 Feb 2017 05:15:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C82427FB1 for ; Mon, 27 Feb 2017 05:15:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3164C28375; Mon, 27 Feb 2017 05:15:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B32527FB1 for ; Mon, 27 Feb 2017 05:15:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B37D6E2C9; Mon, 27 Feb 2017 05:14:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id B38BC6E2A3 for ; Sun, 26 Feb 2017 15:52:35 +0000 (UTC) Received: from mail.nefkom.net (unknown [192.168.6.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3vWTr12m3Fz3hk6J; Sun, 26 Feb 2017 16:52:33 +0100 (CET) X-Auth-Info: 8jpUyDncQkBqE+tbsDV/jCKHpA6f2THsTF7ltjiO/B8= Received: from kurokawa.lan (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3vWTr053GMzvdWQ; Sun, 26 Feb 2017 16:52:32 +0100 (CET) From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: mxsfb: Assure CTRL and CTRL1 values are latched into HW Date: Sun, 26 Feb 2017 16:52:05 +0100 Message-Id: <20170226155205.22277-1-marex@denx.de> X-Mailer: git-send-email 2.11.0 X-Mailman-Approved-At: Mon, 27 Feb 2017 01:45:06 +0000 Cc: Marek Vasut , Breno Lima , Daniel Vetter , Fabio Estevam , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP For reasons unknown, the first write into CTRL and CTRL1 registers is not actually latched into the hardware and the data read back are the reset values. Second write into the same registers has the expected effect though and a readback returns the written values. Add the second write. Signed-off-by: Marek Vasut Cc: Breno Lima Cc: Daniel Vetter Cc: Dave Airlie Cc: Fabio Estevam Cc: Stefan Agner --- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c index 6d701d2c362d..f02d23d55995 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c @@ -84,6 +84,8 @@ static int mxsfb_set_pixel_fmt(struct mxsfb_drm_private *mxsfb) writel(ctrl1, mxsfb->base + LCDC_CTRL1); writel(ctrl, mxsfb->base + LCDC_CTRL); + writel(ctrl1, mxsfb->base + LCDC_CTRL1); + writel(ctrl, mxsfb->base + LCDC_CTRL); return 0; }