Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp588728ybd; Wed, 26 Jun 2019 03:23:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAqArs2twpaGZSdmsJX3XgU4XmgJ2l5lUl4WSP6GzE2Mo1Ltlwa8AMKGnQ4gARa/J/NHzZ X-Received: by 2002:a17:902:7687:: with SMTP id m7mr4614325pll.310.1561544618406; Wed, 26 Jun 2019 03:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561544618; cv=none; d=google.com; s=arc-20160816; b=pKK+KzWP5nn0MRFgWBqJ/70vpflSGUl86S2fhSRdejLhOArnTAt0f2S9gsPgwKtpDJ ajLosiz7cuxCOK5ElbgraVVFfMh4lOifYQyZy6fvnqxcqX++U6vXsMf1LgEZRXmdBhrJ oAaSui+GOzd5/G5pEkQ0vcescBRs8v6d33sQ3kJ4omlIzpwJPRKhZ43/f2gWQiH8deEG 3CHPBVy0hupc4qAPfU/W1ov8+jOpC8nfO5n3VMoIj8TxnQNaAMtDthm9pnRjRdWN1jOP ydZUvbLkGSZun7wtgfP5CBnS9d1XzvgQxyAaRWW8ehjEh2b8yrZ0I3+LgmpjpsqsnsXB XB4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yyuETXr2EkbZQOH9h/9dK01cPMURu8Wqu5Wrp7dv6pA=; b=c87F09ZhJW+QVhUN4HHtbYPMVQ5V9RL6ik1s3n9TRjvwK2R//OTf9tr4i79OMmqfUp 9gKyciHT65DrqBqvLj4MpgSZ6r/YRzYz4sLed9Wjmvwnv8H/OttgbgA2M+edNYA/W70w BtuELBJb0HG8kxPEsBe9n2mFHiqBs2N9fPV55afvsc+g3HZTVLQnNTVr67qLZEpydxnp nkH3yjSC/4yuqc/rXLT5vlFuGSCTwftRg8T/P7ez9CjM0BVm+UmEfoqqpy8dBR0xbg3A ZrhzqTW3+b4qrjQ9UYci5NPqPx35MvtedoHSKRlwLXDfk+7mpvw9OCHT3HOFlEiuiA58 Ipgg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si3066196pla.2.2019.06.26.03.23.21; Wed, 26 Jun 2019 03:23:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbfFZKWw (ORCPT + 99 others); Wed, 26 Jun 2019 06:22:52 -0400 Received: from foss.arm.com ([217.140.110.172]:58072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbfFZKWw (ORCPT ); Wed, 26 Jun 2019 06:22:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 61DE4360; Wed, 26 Jun 2019 03:22:51 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 42AB43F718; Wed, 26 Jun 2019 03:22:51 -0700 (PDT) Received: by e110455-lin.cambridge.arm.com (Postfix, from userid 1000) id 083BF682573; Wed, 26 Jun 2019 11:22:50 +0100 (BST) Date: Wed, 26 Jun 2019 11:22:49 +0100 From: Liviu Dudau To: Pavel Machek Cc: linux-kernel@vger.kernel.org, Wen He , Sasha Levin Subject: Re: [PATCH 4.19 55/90] drm/arm/mali-dp: Add a loop around the second set CVAL and try 5 times Message-ID: <20190626102249.GQ17204@e110455-lin.cambridge.arm.com> References: <20190624092313.788773607@linuxfoundation.org> <20190624092317.745033085@linuxfoundation.org> <20190626075619.GB32248@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190626075619.GB32248@amd> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 09:56:19AM +0200, Pavel Machek wrote: > > On Mon 2019-06-24 17:56:45, Greg Kroah-Hartman wrote: > > [ 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. > > > > @@ -204,8 +205,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"); > > + } > > + > > We'll still get the debug message even if > malidp_set_and_wait_config_valid() suceeded. That does not sound > right. > Pavel It does, because the first malidp_set_and_wait_config_valid() has timed out, which is not the expected behaviour at all. LS1028A has some quirks that require this loop in order to get it out of some stalled state, but any other implementation of the IP should not have this issue. Hope this clarifies things. Best regards, Liviu > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯