Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp414066pxw; Fri, 8 Apr 2022 10:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1aa0KmFNHAcsEGR+TwPsheuoUtGQ8a3YypuOI2Ygg5szYyj/9jJ1MFH5MBkCvZl64/N4I X-Received: by 2002:a17:907:e8a:b0:6e7:f3cb:61eb with SMTP id ho10-20020a1709070e8a00b006e7f3cb61ebmr19523931ejc.247.1649439288622; Fri, 08 Apr 2022 10:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649439288; cv=none; d=google.com; s=arc-20160816; b=c+6BCjGft9I/uHiYU8WoY/8AVLGRnxeIk7yIUhDT+HpDbtmQLxLyzRTZ+34fu4qNo3 bHu23ipEd6Rd3OHl+/7vBnOXIkDdULMfS4rbt6hFnXrnvgw/SW5BlWEb1Houx5ZzqZGv Ey5wUoCsTifKgOsddJiN9o62aFLKK3IoSunky8l2FsMP+FtsujKmK9TrNJN7efGiHQoZ ebvSOnkuOW6pWJSgrNfDyRjjtlSI985AlVOPktc+cFDLYXDxQ0MuR5m4yUkbHDe4HNBZ atE72NWpe+eEGS16zholltFa7/8rXd6orfFiDMW9TRZ6N0rRszbfAXrRdQn+Tc0M4Jda PUcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qnV1xPHXIhELyu3l/Rzc6DpeLBQsaK18p8BjdbQ3rfM=; b=v+1U7Q6GGsB8tSWcKO4ubyqPB05NN05Gvdh9fsp64O7po0pqHzux8HeTFkRDI4+e2G xqtmQO1Kj85EVlEqVNlLb1Zo79Tdw45DAl4ib4Q0sBZtRrPDecB5peOry01Gf0l8WBD6 4W1dxdCpOQxk3zPDWkjYBeT7H/gUhex1RImRIkFymsYF2BlgEzC3lLRoT7KIgZcSBBLN i9pHN1xf/Dpn3SQ7FQMyZNbw4wRe9uLqgaO5bLiIQSUnI/N3pA/ZhCxj9HfxFrIcgqoQ +Ck/NGEg5MWAgVefPwzDbKa4KeEQsjzW6+dhmJmbRfGOOGvdMjFipH3BPXw0z8duKfBz Udng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m7ai8kdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a1709061ec600b006df76385cf7si1352008ejj.407.2022.04.08.10.34.23; Fri, 08 Apr 2022 10:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m7ai8kdq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234357AbiDHMWR (ORCPT + 99 others); Fri, 8 Apr 2022 08:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233897AbiDHMWO (ORCPT ); Fri, 8 Apr 2022 08:22:14 -0400 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 434AF33CC49 for ; Fri, 8 Apr 2022 05:20:10 -0700 (PDT) Received: by mail-qv1-xf36.google.com with SMTP id x5so7312559qvk.4 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=2+9Fsn66QambAZFg1p8OCk9JgvTrcCEOBHozu0aGL+CYTw9FWPpr6RCOSj5dlNTxR+ l6fqN/HNkFXYKeGv+VBosa+0dNBBTr7NHbfBcKQJAuqjcQxnMfX2uWJe2WZBncUb+q4j Yn6AiT8XC+IKpWzWEtnIMc4OXpDokL6mmjZfgwgGQuhbzHSRfw+EPSXnOhq4q9OKrzeN FgCAM6Vjv1HUsM8x94Ws9yHke1p79Ei9bq0AIX3fnpABlhM6CqMtQoGwHAkHiR1AzYkh 8+GRouFmqk99pQB1qJx+7Lfpv5owTPPJacEXgQunqj8jdSfLje/2Fz657ennYsygc+sE SZKw== X-Gm-Message-State: AOAM533vReTabCxJiUeP+nO5gcaK6RrDEhmi2uTS28+rM52kjbMptHrX F5D5SiEb7hoH+cTIn2hlK1msHmM7t8lHcQPTUfT5/Q== 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" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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