Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2865739pxb; Mon, 4 Apr 2022 00:41:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/z10rJa8opHWgWfe+4Pup0bAcW9V1GjTu2hgKH58okVqY7h0MzceZ4pbT/vbFe2Jbl45Z X-Received: by 2002:a17:903:240a:b0:14e:dad4:5ce4 with SMTP id e10-20020a170903240a00b0014edad45ce4mr22580601plo.125.1649058102663; Mon, 04 Apr 2022 00:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649058102; cv=none; d=google.com; s=arc-20160816; b=x8kGgKLu24hzmBM9HNJ0wkg6w9oYtNv7F9JBZM7udk1f7QQRJ/hKGOmsz2rsY7jKP4 mr4xcyyW3ocy9uMzN+IHSs8bgqZzrLRcOHX9yMFyr+KFjDz+PnqygpIsmpXHG+61JJEa GfNRVvs4Lh9MiCPb4xenP9H9zcmNo8688bkbYUuhi2wBVaOuZugLRulsMjgax2kb24Do Twvyk2WN6VjUcq+tBYP1t4W2j9xNzPc2FcGrVyFL0rZCUUMZ/mYIpJpb6JhxCXBJmyxX qDi/Zd+N5K1RtctFRGmSOdwg5nc0vjL1I/g6uA9MRIBgbRva3Ea5Y/RQ7Epiz1hYmtUp 4rIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Jx8e761MNPFyJ2/BAtkY0nyoED7Z8+xj5f0GT++V4DU=; b=DofsyFHowetw7D7Untq7SkDdQdH+6cAKHKJTKUMPXSbd0ycTZJ9QYLYu7mwlKEIv2m 0fhCroxVKgAKO0pIFRIm9LatTac4NAScciKBYuY/y9RBn7EnD2dSi2RrPEvLaF/Wbcht nmIm28QZz3XyXmdDfMB9z/kF/vbau/V0CBBjU6gg20WYjrEhivB2Gn71hiaALn4aMCfV jYFwH+YH92fggc2GvEwpHyp46m8GQkdpFsLgJZkwV2Be5nKuFvJsf6P9wdINYjLH/02l y/I6PbSO7NW9pas/D7Z2Fj+VY97/TLOJ6qFwN6maBpz4MY73jkvjyXbXC1bj46QFvpub RZCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CM5tAEao; 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 d1-20020a170902854100b00153b2d16493si8680805plo.155.2022.04.04.00.41.29; Mon, 04 Apr 2022 00:41:42 -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=CM5tAEao; 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 S240225AbiDBKjp (ORCPT + 99 others); Sat, 2 Apr 2022 06:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbiDBKjm (ORCPT ); Sat, 2 Apr 2022 06:39:42 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EA581AF7E9 for ; Sat, 2 Apr 2022 03:37:47 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id h7so9081729lfl.2 for ; Sat, 02 Apr 2022 03:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Jx8e761MNPFyJ2/BAtkY0nyoED7Z8+xj5f0GT++V4DU=; b=CM5tAEao5vQ2577zZq46eGT5uUdK6gdVlWEARVuyxYeNLnYiT8lvo5OCG2ZcKhDGfb wy6RzILMGSWya1H7UCQr8Y4fjgCHbD+N0bIgO8rFWOwSygD60R87YX12LQBKXes0rNPR FQOBFpPb/5zrL2nQxvW2rumRZWeKgIx/p9Ila06gACmYl8sawMjF2PLwS8QtgZb8I5qx QyOD88AioP5g/0oCKIYAfuqniXGLgVHDyp5CkITXTV/3iv2MJ1nPjOiTehzvNKJJvomc Oa3oNbA/WgWKKW3dNoiI/IVu3xfKKUao07GPXs4EzJA+/sVfrm6CUbZRq58SKFwbCDRs CVjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Jx8e761MNPFyJ2/BAtkY0nyoED7Z8+xj5f0GT++V4DU=; b=crYwIJEkoPF06oyWgvbGgQcNTxEqzlR6OoHrz5yEYu+wAKuONMxf9nB79Ywe0qWDlF a9NElrWd66lqFnBD/nRfLgD91dknnwh8f9m5GPCdXAiPSjtwVYY+4uqdqxU/el345Lub ko7gWrJkUygl8QDVR0KxNpQ/N1u+qo3VcOBmJBGLJr9VnxeqABOMGOvvsabdsl5PdAN0 TlNhsS1ee9wb8S8YXL6sgAP4xKUqUl45dsktkR3/eWQ6HFzuiPEjJ4Mtwx8r56N71YRj MI0oxpC8VqZzNaOH3Q8/AGkjRW14jAKqN5H0Kp+VqrmP0aFGRHk1NzumeBJLTd4Gr+j6 VyOw== X-Gm-Message-State: AOAM531LHE71YW5i1l2aTqggSQAQwtXFPHePl8kzX+Iusjs7M7QM09GN azrAgs7K9gPi6MFTzMnJSx+Rag== X-Received: by 2002:a05:6512:3c90:b0:44a:dc25:ab44 with SMTP id h16-20020a0565123c9000b0044adc25ab44mr4502073lfv.407.1648895865799; Sat, 02 Apr 2022 03:37:45 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id i16-20020a056512319000b0044ae52c6365sm264006lfe.88.2022.04.02.03.37.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Apr 2022 03:37:45 -0700 (PDT) Message-ID: <392b933f-760c-3c81-1040-c514045df3da@linaro.org> Date: Sat, 2 Apr 2022 13:37:44 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v6 1/8] drm/msm/dp: Add eDP support via aux_bus Content-Language: en-GB To: Doug Anderson , 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 , quic_vproddut , quic_aravindh@quicinc.com References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-2-git-send-email-quic_sbillaka@quicinc.com> From: Dmitry Baryshkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 01/04/2022 02:22, Doug Anderson wrote: > Hi, > > On Wed, Mar 30, 2022 at 9:03 AM Sankeerth Billakanti > wrote: >> >> @@ -1547,6 +1593,10 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, >> >> dp_display->encoder = encoder; >> >> + ret = dp_display_get_next_bridge(dp_display); >> + if (ret) >> + return ret; > > It feels weird to me that this is in a function called "modeset_init", > though I certainly don't know the structure of the MSM display code > well enough to fully comment. It's called modeset_init() as it initializes KMS objects used by DP driver. We have similar functions for dsi and hdmi > My expectation would have been that > devm_of_dp_aux_populate_ep_devices() would have been called from your > probe routine and then you would have returned -EPROBE_DEFER from your > probe if you were unable to find the panel afterwards. I don't think it's possible to call it from probe() since drm_dp_aux_register() is called only from dp_display_bind(). The PHY also isn't initialized at that moment, so we can not probe AUX devices. The overall semantics of the AUX bus is not clear to me. Typically the bus is populated (and probed) when devices are accessible. But for the display related buses this might not be the case. For example for the DSI bus we clearly define that DSI transfer are not possible before the corresponding bridge's (or panel's) enable call. Maybe the same approach should be adopted for the AUX bus. This would allow us to populate the AUX bus before hardware access is actually possible, thus creating all the DRM bridges before the hardware is actually up and running. > Huh, but I guess you _are_ getting called (indirectly) from > dpu_kms_hw_init() and I can't imagine AUX transfers working before > that function is called, so maybe I should just accept that it's > complicated and let those who understand this driver better confirm > that it's OK. ;-) > > >> @@ -140,5 +140,6 @@ struct dp_parser { >> * can be parsed using this module. >> */ >> struct dp_parser *dp_parser_get(struct platform_device *pdev); >> +int dp_parser_find_next_bridge(struct dp_parser *parser); > > Everything else in this file is described w/ kerneldoc. Shouldn't your > function also have a kerneldoc comment? -- With best wishes Dmitry