Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2288653imu; Thu, 10 Jan 2019 11:27:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN4NQc62uXqJVXM+qAcoZSrClRZlYROOjVlcIkXWTn1mJtpd2QHM1Afkw1H7Y9MQBXC7hnpO X-Received: by 2002:a63:3602:: with SMTP id d2mr10338347pga.404.1547148442136; Thu, 10 Jan 2019 11:27:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547148442; cv=none; d=google.com; s=arc-20160816; b=Fw6yfw+H+l1/h28+ef1Eq/N97HnfRaj8p/r/IAovtQr9zTkG3YdbMBQWD0EM3wOaR4 AG8iCK8lYAbKyMU2BszqnjOQnFHEiRZLqzzVTXr0HW8TuFOtY2PvJ2rhHyuPzUeu5m9Z B3fZxk4+OAvDRMbCvC/kU6WcdIuKabDBSVVfFWV4vUh0xVFcJdraglqFom5zY1xQOTAw CZk1zCiz7U+6Fq9DbgZ6GkNG9SjmEtJafMwoCMb0ovlVJIn7qqfhvkbOLZ1UH7N/5xud hc+vx1iu6vPaOKKVrTT37BPwpornwsLP/beRBPFNJILHi5ItbAyunLl6HtMLc5RbWxQq fwBg== 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=aezL/1hbbwzk+gYtpfcIlmB4Mg4WpPToiKY7LK5DKoU=; b=LwlnQV5UqqN0dumDyGeHSh2gsb0iyYrTJ3n6c3DJsxaaZC3U5m2nx0PsTAF9hWr8r2 nohaelr9c1+eDhFu+NswJke2j2ATdOHswDDXtBuLyOyL1B/ldYH0A2lgCeJ8PE7RXOll WroZYVrvJPyJCVyDbWmbQt42R1a9FUOw4BBsAnqPWQCgCPnCQ94k00BZzrk5IKpx8f7g /3F9GQVk1ibB4mDLTdtkwRrT9okl9GZ9AfC6kgQYym6aLEl4aWa6JeqsSIER3ki2Upyx umqmBpZk3/st2Jcli/Jr0BWQ1WjKbQkhH5v0CfywzKStvOZmcsPgAYkiQbcAm3KKyqso hcgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fIJpWIzw; 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 j11si20400467pgk.265.2019.01.10.11.27.06; Thu, 10 Jan 2019 11:27:22 -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=fIJpWIzw; 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 S1729450AbfAJTZc (ORCPT + 99 others); Thu, 10 Jan 2019 14:25:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:47940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728572AbfAJTZc (ORCPT ); Thu, 10 Jan 2019 14:25:32 -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 8B8C220651; Thu, 10 Jan 2019 19:25:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547148331; bh=/vR7LskhHHSTMwzevIJBqkXpkfEf+ABm3ogsIzBsb7A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fIJpWIzwCdjQEVAZMDq4Sh4f4Spa7TVjYDR++txQnfi9dt8G1NrWTnSCC1pXE1Wz6 kCe+BtkENC9yf+/aKLqxIFroKdM6mQkex7hzm3e0NGbrPp1sFTNuX1cpuQgZqf74Zd ZQFaqlTSB/hfEdogklntQVSZCa3sSBn2T1IPHfBc= Date: Thu, 10 Jan 2019 20:25:22 +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: <20190110202522.10206f2d@bbrezillon> In-Reply-To: References: <20190110151020.30468-1-peda@axentia.se> <20190110151020.30468-5-peda@axentia.se> <20190110182904.5efd08f2@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 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 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. > But this patch is not overly > important, I just wanted to avoid the resulting "black hole" when the > plane DMA is disabled mid-frame. But disabling planes is probably not > something that happens frequently and will perhaps not be noticed at > all... Okay. Other patches look good to me, I'm just waiting for Nicolas feedback before applying them.