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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22FFAC4332F for ; Fri, 8 Apr 2022 18:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbiDHSEl (ORCPT ); Fri, 8 Apr 2022 14:04:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbiDHSEk (ORCPT ); Fri, 8 Apr 2022 14:04:40 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C612A838C for ; Fri, 8 Apr 2022 11:02:36 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id v13so5441143qkv.3 for ; Fri, 08 Apr 2022 11:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qnWn/G1v8AMjgZeV0vrRRskVP5PKCPkKnjAvSBWCiog=; b=Yrv/4DfWo8XzuZKX3n2fnRyM5qg5cpPd9RJn0imI4WJgfA4/hq+XwK9Zez1bIwBFYG QxCMABFF3bqiHIWYhC6zjNtGol7oTSnOQqqyJFcuFqDNXpPyLZ4B69ms5ViWU63tMj+8 uVXMMz2FNHEUtmwK6ym9rZiV1MBctW2Kf7hipW8dlYW3COwe6ol7B3iEqbxxH1VB98C8 aOIvIk6e5JtfwqivEiIizEpJiJV/ST6bkAayH/VrgmDzhchacsaK+uSJE0OnvGg2/eGU cMu9HHoge1H5LkMbBB1zaIdGPc4PwFNWUQA1vngF5bjc+F94yqev4OLIAImsKsRY4Vh1 6+aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qnWn/G1v8AMjgZeV0vrRRskVP5PKCPkKnjAvSBWCiog=; b=OnFtUS3S1lYEpusMyYi1t48igDT66SzfQ7HUrysEDRioJoOnD73I1LflrHOL3rGM3q UDPkYNrOPibSjWR5AblwGjH8lpgUMpTDpWZESb8QfBsJ8gr5u62YpAv/KqgX4RBBuVIA H8pTrpLVhxJX/yuWC82t4CDf8IKK24lyFllxTs78BAnPhwh1/nTqnO24dWvt3GPKeAJU t1SRbM2LW4xXHTJaClyqXW6NLCOgOE2g+mKf4AZxDB3Z04WCg6nCwAoEKGEX72nUxrt4 FgGx1WoJGtzZuQpE+q3PjQIzD5vy0qep0aMjKXU+tMXbCWBRgR+4CGDEDP0hWsiWnOjF /afg== X-Gm-Message-State: AOAM530rqHiZdG2GMcZ5/Iccz1fASWiXQnlBphUNStX9BsqV+r/E05Io p4Uwsj3LPxhlGtdbHmhLuz25/EN7A3lmQ8BSzooNXA== X-Google-Smtp-Source: ABdhPJy0Zg7wGYGP3Y4ju21eKWOojsGNF/XGXzPyEC1bFWczC1hJ830VSwicu8jxDsJoQJjrLC3tmgMKEMTuAl3yecw= X-Received: by 2002:a05:620a:170a:b0:67d:be5c:204a with SMTP id az10-20020a05620a170a00b0067dbe5c204amr13919747qkb.593.1649440955444; Fri, 08 Apr 2022 11:02:35 -0700 (PDT) MIME-Version: 1.0 References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-6-git-send-email-quic_sbillaka@quicinc.com> <94da2c97-2ad2-4575-bd73-d66ad989e17b@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 8 Apr 2022 21:02:24 +0300 Message-ID: Subject: Re: [PATCH v6 5/8] drm/msm/dp: prevent multiple votes for dp resources To: Sankeerth Billakanti Cc: Doug Anderson , "Sankeerth Billakanti (QUIC)" , dri-devel , linux-arm-msm , freedreno , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Clark , Sean Paul , Stephen Boyd , quic_kalyant , "Abhinav Kumar (QUIC)" , "Kuogee Hsieh (QUIC)" , "bjorn.andersson@linaro.org" , Sean Paul , David Airlie , Daniel Vetter , quic_vproddut , "Aravind Venkateswaran (QUIC)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, 8 Apr 2022 at 20:12, Sankeerth Billakanti wrote: > > > > On Wed, Mar 30, 2022 at 9:04 AM Sankeerth Billakanti > > > wrote: > > >> > > >> The aux_bus support with the dp_display driver will enable the dp > > >> resources during msm_dp_modeset_init. The host_init has to return > > >> early if the core is already initialized to prevent putting an > > >> additional vote for the dp controller resources. > > >> > > >> Signed-off-by: Sankeerth Billakanti > > >> --- > > >> drivers/gpu/drm/msm/dp/dp_display.c | 10 ++++++++++ > > >> 1 file changed, 10 insertions(+) > > > > > > I'm not a huge fan of this but I'll leave it up to Dmitry. In general > > > it feels like there should be _a_ place that enables these resources. > > > Checks like this make it feel like we just scattershot enabling > > > resources in a bunch of random places instead of coming up with the > > > design for enabling them in the right place. > > > > I'd prefer to see a check for eDP in dp_display_config_hpd(). Or even better > > to see that this function isn't called for eDP at all. > > > > This needs to be called when eDP is not using the aux_bus path. If the eDP panel is > given as a separate panel driver, then the resources need to be enabled here. > > If we don't want to support eDP without aux_bus, then we can skip this function. I think it's up to you to decide, if it's necessary or not. But if it is, please change it accordingly. > > > > > > In any case, if we do end up landing this patch, it sure feels like it > > > needs to move earlier in the patch series, right? This patch shouldn't > > > hurt even without the other patches in the series but if you apply the > > > earlier patches in the series without this one then you'll have a bug, > > > right? That means this needs to come earlier. > > > > > > -Doug > > > > > > -- > > With best wishes > > Dmitry > > Thank you, > Sankeerth -- With best wishes Dmitry 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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D9CCC433EF for ; Fri, 8 Apr 2022 18:02:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E41B10E71F; Fri, 8 Apr 2022 18:02:38 +0000 (UTC) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5DA9E10E71F for ; Fri, 8 Apr 2022 18:02:36 +0000 (UTC) Received: by mail-qk1-x72b.google.com with SMTP id 75so2615157qkk.8 for ; Fri, 08 Apr 2022 11:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qnWn/G1v8AMjgZeV0vrRRskVP5PKCPkKnjAvSBWCiog=; b=Yrv/4DfWo8XzuZKX3n2fnRyM5qg5cpPd9RJn0imI4WJgfA4/hq+XwK9Zez1bIwBFYG QxCMABFF3bqiHIWYhC6zjNtGol7oTSnOQqqyJFcuFqDNXpPyLZ4B69ms5ViWU63tMj+8 uVXMMz2FNHEUtmwK6ym9rZiV1MBctW2Kf7hipW8dlYW3COwe6ol7B3iEqbxxH1VB98C8 aOIvIk6e5JtfwqivEiIizEpJiJV/ST6bkAayH/VrgmDzhchacsaK+uSJE0OnvGg2/eGU cMu9HHoge1H5LkMbBB1zaIdGPc4PwFNWUQA1vngF5bjc+F94yqev4OLIAImsKsRY4Vh1 6+aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qnWn/G1v8AMjgZeV0vrRRskVP5PKCPkKnjAvSBWCiog=; b=7U4NTkvVcvFEbnfmDX3NP5X3gW/7/2mjJkkb/Z8/EYOdmkzw1hW6gspJMYC8rKzs72 /Ls3Ow2SOVUKDmcc2dRtMt+vGqNfuD6TtMdV5F9RnMpi6DSd4BlJJoENkneR892p/XWx EJDr4awTR44jh+4d7BZfw3zRVifS2Vl6JVR63AUTwPoG6cH+sL34MDxqdRmJdP0m+k3J 2VmNg01EKYq4Oj309JrOLkhakX+kJBZDDzTmpIh6pk3TJqQJ0pOC8jRwl8a3kNbC7rEQ nkhBcqufcSRlgGVJBYXXwQFGTT8RYbUSgYFDIwmdjwJ1sCYugHPV7abHRJLx6RId/OXp noUw== X-Gm-Message-State: AOAM530lHUMMN/21TotFzP/9zE+o6s8S492Ygw8C7mSdJkQmW8htBsPv p0SRm6VnmrxLmMmLKe2+Jg1+Mt3bTEuyG5ZBoO64mQ== X-Google-Smtp-Source: ABdhPJy0Zg7wGYGP3Y4ju21eKWOojsGNF/XGXzPyEC1bFWczC1hJ830VSwicu8jxDsJoQJjrLC3tmgMKEMTuAl3yecw= X-Received: by 2002:a05:620a:170a:b0:67d:be5c:204a with SMTP id az10-20020a05620a170a00b0067dbe5c204amr13919747qkb.593.1649440955444; Fri, 08 Apr 2022 11:02:35 -0700 (PDT) MIME-Version: 1.0 References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-6-git-send-email-quic_sbillaka@quicinc.com> <94da2c97-2ad2-4575-bd73-d66ad989e17b@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 8 Apr 2022 21:02:24 +0300 Message-ID: Subject: Re: [PATCH v6 5/8] drm/msm/dp: prevent multiple votes for dp resources To: Sankeerth Billakanti Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_kalyant , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "Sankeerth Billakanti \(QUIC\)" , "Abhinav Kumar \(QUIC\)" , quic_vproddut , David Airlie , linux-arm-msm , "Kuogee Hsieh \(QUIC\)" , "bjorn.andersson@linaro.org" , Doug Anderson , dri-devel , LKML , Sean Paul , Sean Paul , "Aravind Venkateswaran \(QUIC\)" , Stephen Boyd , freedreno Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 8 Apr 2022 at 20:12, Sankeerth Billakanti wrote: > > > > On Wed, Mar 30, 2022 at 9:04 AM Sankeerth Billakanti > > > wrote: > > >> > > >> The aux_bus support with the dp_display driver will enable the dp > > >> resources during msm_dp_modeset_init. The host_init has to return > > >> early if the core is already initialized to prevent putting an > > >> additional vote for the dp controller resources. > > >> > > >> Signed-off-by: Sankeerth Billakanti > > >> --- > > >> drivers/gpu/drm/msm/dp/dp_display.c | 10 ++++++++++ > > >> 1 file changed, 10 insertions(+) > > > > > > I'm not a huge fan of this but I'll leave it up to Dmitry. In general > > > it feels like there should be _a_ place that enables these resources. > > > Checks like this make it feel like we just scattershot enabling > > > resources in a bunch of random places instead of coming up with the > > > design for enabling them in the right place. > > > > I'd prefer to see a check for eDP in dp_display_config_hpd(). Or even better > > to see that this function isn't called for eDP at all. > > > > This needs to be called when eDP is not using the aux_bus path. If the eDP panel is > given as a separate panel driver, then the resources need to be enabled here. > > If we don't want to support eDP without aux_bus, then we can skip this function. I think it's up to you to decide, if it's necessary or not. But if it is, please change it accordingly. > > > > > > In any case, if we do end up landing this patch, it sure feels like it > > > needs to move earlier in the patch series, right? This patch shouldn't > > > hurt even without the other patches in the series but if you apply the > > > earlier patches in the series without this one then you'll have a bug, > > > right? That means this needs to come earlier. > > > > > > -Doug > > > > > > -- > > With best wishes > > Dmitry > > Thank you, > Sankeerth -- With best wishes Dmitry