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 194ADC433FE for ; Thu, 31 Mar 2022 23:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243066AbiCaXZc (ORCPT ); Thu, 31 Mar 2022 19:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243080AbiCaXZ1 (ORCPT ); Thu, 31 Mar 2022 19:25:27 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9254506D for ; Thu, 31 Mar 2022 16:23:21 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id r13so2397708ejd.5 for ; Thu, 31 Mar 2022 16:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7juVurgjLt3GvUzI9U9c+xp5sahJ/Uk+aOlgugxy0EM=; b=RtJix/BsoQj0ELH2OMFl7dwsORWQLL0UBqSXWJr5KoYLICZZbVFRb/zdCkHwWWysN5 3b5vtLz0FaF+JGho0PKGYaYoz18U0Fy53xtgtIwoMITco5McP4KTTF/FQkbhfbr91SR4 pxJraAJYBLjynqhNcmQ0n9QTPBRiLktURUGCg= 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=7juVurgjLt3GvUzI9U9c+xp5sahJ/Uk+aOlgugxy0EM=; b=No4RTuLpw8DIVTtc/mkHKf0GmkcWZPkWyPJ+a7jNaYXigRX5X4TjKNw3rQb85C9IWN 5Zyjoeo7rdgon0xPeEJsb1MBHx1ib6ZRL+/P4aJn1B1bEJNIs2MchNQhqfTKFJgfKS5C o3v9E2IcVBsK0ocQy5aIrsMQMvGTI9wQZfmlh5DnqDK57UmpP6BOEWZliAT/bXtSk7Lf OYDxq5gMMTg1oKqqfrdpRnJTVi7eYiedV46rg+chSdceQieaFu8fqftBGSrbH9ElRxJL jP4QZiDug6OpJ/Hy5SVCHCFmOYsrO0jKAfAQQng6s1UJePMR5b3fC3eJVQszvFpGf7uf sTVA== X-Gm-Message-State: AOAM531secQEmMiL+LKa72M9/n0k1xeUbQER5NfKUkXIse1ojJ5cs+PL WFE/7C/pNIBfMqHcC1rAh+mhOUqEQfGUx3/v X-Google-Smtp-Source: ABdhPJwFQ6l6XVhuZYRgQwcbVIloKKinANS+W9BgUfO26rNMldjOTgcyvck5ny4+rW6uWh6l6BMQUw== X-Received: by 2002:a17:906:c104:b0:6e4:a223:1af9 with SMTP id do4-20020a170906c10400b006e4a2231af9mr6744840ejc.441.1648768999902; Thu, 31 Mar 2022 16:23:19 -0700 (PDT) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com. [209.85.221.52]) by smtp.gmail.com with ESMTPSA id v17-20020a170906339100b006e11af84acasm312394eja.128.2022.03.31.16.23.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 16:23:19 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id c7so1908519wrd.0 for ; Thu, 31 Mar 2022 16:23:18 -0700 (PDT) X-Received: by 2002:adf:e7cd:0:b0:204:ba2:b106 with SMTP id e13-20020adfe7cd000000b002040ba2b106mr5551021wrn.679.1648768998053; Thu, 31 Mar 2022 16:23:18 -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> In-Reply-To: <1648656179-10347-6-git-send-email-quic_sbillaka@quicinc.com> From: Doug Anderson Date: Thu, 31 Mar 2022 16:23:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 5/8] drm/msm/dp: prevent multiple votes for dp resources To: Sankeerth Billakanti Cc: 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 , Sean Paul , David Airlie , Daniel Vetter , Dmitry Baryshkov , quic_vproddut , quic_aravindh@quicinc.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, 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. 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 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 77A3FC433F5 for ; Thu, 31 Mar 2022 23:23:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF49910E32B; Thu, 31 Mar 2022 23:23:22 +0000 (UTC) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBF8110E32B for ; Thu, 31 Mar 2022 23:23:21 +0000 (UTC) Received: by mail-ej1-x62f.google.com with SMTP id j15so2346441eje.9 for ; Thu, 31 Mar 2022 16:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7juVurgjLt3GvUzI9U9c+xp5sahJ/Uk+aOlgugxy0EM=; b=RtJix/BsoQj0ELH2OMFl7dwsORWQLL0UBqSXWJr5KoYLICZZbVFRb/zdCkHwWWysN5 3b5vtLz0FaF+JGho0PKGYaYoz18U0Fy53xtgtIwoMITco5McP4KTTF/FQkbhfbr91SR4 pxJraAJYBLjynqhNcmQ0n9QTPBRiLktURUGCg= 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=7juVurgjLt3GvUzI9U9c+xp5sahJ/Uk+aOlgugxy0EM=; b=DeVOoZZQMRRaxhVBKcL7uCFv8OXirhm70AHMhl2tRTxMpX9AcGCZlCJRaVVk6MpjlV Z0qS7RXDNEU7bO+2a10dqPOjmNezoioFvv4FziGobIDQI9yBXCbgRqSpJLfBBz0n8fXT wTvpnD5oQYW+Sv9teoRa6w2qcHdm0vsBZxzaGrPtP3tZNsIojoqh/06pB40WtIap+FWn 8DhAmPofALyu5vJCv1Ro1iY1AN6G/INfKC73LR9vHeo/AaTZNGNx/is6YDWsexD5iMzq EnRXPVYUhsBI5eytpemND2HKdvbPay1q8RKoz4yVRFwK0PgGYZr2GM9uy0QfPmAMGU4m iiSQ== X-Gm-Message-State: AOAM533NQPOX3y5/bv1J8vZUboALbqukISX1rhk9oddVvIdqATRelzJw 46q4+8yWksS2DHZQmToHk7JguYXlZyLljyX3 X-Google-Smtp-Source: ABdhPJzxgNr+hBe8aNCbKkzBDuhP7uB/iYWICh7leO8JsEiIM2IISQAFrNxU6dAwGAmR/nrKRHaOpg== X-Received: by 2002:a17:907:7214:b0:6dd:e8fe:3e9 with SMTP id dr20-20020a170907721400b006dde8fe03e9mr7077656ejc.51.1648769000021; Thu, 31 Mar 2022 16:23:20 -0700 (PDT) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id ky5-20020a170907778500b006d1b2dd8d4csm320242ejc.99.2022.03.31.16.23.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 16:23:19 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id h23so1796571wrb.8 for ; Thu, 31 Mar 2022 16:23:18 -0700 (PDT) X-Received: by 2002:adf:e7cd:0:b0:204:ba2:b106 with SMTP id e13-20020adfe7cd000000b002040ba2b106mr5551021wrn.679.1648768998053; Thu, 31 Mar 2022 16:23:18 -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> In-Reply-To: <1648656179-10347-6-git-send-email-quic_sbillaka@quicinc.com> From: Doug Anderson Date: Thu, 31 Mar 2022 16:23:05 -0700 X-Gmail-Original-Message-ID: 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" , Bjorn Andersson , "Abhinav Kumar \(QUIC\)" , quic_vproddut , David Airlie , linux-arm-msm , LKML , dri-devel , Stephen Boyd , Sean Paul , Sean Paul , Dmitry Baryshkov , quic_aravindh@quicinc.com, "Kuogee Hsieh \(QUIC\)" , freedreno Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, 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. 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