Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1187501imu; Wed, 16 Jan 2019 14:23:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vCw/DSp5InvLQByfM0/QOSkonaw+E8hqT02b5gCzdxWHFlXOOzJkpQi8EQv3fYzphUrPx X-Received: by 2002:a63:40c6:: with SMTP id n189mr10729868pga.355.1547677433995; Wed, 16 Jan 2019 14:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547677433; cv=none; d=google.com; s=arc-20160816; b=Rz185p8HtbpX4db8uCTww04fywAkgFJLgfuHPyUY0LlVNLtLzxG3Ov75Xfk8gsvdEC 0s8TMSlGqiACEXNFT6xK0Lj4d+Gv2eaK+GIL0XpNTd0lbEriI8V0ftihy1gKI4IPvLNb VHVMplzaB35lk1yNatQtp2rsYiJvbxKSx/Itk1zXxUxAYsgrM3ShwFpTwPfVnBfIgaP1 gTnFRIz8/WFXZZ16+qEDw/uuLxMy/jRcYIQpstUz8PUKws2V5tJ5iPHqVnWznoPAGr8a lHGvyeNvjRSwcXSCd2XtZqBEkWqTk66mlfmjlT3Ai5fDOyajKxQKVUnvxskOCj1zx2PB OxCA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=64Wx58nuwxl+FJUm5CmV7GoiJ2jX/e48OCJHHJnwua4=; b=SsxGJqM8/ccuP619HPtt5QOFJtTPa+X6EBiUO1ziCDWYXVLexJ5sgWDwdIoVwEnVQo 5aiS9ycIlE4nmO4ghxAntpAhw3If8Dz+501QNlP+luEV9C6nG4x6H+0pjLyH2sCg3ZxY l0WsXifpGXNO0dAt5J3PMd6ht8Grl88ecvqfwUK1RqIlZvrmH7hs9F8bVVyF2WzWwyc5 nrqVCDcxF3M5E0ceZvl8SEM4JGY95BO1q+YjMXpxmpCLOx4bM9++Ta2Cv0nDS7jpkEuH fFKOiIoG6ZaKcrkQJvBzfjwBj8+/EKo91XepzLS3tADWKdPLHvRQjQfiSIFg6HL0pY/c hDiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cR/DhM8f"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si7662582pla.81.2019.01.16.14.23.34; Wed, 16 Jan 2019 14:23:53 -0800 (PST) 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="cR/DhM8f"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390921AbfAPOp7 (ORCPT + 99 others); Wed, 16 Jan 2019 09:45:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:47892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730894AbfAPOp6 (ORCPT ); Wed, 16 Jan 2019 09:45:58 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (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 8F72520657; Wed, 16 Jan 2019 14:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547649958; bh=RpxCb7uIWRRnSDY18jtHaRcDC4JxCs48Xtr9FHci1pA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cR/DhM8fX69O18yQo6C4R4q1WzitweTNFkCofTQiA4aGLy0Gh18x97b+adlHkewQc 3/WLhtWa1yHvP9aYeMhMrcitAgof465jSeVxkHx+Ttnq/1Uh0imMB1TUPA9WOzKdD7 9Bh3ON1HQnPneSShoSJvkq5VvDEPvqlID4TKgMiY= Date: Wed, 16 Jan 2019 15:45:47 +0100 From: Boris Brezillon To: Peter Rosin Cc: Alexandre Belloni , David Airlie , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Boris Brezillon , "linux-arm-kernel@lists.infradead.org" , Nicolas Ferre Subject: Re: [PATCH 4/4] drm/atmel-hlcdc: do not immediately disable planes, wait for next frame Message-ID: <20190116154547.711d7087@bbrezillon> In-Reply-To: References: <20190110151020.30468-1-peda@axentia.se> <20190110151020.30468-5-peda@axentia.se> <20190110182904.5efd08f2@bbrezillon> <20190110202522.10206f2d@bbrezillon> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Jan 2019 14:29:28 +0000 Peter Rosin wrote: > On 2019-01-10 20:25, Boris Brezillon wrote: > > On Thu, 10 Jan 2019 18:51:21 +0000 > > Peter Rosin wrote: > > > >> On 2019-01-10 18:29, Boris Brezillon wrote: > >>> On Thu, 10 Jan 2019 15:10:48 +0000 > >>> Peter Rosin wrote: > >>> > >>>> The A2Q and UPDATE bits have no effect in the channel disable registers. > >>>> However, since they are present, assume that the intention is to disable > >>>> planes, not immediately as indicated by the RST bit, but on the next > >>>> frame shift since that is what A2Q and UPDATE means in the channel enable > >>>> registers. > >>>> > >>>> Disabling the plane on the next frame shift is done with the EN bit, > >>>> so use that. > >>> > >>> It's been a long time, but I think I had a good reason for forcing a > >>> reset. IIRC, when you don't do that and the CRTC is disabled before the > >>> plane, the EN bit stays around, and next time you queue a plane update, > >>> you'll start with an invalid buf pointer. > >> > >> It might be possible to clear the EN bit in ...CHDR before enabling the > >> plane in ...CHER. Or is that too late? > > > > I think I tried that, but I'm not sure (BTW, this change was done in > > bd4248bb5e8b ("drm: atmel-hlcdc: reset layer A2Q and UPDATE bits when > > That patch is a big fat NOP if you read the documentation. Those bits > are marked with a '-' for all LCDC channel disable registers, for all > supported chips IIUC. Are the effects of those bits mentioned in any > errata? IIRC, it was not documented in the datasheet, but this came out during a discussion with the IP designer. > > It would be good with a comment that the present undocumented disable > method is intentional. Yes, I should have added a comment about that, my bad. > That would have kept me from assuming the whole > thing was just copy-paste junk from ..._enable that happened to work. > > >> disabling it")). Anyway, I'm not even sure this is still needed now > >> that atomic updates have a wait_for_flip_done/vblank() in the commit > >> path. > > The documentation for the RST bit states "Resets the layer immediately. > The frame is aborted." which sounds a bit scary and heavy-handed. But > again, I don't know what that actually means and what the effects are > but that was the reason for me wanting to avoid the RST bit. As I said, I'm not even sure the problem I was trying to fix still exists.