Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1575473rdb; Wed, 31 Jan 2024 02:59:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhjxk4HihA75d0oF/jjltyhXA8lsm8WrvCd9veznDDHDeqqeQU8v4Z00LXvA7Cs6f8rwoB X-Received: by 2002:a17:906:e2cd:b0:a36:6d4e:6d85 with SMTP id gr13-20020a170906e2cd00b00a366d4e6d85mr1030229ejb.8.1706698740610; Wed, 31 Jan 2024 02:59:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706698740; cv=pass; d=google.com; s=arc-20160816; b=UJNiYmYP72PHjJNzm02jgoXdtkpa4HOIcyVn+UTOWggNHFliSHtjuM4gcRO5m/A266 k5cE5I3UxN9a9RPGOVdQHLpMqsxFKEEuIG8pkiVteapJcutZCbBKHHAy4Ij4qKXbPgmD abx4+ShHr/fRvt1i5aopXzcF7T2GC+7j7FE/1OBnVpLjsajtKAR7bG3OvsAwR2skDyr4 E2pZb65TpS+syXZlPM+Fpv4rZiAFOwx64o+x8HTv5FQ+aDGdFZ0IEIr0L3ZVNM7Zn3aO V1r09L4j1DKkwiXdFG8YUmCMfr+jdlxMzF6NeVdngEFaw5WYou/3JtbUBWTRKqoNr3W5 5Ojw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RhwFe3/zX1E+xNz4KEX1CO60Pv2eH1vcOy/I9eBVC7M=; fh=XjoK6FnlSIQtYWImuldesrNR7KnSUHJyRozh/vsanXA=; b=DwgjGdv3jji410GqDybA+SNrqhpe/KHqrfNhAClMuoUboYuvKWLhvhqB7MzcOPpqFa 6CMotNYEI3qpuxFgQXyBKNWorRFKJ/eGVCLdfPTjfOhbAkeiji6AdC6MSYqeoK50H6wh LdAqYIlTblhqoVJlqY6jhuk9swZeZmcT7GkgRUBw0T7+1MPOm/q9OKIME6sw662z2hDS TQ4IlT3m4TvKT4NNPf614SFjXBm+RR9QavTkA8e9wxWvFMwWRlEzlJv+k5VRO332Tmqa XJYUUm8nOioHrWiF9C9alJbBPsep1aKzYu6a/0WsSnvrfK7lDmvcEtcfLOCSvkViX6AX rR1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pzkgeu3+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUbcKjnnU6n/c7B1/aB0gYjXcUi/gzPknu63uWXuD/8URcJMOpb9QvNoeiz7RbzECNsUbKe282cy5lJAQqO9v6A4UYgur0WbcpoElBV4Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u16-20020a170906069000b00a2c4b49bef1si5596822ejb.374.2024.01.31.02.59.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:59:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pzkgeu3+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5B2631F2265A for ; Wed, 31 Jan 2024 10:59:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A0F476022; Wed, 31 Jan 2024 10:57:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pzkgeu3+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1445E768FA; Wed, 31 Jan 2024 10:57:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698636; cv=none; b=b2PjD2OPopPU/cHYpGNAsUcp2fGxq7gtSJODQur2f2CfDe+t5iuBDuytEg4uq+Dqr9KUjWAFpsojDYR/VtyeuBagKRO/Z2uBZim2bqDc6+9tVUxl2S9gW0m3SdhS/0l+of9LaZ1v7JMPbAWocypT/leVLxYvmqM0ZRj4xvYhrhw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698636; c=relaxed/simple; bh=HjxXQQTvclGKG5R5BVCKvlblWKeDppBCdGL0/w/TsH0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cQpXHe3wS9Awwe3LlzTIExySXhK6K/5IhVAt2LdrGNosh3stCNKxko1TrhGE1NDZe4NlNqXG9kYFUcPiWJAL59xQR4Q0+KmksEyB8Ct0xBn3yyvbe962TCLeK7A/g3dn3llDXl+TCYSs314zg+uPxYTkd54SxZVncbDTz7yMa7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Pzkgeu3+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 069D9C433F1; Wed, 31 Jan 2024 10:57:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706698635; bh=HjxXQQTvclGKG5R5BVCKvlblWKeDppBCdGL0/w/TsH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pzkgeu3+p2MwLnWBo/i2Hgnqw/ZmlOWIqzaaR7eedKbxIAzKq5mXhLYKJTCXxLm+Y cgep8bB7Bzl7TaHLHcoqkNlKfAV+ZWTOYCotGp54EMnO/qLB+27hBCTMMPP3CYWiWx Fs8Ny/9DWl+gSo0c7kbWJ/Ounmmrdn+R8xid6thwW7YJsyskwVfa55AAKEU1x6xn+7 ClWqPGH90dSSNpqDTYY32RT4CHWaYgiRyb3Q91LtZfmq2SoRsRAGTn/BdRcAAFwgcq 8vcTU2+Idk+/eD87gBkVtXdM4BsoM0DfN8QN+jdZGuY8xEfWLFR0R4tWw0Ftk/rof/ RPCaGEcDmLPKw== Date: Wed, 31 Jan 2024 11:57:12 +0100 From: "mripard@kernel.org" To: Jason-JH Lin =?utf-8?B?KOael+edv+elpSk=?= Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "michel@daenzer.net" , "chunkuang.hu@kernel.org" , "intel-gfx@lists.freedesktop.org" , "linux-arm-msm@vger.kernel.org" , "mikita.lipski@amd.com" , "dmitry.baryshkov@linaro.org" , "daniel.vetter@intel.com" , "tzimmermann@suse.de" , "nicholas.kazlauskas@amd.com" , "dri-devel@lists.freedesktop.org" , "quic_abhinavk@quicinc.com" , Project_Global_Chrome_Upstream_Group , "manasi.d.navare@intel.com" , "lucas.demarchi@intel.com" , "sean@poorly.run" , "matthias.bgg@gmail.com" , "dmitry.osipenko@collabora.com" , "fshao@chromium.org" , "linux-arm-kernel@lists.infradead.org" , "jani.nikula@intel.com" , "angelogioacchino.delregno@collabora.com" , "freedreno@lists.freedesktop.org" Subject: Re: Re: Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks Message-ID: References: <20230216111214.3489223-1-daniel.vetter@ffwll.ch> <20230307145613.xvhru3fpcudlpazt@houat> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5hcnxgxxlxzr7qg7" Content-Disposition: inline In-Reply-To: --5hcnxgxxlxzr7qg7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Jan 31, 2024 at 05:27:14AM +0000, Jason-JH Lin (=E6=9E=97=E7=9D=BF= =E7=A5=A5) wrote: >=20 > On Sun, 2024-01-28 at 10:24 +0100, Maxime Ripard wrote: > > On Thu, Jan 25, 2024 at 07:17:21PM +0100, Daniel Vetter wrote: > > > On Tue, Jan 23, 2024 at 06:09:05AM +0000, Jason-JH Lin (=E6=9E=97=E7= =9D=BF=E7=A5=A5) wrote: > > > > Hi Maxime, Daniel, > > > >=20 > > > > We encountered similar issue with mediatek SoCs. > > > >=20 > > > > We have found that in drm_atomic_helper_commit_rpm(), when > > > > disabling > > > > the cursor plane, the old_state->legacy_cursor_update in > > > > drm_atomic_wait_for_vblank() is set to true. > > > > As the result, we are not actually waiting for a vlbank to wait > > > > for our > > > > hardware to close the cursor plane. Subsequently, the execution > > > > proceeds to drm_atomic_helper_cleanup_planes() to free the > > > > cursor > > > > buffer. This can lead to use-after-free issues with our hardware. > > > >=20 > > > > Could you please apply this patch to fix our problem? > > > > Or are there any considerations for not applying this patch? > > >=20 > > > Mostly it needs someone to collect a pile of acks/tested-by and > > > then land > > > it. > > >=20 > > > I'd be _very_ happy if someone else can take care of that ... > > >=20 > > > There's also the potential issue that it might slow down some of > > > the > > > legacy X11 use-cases that really needed a non-blocking cursor, but > > > I think > > > all the drivers where this matters have switched over to the async > > > plane > > > update stuff meanwhile. So hopefully that's good. > >=20 > > I think there was also a regression with msm no one really figured > > out? >=20 > OK... > But I am only available on MediaTek platform. I think most of us are in that situation, and which is part of the reason it kind of stalled :) > Does it also causes a regression with msn if I re-send a patch for > drm_atomic_helper.c only? Yes, that's my recollection at least. Fortunately, Dmitry might be able to clear that up. Maxime --5hcnxgxxlxzr7qg7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZboniAAKCRDj7w1vZxhR xYCCAP0csImA/YjD7JSlWCeV9u6MhNi6I3Xxd+iiSif3+wOZNAEAxvXjP7nLFw0A 7p53QCY/Y9Y7o9UlXM3Ql3BtsLQwnwU= =jjPN -----END PGP SIGNATURE----- --5hcnxgxxlxzr7qg7--