Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6272511rwn; Tue, 13 Sep 2022 01:24:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7AxxOsrDtPGtxDr6PS9YiSBs21u2fGgqgbumWfINv2nbTrb0L+82YNEnW7Tm4vbkqSq9f+ X-Received: by 2002:a17:902:ab98:b0:172:a566:d462 with SMTP id f24-20020a170902ab9800b00172a566d462mr30412956plr.53.1663057443267; Tue, 13 Sep 2022 01:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663057443; cv=none; d=google.com; s=arc-20160816; b=Ti1H8n+Zc37/fNwlpHky7J4eXN98IJopnVkOgaIVe/006A4B+sYFwMZUEJzr4rDMPW /82Z3xQOdnsPTsS70Ny24Fmv7+7VsVYEnc1vEs3Zi3xsIKDbIy2CJXKte5HfKJs4eXJy yzCHHfAfmYx6jz3H6Tl2jpA9vqVyo7IOvVCmR17hVHOSCsP8J2E9FhfOKp3wQpH0E38r Gucg6NgXIncyQg0T0FASN3E7UpXvWhcCzFXn+cZMnBvju2r+Om/GuPC0O+DtJ2E664L3 c+z3tR3atrKP89SJc7K5DxMa0lLkk+hpUmMxt/h67kMAelVl/IyrcmdTGrDtqYc1Ajy4 ntrA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D76bXs1QtH89J8TTgrlROCeSfBEFGSf7i1X2JmgV98E=; b=TVcE317WCmCKnmTJk8AKIbGbhazp7BeS8rjiYkI8i0jea+C7NGkNqvLejDvZu3oyiB YbQDZYorH83bjYYzsRQ0dhropzfM0cE+lOZedh8alOge6cI6dkhc9xwwr3F88AC2Se5y XFf1PjXKj2Oj+SQe7T3bpi8sTsg6yN7fzzRnhS8fE10PatWqQwxUKBBqYswhWKJJ9HwJ lbC3skG1Y8f4Q9t9zPBQuCYjDJlwh8hcH5nhEBfg6oGgmmnh5nviq/EhRFTRQeXOWEkf RL05/84YZu2X0799AfAECpNIHUjqaixI7IgUHRBGWl6GNQ3qt4BRvQs1W8pSzhVSqAVu JRlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbfN+Zsi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q135-20020a632a8d000000b0043941cf40f1si1542651pgq.740.2022.09.13.01.23.50; Tue, 13 Sep 2022 01:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbfN+Zsi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230176AbiIMHUr (ORCPT + 99 others); Tue, 13 Sep 2022 03:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbiIMHUo (ORCPT ); Tue, 13 Sep 2022 03:20:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F3413B962; Tue, 13 Sep 2022 00:20:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90DC861336; Tue, 13 Sep 2022 07:20:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E09D6C433C1; Tue, 13 Sep 2022 07:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663053642; bh=8E4O++2S6FWEnxjwuILlmwZ5txcSLR8D7sk53WBMDXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DbfN+Zsij52xBRMio9UjMnddcvrW6l9KE1bas+PuyClOTdyacgCwG7an4RMBeFzgq ZkmufTzGX5eXiWuUaeu60mAi6OuZ/eofEFLww/gnvV28K02ZOqeVzU1jDiJpgZ+kBR e4HsovoyZhSSU7WfsnpwNEsRFJ7OS+J9NTRwS1lbBnN8a+QkUCKdK+uqAN5pmLwPbL RahtWxI+J/aAuBwYRPhi449p37AjDnVGuSGY2ZtO2qDn8fW4E9HxEOJLwPc6qg9vZJ 1n/dpiaPWA9L2Qy6akJJFp424t4k9GnNptI+XZHTxWnqTc7YsFCa71oldb5vsEgiQ5 29EgLxVTHYqIA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oY0Do-0000nJ-Jh; Tue, 13 Sep 2022 09:20:40 +0200 Date: Tue, 13 Sep 2022 09:20:40 +0200 From: Johan Hovold To: Steev Klimaszewski Cc: Dmitry Baryshkov , Johan Hovold , Douglas Anderson , Rob Clark , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Sean Paul , Stephen Boyd , Bjorn Andersson , Manivannan Sadhasivam , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 4/7] drm/msm/dp: fix aux-bus EP lifetime Message-ID: References: <20220912154046.12900-1-johan+linaro@kernel.org> <20220912154046.12900-5-johan+linaro@kernel.org> <69526798-93df-a4f9-c385-c9bf490cc709@kali.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <69526798-93df-a4f9-c385-c9bf490cc709@kali.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 12, 2022 at 04:55:58PM -0500, Steev Klimaszewski wrote: > > On 9/12/22 1:10 PM, Dmitry Baryshkov wrote: > > On 12/09/2022 18:40, Johan Hovold wrote: > >> Device-managed resources allocated post component bind must be tied to > >> the lifetime of the aggregate DRM device or they will not necessarily be > >> released when binding of the aggregate device is deferred. > >> > >> This can lead resource leaks or failure to bind the aggregate device > >> when binding is later retried and a second attempt to allocate the > >> resources is made. > >> > >> For the DP aux-bus, an attempt to populate the bus a second time will > >> simply fail ("DP AUX EP device already populated"). > >> > >> Fix this by amending the DP aux interface and tying the lifetime of the > >> EP device to the DRM device rather than DP controller platform device. > > > > Doug, could you please take a look? > > > > For me this is another reminder/pressure point that we should populate > > the AUX BUS from the probe(), before binding the components together. > > > >> > >> Fixes: c3bf8e21b38a ("drm/msm/dp: Add eDP support via aux_bus") > >> Cc: stable@vger.kernel.org      # 5.19 > >> Signed-off-by: Johan Hovold > >> --- > >>   drivers/gpu/drm/bridge/parade-ps8640.c   | 2 +- > >>   drivers/gpu/drm/display/drm_dp_aux_bus.c | 5 +++-- > >>   drivers/gpu/drm/msm/dp/dp_display.c      | 3 ++- > >>   include/drm/display/drm_dp_aux_bus.h     | 6 +++--- > >>   4 files changed, 9 insertions(+), 7 deletions(-) > This breaks builds which have ti-sn65dsi86 included: > > drivers/gpu/drm/bridge/ti-sn65dsi86.c:628:50: error: passing argument 1 > of 'devm_of_dp_aux_populate_ep_devices' from incompatible argument type. > > As well, > > drivers/gpu/drm/bridge/ti-sn65dsi86.c:628:15: error: too few arguments > to function 'devm_of_dp_aux_populate_ep_devices' Thanks for reporting this. I messed up and apparently only grepped for devm_of_dp_aux_populate_bus() and not the devm_of_dp_aux_populate_ep_devices() wrapper when searching for users. Johan