Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp395238rwr; Wed, 26 Apr 2023 00:24:39 -0700 (PDT) X-Google-Smtp-Source: AKy350YQVGr22XAQcOYPZA1oyJJG8Zfz2ngG1SioD5d7CSWKH1MrKG4W6gxDotrSwhme5NAx+rxO X-Received: by 2002:a05:6a00:1581:b0:63b:8a91:e641 with SMTP id u1-20020a056a00158100b0063b8a91e641mr26905263pfk.11.1682493879050; Wed, 26 Apr 2023 00:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682493879; cv=none; d=google.com; s=arc-20160816; b=hbBbTofkV+Ah+IvT4BZMs/hu4fpwua0W5aq2LitTB0aLKzO21UsOp7tOkpkNiMCdil c1C+3Rv66PCkN4uzH5F8Wzm61OT4I++dhaIV9v2KrQO44ACA/Pj4oV7w0xf58QyfH1S+ Qi3TmTQ6egI1dO+o+L7mdijuX4lPTv6ugkXWWzEiQtVwHhoI4e7btpZYSOsXFao7+EI0 WA4bfqoHDa5D/FPO+8eIghigQoYW0DBiEMHARR8+4vLc0G8jnMLdTSKsT02Mp6zrTY4m gRKg+O5KIPo0kXmE7TI/jaQ0EGyrtHun0Ii2L/UwqX3GcM/V+4/wz02i5pnHstu0KZ32 4eyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1NoomQMOf8xB6iuuN1Y9RpenHC4Ly7mm/tDw0A/hRbI=; b=DPgkhjyMthmrduZy9gtpzP+/7JAgdPZyUIATRwb4Q9qZUe/OkQaaGaUINtae7ku4dP Eg60dmTWAeCF5PGtfSsFlF4F7+CoyFoWrh81iUI+8mTko93vsc8js+N3/jNHBojNcpJz KoffVXknJaLE52b6ouVmnLWtQi/xCkR6zzOt9OwqOEhbCjqIdl8niW9LXJ90MepS291h /nzYGoVPdxANHmnM5KzhRtnPfQ2BLFgByuVpvPePtEsGJTt4R3qk8zunZkuAr7xAeBNs Drw4HkA0HZQKIyNwc9y/bLlLiyCZC/Madlp7bOjQnmZVu8agI/6B2d670oi/ZKOkN7tM tltw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020aa78f34000000b0063b7645b97asi15516856pfr.380.2023.04.26.00.24.27; Wed, 26 Apr 2023 00:24:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240026AbjDZHSt (ORCPT + 99 others); Wed, 26 Apr 2023 03:18:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239980AbjDZHSX (ORCPT ); Wed, 26 Apr 2023 03:18:23 -0400 Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [5.144.164.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B60C35A0 for ; Wed, 26 Apr 2023 00:17:47 -0700 (PDT) Received: from SoMainline.org (unknown [89.205.225.144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 9861A3E922; Wed, 26 Apr 2023 09:16:51 +0200 (CEST) Date: Wed, 26 Apr 2023 09:16:48 +0200 From: Marijn Suijten To: Dmitry Baryshkov 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 Subject: Re: [PATCH v3 17/21] drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces Message-ID: <6fnvr646if7s2wxx64yyhd7ddrxtvirn3tsltba4mgsjkseokq@a7i3d2w3q4pi> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <692a094b-1cb7-d4e1-7e44-6f9fab075c2f@linaro.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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. - 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 >