Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3537778rwd; Mon, 22 May 2023 15:48:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qKv6noWJo6mhW246nhVdqKz1DrmVrLtroImOWuD/Pqyk0qPLSCWwsvu6GMl/s5N2zs5Br X-Received: by 2002:a05:6a20:3cab:b0:104:144:dbdc with SMTP id b43-20020a056a203cab00b001040144dbdcmr14123048pzj.33.1684795726546; Mon, 22 May 2023 15:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684795726; cv=none; d=google.com; s=arc-20160816; b=Rmq9tgn2lONgmR9eOH3rbDLhcM9hyJZQcdsqauVTZS7gbEnUx6sW6deKju5vcBPVfm cFeKdbM9X5XBMS3getpgHwrdHNxv9kIjYtyg9m9KdQfZLueW1HPONXbRY8h2SuEP9SNx bhHECK3YIaUO/LNyefsfdHtZRQ7ChWgLl/r6GwDDfIzmSpOci7vvbweWugDZ9JIdet09 oC2ShAVUBLYB20VAU4OPMQHrU80KUb3lwR/NKy5TJtlq4n4MJXU/0y2TJfeU8Hj4OWvS QS3lZaLfWdCZIgWMvDprRNb/HBPxTx0+/IC6hBIR4P4ixFaLtrNqYYBxHWuWPeuTaer1 qfrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6k2tBhIE2rm0F9Omi3YialXHOsjKSypvsYP7cK648XA=; b=pN/M5nWlhrlZCElVWY1HzhfKbmHaEDxRJYJprhBEepXfjekNnAak7lm+XgnGhuGzuY +Pd9IzGXgIFwx+zvUZ/lMNgpaW54Ig+4VeEMO+tjx9pImOqb8ie2WnnDIfrGIvpGts6G 61vV7eFCAmJ+D5xoIEVHofmHuSsI9psJ3qoGqLD+4vHkdfh1OUbTxf3oQz1Yu4YJlJFz JJR+oy+8+ik3VDCpaA5lHX9/50Da+AwrrT/6zd5o4/q1dDoOEm4jG1vop/eUG81WSuKo trjMsPUStF01qQAlmPbjUSwbcSfX0+6uyQqwzFObDcFoNCEGv9VWGV0geTnsDN8OHqhV Ku4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EIK07Rtl; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a17090a899100b002449fd20726si285769pjn.64.2023.05.22.15.48.30; Mon, 22 May 2023 15:48:46 -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=@kernel.org header.s=k20201202 header.b=EIK07Rtl; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbjEVWoM (ORCPT + 99 others); Mon, 22 May 2023 18:44:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234083AbjEVWoK (ORCPT ); Mon, 22 May 2023 18:44:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 690EF11A; Mon, 22 May 2023 15:43:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F22CF62C6D; Mon, 22 May 2023 22:43:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AEEAC433EF; Mon, 22 May 2023 22:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684795438; bh=oOHDjeYKCKxfJCgXP2IFGV4OVL44QXbBAH3b4cOYdG4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EIK07Rtlo0FkG2xHNTlvOBNjCr1urFVT9UBOedGuSQfj+W95+8oinEug9N1wDVoNs glixJIsgG6OPvwptlGPmI0zfb+8UR/1fcxdxil9DLSOm+ZQ3/UIYHZufCnjuGP029r qWtaL3czA1cb6AMKq4PeR72BTNih0Is2a+wy0B4+3DDVpksci8GU+rHl0tFNKFzWWP CqzOvANXB2WGirNq9thICVmK2aZbwlmR6Qc3XHQ20cN0bPe6c0pa+AesFjiUQJjjY0 Z0ZkbVnpGif/y5gmnBz6lFNtP59YcnXHjNj6hOxQ0SeXOq5PyvbqwXBO/fFM9KcfRo fZLC6OxKZrteg== Date: Mon, 22 May 2023 15:47:51 -0700 From: Bjorn Andersson To: Kuogee Hsieh Cc: Dmitry Baryshkov , robdclark@gmail.com, sean@poorly.run, swboyd@chromium.org, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@gmail.com, agross@kernel.org, marijn.suijten@somainline.org, quic_abhinavk@quicinc.com, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable Message-ID: <20230522224751.5tf4oifp5z5k45pf@ripper> References: <1684791092-1822-1-git-send-email-quic_khsieh@quicinc.com> <20230522220555.7ood44kavjzzg3lv@ripper> <9804c558-124d-aca4-c534-158c0457b7bf@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9804c558-124d-aca4-c534-158c0457b7bf@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, May 22, 2023 at 03:35:13PM -0700, Kuogee Hsieh wrote: > > > > > > ? -static void dp_display_config_hpd(struct dp_display_private *dp) > > > > -{ > > > > - > > > > -??? dp_display_host_init(dp); > > > > -??? dp_catalog_ctrl_hpd_config(dp->catalog); > > > > - > > > > -??? /* Enable plug and unplug interrupts only if requested */ > > > > -??? if (dp->dp_display.internal_hpd) > > > > -??????? dp_catalog_hpd_config_intr(dp->catalog, > > > > -??????????????? DP_DP_HPD_PLUG_INT_MASK | > > > > -??????????????? DP_DP_HPD_UNPLUG_INT_MASK, > > > > -??????????????? true); > > > > - > > > > -??? /* Enable interrupt first time > > > > -???? * we are leaving dp clocks on during disconnect > > > > -???? * and never disable interrupt > > > > -???? */ > > > > -??? enable_irq(dp->irq); > > > > > > ...we need dp->irq enabled for handling the other interrupts, otherwise > > > e.g. AUX transfers will time out. > > > > > > I added enable_irq(dp_priv->irq) to the EV_HPD_INIT_SETUP case below, > > > just for testing, and with that the patch seems to be working fine. > > > > > > > > > Is there any reason why we need to delay its enablement to after we > > > unmask the HPD interrupts? > > my though is aux transaction should happen after plugin interrupt detected. > I have a next_bridge which implements DRM_BRIDGE_OP_HPD, in which case dp_bridge_hpd_enable() will never be called (the next_bridge's hpd_enable will be called instead). > can you please let me know what did you do to trigger aux timeout? > In this setup I just connect the cable, wait a few seconds and the transfers fails - as there's no interrupts signalling them being completed. > It does not happen on me at my test. > Given that you have the HPD signal on a GPIO, you should be able to rewrite your DTS in line with: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/qcom/sa8295p-adp.dts#n28 And pinmux the HPD signal as GPIO instead. I believe this would allow you to test both code paths - without the actual TCPM known to Linux. > > > > As I wrote, I'd probably prefer to see enable_irq() and disable_irq() > > calls gone. > > ok, i will move enable_irq() out of here. > Thanks, Bjorn > > > > > > > Regards, > > > Bjorn > > > > >