Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1842493pxb; Mon, 13 Sep 2021 06:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOgerXKCICkukpC7MrojuOY2x7ve780Yb75OilRtaDkKhgs3PCL57CZMxutQ1h4KYavJ7i X-Received: by 2002:a05:6638:3046:: with SMTP id u6mr9785544jak.35.1631540723217; Mon, 13 Sep 2021 06:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631540723; cv=none; d=google.com; s=arc-20160816; b=UcCwSuQHc0tfXrIw8XlnyTPZ64VE07P4cSpAMwgTHIZlgGlNag/3DWWKdrkq/Acolm k9ExIaIGllTWQpPvyWYtGjQfbLrTzVf7LxApsYchJpAbECAimLCnM3XJUEs2maft5oZp GS1jeITSSwD9cxZDiQkvSPXWaxW2qaAQDERFxvSDF+DVLDNE8aR4O2dgPuuLV+K0VrQo QNS5NJzgswlolFKePyREkbK891EMYaWnSO4gXlLtst2q9DoY22XeXxsaSDGGA8n52wRw Ia6KK3y6/hjlWgQTEzrA6k46nefM1uiOGk0GWhAzy9+7DVqLC7u/MwVCN6QfC9f4kt40 lcQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UkjUmPCBphROeq4tq098Igcu19HbpwxOgVCyhTZhKaM=; b=CDa4siO4iTv4k1tRwbzGf8NpkxIjRFRVU0biSnV3QKPjkhTSZqtFvODc3DpLK/stih fIfewojmX1+y0+1H08f6KvLn6IFDfN8g6QLg/U1OrFtZr7BvXRHUCNqyJOnB/W2UY2wd aXp7a/Q+BFspNLTgYFZsm7fyd60tzrDypdco69U65WQLzwxCC2IJfTh3C4MiE8pds2LR 2uirzoYNZN/kjDMJBBbqzUucjNVZQyaPHM560KJr+8dgQlADNqLIOj1hSGsQmb+0dXro juJPBPE1qP7xasTalJMMnq/y29KkDFPGiTOuR6i83AdYKGeVqaxTZfhV5/+w1l6nx90j ba/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q04Cv+3S; 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=pass (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 e16si7114275ilm.91.2021.09.13.06.44.50; Mon, 13 Sep 2021 06:45:23 -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=@linuxfoundation.org header.s=korg header.b=q04Cv+3S; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242402AbhIMNmT (ORCPT + 99 others); Mon, 13 Sep 2021 09:42:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241896AbhIMNgX (ORCPT ); Mon, 13 Sep 2021 09:36:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8F78610CC; Mon, 13 Sep 2021 13:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539666; bh=PVex8fCMaRtC1qcYDJnSUMp3qED/h2jG5k4Z5O2w71o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q04Cv+3SICLheKjgrivrKTWo7SbjOJAZYcQYKDm3syFMXlV2RhY01kl3jil2nRNyH H7wtxXXwt+k6lgsdlUkmUu39zqsbK476BWiJ7/UhyvmBCgBboqp2zy2N6JuYycf3Dw ssH5ewPZ7KbShYiPz6q4jWu3QQuHNkC0XTYmHlfE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Vasut , Daniel Abrecht , Emil Velikov , Laurent Pinchart , Lucas Stach , Stefan Agner , Jagan Teki , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.10 113/236] drm: mxsfb: Clear FIFO_CLEAR bit Date: Mon, 13 Sep 2021 15:13:38 +0200 Message-Id: <20210913131104.183068252@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Vasut [ Upstream commit 5e23c98178eb1a2cdb7c4fee9a39baf8cabf282d ] Make sure the FIFO_CLEAR bit is latched in when configuring the controller, so that the FIFO is really cleared. And then clear the FIFO_CLEAR bit, since it is not self-clearing. Fixes: 45d59d704080 ("drm: Add new driver for MXSFB controller") Signed-off-by: Marek Vasut Cc: Daniel Abrecht Cc: Emil Velikov Cc: Laurent Pinchart Cc: Lucas Stach Cc: Stefan Agner Reviewed-by: Jagan Teki Tested-by: Jagan Teki # i.Core MX8MM Acked-by: Lucas Stach Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210620224946.189524-1-marex@denx.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 007ea29abfcc..b535621f4f78 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -243,6 +243,9 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) /* Clear the FIFOs */ writel(CTRL1_FIFO_CLEAR, mxsfb->base + LCDC_CTRL1 + REG_SET); + readl(mxsfb->base + LCDC_CTRL1); + writel(CTRL1_FIFO_CLEAR, mxsfb->base + LCDC_CTRL1 + REG_CLR); + readl(mxsfb->base + LCDC_CTRL1); if (mxsfb->devdata->has_overlay) writel(0, mxsfb->base + LCDC_AS_CTRL); -- 2.30.2