Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2506275pxy; Mon, 3 May 2021 01:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTvcX9cj5yuWSM2u9S3Vy2AmGGiUSMkaHo5UHDyfxNsxzmebeTumCmCXDTd87EQpBmT2Lq X-Received: by 2002:a17:902:9b8b:b029:ee:bb74:7d46 with SMTP id y11-20020a1709029b8bb02900eebb747d46mr10110893plp.65.1620030048436; Mon, 03 May 2021 01:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620030048; cv=none; d=google.com; s=arc-20160816; b=mnw+dQ/6PUdORnTZNs+jLX07lRASIyoqtdUCZjWxm9sZ4WW9zmMJCzfYfatdJTMuEk PCgcqJZMtFwfRJEes0R03r5udSgLlH8j7a2WIX0L6ezn2MR6yRyWR3TmwLAIjO/1erXU Zjtss4B7X2PG8IvJc7z1mt6zofnCyypdTs0h1dr8G6+9G3FHz7eJHIt9O+4O2HUHfd0L ouXr/CvEknAQ3tOnrf0iR1VvudNSqwkuDBsVH5U6aWBHnbyaFp5nawKtJ//2VuSlVFOz m/tu6a6U8AE/5kIdHiUylJNH3SOCG4tAl6GVZGc0T18BDfFC4Mer1pb+201egrHqc9EV F3rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=ZZbw4zaMizJrDrM1TjO6/6x5vguyIVzvER1Undjdu/I=; b=Behu+oQfEy0a5rj2Txpvl9NnqysymAfY6mBg9IHLnzK6e2uITE/lLGTH/xcksNNWAy xsiQUZQlMCKQLrWVhjQZt8N8fRtOIbfuOzOdL8ILYlk9pM612p5FP6CUt8NUkrOMxe90 y8FaT7W+lMNjAlw/sd2VjgBZftfdaCPgWxa5VLY8JCcO+sYHbLCWr7Qp70q2CqtFDS6n 58O5XC7lR0WCMHw6vEjQvx6D+scK/umbjKXPp0bhO6Z8Hu9dvB1xR/Ij9yZ7r0DPJZPD xE6fHaTZEXMRsgW52AuSSWxB7dwBvXqtYqpK/sMKBrUufFUP4vB+dYZgsh5/jZm6Yuia sd6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Bcsr3W3G; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=e0zX+A4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i184si14266878pgd.441.2021.05.03.01.20.35; Mon, 03 May 2021 01:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Bcsr3W3G; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=e0zX+A4V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232887AbhECIU5 (ORCPT + 99 others); Mon, 3 May 2021 04:20:57 -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-kernel@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--