Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10732924rwr; Fri, 12 May 2023 12:07:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yE4AoBKfTbuSuBntovYn/529Cob36oPgNZDlOvGdP6bcqxS6MDlB+H95dOg/KqBLo6SU2 X-Received: by 2002:a05:6a20:a10f:b0:ff:b9c4:a0aa with SMTP id q15-20020a056a20a10f00b000ffb9c4a0aamr31129405pzk.48.1683918469810; Fri, 12 May 2023 12:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683918469; cv=none; d=google.com; s=arc-20160816; b=wMpweyPE17s+9C50NKhrtKv9fYgqwjMQ4l8/KXod+ei5neq1YyxLNKjI4QWuSH+B8i g9Bbv50cMUjmqkt/tjrWiQOZISz4DJw9MTcle6CAgbzVSIngMrDsLd5d7rxNI0I+GIeq ikZKObidLjTxXXrK3uN0CPA4HqznSPnSoGr7gT9raLZMK13r4C2N5jPGofFLVlg0469a KVDbPWrRoMsx6naDvM9C7/macQwlbUUEqmz9KbPZeHA1B7t5TINH7cQWyKUw+VHCedql rDc4DWo7aKM8q84anWtalFIcdcarNeiu3bLNU7GiR9cXppTCaZx90Ke8neNFJxpbo0FO yvUQ== 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=8pKQb+0xYXxOucpnQzXDi3qX8jDqCIpUeJjG+K7ITys=; b=MnCDwFSUX56QHqpILMkC3uHKxd3KRcKBCz8J+LbQDnp0O3Ch5g/5Uwpu6EF5k7Zl7Q KNIbEu+6pgdDH3CIybTUggCiS3K4A1zs9gWSVu46Fg0is4J2/SJloBk1gl6VsNdoEJlT GA7CFmu1ZMre5kh2XJaDchdJwpiJmHTUk5y3cj4Ln4q5wRI8VluNKvI7Nz3CY40QkKEr 8hxGx8/o75gOr7oQMTnX16Nv5AFs5a6W9pqJBG5Z9rnCj7I0m492oaBxa1ezpfXUWzKz 1UmHeYSUPxwn61jloDmScVzPo6c3fCH55gOpyL+nETouGOlSMjDp6SLC0YUvXtBJNCOn ihag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ha15g8FN; 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 i186-20020a6387c3000000b0051b59786e6csi10292404pge.300.2023.05.12.12.07.34; Fri, 12 May 2023 12:07:49 -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=ha15g8FN; 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 S238790AbjELSbO (ORCPT + 99 others); Fri, 12 May 2023 14:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238793AbjELSbI (ORCPT ); Fri, 12 May 2023 14:31:08 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD6A71BF4 for ; Fri, 12 May 2023 11:30:26 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-55b7630a736so152917767b3.1 for ; Fri, 12 May 2023 11:30:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683916224; x=1686508224; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8pKQb+0xYXxOucpnQzXDi3qX8jDqCIpUeJjG+K7ITys=; b=ha15g8FNo/FKZNrF+fIFFhPoe8LUpkxENpBqAGkhlgIIw6RpVsD4q25DcY6gKzpOoa oE9ce0ibbeel8jUFuWC+GQF5KKxHreoW5ikWUjYRb9sdWI3OXNmus3V4iKZ9vHKqd6sg VFxLljBA8G2zdnOjAu+Z1Js/XYXeyUQEJmoaoCuOqG5pxckNIdYrzW1VBharM7ZexDzO MAvtpzlCA1HLpSyajO6KSxrLNGQLfJ014MnGrNCn3ihPSv6NXEv3zvSt8gPoc6j9guXQ hzvsSormsrqNGJQpht3s+lGzNwHuhUoybeKRwb9mn3F+7sDGqIeAxlIvHtB2hx9i0mfI yYCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683916224; x=1686508224; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8pKQb+0xYXxOucpnQzXDi3qX8jDqCIpUeJjG+K7ITys=; b=UW6kYnG9ubHVnF8s/J4HsILM//G0IoiUP5H/PtZxMPBxFLnOzf5D4NyVkQaWyBcnKn /P+YEnihOi95A+HRL1iKT8lY3LhuOQbwmjH+/+XR0Du/tacjlS2lY3g981jQ13fxrzIz 1Az0GuEPc6ZC9zSx9XOIKYLs9PkHRjIKZ6wO4k1gYzRvRsBThJ0DfapUS8E4jfAVwquE aTscnSMFAB+sC89LX0gj40XF3bOzsV9V8XZ/2NP4Fj+hgHJ3W9q2v2JzKSFPyFlW5Tnf M1hFi978mvkxN5ruB2kduqKkpsslNzZWr5WnHLNyhrunChPsI+jrwsl7w/YQuRY/9ApO u0Zg== X-Gm-Message-State: AC+VfDwFUggZGJizXi2FV6McW0jhWgFPiS4/g1/chpyERm5giacdv23H qWJXBrW9q/TMgp7BUf22IqA6vfjQNLpilzc8q/qlTA== X-Received: by 2002:a05:6902:70d:b0:ba7:50d4:d914 with SMTP id k13-20020a056902070d00b00ba750d4d914mr259939ybt.5.1683916224054; Fri, 12 May 2023 11:30:24 -0700 (PDT) MIME-Version: 1.0 References: <1683750665-8764-1-git-send-email-quic_khsieh@quicinc.com> <1683750665-8764-2-git-send-email-quic_khsieh@quicinc.com> <20230511155331.2jmfe7xcs5tihdgb@ripper> <5ef83699-01de-d062-6239-9bb834c70458@linaro.org> <8ac0b5f5-27da-2b28-8f10-b2fca447511a@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 12 May 2023 21:30:13 +0300 Message-ID: Subject: Re: [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable To: Stephen Boyd Cc: Kuogee Hsieh , Bjorn Andersson , dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@gmail.com, agross@kernel.org, quic_abhinavk@quicinc.com, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org 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, 12 May 2023 at 21:03, Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2023-05-11 17:54:19) > > On Fri, 12 May 2023 at 03:16, Kuogee Hsieh wrote: > > > 1) DP with GPIO: No downstream drm_bridge are connected, is_edp = false > > > and internal HPD-logic is in used (internal_hpd = true). Power needs to > > > be on at all times etc. > > > > > > 2) DP without GPIO: Downstream drm_bridge connected, is_edp = false and > > > internal HPD-logic should not be used/enabled (internal_hpd = false). > > > Power doesn't need to be on unless hpd_notify is invoked to tell us that > > > there's something connected... > > > > > > - dp_bridge_hpd_notify(). What is the point of this check? <== i have > > > below two questions, > > > > > > 1) can you explain when/what this dp_bridge_hpd_notify() will be called? > > > > The call chain is drm_bridge_hpd_notify() -> > > drm_bridge_connector_hpd_notify() -> .hpd_notify() for all drm_bridge > > in chain > > > > One should add a call to drm_bridge_hpd_notify() when the hotplug > > event has been detected. > > > > Also please note the patch https://patchwork.freedesktop.org/patch/484432/ > > > > > > > > 2) is dp_bridge_hpd_notify() only will be called at above case #2? and > > > it will not be used by case #1? > > > > Once the driver calls drm_bridge_hpd_notify() in the hpd path, the > > hpd_notify callbacks will be called in case#1 too. > > > > BTW: I don't see drm_bridge_hpd_notify() or > > drm_kms_{,connector_}_hotplug_event() HPD notifications in the DP > > driver at all. This should be fixed. > > > > Is dp_bridge_hpd_notify() being called by > drm_helper_probe_single_connector_modes() when the connectors are > detected? > > I see drm_helper_probe_detect() calls connector->funcs->detect() which I > think calls > drm_bridge_connector_funcs::drm_bridge_connector_hpd_notify() but I > haven't confirmed yet. The 'detect' bridge is the DP bridge in msm > driver > > if (!dp_display->is_edp) { > bridge->ops = > DRM_BRIDGE_OP_DETECT | > > so if the bridge_connector is being used then I think when fill_modes() > is called we'll run the detect cycle and call the hpd_notify callbacks > on the bridge chain. Yes. This call chain is correct. drm_helper_probe_single_connector_modes() -> drm_bridge_connector_detect() -> drm_bridge_connector_hpd_notify(). However on HPD events the DP driver doesn't call into the drm core (which I believe should be fixed). -- With best wishes Dmitry