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 94DE4C433FE for ; Fri, 8 Apr 2022 12:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233984AbiDHMWQ (ORCPT ); Fri, 8 Apr 2022 08:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiDHMWO (ORCPT ); Fri, 8 Apr 2022 08:22:14 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3822F33B03D for ; Fri, 8 Apr 2022 05:20:10 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id kk12so7276338qvb.13 for ; Fri, 08 Apr 2022 05:20:10 -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=qnV1xPHXIhELyu3l/Rzc6DpeLBQsaK18p8BjdbQ3rfM=; b=m7ai8kdqUTEqZEtxij01ueqIDRNer/to8wJyLd/8iO4+BLLqvAAGiuEGtFzKZVWOI0 FV/J3KeywgRxq3mhQ0PIgEpaWUYcXq8q5pdUDyuLa1l/zUEF/XmUB07U8oM9Ik0ysJZU vtqly3RaJH1bNvzi6uSmk8HQKzgpWr+pZGK+PFytl/a+91zOoys1eTL/TjpBJuuhgLIX uSy86jjMuQvtjhuFQhLBllDLqzUq4JtcLaGAZeHjJ2Hv5djMNzin/jFgQ9ZYB435eHS5 LVdMoExsv9u3WQBoOa1+52e5CSHkH4OyAXpoV7og/Kx2CCxV65JCpbOMII1Aqgj/ppvr pw4Q== 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=qnV1xPHXIhELyu3l/Rzc6DpeLBQsaK18p8BjdbQ3rfM=; b=Hjm7LCX1PFoYji5JFhMCbBRWJKyHKZ7LiQlciJcHNJw+MQcuwBuFzCzKk+6dlX+O/y iMUBERbt9PEV/87ArS/zfX+bxC+whNm1NzJRK2p6PFSfw/vlulW72+lmeGFvJv3T0Umo p1zg9U2pg9XfGjBrnjMyX+6horjq6rzPBWDYdUmigHm297RZ1wUs4MKU+WTu0o13ZeXM IAvbawEk89p62L51LZNDyYdOs2zB96EkjbqdbKpwJ04sTjSI2vcjlvudDXnScQjgmw8L oaAfCCF6Yi+PEIaQQdOSJOn93qHrZO2n76t5JUKMK4Om3DaYmKRGJTjZOqf5KuaQDqnI kMBA== X-Gm-Message-State: AOAM530Jfit8AqDoW9ykYIHBpPBmvmMCsK/35VRZqQ46Mh8pOoQl8/1o FoFMW/3iXbkC85yACORSBFb+14PqahpoQ4df9TvShQ== X-Google-Smtp-Source: ABdhPJyppvxucb4/91IO7XFUMqE5JTo2LAUqFHjQRBj+2zXkmKhMX/jftAjRdF5M39x/wbJKWCwF15Aho5GRj5Cqkkc= X-Received: by 2002:a05:6214:20e4:b0:441:7bed:5ccd with SMTP id 4-20020a05621420e400b004417bed5ccdmr16143495qvk.119.1649420409412; Fri, 08 Apr 2022 05:20:09 -0700 (PDT) MIME-Version: 1.0 References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-2-git-send-email-quic_sbillaka@quicinc.com> <392b933f-760c-3c81-1040-c514045df3da@linaro.org> <3e5fa57f-d636-879a-b98f-77323d07c156@linaro.org> <225d2c0a-42ec-28ad-688c-e7e9e2035ee1@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 8 Apr 2022 15:19:59 +0300 Message-ID: Subject: Re: [PATCH v6 1/8] drm/msm/dp: Add eDP support via aux_bus To: Doug Anderson Cc: Abhinav Kumar , "Sankeerth Billakanti (QUIC)" , quic_kalyant , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , quic_vproddut , David Airlie , linux-arm-msm , "Kuogee Hsieh (QUIC)" , freedreno , dri-devel , "bjorn.andersson@linaro.org" , Sean Paul , "Aravind Venkateswaran (QUIC)" , Stephen Boyd , Sean Paul , LKML 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 03:26, Doug Anderson wrote: > > Hi, > > On Thu, Apr 7, 2022 at 4:46 PM Dmitry Baryshkov > wrote: > > > > > The way I'm arguing it should work is that: > > > > > > 1. A whole bunch of the DP init code should move to the DP driver's > > > probe function. This includes parsing the DT, acquiring clocks, > > > getting a handle to our PHY, and IO mapping registers. As far as I > > > know, there's no reason to wait on all the components being probed in > > > order to do this stuff. > > > > Yes. And that's one of the reasons I tried to stay away from the DP > > driver. Each time I open the source code, my hands itch to start > > refactoring the code. > > > > > > > > 2. Once we have done the above things, it should be possible to do AUX > > > transfers, correct? ...and then we can populate the AUX bus from the > > > probe function too. > > > > No. In the DP case the AUX bus is inaccessible until the dongle is > > plugged (see all the HPD handling, phy_init()/phy_power_on() is hidden > > somewhere in that path) > > I guess my thought was that in DP you could still create the AUX bus > at probe time. Then for DP you just return an instant "transfer > failed" from the AUX bus if HPD isn't asserted. For eDP (as discussed > elsewhere) when we try to do an AUX transfer then we delay until HPD > is there. I think panel-edp would already handle the delay, so we do not need to have this logic in the DP driver. > So we can still acquire resources (clocks, PHY, io maps, etc) at probe > time for DP and create the AUX bus, right? It will just return > "-ENODEV" if HPD isn't asserted and you're DP? Yes, please. I still suppose that we'd need a separate case to power_on eDP's PHY during the probe time. Maybe I'm mistaken here. -- 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 794CDC433F5 for ; Fri, 8 Apr 2022 12:20:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E579510EFE4; Fri, 8 Apr 2022 12:20:11 +0000 (UTC) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66FCF10EFE4 for ; Fri, 8 Apr 2022 12:20:10 +0000 (UTC) Received: by mail-qv1-xf35.google.com with SMTP id f3so7291370qvz.10 for ; Fri, 08 Apr 2022 05:20:10 -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=qnV1xPHXIhELyu3l/Rzc6DpeLBQsaK18p8BjdbQ3rfM=; b=m7ai8kdqUTEqZEtxij01ueqIDRNer/to8wJyLd/8iO4+BLLqvAAGiuEGtFzKZVWOI0 FV/J3KeywgRxq3mhQ0PIgEpaWUYcXq8q5pdUDyuLa1l/zUEF/XmUB07U8oM9Ik0ysJZU vtqly3RaJH1bNvzi6uSmk8HQKzgpWr+pZGK+PFytl/a+91zOoys1eTL/TjpBJuuhgLIX uSy86jjMuQvtjhuFQhLBllDLqzUq4JtcLaGAZeHjJ2Hv5djMNzin/jFgQ9ZYB435eHS5 LVdMoExsv9u3WQBoOa1+52e5CSHkH4OyAXpoV7og/Kx2CCxV65JCpbOMII1Aqgj/ppvr pw4Q== 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=qnV1xPHXIhELyu3l/Rzc6DpeLBQsaK18p8BjdbQ3rfM=; b=fp4uaEYE3QhFVphM/kHwbXUHParwf3E3S+B+e6z0bAWfMbCm86isPaCwA0PBopScEB v56r34f3vR3zt+CCoNS+G/AAsOvM3f6NuCKrNUwzJUCLElYoKAEmCRvNbRpSPYnbhrdQ vlMD8i7d5FPyU1uR7NPet2iDi1OIsfapONssO6rojLHE/lzPMCDQcf9QEgs3Qo0TprTC 6sYJYGJM8RsUCv0ImbjvEtwjGMolXQkkREpWborLbgoN4H+fSVpL+wO2N9xTbBUjhZ8W 6dF6ppXOGsvjpWgMeGDA/eGH34M8fcM4yGypxZo96gNeCJBeAVeNadpnvIfO3HyTfU95 +Fig== X-Gm-Message-State: AOAM532DMvpEmkwiDx+HUOCUA/m5txkRfpK9Oo/um3/cdpWuvE9Hd0I1 yZq59GEdm5jqETBuhuPTaLR+MgRgLBxZO/W74I/WUA== X-Google-Smtp-Source: ABdhPJyppvxucb4/91IO7XFUMqE5JTo2LAUqFHjQRBj+2zXkmKhMX/jftAjRdF5M39x/wbJKWCwF15Aho5GRj5Cqkkc= X-Received: by 2002:a05:6214:20e4:b0:441:7bed:5ccd with SMTP id 4-20020a05621420e400b004417bed5ccdmr16143495qvk.119.1649420409412; Fri, 08 Apr 2022 05:20:09 -0700 (PDT) MIME-Version: 1.0 References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-2-git-send-email-quic_sbillaka@quicinc.com> <392b933f-760c-3c81-1040-c514045df3da@linaro.org> <3e5fa57f-d636-879a-b98f-77323d07c156@linaro.org> <225d2c0a-42ec-28ad-688c-e7e9e2035ee1@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 8 Apr 2022 15:19:59 +0300 Message-ID: Subject: Re: [PATCH v6 1/8] drm/msm/dp: Add eDP support via aux_bus To: Doug Anderson 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\)" , quic_vproddut , David Airlie , linux-arm-msm , Stephen Boyd , Abhinav Kumar , dri-devel , "Kuogee Hsieh \(QUIC\)" , Sean Paul , Sean Paul , "Aravind Venkateswaran \(QUIC\)" , "bjorn.andersson@linaro.org" , freedreno , LKML Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 8 Apr 2022 at 03:26, Doug Anderson wrote: > > Hi, > > On Thu, Apr 7, 2022 at 4:46 PM Dmitry Baryshkov > wrote: > > > > > The way I'm arguing it should work is that: > > > > > > 1. A whole bunch of the DP init code should move to the DP driver's > > > probe function. This includes parsing the DT, acquiring clocks, > > > getting a handle to our PHY, and IO mapping registers. As far as I > > > know, there's no reason to wait on all the components being probed in > > > order to do this stuff. > > > > Yes. And that's one of the reasons I tried to stay away from the DP > > driver. Each time I open the source code, my hands itch to start > > refactoring the code. > > > > > > > > 2. Once we have done the above things, it should be possible to do AUX > > > transfers, correct? ...and then we can populate the AUX bus from the > > > probe function too. > > > > No. In the DP case the AUX bus is inaccessible until the dongle is > > plugged (see all the HPD handling, phy_init()/phy_power_on() is hidden > > somewhere in that path) > > I guess my thought was that in DP you could still create the AUX bus > at probe time. Then for DP you just return an instant "transfer > failed" from the AUX bus if HPD isn't asserted. For eDP (as discussed > elsewhere) when we try to do an AUX transfer then we delay until HPD > is there. I think panel-edp would already handle the delay, so we do not need to have this logic in the DP driver. > So we can still acquire resources (clocks, PHY, io maps, etc) at probe > time for DP and create the AUX bus, right? It will just return > "-ENODEV" if HPD isn't asserted and you're DP? Yes, please. I still suppose that we'd need a separate case to power_on eDP's PHY during the probe time. Maybe I'm mistaken here. -- With best wishes Dmitry