Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2390411rdb; Wed, 21 Feb 2024 06:22:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVZTDqZgq/j2zxvMhiFrfuGAuKdUleU6AE4DMK+FBDRt5OIG70PZuloHm34eeRADYdUa6QxrCOOryh+1waThNbmHxhfk4K/Qe25+miW2Q== X-Google-Smtp-Source: AGHT+IHAhebvlAlD9h6lVLiGQm4xZgpSiPYbrBGMnIHKcUxrwqcppCKG0aqxGPam3ZViOtvBBAvT X-Received: by 2002:a17:903:22c5:b0:1db:dcdf:2e2 with SMTP id y5-20020a17090322c500b001dbdcdf02e2mr13363367plg.23.1708525362018; Wed, 21 Feb 2024 06:22:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708525362; cv=pass; d=google.com; s=arc-20160816; b=K5nMtY5paMVX7040DaaMdw4Vr6Iwjr33JRnrYrAf1BtuV14uk+aj94Ffer+TjiwuyZ htfhWHRIH+W4fRCqkm9Hw5PJkUqQ33y5nDHlD45AzqrZ9y9H7iBCloHHfOuoRfRNBXzl DZNAa3pNQo3kULBcDd9Sp7zVelOX4vHDiko/dBU+EpKekANh8njGQ1esv2CGEAGcY+ZR 3KmwGk0PuN51U0qTv2rQk/HI0lkCmw8Hzb8Qatso5Aiesqawbp/YlNdl0zP9dQBEuCmN bdCwTH4T98jxUfTEFvHo0JsLeVViMyRB//IdQ5zg5j9bFZlD7RMPElGPTlHV9oEiBzmi v4SQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RnZIWsKVs01+GsM2aAmfYGGkuGt0f3iIBdtsfGwA0DE=; fh=z+qODvki+2Onn9xDf/JcNkYDLZdGvudDpNdxi74e4Dg=; b=EeSZl/Z9+ipUbgHaWZobUZQ/TFDA0o5HH7+nU0QvX7FS+Vfv+CZm8XsEo8AdoZcr9k 11tfS0Biq9aeUy7ispkilTc842mZD5QxqLpbuMbHvyQMMhykm04vbhTu260UbYOLcDFO v+rnqrz3RD+xMIzjyFXDquguxOuM7ORQPc4jYuArKHcGbAOUTydQH7+0MgXUK7FuGTMf nBHxc2zKkCyE8n0XOYvldQMQ6hwa3Ly6XskO2x4u5YHrXtvZ1O8q09pvGylp9lZqMBYr BZPc0xUwKybbKpH/a2P5wslP9dO34cJz7ZDl+hFCRvRvOX1EzcLNx0bOyjjrOrLIgHV7 G0MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=FmhYO+ZN; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-74883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n5-20020a170902e54500b001dbea2bd2d2si5920214plf.218.2024.02.21.06.22.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 06:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=FmhYO+ZN; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-74883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B2FCF281001 for ; Wed, 21 Feb 2024 14:22:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB3967BB03; Wed, 21 Feb 2024 14:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="FmhYO+ZN" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D892969317 for ; Wed, 21 Feb 2024 14:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708525358; cv=none; b=VyLrgdT5BdWh9gvIvz2QY9FTu+dWXFU1zRwihYwDYxXu/KEvIOK1Md7umIjBJFbBz8ldtf/dEW6h/ppD6CRw5hC8dxiWb8iERNEsKBi/zCsuvarRlVBRJO2pqEsLLDoAnmZxzcnfBmwq1rCtt1JidOgfxV+LdiyHQbdrBtl2aSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708525358; c=relaxed/simple; bh=LF3mPKz82wFKYBnS3pkUFExa+8tzUpNv+iiGbb7Kggc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r7Sfwe+mSpYswe+rW5NZH7isFRq2QjCHxf7VLPBmzzyVBxKWHRyVubKLQf6aJvOJz438xs/e4NmxWdsLII19ObZnV3sNYjDfCoyvWxKw0u+ZPvn1/Wc/ziySn/ByrbKluKbS5tbeA9BWMjUISjvcNDj8gqahh4XqFfFKq6wVFMQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=FmhYO+ZN; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708525351; bh=LF3mPKz82wFKYBnS3pkUFExa+8tzUpNv+iiGbb7Kggc=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=FmhYO+ZNYNU0FoScZxKn01rd9HtaMosC2AF9CFkg2IIDbNUYYYGRJBlLI/ow9fhuN S7NpSsbC2rZGeJcs2D1NrTfoiWxgMXo7Bk3eqLWovOtIHd/rcRtGcL8axGhaxSRoB4 yrUAFDB3bdUZb7RnkypcZNqX5O+tiL9d3yyixMLo= Date: Wed, 21 Feb 2024 15:22:30 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Maxime Ripard Cc: Chen-Yu Tsai , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jernej Skrabec , Samuel Holland , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] drm/sun4i: Fix layer zpos change/atomic modesetting Message-ID: <6n6fnjl3dw4dnmoygh3u72ebbubotpqyg67cwkuataw2vw6lwm@bhxrtjewjso6> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Maxime Ripard , Chen-Yu Tsai , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jernej Skrabec , Samuel Holland , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20240216190430.1374132-1-megi@xff.cz> <20240216190430.1374132-4-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Maxime, On Wed, Feb 21, 2024 at 02:45:20PM +0100, Maxime Ripard wrote: > Hi, > > On Fri, Feb 16, 2024 at 08:04:26PM +0100, Ondřej Jirman wrote: > > From: Ondrej Jirman > > > > Identical configurations of planes can lead to different (and wrong) > > layer -> pipe routing at HW level, depending on the order of atomic > > plane changes. > > > > For example: > > > > - Layer 1 is configured to zpos 0 and thus uses pipe 0. No other layer > > is enabled. This is a typical situation at boot. > > > > - When a compositor takes over and layer 3 is enabled, > > sun8i_ui_layer_enable() will get called with old_zpos=0 zpos=1, which > > will lead to incorrect disabling of pipe 0 and enabling of pipe 1. > > > > What happens is that sun8i_ui_layer_enable() function may disable > > blender pipes even if it is no longer assigned to its layer. > > > > To correct this, move the routing setup out of individual plane's > > atomic_update into crtc's atomic_update, where it can be calculated > > and updated all at once. > > > > Remove the atomic_disable callback because it is no longer needed. > > > > Signed-off-by: Ondrej Jirman > > I don't have enough knowledge about the mixers code to comment on your > patch, so I'll let Jernej review it. However, this feels to me like the > pipe assignment is typically the sort of things that should be dealt > with device-wide, and in atomic_check. Yes, this is what this patch does. It moves blender setup from individual planes' attomic commits to a single place in crtc atomic commit. kind regards, o. > If I'm talking non-sense, it would be great to mention at least why that > can't be an option in the commit log. > > Maxime