From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E6AEC433B4 for ; Mon, 3 May 2021 08:20:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA58561221 for ; Mon, 3 May 2021 08:20:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230490AbhECIU4 (ORCPT ); Mon, 3 May 2021 04:20:56 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:50213 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbhECIU4 (ORCPT ); Mon, 3 May 2021 04:20:56 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id B6EB0580BBD; Mon, 3 May 2021 04:20:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 03 May 2021 04:20:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=ZZbw4zaMizJrDrM1TjO6/6x5vgu yIVzvER1Undjdu/I=; b=Bcsr3W3Gqk0ypd8Zdc6LIqxdAWqQOLoyBNDbhzPyPFT ivyPg0TCCln1kmTpGoENRBweah8m8UXclRPTCbznej572MsSINCFpqWXQExHntvg z3rptIh7re/fAPEUOKOwnjI9sHflXVrtegVx7hsdSdh3aMJlHgtDBOOrQbSlqEpa VUASdwwGySbA/lGmV/4PpBNGWDrmEtHGt+zHXAfW9fC+PpvT6+N/DDVjv8IsSzhu EHqd3j5KG0ZlbvWzWcedMZwlkMqdLmiPuU6W9P2s4VwzyEvEZMliWjyNyEhjjUWk UXrcUdsGIjPlgIw/Pikh9O4sFfc1LAWNSkQqLEfY+Iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ZZbw4z aMizJrDrM1TjO6/6x5vguyIVzvER1Undjdu/I=; b=e0zX+A4VgmfixaP+9SwceH 8dWHq/maRcArZax5k5Mu7N4copJnf/CGXeu3DFZHRBtcXd6RnLgxIdbzGmE33/HI a/sjlcm07J2oapmvhp6yjbSEyARNUHfVpAN8oaTVKD9BuW9t3ENZGaWJp/287vC3 HYWWU5X8lyqkhIU8Gb8lkganCI+Qn8vDvCkrB7M7LJ3iXo6UiLaV61dcI47s6ubQ nEh9+k1JtU4wUEniqOUUsY66WAOqjNotLHxRZ0IaiNINjHVVKGN9C6bzeprl/Yoc 4v04r3mRV3ml8VFwZOwpFCIp7Yx31LcgJioKeIdvOpP28Qa+AYDvQqAqZp3lVxOQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdefgedgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 May 2021 04:20:00 -0400 (EDT) Date: Mon, 3 May 2021 10:19:57 +0200 From: Maxime Ripard To: Stephen Boyd Cc: Rob Clark , dri-devel@lists.freedesktop.org, Rob Clark , John Stultz , Sean Paul , David Airlie , Daniel Vetter , Abhinav Kumar , Thomas Zimmermann , Kalyan Thota , Hongbo Yao , Qinglang Miao , Laurent Pinchart , Lee Jones , Ville =?utf-8?B?U3lyasOkbMOk?= , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/msm/dpu: Delete bonkers code Message-ID: <20210503081957.qj5kdbrk7y4dnhid@gilmour> References: <20210430171744.1721408-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="33yimouztyqtinrp" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org --33yimouztyqtinrp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Apr 30, 2021 at 10:44:53AM -0700, Stephen Boyd wrote: > Quoting Rob Clark (2021-04-30 10:17:39) > > From: Rob Clark > > > > dpu_crtc_atomic_flush() was directly poking it's attached planes in a > > code path that ended up in dpu_plane_atomic_update(), even if the plane > > was not involved in the current atomic update. While a bit dubious, > > this worked before because plane->state would always point to something > > valid. But now using drm_atomic_get_new_plane_state() we could get a > > NULL state pointer instead, leading to: > > > > [ 20.873273] Call trace: > > [ 20.875740] dpu_plane_atomic_update+0x5c/0xed0 > > [ 20.880311] dpu_plane_restore+0x40/0x88 > > [ 20.884266] dpu_crtc_atomic_flush+0xf4/0x208 > > [ 20.888660] drm_atomic_helper_commit_planes+0x150/0x238 > > [ 20.894014] msm_atomic_commit_tail+0x1d4/0x7a0 > > [ 20.898579] commit_tail+0xa4/0x168 > > [ 20.902102] drm_atomic_helper_commit+0x164/0x178 > > [ 20.906841] drm_atomic_commit+0x54/0x60 > > [ 20.910798] drm_atomic_connector_commit_dpms+0x10c/0x118 > > [ 20.916236] drm_mode_obj_set_property_ioctl+0x1e4/0x440 > > [ 20.921588] drm_connector_property_set_ioctl+0x60/0x88 > > [ 20.926852] drm_ioctl_kernel+0xd0/0x120 > > [ 20.930807] drm_ioctl+0x21c/0x478 > > [ 20.934235] __arm64_sys_ioctl+0xa8/0xe0 > > [ 20.938193] invoke_syscall+0x64/0x130 > > [ 20.941977] el0_svc_common.constprop.3+0x5c/0xe0 > > [ 20.946716] do_el0_svc+0x80/0xa0 > > [ 20.950058] el0_svc+0x20/0x30 > > [ 20.953145] el0_sync_handler+0x88/0xb0 > > [ 20.957014] el0_sync+0x13c/0x140 > > > > The reason for the codepath seems dubious, the atomic suspend/resume > > heplers should handle the power-collapse case. If not, the CRTC's > > atomic_check() should be adding the planes to the atomic update. > > > > Reported-by: Stephen Boyd >=20 > Maybe better to use swboyd@chromium.org for this one. >=20 > > Reported-by: John Stultz > > Fixes: 37418bf14c13 drm: Use state helper instead of the plane state po= inter >=20 > Should be >=20 > Fixes: 37418bf14c13 ("drm: Use state helper instead of the plane state po= inter") >=20 > to match the preferred format. >=20 > > Signed-off-by: Rob Clark >=20 > Otherwise looks good, thanks. Thanks for figuring this out, I've applied it with your chromium address and the proper fixes format. Maxime --33yimouztyqtinrp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYI+yLQAKCRDj7w1vZxhR xZRaAQDTPjjiUQFAFWgbNS7oRz3zrty/Iml8Ny6hby1mPZ/NFAEA3T3YH0IJPL4s Nx3/uC0n+0PWb2Dr5NHA3d2sPNWRwQU= =D+EX -----END PGP SIGNATURE----- --33yimouztyqtinrp--