Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1775973rwb; Thu, 15 Dec 2022 14:23:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf571xWIXD2u3qUNQ4ZB+1SLz6CFaNusaw7gdOEj8zzezX8PkepPWY7JoBsX41ciurA6XXvr X-Received: by 2002:a17:907:8b94:b0:7c1:92a8:ef57 with SMTP id tb20-20020a1709078b9400b007c192a8ef57mr10497860ejc.6.1671142983641; Thu, 15 Dec 2022 14:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671142983; cv=none; d=google.com; s=arc-20160816; b=WTrf1ej4JuYl3B/0b/Jw0Suaen8ORx2purerUMTFstFpSxnmQLClOZj4e4w/A2KyZ2 WlQo/EuksA4GynMEbv53StM2Zqwx7XpEXilDOivV+0yiZGFD3rE42F6IoEZuAn5D6sih fQ+jyrW3yVT2aWKFi5Kd7fZSl+9mVyjE/drvZbSUS6g0/xxb6Oo8bILMOBtX9S7f/RoW U57/8psMr0Q2PNrp0iG8D1vnirxpmMYTaLBsllAD969CkINHi2w8OnMgSk7arqrNajKe bL+EKLgd3p6FYdhBwTn2o4cu8+w2TTXw8ZZMISeKcNz13v95XC6i7qVvDpBpNhhG3f/+ OKcQ== 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=QU5KkRkZe2Gr+oh/FfMfiprdckR8IqoLQ616fAorRLQ=; b=Vea+wnGX86nE+Luk6QhFl8HOOmhSwz/Lwb5sUjQ3TNyni3LSYK7kKLWe9kp7BlJBZA jQ0oMcDTgT3j4rQQ4YuPiiBzdcfdbZa3gYjEPH/M7eyOuIn5M1UjYH2BNwRyfIz347ro szdbK07TbZ76kTjVydJNQfZS3tS2CMiUHRqPI9aUd/d6eY0QNIn0DrONvr7LKwfm6qrG zGdIR7JfmR1e6HQZKIH7O0ibgZHsdZuNwklHn4k96cllPq8rSIyR9gB0JOCJZTTw2j2S keSEMuS0mO3QmMIvkkUUUpNDQza8N6ybrwP9ocdzr+j894mZsiaWw581lw3oOLcho7I+ piBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PKAxLiHX; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa16-20020a170907869000b007c500a2f33asi471974ejc.208.2022.12.15.14.22.47; Thu, 15 Dec 2022 14:23:03 -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=@quicinc.com header.s=qcppdkim1 header.b=PKAxLiHX; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbiLOVXX (ORCPT + 68 others); Thu, 15 Dec 2022 16:23:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiLOVXT (ORCPT ); Thu, 15 Dec 2022 16:23:19 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5A73A2; Thu, 15 Dec 2022 13:23:17 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BFJYDJB011582; Thu, 15 Dec 2022 21:23:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=QU5KkRkZe2Gr+oh/FfMfiprdckR8IqoLQ616fAorRLQ=; b=PKAxLiHXTnWLRBaosCf3cMlo+Fe41BE9+wIC7mWwQDYKCB/HloHYwFYnaCIDRnPqKDFo xOul1v00HHCq/3hyFPULIAicdFL+shT+vrnbuTz2d+Dg6qlBmVXK5urqj+j0ApYqgdsZ AFRspkb4Ms3ywEktYazCsHP64Yr3jcuebSFLiMn53QxExDIVZbxM+THdgvDHLDykHDu1 4riqL3E+QLcKUOrl0k5FEFHATUW1KKGc6SkHTvF9xN46dityQwEnraf8SkC9wtJr90pr NfD4JigZJpO51ZABhnJ2amcmgAlesYUCdD2sw35fJZHwh1qBHsBR2vCXIZ/k/H/AYnzN BA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mfyyu2gqw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Dec 2022 21:23:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2BFLNAUD014519 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Dec 2022 21:23:10 GMT Received: from [10.110.100.96] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 15 Dec 2022 13:23:09 -0800 Message-ID: <9fc3cd6c-8ae3-ce9c-435b-76e0e641d960@quicinc.com> Date: Thu, 15 Dec 2022 13:23:07 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; 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-US To: Dmitry Baryshkov , Stephen Boyd , , , , , , , , CC: , , , , , References: <1671129159-31105-1-git-send-email-quic_khsieh@quicinc.com> From: Kuogee Hsieh In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: neUrE7bAUWARf-_uHNZSDCikfFR6QQYO X-Proofpoint-GUID: neUrE7bAUWARf-_uHNZSDCikfFR6QQYO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-15_11,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=920 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1015 suspectscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212150178 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,SPF_HELO_NONE, SPF_PASS 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 12/15/2022 1:15 PM, Dmitry Baryshkov wrote: > 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. > > ok, I will split this patch into two.