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 72E6DC433FE for ; Fri, 8 Apr 2022 00:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232974AbiDHAXZ (ORCPT ); Thu, 7 Apr 2022 20:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232840AbiDHAXY (ORCPT ); Thu, 7 Apr 2022 20:23:24 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1D214FBB5 for ; Thu, 7 Apr 2022 17:21:21 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id f18so8294379edc.5 for ; Thu, 07 Apr 2022 17:21: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=4AEJnP5mTsYddtMXtuB9PzpAwm62Zr/93tws7knCoTY=; b=FrYI2nBdk+yG/OOXXygzXyvL+ZpcWJWtKe8unV3SbCy1rXBwNnk84WeXyNP/2VlDJy Kg/uBh0NPlU2+DivSPdwyS8dsLdPzD8+y5xmEtYYC5jD30jJr5S+ozejI/3/UdKogkht sWSHEixJSYchJR9gauZlQDTuFx098SCzhXo+o= 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=4AEJnP5mTsYddtMXtuB9PzpAwm62Zr/93tws7knCoTY=; b=OLjexb2Bn6KQ+msru3gHtFIReZdZ0QzsxmsGw3YF3lmgjuvZABOMvHPN0DCEGzXDjV m2R1IVvQRZUqZ/hlu1iSpRanacE9PHvvi1Qn+9LuY7v1RHK/8us7wwZsEum+VMK1mEOA jgC+CKNdN1d0Y22jymnxUBqdkPqeTqllu2OAONhLDniSr+p4dd+o4XeaFfh+x99zfldS XzNzfxR53PhIY2GjuPICONeUhhYnPXox9afiKVoA+7XAA6cziuRpy/E53NKW8nKHh2Jn A8Ys9IwdOcfe2F2nvaJIxzfZwB2WBz2B57WDQfY9zCHyWokKKSUSImRxR5pVwMF0tsxK KWQQ== X-Gm-Message-State: AOAM532FF8OrrsZSTXgDBC4YBYYA4ndTw48lAwz25OZIRrsGFB0HCJyy h/KWybm9VR2eKDXAHSUgwzoNr8MBfMo/fSt7zRY= X-Google-Smtp-Source: ABdhPJy0IW5tZJBclgf35lG7HjgCEEIaMXwUqSSWko0FW37v/7VdM9vdkbLBEKlRa/mWq96cU2VOPw== X-Received: by 2002:a50:ce03:0:b0:41c:c36b:c75 with SMTP id y3-20020a50ce03000000b0041cc36b0c75mr16610004edi.195.1649377279701; Thu, 07 Apr 2022 17:21:19 -0700 (PDT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com. [209.85.221.41]) by smtp.gmail.com with ESMTPSA id k26-20020a056402049a00b004197b0867e0sm9788480edv.42.2022.04.07.17.21.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Apr 2022 17:21:19 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id b19so10498887wrh.11 for ; Thu, 07 Apr 2022 17:21:19 -0700 (PDT) X-Received: by 2002:a5d:568e:0:b0:207:8d1a:46c6 with SMTP id f14-20020a5d568e000000b002078d1a46c6mr3186227wrv.422.1649377278855; Thu, 07 Apr 2022 17:21:18 -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: Doug Anderson Date: Thu, 7 Apr 2022 17:21:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 1/8] drm/msm/dp: Add eDP support via aux_bus To: Dmitry Baryshkov 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 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. 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? -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 2E88FC433F5 for ; Fri, 8 Apr 2022 00:21:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 684C710EE72; Fri, 8 Apr 2022 00:21:25 +0000 (UTC) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32F1410EE70 for ; Fri, 8 Apr 2022 00:21:24 +0000 (UTC) Received: by mail-ed1-x535.google.com with SMTP id c42so8282519edf.3 for ; Thu, 07 Apr 2022 17:21:24 -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=4AEJnP5mTsYddtMXtuB9PzpAwm62Zr/93tws7knCoTY=; b=FrYI2nBdk+yG/OOXXygzXyvL+ZpcWJWtKe8unV3SbCy1rXBwNnk84WeXyNP/2VlDJy Kg/uBh0NPlU2+DivSPdwyS8dsLdPzD8+y5xmEtYYC5jD30jJr5S+ozejI/3/UdKogkht sWSHEixJSYchJR9gauZlQDTuFx098SCzhXo+o= 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=4AEJnP5mTsYddtMXtuB9PzpAwm62Zr/93tws7knCoTY=; b=U6i/FdDQl4FiSCsXXgJcck8XombEDPYXknySQKUBbr9Ojq+JbSxzypGZQk6h9Ha8Qn 3kxhpalYc/IE5Jj98JpkNdhqQo+uV1aTVk07vcnnI4BtO66Ni5V1ekXQMaBhvq7/taKv yln/1zTS+BifTuuuzd8kddRjsrwEfW1X53iFNpweWqsOZQOZ9m3HsVkfDb1Trg35PwIF sNT9EI2uGaTqKhRBwrUmNK9zKR5bctEhZ+wGGJfFncpb0wA4jtzAgwr1J7MJZ4+J2uee jFd+4l+L4qpIq0WE0IrS6QnPTGWvUqwHbnKKLQezZwP4L8e15UwYk8KaUtFPYWvtbs0F +K+g== X-Gm-Message-State: AOAM532jrmY6XFH+523FkapN4a9Pb0LHLN1M0j7EdG0QmErGcv0TfKvm Rrb3reDFi47dc5hD+SW5Fj4AAJ0nM9ZbcL6vTbk= X-Google-Smtp-Source: ABdhPJzosyjeUYBK2ctWLss/FkR2oocVQ8TftVj53c0g77U/a98afrn5hih8IgQA30oQtwNJss1nxg== X-Received: by 2002:a05:6402:1d51:b0:418:bd81:78b3 with SMTP id dz17-20020a0564021d5100b00418bd8178b3mr16544219edb.46.1649377282524; Thu, 07 Apr 2022 17:21:22 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com. [209.85.221.51]) by smtp.gmail.com with ESMTPSA id m2-20020a50e1c2000000b0041d121b095fsm883261edl.67.2022.04.07.17.21.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Apr 2022 17:21:19 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id h4so10477884wrc.13 for ; Thu, 07 Apr 2022 17:21:19 -0700 (PDT) X-Received: by 2002:a5d:568e:0:b0:207:8d1a:46c6 with SMTP id f14-20020a5d568e000000b002078d1a46c6mr3186227wrv.422.1649377278855; Thu, 07 Apr 2022 17:21:18 -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: Doug Anderson Date: Thu, 7 Apr 2022 17:21:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 1/8] drm/msm/dp: Add eDP support via aux_bus To: Dmitry Baryshkov 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" 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. 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? -Doug