Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6237166rwn; Tue, 13 Sep 2022 00:40:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR6U91m1Y/ZpQ7NMZ4zFwIA6bLPlQGf5ObjdTyKrjCJ3fTQXCQOdNMks/XvPuPkzpW+QfxoL X-Received: by 2002:a17:902:ce03:b0:178:3ba6:f731 with SMTP id k3-20020a170902ce0300b001783ba6f731mr6015219plg.115.1663054809897; Tue, 13 Sep 2022 00:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663054809; cv=none; d=google.com; s=arc-20160816; b=ONVrkQGSgxety0tI/QJ6nBdKfqDUXUiZrIFpoBlY3VEEC0gbIAzhxP2jEQZ4bkUhYw wcSoSp8ZgEw1Iz1xZyDrLykWquGzmfRPDlUSCpbekzTCuwIkGt9Cv42ISqagGfRtq944 1CamWTombFAWd9xd3Sa3fV2rnU80tgaQzSabdILNPCkZFMmoF6N1YLjrXY4hPGAJb6xF QfgYmlSvjlY2NJkDKl+RTggtApvTppWwbgr6fvld69agotAOGgr1ug9nDh7dSgqBK70z VZpYP979Lf7G6ddxL+YleRx6niX8KyDJwxEDnAu3X1zy3/SsCOMsuI3b8jMJi7Bq8puy 6kfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gKNkp5TT0XjbSEmbU4M+B2B1cDxK13/0CThFH853tls=; b=qUTY9wDNLQQ9XY2tbO+vG9BYrwUTe3HeMSAJcbp1W9o8J2j5TkrrcUoRmzaWLM7p3e LxzDvQLFwGMhKF0Tqb6A9YqXB/MDwkMiDj9ZIfIle2s9ckkg2XV8kFQXroUMZdS+IhVH DcLatp3NY3NIhFgl1nefj0CoCl3p2pffhFPk83Fyzebf1i03a5hyheLCV7hDoP2IqLCt 8OUK2oidlXdxUV0U0migcbO7Se4j+i5OaIsx8S8yDg0chC4Zqc7Sq6ij3bxhu8iqSNYC 4Dj57JEpYSCMkmeZnVyQDqyCwD8kU8CM10W6K/RIdQX/v3Kx/K+81b9ITRh/FDwc5MSL Kf6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="oWWEF/08"; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170902d54b00b00174ab1a7deasi10992585plf.316.2022.09.13.00.39.55; Tue, 13 Sep 2022 00:40:09 -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=@chromium.org header.s=google header.b="oWWEF/08"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbiIMGly (ORCPT + 99 others); Tue, 13 Sep 2022 02:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbiIMGlv (ORCPT ); Tue, 13 Sep 2022 02:41:51 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCA352E42 for ; Mon, 12 Sep 2022 23:41:50 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id w16so9800715eji.9 for ; Mon, 12 Sep 2022 23:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=gKNkp5TT0XjbSEmbU4M+B2B1cDxK13/0CThFH853tls=; b=oWWEF/08VQtpBTsplhTEQ87f9wS6PdIe0WOT+m9wrHcVpU1Gbf6/v9mUpGSDwch3nR A0Zib3++wgkeB2Ne5BzvDdzU+eifZFHaQGbgrGEK0/vux33BpwRSjkNkzUNwtnnOeeHH s0dkzYSP2obWbdCHPijdD2H/iA0Pku8Ki4LTg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=gKNkp5TT0XjbSEmbU4M+B2B1cDxK13/0CThFH853tls=; b=GYr0qxWQygcbWiGXdcYFNcPS7tcNLuS85tYW3DNjbzAtktW/RiqqWoZwvWpDdYqMqp iuTHy25kRPEEAlLx6zBqPTFWL+W1SA0U/1iSwZ7JoC4SjOKWiG3uAkouDWn5yharm+tD o9zzen1aRxAovcOSCIQUVOG/lDoZmpLBwc3mj0lUC10ghWaA5Ys3d6G5mAIGZ8AepPGS lvrLihF5Xwhh7QybubNNw6rC1R/zLhq1D57D0feQj66D3SpTxRVuKdqp1v2hT7j1qG/d WXKQiNlzNy6iY6gN6ea6xx/iE1jneRwM5tDdgEu8FU2bLMDc9WbtX+i0cvk7RZSvg2ce D2wQ== X-Gm-Message-State: ACgBeo3ZqsfpWOiU5Kk6NVczpyhg3Wtu3s2SDSW7bY42GGm3exGAehDL PwBZeZ41Z1CbkOW3/j0huiLNWjUixk40IjTTxL0= X-Received: by 2002:a17:907:72d5:b0:77d:5d01:4f4f with SMTP id du21-20020a17090772d500b0077d5d014f4fmr6149828ejc.285.1663051309124; Mon, 12 Sep 2022 23:41:49 -0700 (PDT) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com. [209.85.128.49]) by smtp.gmail.com with ESMTPSA id oz9-20020a1709077d8900b0077086ee4633sm5579764ejc.53.2022.09.12.23.41.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Sep 2022 23:41:48 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id v185-20020a1cacc2000000b003b42e4f278cso9682793wme.5 for ; Mon, 12 Sep 2022 23:41:48 -0700 (PDT) X-Received: by 2002:a05:600c:4e8b:b0:3a5:f5bf:9c5a with SMTP id f11-20020a05600c4e8b00b003a5f5bf9c5amr1199949wmq.85.1663050927147; Mon, 12 Sep 2022 23:35:27 -0700 (PDT) MIME-Version: 1.0 References: <20220912154046.12900-1-johan+linaro@kernel.org> <20220912154046.12900-5-johan+linaro@kernel.org> In-Reply-To: From: Doug Anderson Date: Tue, 13 Sep 2022 07:35:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] drm/msm/dp: fix aux-bus EP lifetime To: Dmitry Baryshkov Cc: Johan Hovold , 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 , linux-arm-msm , freedreno , LKML , "# 4.0+" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi, On Mon, Sep 12, 2022 at 7: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. Aside from the kernel robot complaints, I'm not necessarily convinced. I think we know that the AUX DP stuff in MSM-DP is fragile right now and Qualcomm has promised to clean it up. This really feels like a band-aid and is really a sign that we're populating the AUX DP bus in the wrong place in Qualcomm's code. As you said, if we moved this to probe(), which is the plan in the promised cleanup, then it wouldn't be a problem. As far as I know Qualcomm has queued this cleanup behind their current PSR work (though it's never been clear why both can't be worked on at the same time) and the PSR work was stalled because they couldn't figure out what caused the glitching I reported. It's still on my nag list that I bring up with them every week... In any case, if a band-aid is urgent, maybe you could just call of_dp_aux_populate_bus() directly in Qualcomm code and you could add your own devm_add_action_or_reset() on the DRM device.