Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp393971rwr; Wed, 26 Apr 2023 00:23:23 -0700 (PDT) X-Google-Smtp-Source: AKy350ajSZ3YmTpoZd/7bgeIWKXFTsyTuQ3/DP/cW0jWqxIyxvwXNgjRBt+bNcqTfqhqXqTPjOGk X-Received: by 2002:a17:902:f544:b0:1a6:84be:a08f with SMTP id h4-20020a170902f54400b001a684bea08fmr24334140plf.64.1682493802800; Wed, 26 Apr 2023 00:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682493802; cv=none; d=google.com; s=arc-20160816; b=mRwLYkCLgGxMgW5AFQXJreZzdOgeSuaYpZLZd2vdoGSjIA8nIWSzYuBJ4SfHH6knQd ss4kcKceeTBj53TSCEa+oPKI5y7erFuG+yRQtSO5YTsWt1Bod2oDgbbuwO4APH4Qv9QY bBoaDtEmfOv7Y0pwbSazcWq1IJHMKz+vd7J8Ad7yu0Ur7wi6x8ZL00mJ6s+33Cu27JcC C3sThKkvNmMlHKi9rzI0WIMEeCa93ASzQI3SUCNG1D5yYnmfMAIJWmZc/zutNCwfybnU abEeupFNkkVem16RCkRG8ZXWWfmI5lIvSKeti7ZPfh2WH89RqlcXFoHnxScUWAo9psr8 iBHw== 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=+xmo/OgW+kFPZImvTPMJeINxL/eragLSlQhbr0bqSyc=; b=kUhr989OsQic8Dk7nfJwcQ+9cmnPjuW5FDLMDPz5LF6Wtt6gvPdXDKmT6bxpP7dWN9 lT8VFVYA13zV15hu+FTKl4S7MwaOQy/mQBQyRSmXVC3m6vGZs0lY6KyFM3tDhPvoGeoo aG16U0mJIP9M6t4RAacWRCcT7Q5ozThf0tEZfMpCU3AhBIzA8InfpVWKuuL7wXTZgkNy lHvoTd4BoiriIbtunQp12vhkgUS6eeGCuUmlJvsZSe5cBP5euGNy5fYBC6y7vBGVR/6z nlL3HyfpXk3H88HbbCl0I6lyrDEr6+NRnc6Yfd6nTLyKpLHBmzsZ+xK5N1aAY0IIAk8a YQFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w40ywDA1; 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 q15-20020a170902eb8f00b0019e272a22c7si10295377plg.53.2023.04.26.00.23.11; Wed, 26 Apr 2023 00:23:22 -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=@linaro.org header.s=google header.b=w40ywDA1; 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 S235251AbjDZHSR (ORCPT + 99 others); Wed, 26 Apr 2023 03:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239627AbjDZHSP (ORCPT ); Wed, 26 Apr 2023 03:18:15 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3DD3ABC for ; Wed, 26 Apr 2023 00:17:39 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-94f3cd32799so1262709166b.0 for ; Wed, 26 Apr 2023 00:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682493454; x=1685085454; 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=+xmo/OgW+kFPZImvTPMJeINxL/eragLSlQhbr0bqSyc=; b=w40ywDA1jmA2RPBfxx2qh62xbPkI+yS54M/Uth3ZJF3GaNj3IeiRCYZgyj0ZAZT1/t EKwqCPoeY1/hwmSk4mjMg0KZMmmJ/hFnZ/RAJ9F9uV267Rgw9imue3yp5ugF4lwprpDS 0oysqTPOCLDuqZFQYqsEXlWUX2pHpGLNSsWzxwEA93JhCVT2HywxYTeCC8uj2TrS7qEd 7ZRzgWW1828BjedgmpB3HuuZYXEv+HATICD1BwIJ1C9WoWjhbGHQeDQd2Ln/Q/uPv+nu Tt40/ir82UHfhbqD/blyhPK2bifs1YugSoVlbToSKCdRVQsub6zSFC6p+nPkGY8ySnpm NWJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682493454; x=1685085454; 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=+xmo/OgW+kFPZImvTPMJeINxL/eragLSlQhbr0bqSyc=; b=kyymEnhgXcWLlJluuKRbSj9TSnSCI2E8PYU4WZUs4hgBSVRLVYpTZHUyC1ENI164UC yrSTMbe9fVPwIUkHO69/yk0T6DYZrf8MxX6h8MxeruvhyhG8BzMYRGWOIwlOt4VGg5ik HE2WisYElWBJurz/LZ/2LrpdGjMQAKDEPQhes6ymolhVAn0LypxX5/Bjc5fJY+u4juSd dK+SQS3gjW6yN3lLWBWB/XgUB9mXgL28JuROJ9b7QVcrfa9CG+niVoGZ39O+IQ+qZxwd wocVs17go8QixjGRpSBz8MuBXcm1OejTdzG/WGu6pKIlHiS03fLI5PQIU9mjRQClWjpM l6cw== X-Gm-Message-State: AAQBX9fwFt16MTFsCwKGIHdqRGmbu63ktzn1XHThr715RoynhhCNnfsX AM9fUFcLPrpJgIJ6scicznZREQ== X-Received: by 2002:a17:906:c155:b0:94f:432f:242f with SMTP id dp21-20020a170906c15500b0094f432f242fmr19767454ejc.67.1682493453844; Wed, 26 Apr 2023 00:17:33 -0700 (PDT) Received: from [172.23.2.4] ([31.221.30.162]) by smtp.gmail.com with ESMTPSA id n6-20020a170906700600b0094f5a74ba83sm7759330ejj.39.2023.04.26.00.17.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Apr 2023 00:17:33 -0700 (PDT) Message-ID: <79a8726f-534c-ea2d-f029-7c3e9256fc54@linaro.org> Date: Wed, 26 Apr 2023 10:17:32 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 17/21] drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces Content-Language: en-GB To: Marijn Suijten Cc: Rob Clark , Abhinav Kumar , Sean Paul , David Airlie , Daniel Vetter , Adam Skladowski , Loic Poulain , Bjorn Andersson , Kuogee Hsieh , Robert Foss , Vinod Koul , Neil Armstrong , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jordan Crouse , Jessica Zhang References: <20230411-dpu-intf-te-v3-0-693b17fe6500@somainline.org> <20230411-dpu-intf-te-v3-17-693b17fe6500@somainline.org> <692a094b-1cb7-d4e1-7e44-6f9fab075c2f@linaro.org> <6fnvr646if7s2wxx64yyhd7ddrxtvirn3tsltba4mgsjkseokq@a7i3d2w3q4pi> From: Dmitry Baryshkov In-Reply-To: <6fnvr646if7s2wxx64yyhd7ddrxtvirn3tsltba4mgsjkseokq@a7i3d2w3q4pi> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 26/04/2023 10:16, Marijn Suijten wrote: > On 2023-04-26 03:05:12, Dmitry Baryshkov wrote: >> On 26/04/2023 02:06, Marijn Suijten wrote: >>> All SoCs since DPU 5.0.0 have the tear interrupt registers moved out of >>> the PINGPONG block and into the INTF block. Wire up the IRQ register >>> masks in the interrupt table for enabling, reading and clearing them. >>> >>> Signed-off-by: Marijn Suijten >>> --- >>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 52 +++++++++++++++++------ >>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 4 ++ >>> 2 files changed, 44 insertions(+), 12 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >>> index e116993b2f8f7..5e2d68ebb113e 100644 >>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c >>> @@ -17,18 +17,26 @@ >>> * Register offsets in MDSS register file for the interrupt registers >>> * w.r.t. the MDP base >>> */ >>> -#define MDP_INTF_OFF(intf) (0x6A000 + 0x800 * (intf)) >>> -#define MDP_INTF_INTR_EN(intf) (MDP_INTF_OFF(intf) + 0x1c0) >>> -#define MDP_INTF_INTR_STATUS(intf) (MDP_INTF_OFF(intf) + 0x1c4) >>> -#define MDP_INTF_INTR_CLEAR(intf) (MDP_INTF_OFF(intf) + 0x1c8) >>> -#define MDP_AD4_OFF(ad4) (0x7C000 + 0x1000 * (ad4)) >>> -#define MDP_AD4_INTR_EN_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x41c) >>> -#define MDP_AD4_INTR_CLEAR_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x424) >>> -#define MDP_AD4_INTR_STATUS_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x420) >>> -#define MDP_INTF_REV_7xxx_OFF(intf) (0x34000 + 0x1000 * (intf)) >>> -#define MDP_INTF_REV_7xxx_INTR_EN(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c0) >>> -#define MDP_INTF_REV_7xxx_INTR_STATUS(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c4) >>> -#define MDP_INTF_REV_7xxx_INTR_CLEAR(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c8) >>> +#define MDP_INTF_OFF(intf) (0x6A000 + 0x800 * (intf)) >>> +#define MDP_INTF_INTR_EN(intf) (MDP_INTF_OFF(intf) + 0x1c0) >>> +#define MDP_INTF_INTR_STATUS(intf) (MDP_INTF_OFF(intf) + 0x1c4) >>> +#define MDP_INTF_INTR_CLEAR(intf) (MDP_INTF_OFF(intf) + 0x1c8) >>> +#define MDP_INTF_TEAR_OFF(intf) (0x6D700 + 0x100 * (intf)) >>> +#define MDP_INTF_INTR_TEAR_EN(intf) (MDP_INTF_TEAR_OFF(intf) + 0x000) >>> +#define MDP_INTF_INTR_TEAR_STATUS(intf) (MDP_INTF_TEAR_OFF(intf) + 0x004) >>> +#define MDP_INTF_INTR_TEAR_CLEAR(intf) (MDP_INTF_TEAR_OFF(intf) + 0x008) >>> +#define MDP_AD4_OFF(ad4) (0x7C000 + 0x1000 * (ad4)) >>> +#define MDP_AD4_INTR_EN_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x41c) >>> +#define MDP_AD4_INTR_CLEAR_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x424) >>> +#define MDP_AD4_INTR_STATUS_OFF(ad4) (MDP_AD4_OFF(ad4) + 0x420) >> >> >> Please don't reindent lines together with doing the actual changes. >> Please set the correct alignment in the patch 10 > > The alignment here is extended to accomodate for > MDP_INTF_REV_7xxx_INTR_TEAR_STATUS(intf), or do you want me to reserve > the right indentation from the get-go in patch 10? That'd certainly > make it more clear which lines are added here, and patch 10 already > adjusts the alignment anyway. Yes, please. > > - Marijn > >>> +#define MDP_INTF_REV_7xxx_OFF(intf) (0x34000 + 0x1000 * (intf)) >>> +#define MDP_INTF_REV_7xxx_INTR_EN(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c0) >>> +#define MDP_INTF_REV_7xxx_INTR_STATUS(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c4) >>> +#define MDP_INTF_REV_7xxx_INTR_CLEAR(intf) (MDP_INTF_REV_7xxx_OFF(intf) + 0x1c8) >>> +#define MDP_INTF_REV_7xxx_TEAR_OFF(intf) (0x34800 + 0x1000 * (intf)) >>> +#define MDP_INTF_REV_7xxx_INTR_TEAR_EN(intf) (MDP_INTF_REV_7xxx_TEAR_OFF(intf) + 0x000) >>> +#define MDP_INTF_REV_7xxx_INTR_TEAR_STATUS(intf) (MDP_INTF_REV_7xxx_TEAR_OFF(intf) + 0x004) >>> +#define MDP_INTF_REV_7xxx_INTR_TEAR_CLEAR(intf) (MDP_INTF_REV_7xxx_TEAR_OFF(intf) + 0x008) >>> >>> /** >>> * struct dpu_intr_reg - array of DPU register sets >>> @@ -93,6 +101,16 @@ static const struct dpu_intr_reg dpu_intr_set[] = { >>> MDP_INTF_INTR_EN(5), >>> MDP_INTF_INTR_STATUS(5) >>> }, >>> + [MDP_INTF1_TEAR_INTR] = { >>> + MDP_INTF_INTR_TEAR_CLEAR(1), >>> + MDP_INTF_INTR_TEAR_EN(1), >>> + MDP_INTF_INTR_TEAR_STATUS(1) >>> + }, >>> + [MDP_INTF2_TEAR_INTR] = { >>> + MDP_INTF_INTR_TEAR_CLEAR(2), >>> + MDP_INTF_INTR_TEAR_EN(2), >>> + MDP_INTF_INTR_TEAR_STATUS(2) >>> + }, >>> [MDP_AD4_0_INTR] = { >>> MDP_AD4_INTR_CLEAR_OFF(0), >>> MDP_AD4_INTR_EN_OFF(0), >>> @@ -113,11 +131,21 @@ static const struct dpu_intr_reg dpu_intr_set[] = { >>> MDP_INTF_REV_7xxx_INTR_EN(1), >>> MDP_INTF_REV_7xxx_INTR_STATUS(1) >>> }, >>> + [MDP_INTF1_7xxx_TEAR_INTR] = { >>> + MDP_INTF_REV_7xxx_INTR_TEAR_CLEAR(1), >>> + MDP_INTF_REV_7xxx_INTR_TEAR_EN(1), >>> + MDP_INTF_REV_7xxx_INTR_TEAR_STATUS(1) >>> + }, >>> [MDP_INTF2_7xxx_INTR] = { >>> MDP_INTF_REV_7xxx_INTR_CLEAR(2), >>> MDP_INTF_REV_7xxx_INTR_EN(2), >>> MDP_INTF_REV_7xxx_INTR_STATUS(2) >>> }, >>> + [MDP_INTF2_7xxx_TEAR_INTR] = { >>> + MDP_INTF_REV_7xxx_INTR_TEAR_CLEAR(2), >>> + MDP_INTF_REV_7xxx_INTR_TEAR_EN(2), >>> + MDP_INTF_REV_7xxx_INTR_TEAR_STATUS(2) >>> + }, >>> [MDP_INTF3_7xxx_INTR] = { >>> MDP_INTF_REV_7xxx_INTR_CLEAR(3), >>> MDP_INTF_REV_7xxx_INTR_EN(3), >>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h >>> index 425465011c807..fda7f8c9caece 100644 >>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h >>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h >>> @@ -23,11 +23,15 @@ enum dpu_hw_intr_reg { >>> MDP_INTF3_INTR, >>> MDP_INTF4_INTR, >>> MDP_INTF5_INTR, >>> + MDP_INTF1_TEAR_INTR, >>> + MDP_INTF2_TEAR_INTR, >>> MDP_AD4_0_INTR, >>> MDP_AD4_1_INTR, >>> MDP_INTF0_7xxx_INTR, >>> MDP_INTF1_7xxx_INTR, >>> + MDP_INTF1_7xxx_TEAR_INTR, >>> MDP_INTF2_7xxx_INTR, >>> + MDP_INTF2_7xxx_TEAR_INTR, >>> MDP_INTF3_7xxx_INTR, >>> MDP_INTF4_7xxx_INTR, >>> MDP_INTF5_7xxx_INTR, >>> >> >> -- >> With best wishes >> Dmitry >> -- With best wishes Dmitry