Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2179048imu; Thu, 10 Jan 2019 09:32:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN6/7iOks8s/4JIxyD159isDaj7a2aprWpOeGf7nB2w5i+HsfZp2L0wXFxvIZ18FIyarP1Sz X-Received: by 2002:a62:4549:: with SMTP id s70mr10952160pfa.233.1547141543332; Thu, 10 Jan 2019 09:32:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547141543; cv=none; d=google.com; s=arc-20160816; b=gZOFkhSEsU0R3xtKnk8vCUVOgQIcm7FLCaAMneVlp8atmliogS5Vdx8UJSSqlFhccp eMMdH8jFGOKjvGuBHn3hvV9jeFF27x2jqTWy4UB7LduXPUULkmcrstt7peI0xcaOu5/M z0ItmE+m8wT2baQNJKzzIpPVVNGE1BETjPTnMIYRr4BrB9P3FqJp8Gtq/fW7d3BpUc3Z xKPGC4GX4qctEa29NSKRteOfxggDkqUEEZJBVBTr89H4D4O/ibIef/D+OR9mPgxIYtG6 PSUgDavGQ3oAQaCT3v24lA8il5Skym9ccSD2MOUh4aP4h5GR83D5QrlvQvGg5rqhOVas WyCA== 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=1eJAYllhYBxC4K/ZOvI9Ck8pvFks/t7mOPGeMfP+Wks=; b=Mf7q+ACY9rEmkHkMNN8SnKvXdLKtC4WuviTJRxDshxXz4X5tpWUaYOvJ+8GGWhFxlV vNMa79WktbX1DPN0mGhSGZ0fBIHJ4iY2xZ5U54d1du/4VDnKE5VGX2QG3Pc40Z0cM+Y4 ci4rM8giIi63xgXqngLYmfOEtU/0mhoGE8swPhhBcWlIzusj1y1qxvLXofjCUAJji6Ie 329v9WimLfRiY83owIh577inZUK5x2tXnICpLb2lCiY274ojyrcmT1BtRS/7IBBWoWDf M8Wv+X92KlyAtxSn6g8aPeGcqCNPgRWYB6myjn0VhCHkTASuoyfT7TvK3xhc/xK+yozX ONYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RyJWpk8p; 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 j3si14309262plk.199.2019.01.10.09.32.08; Thu, 10 Jan 2019 09:32:23 -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=RyJWpk8p; 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 S1730375AbfAJR33 (ORCPT + 99 others); Thu, 10 Jan 2019 12:29:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:43240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730008AbfAJR31 (ORCPT ); Thu, 10 Jan 2019 12:29:27 -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 D3E4920675; Thu, 10 Jan 2019 17:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547141366; bh=q6nzpHw6PA14SiZLCIxsAslUipB3CPV2u5tQO8zhUJo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RyJWpk8pjrRaAOV75OxxxUhQ+LA0rxZMfWmPJJZ7OjrEnAEwq8s6QyjuSkyCAo0fi OnBSl1kMX6h5NGG8myMlqn2DdZ+xV9EOFCU40DwFdZpPXFKzBdNshsfwzwSslLnhG1 v6b7NpG7nLVXNNhOVuT0TVJio9TgIvMHRllUEaGI= Date: Thu, 10 Jan 2019 18:29:17 +0100 From: Boris Brezillon To: Peter Rosin Cc: "linux-kernel@vger.kernel.org" , Alexandre Belloni , David Airlie , "dri-devel@lists.freedesktop.org" , Boris Brezillon , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 4/4] drm/atmel-hlcdc: do not immediately disable planes, wait for next frame Message-ID: <20190110182904.5efd08f2@bbrezillon> In-Reply-To: <20190110151020.30468-5-peda@axentia.se> References: <20190110151020.30468-1-peda@axentia.se> <20190110151020.30468-5-peda@axentia.se> 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 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. > > Signed-off-by: Peter Rosin > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > index 05519e8c6586..f2f570642f84 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > @@ -728,9 +728,7 @@ static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p, > > /* Disable the layer */ > atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHDR, > - ATMEL_HLCDC_LAYER_RST | > - ATMEL_HLCDC_LAYER_A2Q | > - ATMEL_HLCDC_LAYER_UPDATE); > + ATMEL_HLCDC_LAYER_EN); > > /* Clear all pending interrupts */ > atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR);