Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1406034pxj; Fri, 21 May 2021 13:29:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEhLmpVNoWx0mV6x5deeNry66lO0HBb+KcxulrfZaPEIzGhULDXmREHo/AAiSyrCgvAgLF X-Received: by 2002:a17:906:ca50:: with SMTP id jx16mr11784821ejb.386.1621628948457; Fri, 21 May 2021 13:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628948; cv=none; d=google.com; s=arc-20160816; b=If7zBJv3sJp1/TnrMqS6sB1sUfQTqBRA2oLW7eqll0Xh0gRoMbY4QhT/5R22qHesKZ zvS0SDTbT3BgV2fa4YfTCnAWAqOlz07oDuzCn2DkOdUNVOSzV+hV8BB9thfNC8e3B/ow W6mjDQl80lRiFhRhY7AuOk/o5YjcnsCpKln4lWHhAwlzbkmOQZGK+GSps2v645W4sdNa BxvJ/CN1g6hsOcr2nKrRHwWk+Bw3Iql+QvZQoDSB+ERHqZZiz+/7o905kb5cIcg0/N0I Zry//o/moTsaGvq83quYVwzDlG5Bu5MDIz5Ot1l4jhVt6BhfUoVcSOfpUbWYZ5BTlYWC w26Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=zFQeR15yIV/MRBDjlnj5bg2b1g+GsEMnzWlVJyF+4vU=; b=e23RLBTqwSsNcQmqnRrRY4eToKF2FgosjG3GP3webCviDxlWgq8WuGzyP228WZFJBh JKD64BEvUdwRgTRIPxyeKl7Uvoyvuh7lUeTLVLRYCWOZ3pu1KFqVd0nbtHkjoWbRRPhC fPJcDKbpgmQytl27zjE5HUUwuY7A24hpvUfLVktuqUvEDlElwhpfml1d9rcu/BmJ+goh Hxb02vmBEWN9j9W6rTh4X7ERyGS9/t0G1LoH3/atphU+Uyh7fi90rKwuRDyaZxI59SMf OQfyMIGMRwozX4jSI2ns0jlyGVyyD9Du1RLD/Z2BNcXuPlnNG1/2Gb0BvzTDKwrGIcfV Qb6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=LRtgzonz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si5914920eds.368.2021.05.21.13.28.45; Fri, 21 May 2021 13:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=LRtgzonz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbhEUTrP (ORCPT + 99 others); Fri, 21 May 2021 15:47:15 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:34063 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhEUTrN (ORCPT ); Fri, 21 May 2021 15:47:13 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1621626350; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=zFQeR15yIV/MRBDjlnj5bg2b1g+GsEMnzWlVJyF+4vU=; b=LRtgzonz1+7yegnd+UHUaW8nwUWDkLz1+/Ot00hDDBQ16kvXMkJ7sdb0eGetyev13s+QXRbw cqVUG+64mobHmGKkT+kem3j5lyscLu/1yJDIBEH0i7h3NBVvdzvVd805dLuIi69vxmzoFNbH 75QFqtZJ3BD7IIdXvvNc87chwH8= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 60a80de0c229adfeff6ea01d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 21 May 2021 19:45:36 GMT Sender: khsieh=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CB70AC4323A; Fri, 21 May 2021 19:45:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: khsieh) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3AA00C4338A; Fri, 21 May 2021 19:45:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 21 May 2021 12:45:35 -0700 From: khsieh@codeaurora.org To: Stephen Boyd Cc: agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org, abhinavk@codeaurora.org, aravindh@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly In-Reply-To: References: <1621013713-6860-1-git-send-email-khsieh@codeaurora.org> <5d341df202facb3240a72cfb35e18167@codeaurora.org> <1e9970ee1a7109e336bc6ed51e727442@codeaurora.org> Message-ID: X-Sender: khsieh@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-05-21 12:18, Stephen Boyd wrote: > Quoting khsieh@codeaurora.org (2021-05-21 08:21:58) >> > >> > Ok. So you're saying that we want to put both events on the queue >> > regardless, and put IRQ_HPD there first because we want to check the >> > status bit? Doesn't reading the status bit require the dongle to be >> > connected though? So if an unplug came in along with an irq_hpd we may >> > queue both the irq_hpd and the unplug, but when it comes time to >> > process >> > the irq_hpd in the kthread the link will be gone and so trying the dpcd >> > read for the link status will fail? >> > >> yes, >> we had a previous bug with this scenarios already. >> https://partnerissuetracker.corp.google.com/issues/170598152 >> At this case, dongle produce two interrupts, irq_hpd followed by >> unplug >> immediately (not presented at isr status register at same time), at >> the >> time dongle unplugged form DTU. >> But due to dp ctrl reset at handling irq_hpd which cause unplug mask >> bit >> be cleared so that unplug interrupt got lost. >> > > Again, wouldn't that be too late if the hardirq handler is delayed to > the point that the two irqs are pending in the isr status register? yes, but that not much dp driver can do. As long as DP driver can recovery (shut down gracefully) and ready for next plugin, then i think it should be fine.