Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4469181rwe; Mon, 17 Apr 2023 13:12:12 -0700 (PDT) X-Google-Smtp-Source: AKy350acuzgdbM3tOlC/CEdY8c2fZXm1nf4cifl1jzBkPN2HYz90qHuV7TjYU7qo6F06SpMUK8v2 X-Received: by 2002:a05:6a21:99a0:b0:ee:e719:7a9b with SMTP id ve32-20020a056a2199a000b000eee7197a9bmr11467047pzb.21.1681762332637; Mon, 17 Apr 2023 13:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681762332; cv=none; d=google.com; s=arc-20160816; b=JN17qecpX58B2oywZZ51zpMjkmkGCuQHkYVZkY3R3Hny0BH7AVg6ihKvkMDJGytQCu IPOqibFjClSmHA1r2r4AgXyADtKZmlyPr7yyf2DVH7yYdUumTFxqPA+YeK8mX6z2M+nS YpK2mUMiib8GWhl/ka9PyLH4Xz4RMia/SBr5EFObYKKYuDpospyqzhA7r+7Ca2jxd3cn MCsbch9kxpZ8RqU+oZDi22HpgnXVo5VbcGGJiCBBeLyeJUh27/hLKGh0ESdPzpI/2pGC Jbqd1jHtfCBBPbBbHhVb+Lin8POnFUb6qvU4aBt3nWYcVwM7UEHMSBFHFKpGlu2fat3p 67Jw== 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:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=f0yR2o/2rv6QyvNtJVUHg97aiYmgNcqRPOSUH7dGGmU=; b=rBI+jEQSj6E2lYxbSDOMqwpqxZskFZ0sgJpNfuOjvrSAxQyTlpagnrt1OLqu3Wa86H v89mGiAzmPxOhzlcfPDcp8Z4K347Z2EzbySYIKTSGHl5rJOR2E+Zg/4FRRouL8bKSurk DMat8r6sjngr7Y/Nvw9h04HecSEmT33JFphbS/J5zq+sfRbo6jmwvSfnKRlONFf6eT/1 GcvQ9tiqNeVd44DwMT50gzoW2NC1CrG4hNfjgBf8r6Lqd4dySdKi/q+F/ECDrR3mLWMD VBABNqjhQki92g6bH1j4WnpHWMWIx6QIcpLN+Txm5nBwIr//S+/dKPHuQOSth2+GYEqJ SOLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EqFsb75z; 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 u11-20020a6540cb000000b0051309268f34si12178866pgp.632.2023.04.17.13.12.00; Mon, 17 Apr 2023 13:12:12 -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=@quicinc.com header.s=qcppdkim1 header.b=EqFsb75z; 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 S230199AbjDQT7u (ORCPT + 99 others); Mon, 17 Apr 2023 15:59:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjDQT7s (ORCPT ); Mon, 17 Apr 2023 15:59:48 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F5B421A; Mon, 17 Apr 2023 12:59:47 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33HJfloL017631; Mon, 17 Apr 2023 19:59:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=f0yR2o/2rv6QyvNtJVUHg97aiYmgNcqRPOSUH7dGGmU=; b=EqFsb75zaz8dBAigRqnhvz5wkDQjRGTiX5Omc7OaTRioVDp9pukFWYPFp9sRniVr/N2u Ndq1jyd26TA6LoiOAQ1z8EmcvtCnFEj28oNv6tg3PXXeSLJ0VY1jpklPAuV6zprqXmgv eg1d607y5QetKwTaUTNXYNaNWbenMpTVtBwJ/ZTk5efHmGDcZYbfrK5ILUYsCKRyhWpj 3hZ9rat1bBKdN5a7/tdDrXOAepIe7QjECsCiIEkZXnsKlImzyCqsbb0DdUGSIu6WI6u0 NLUiRiAMYuMrkRLpc5uuKbmyDcP147epNkud95wrVu43NAEjYPU1mSOvIRcmpCMlrM1o Vg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q17yhrtcb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Apr 2023 19:59:34 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33HJxXG3018573 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Apr 2023 19:59:33 GMT Received: from [10.110.98.241] (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.42; Mon, 17 Apr 2023 12:59:31 -0700 Message-ID: <9da3676e-d2fb-d25a-f9b9-4c1e6ac8d03c@quicinc.com> Date: Mon, 17 Apr 2023 12:59:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [RFC PATCH 5/7] drm/msm/dpu: Document and enable TEAR interrupts on DSI interfaces Content-Language: en-US To: Marijn Suijten , Dmitry Baryshkov , Jessica Zhang , , Neil Armstrong , <~postmarketos/upstreaming@lists.sr.ht>, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , "Jami Kettunen" , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Stephen Boyd , Vinod Koul , Bjorn Andersson , Kuogee Hsieh , Konrad Dybcio , "Loic Poulain" , Vinod Polimera , Adam Skladowski , , , , References: <20221231215006.211860-1-marijn.suijten@somainline.org> <20221231215006.211860-6-marijn.suijten@somainline.org> <773cd72b-a766-1764-e25f-0af1174f0e51@quicinc.com> <1051d6bd-eb3c-6293-0bd2-3f4ea28fa3f8@linaro.org> <20230214130636.ldckqgcq6ajph372@SoMainline.org> <5tjwn4p3nkpjuczudipkrvhy63kfzos6x7o7aufwdei7auujcz@oba37opujh5r> From: Abhinav Kumar In-Reply-To: <5tjwn4p3nkpjuczudipkrvhy63kfzos6x7o7aufwdei7auujcz@oba37opujh5r> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: 7DfvtvYyoPWqKuXJqap4fVNdK2TMiDyu X-Proofpoint-GUID: 7DfvtvYyoPWqKuXJqap4fVNdK2TMiDyu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-17_13,2023-04-17_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 impostorscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 clxscore=1011 malwarescore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304170175 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 4/17/2023 12:41 PM, Marijn Suijten wrote: > On 2023-02-14 09:54:57, Abhinav Kumar wrote: > [..] >>>>>> Just wondering, how were the lengths calculated for the INTF blocks? >>>>>> The values in general seem a little off to me. >>> >>> These (for MSM8998) have been taken from downstream specifically; my >>> series starts using INTF_STATUS at 0x26C which conveniently is the >>> register right after 0x268, matching the fact that INTF TE and these >>> registers weren't supported/available yet on MSM8998. >>> >>>>>> For example, I'm looking downstream and it seems to me that the length >>>>>> for the INTF_0 on MSM8998 should be 0x280. Similarly for SC7280, I'm >>>>>> seeing that length for INTF + tearcheck should be 0x2c4. >>> >>> There are many different downstream sources and tags with seemingly >>> conflicting/confusing information. For v2 [2] I've picked the highest >>> register used by the driver which is INTF_TEAR_AUTOREFRESH_CONFIG at >>> 0x2B4 (but there might always be more registers that don't need to be >>> poked at by the driver, but contain magic debug information and the >>> like... those would be useful to capture in the dump going forward). >>> >>> [2]: https://github.com/SoMainline/linux/commit/2bbc609dd28aa0bd0a2dede20163e521912d0072 >>> >> >> Not entirely correct.TEAR_AUTOREFRESH_STATUS is at 0x2c0 for sm8350 and >> sm8450 as well so 0x2b4 is a bit short. DPU code uses autorefresh status >> today.Esp after your changes it will use the autorefresh status from >> intf te which is at offset 0x2c0 > > Revisiting this, I don't see current DPU code nor downstream 5.4 / 5.10 > SDE techpack on some of my checkouts use this register, only > INTF_TEAR_AUTOREFRESH_CONFIG at 0x2b4..0x2b7. Am I missing something > critical here? > Wow, I lost context since its been months since your last response. But, I refreshed some of it. You are right, we use the status bits present in the INTF_TEAR_AUTOREFRESH_CONFIG and INTF_TEAR_ AUTOREFRESH_STATUS is unused. I got confused between the status bit present in the two registers as both relate to autorefresh. But, the offset of of INTF_TEAR_ AUTOREFRESH_STATUS is still at 0x2c0 as i wrote before so 0x2c4 is the accurate length of this block. And yes, all the blk lengths should be accurate now in the hw catalog after the rework and reviews of that rework. >>>>> We have discussed INTF lengths in [1]. The current understanding of the >>>>> block lengths can be found at [2]. Please comment there if any of the >>>>> fixed lengths sounds incorrect to you. >>>>> >>>>> [1] https://patchwork.freedesktop.org/patch/522187/ >>>>> [2] https://patchwork.freedesktop.org/patch/522227/ >>>>> >>>>> [skipped the rest] >>>>> >>>> >>>> Please correct my understanding here, it was agreed to fix intf blocks >>>> to 0x2c4 here https://patchwork.freedesktop.org/patch/522227/ but I dont >>>> see this was merged? >>>> >>>> It was agreed to first land INTF_TE and then add the higher addresses >>> >>> Seems like it, at least if I interpret [3] correctly. My series adds a >>> new define that will hardcode _len to 0x2B8 for now, and Dmitry/Konrad >>> can later extend it to whatever is stated by the correct downstream >>> source. >>> >> >> Like mentioned above it should be 0x2c0 for intf block. >> >> If you face any conflicting information in downstream code, you can >> always check with me on IRC. > > Ack, it looks like others landed these changes for me now via the > catalog rework, so I have just rebased and kept the lengths in. > > - Marijn