Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751292AbdGQG5u (ORCPT ); Mon, 17 Jul 2017 02:57:50 -0400 Received: from smtp.csie.ntu.edu.tw ([140.112.30.61]:35584 "EHLO smtp.csie.ntu.edu.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbdGQG5s (ORCPT ); Mon, 17 Jul 2017 02:57:48 -0400 MIME-Version: 1.0 In-Reply-To: <20170717065504.xnahsboer3fh4k3i@flea> References: <20170717065504.xnahsboer3fh4k3i@flea> From: Chen-Yu Tsai Date: Mon, 17 Jul 2017 14:57:19 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] drm/sun4i: make sure we don't have a commit pending To: Maxime Ripard Cc: Chen-Yu Tsai , Daniel Vetter , David Airlie , Jani Nikula , Sean Paul , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , Laurent Pinchart , Mark Yao , Heiko Stuebner , dri-devel , linux-kernel , linux-arm-kernel , "moderated list:ARM/SAMSUNG EXYNO..." , "open list:ARM/SHMOBILE ARM..." , "open list:ARM/Rockchip SoC..." Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 33 On Mon, Jul 17, 2017 at 2:55 PM, Maxime Ripard wrote: > On Fri, Jul 14, 2017 at 04:56:01PM +0800, Chen-Yu Tsai wrote: >> Hi, >> >> On Thu, Jul 13, 2017 at 10:41 PM, Maxime Ripard >> wrote: >> > In the earlier display engine designs, any register access while a commit >> > is pending is forbidden. >> > >> > One of the symptoms is that reading a register will return another, random, >> > register value which can lead to register corruptions if we ever do a >> > read/modify/write cycle. >> >> Alternatively, if changes to the backend (layers) are guaranteed to happen >> while the CRTC is disabled (which seems to be the case after looking at >> drm_atomic_helper_commit_planes and drm_atomic_helper_commit_tail), we >> could just turn on register auto-commit all the time and not deal with >> this. > > As far as I understand, it will only be the case if we need a new > modeset or we changed the active CRTC or connectors. But if you change > only the format, buffers or properties it won't be the case, and we'll > need to commit. So in other words, if someone were to use it for actual compositing and moved the upper composited layer around, we would need commit support to be safe. Sounds more or less like something a video player would do. Thanks ChenYu