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 839C6C433EF for ; Fri, 8 Apr 2022 12:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234196AbiDHMWQ (ORCPT ); Fri, 8 Apr 2022 08:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233882AbiDHMWO (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 3B04E33CC42 for ; Fri, 8 Apr 2022 05:20:10 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id a5so7331274qvx.1 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=UIFooxlrLA4a7t+cLyq5Hh/SZ+TItTgRVgVeK5SgT5ydFj/lLI7UkfrjNpqzEHtOZK rcakdtRSZ65yeSWnLf5wYpqWEmIwnEKzveI0rOyatv7SlBCbvLamk5mg265CGT3KL/Oj Kbq5j4HSSHFZkB7/vygqUY7Rekbweeau3p9AjFDMHz+VCFBERj2YFm/kEn1Cu+RJmEJE M32bW+/CXY0uA0ykisgjalaNdOTrojc259Pnc48YtZO6sbOHTCGV9sXuqBCpimAIxhkZ NHg3ZkX/A4SSCbXhGJXHbBKJybGa621uumIMv7EdDQ3osCi6L+4q2ZRJxsPU1tQ82cZq Ba0g== X-Gm-Message-State: AOAM532bA64x1sXFTaJJJwxtrtc5GE0k62sQh9o2AUWd+AxZ6VYP1Ym5 MTces7zoY5fnxteAoKBvvC5/qW/8EzK+OowFyRy3nw== 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: devicetree@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