Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1706592rwb; Thu, 15 Dec 2022 13:22:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7O+a3ov9tTIHBJJ5zCmpqQH1dTwPisn87riLB+GPKO3JaNXkDFcodnxHH+AaquAejOp452 X-Received: by 2002:a17:902:7005:b0:189:dc47:fe40 with SMTP id y5-20020a170902700500b00189dc47fe40mr29429842plk.15.1671139325172; Thu, 15 Dec 2022 13:22:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671139325; cv=none; d=google.com; s=arc-20160816; b=MwGuhuUuwSQldG8nXPhVgVMEfPo5or7JL86yiXCbcMMzDrH0e7YBZqaDGXr34jKoAi n6iFTFYHmaqkZAs90NmUwt/0jid++tKGGLLBCGOrTZsMGeNekl216IFdzYHArYAAA+Da g3MNEI4/2j9MBDUw7HGvgruMTOW49jgcJmgOrP0jmsiRP7bxHscq2Oax0C7fYJLtcGxj PDzfnecFkglKXc4SogIqGcEBpVdP5u7Ytv9gIDzuvfyvvOyK33yZBKa7qwx1XLVmXsJ6 S+bh0vBYAmTviLtgAu1Yq3L22sbw2Vt31J2Pz6lvyrvRBheuC04I/V2Vryig0gWcY+Kr q35A== 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=/VBZEpcKP4A7HRf3+eiikNb+ikQq8cYagAbglF7pGtE=; b=s1UgpQ19J+K7+0gV+blvlJKbs/ijtTBRRoAMq4KCdQb3V1aVCazlEQZMU6IHd7lxCa uv+qgAgj+/slzemcZ3ZhEZDTNFcxh7nxRsoCl6EwNQO3kiLFAlvGQPIPi3U1XsnK5TVj 0smo3EgYSI//Ya0d31BFPktKSvVTKDdNLR4Qen2ZBInf2xapdDSB/KAKsmB5MJauLT6y quaXtEWAYaL3Zqo/kavQ32SVxfVEdgHWeWOx4T6xqonWLtwoX343y9fLtj458CfvYDyk dlc9Ol9qZzmN9Hz5/pP5VVYrltOVIBzo6aVvqNrBdm75mgfDd1nEnCvhkozqNYsXC88/ XX9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P38H68dM; 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 g2-20020a170902e38200b001747ed48ee8si315724ple.150.2022.12.15.13.21.56; Thu, 15 Dec 2022 13:22:05 -0800 (PST) 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=P38H68dM; 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 S229763AbiLOVQT (ORCPT + 68 others); Thu, 15 Dec 2022 16:16:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbiLOVP6 (ORCPT ); Thu, 15 Dec 2022 16:15:58 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8537D1A231 for ; Thu, 15 Dec 2022 13:15:56 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id j4so509155lfk.0 for ; Thu, 15 Dec 2022 13:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/VBZEpcKP4A7HRf3+eiikNb+ikQq8cYagAbglF7pGtE=; b=P38H68dMCVUdc3ewAEWsr8zjWbhPEYIxR7yFrbGbDZQm6004LSjxcFQdeN/dZX3DIS kMnSfOnFl4XvGBg4E3tfy17ToPCDMitPAEn1ADsEC+qHb2p/LBz/wPguQoWh89uLz6B9 HEFmqlG8cSwXcMy0iDVHbDOoGwtTGdqX+x6w1/EDtqShWFvANKkGVZzkuTWehkm6DaU/ IMVNZGrjQ67s3C1aRRO+LDnqt3X5zsiRB3oc+JgkUyWn7WUVGsHSe4+z74Xx3X5DPR5E x6+tiOBBlei4knI+F/sqkfYN4jmxWVH12F/NQw4W/zO2BCGlafcNY0qqqBAn5x0Xr+hU +Fcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/VBZEpcKP4A7HRf3+eiikNb+ikQq8cYagAbglF7pGtE=; b=2sxIq/wIg4YP6Je7a5dJvhR9c2MqkL/OIZj/uvb46xzDryQTw5ev09XrfR0a4CRWQQ XqJ0PqiSftvfr6/jWVqB9eygGO8wJUmMeohmtrdThtl/TK+hLr/j/8isGPAZkTRTxkIe s/AV54LGqCPZ7DhNMg0UW6ahPFsN0t2OrQGmudIadS5fdTJ73XWelJe0TS2QXsxXKUdn dUAMwMqHVD7Vm6mcdSsnbHkUCJ9yDLRM73bMkjskSNgUZ1EAiJafQfoR+KdEfYYmOETu +QfiT2L3yHrK1xrklulbC1Ux9mzjy30CbodLAuPAj/KPGGpIQOtjcRzOICQOWPZ27U8s PjTQ== X-Gm-Message-State: ANoB5pljuIaHLbvDy2Bf44lkDOkc3V/g8b2FvCQTCfIOMjnJdYzKS6Zw ozPxKm/02VneyAriUTBGCiWwC7TNVrqCdsPURVE= X-Received: by 2002:a05:6512:b10:b0:4a4:68b8:c2ad with SMTP id w16-20020a0565120b1000b004a468b8c2admr10335227lfu.4.1671138954856; Thu, 15 Dec 2022 13:15:54 -0800 (PST) Received: from ?IPV6:2001:14ba:a085:4d00::8a5? (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id 12-20020ac25f4c000000b00485caa0f5dfsm16880lfz.44.2022.12.15.13.15.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Dec 2022 13:15:54 -0800 (PST) Message-ID: Date: Thu, 15 Dec 2022 23:15:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer Content-Language: en-GB To: Stephen Boyd , Kuogee Hsieh , agross@kernel.org, airlied@gmail.com, andersson@kernel.org, daniel@ffwll.ch, dianders@chromium.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org Cc: quic_abhinavk@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 References: <1671129159-31105-1-git-send-email-quic_khsieh@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 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 15/12/2022 22:10, Stephen Boyd wrote: > Quoting Dmitry Baryshkov (2022-12-15 10:46:42) >> On 15/12/2022 20:32, Kuogee Hsieh wrote: >>> if (!aux->cmd_busy) >>> return; >>> >>> if (aux->native) >>> - dp_aux_native_handler(aux, isr); >>> + ret = dp_aux_native_handler(aux, isr); >>> else >>> - dp_aux_i2c_handler(aux, isr); >>> + ret = dp_aux_i2c_handler(aux, isr); >>> >>> - complete(&aux->comp); >>> + if (ret == IRQ_HANDLED) >>> + complete(&aux->comp); >> >> Can you just move the complete() into the individual handling functions? >> Then you won't have to return the error code from dp_aux_*_handler() at >> all. You can check `isr' in that function and call complete if there was >> any error. > > I'd prefer we apply my patch and pass the irqreturn_t variable to the > caller of this function so spurious irqs are shutdown. Should I send it > as a proper patch? I'm for handling the spurious IRQs in a proper way. However I believe that it's not related to the issue Kuogee is trying to fix. Thus I think we should have two separate patches: one fixing the EDID corruption issue (for which the proper fix is !isr check, IIUC) and the irqreturn_t. And for the irqreturn_t it might be beneficial to move complete() call to the dp_aux_foo_handler(). Or might be not. That would depend on the patch itself. -- With best wishes Dmitry