Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2253824ybd; Mon, 24 Jun 2019 03:22:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwHIAX8gPqG3PbbrCIXFmU9WpYnyMuFW54iXaJokIOSWEFqnxTm4kp93kOLgV5Y7hziR7E X-Received: by 2002:a17:902:a986:: with SMTP id bh6mr145943869plb.100.1561371736616; Mon, 24 Jun 2019 03:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371736; cv=none; d=google.com; s=arc-20160816; b=yXlaGso5TmI3OK+Ae2p22dQLR2tZA4TTF7CY1D2JI2vHPaGd01MSIZFl3bez6BgWIO TFSlmWPeyUQ1EkbGqQuWX2H6TNykGFHkpBThbvYOhYb/ewwVfpyI7i6Ll5S6eQVUNrSN khyTkKJbogFOwCSP3j7gQ6c6dykUnqzfiUiqLmL0+hG/ac54W2+muZY9rfVXmy8uYoTE sVJVKbboiILAxELoE0yT2QRSAzxLTCprlnRJdmHLvlZcLhUpoTmJNnZY12QJsuQWI37T rPqAoaRa513DCsEn0kAjVXWAynvWx8PNwOIocEd97XBotiINdCFuwJF5ZrKbYUrwaAqN 5nQg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aMtoZTyBY0w0TOiwfU0sjjTWnvTmp6oiZnSf0uUSMP0=; b=YJCL2e2w1IcGQebb9+oTLgYbsd4aId4t+To+HC88/qHlSCfKw5g15rA79MiTh7nmsj BdcX1ieqJORClCShJyC0BiJZYMr+ED5lTpaVGtpCkULrq9PTe70jluDv8uTD4hJYiANR sVFogBVsJhZojyalJQlPoPnmv0R+ZckvGPGj0OWnXwfTFa+1xIgNJ/8KKPxGkJ2YydXf 6AWAYJX7NN82TO5dKmYhZgy8vdkpuqbME0+82c9Uu7x4Ghjs3lslDzhH1FsEDfxYKC45 9iZrIKTdWprq3pJCrfABPypCWybFPMbIP/O3k1ZSDlrjsMC27NgcEZ1/bGod0/3/TJqf MkAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cK4nLNRp; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si7917038pgp.45.2019.06.24.03.22.01; Mon, 24 Jun 2019 03:22:16 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cK4nLNRp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730593AbfFXKVo (ORCPT + 99 others); Mon, 24 Jun 2019 06:21:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:57432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727525AbfFXKVn (ORCPT ); Mon, 24 Jun 2019 06:21:43 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A938A20645; Mon, 24 Jun 2019 10:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371702; bh=bD9YaJqBlzl1KE7+ecKFBN9ZNPFXK3KxohStnliNm60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cK4nLNRpFig/SrmIREvUXfevaopa8Rhg5qLROSeEUmhGS802jXyOuhD95rHi969VC dxrMGUMU/5RoS6WfHq+QtDYWfzYaIr0bpPbYo4l9E5MBnW1Ce1KY0XHhGaEQbO+Mu1 ArWRExiFSbJz0A8DXXpIyCXtddozghRltfwhIRIk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen He , Liviu Dudau , Sasha Levin Subject: [PATCH 5.1 070/121] drm/arm/mali-dp: Add a loop around the second set CVAL and try 5 times Date: Mon, 24 Jun 2019 17:56:42 +0800 Message-Id: <20190624092324.454603668@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6a88e0c14813d00f8520d0e16cd4136c6cf8b4d4 ] This patch trying to fix monitor freeze issue caused by drm error 'flip_done timed out' on LS1028A platform. this set try is make a loop around the second setting CVAL and try like 5 times before giveing up. Signed-off-by: Wen He Signed-off-by: Liviu Dudau Signed-off-by: Sasha Levin --- drivers/gpu/drm/arm/malidp_drv.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index ab50ad06e271..64da56f4b0cf 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -192,6 +192,7 @@ static void malidp_atomic_commit_hw_done(struct drm_atomic_state *state) { struct drm_device *drm = state->dev; struct malidp_drm *malidp = drm->dev_private; + int loop = 5; malidp->event = malidp->crtc.state->event; malidp->crtc.state->event = NULL; @@ -206,8 +207,18 @@ static void malidp_atomic_commit_hw_done(struct drm_atomic_state *state) drm_crtc_vblank_get(&malidp->crtc); /* only set config_valid if the CRTC is enabled */ - if (malidp_set_and_wait_config_valid(drm) < 0) + if (malidp_set_and_wait_config_valid(drm) < 0) { + /* + * make a loop around the second CVAL setting and + * try 5 times before giving up. + */ + while (loop--) { + if (!malidp_set_and_wait_config_valid(drm)) + break; + } DRM_DEBUG_DRIVER("timed out waiting for updated configuration\n"); + } + } else if (malidp->event) { /* CRTC inactive means vblank IRQ is disabled, send event directly */ spin_lock_irq(&drm->event_lock); -- 2.20.1