From patchwork Thu Jul 27 16:20:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 971EEC04A94 for ; Thu, 27 Jul 2023 16:21:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231894AbjG0QVM (ORCPT ); Thu, 27 Jul 2023 12:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbjG0QVL (ORCPT ); Thu, 27 Jul 2023 12:21:11 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 307BB19B for ; Thu, 27 Jul 2023 09:21:10 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-522382c4840so1519503a12.2 for ; Thu, 27 Jul 2023 09:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690474868; x=1691079668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Hss43lOMtTWZaP6PSxJpTqk3ynxiZmBIfWetPiB5OU4=; b=y/qEf/U9N0vmnlPM4Sya0OVBl059hMk+Q/cFoYuhWfv7iNuWhWX9al27Jh7m1iEGcp XzPkjf3d77I2S35ixUHETdxtTZaV27QHBAjhtUFg8hvF2XDtmFqMjHPbzdqD1y0Jcn/b P9mI7k6RADgTimuohuHwIPtN04cSmf8yYWYtr+4AtCmU0Mvn+FdwXX5U/XrQqyTGalUS //FZtyv0mXrKK4mccZn50MK1ui1Xb1/3kp7WtmsDXJGpT2JTCmrE7c1Znw+f1eeAW53w UCsqldfFCzco3puoaBzcyAdfA/OdIRocAClRWdDHbHgoKkvquv0TlwyiNAj0e3UAUnim 179w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690474868; x=1691079668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hss43lOMtTWZaP6PSxJpTqk3ynxiZmBIfWetPiB5OU4=; b=K6Hbm8OAFf3QQWwrFnO5lM3mhgmFtavzHUwb9KgRnmWTcOplrkq+I7dU09+N1mCwNb J5N2sgYzw35Vagwo2qH1Zim1GLudjU8sfetpoDOsHSEPGPVVmR1hiTP9fG3kfszVctog KOxImC5tdjka5jvHnQXXYU5xqfanZrBxcdIjvQ5WODl3ShOm0xc+/0HJkAKX1X5g3wII DvdDT6IToN8l4iZPVQG7xRpc6OyMi58kkeoJrkW2zsNpbS9jSjyn4ddIFoT/uGgckjW2 4mMfvvtEEkYSsoNtGCRbq/D19tq3fftRkrSxs7RC/W7/Yun4iQW5JHH91tlbdbeAxROB jj0Q== X-Gm-Message-State: ABy/qLbF+6QpsZkb+GV3O+g5C+mShofks4/QL5TCKd9YIotcZOCYTTms PyVsy4v7SKk/L32MnSv5+RQXqg== X-Google-Smtp-Source: APBJJlH/fIxEZ729kMD+e6bMyn267HlAYoWAPHkICnfabMa1VE0mlPeQcN1xXdi7j7obwrk87PK3Uw== X-Received: by 2002:aa7:c68f:0:b0:522:3ef1:b10 with SMTP id n15-20020aa7c68f000000b005223ef10b10mr2113757edq.6.1690474868671; Thu, 27 Jul 2023 09:21:08 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a15-20020aa7d90f000000b00521953ce6e0sm808027edr.93.2023.07.27.09.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 09:21:08 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 2/7] drm/msm/dpu: drop the DPU_PINGPONG_TE flag Date: Thu, 27 Jul 2023 19:20:59 +0300 Message-Id: <20230727162104.1497483-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> References: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The DPU_PINGPONG_TE flag became unused, we can drop it now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index 3ff07d7cbf4b..c19dc70d4456 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -79,7 +79,7 @@ (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) #define PINGPONG_SDM845_MASK \ - (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_TE) | BIT(DPU_PINGPONG_DSC)) + (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC)) #define PINGPONG_SDM845_TE2_MASK \ (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 945b88c5ab58..a6f8eee58b92 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -136,7 +136,6 @@ enum { /** * PINGPONG sub-blocks - * @DPU_PINGPONG_TE Tear check block * @DPU_PINGPONG_TE2 Additional tear check block for split pipes * @DPU_PINGPONG_SPLIT PP block supports split fifo * @DPU_PINGPONG_SLAVE PP block is a suitable slave for split fifo @@ -145,8 +144,7 @@ enum { * @DPU_PINGPONG_MAX */ enum { - DPU_PINGPONG_TE = 0x1, - DPU_PINGPONG_TE2, + DPU_PINGPONG_TE2 = 0x1, DPU_PINGPONG_SPLIT, DPU_PINGPONG_SLAVE, DPU_PINGPONG_DITHER, From patchwork Thu Jul 27 16:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E1C6C04FDF for ; Thu, 27 Jul 2023 16:21:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233477AbjG0QVO (ORCPT ); Thu, 27 Jul 2023 12:21:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjG0QVN (ORCPT ); Thu, 27 Jul 2023 12:21:13 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 680D719B for ; Thu, 27 Jul 2023 09:21:12 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5222b917e0cso1549156a12.0 for ; Thu, 27 Jul 2023 09:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690474871; x=1691079671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z/odzKdmyEPbBzzMSszAZAD9v3Trah6OzbxWCSFaBlI=; b=i9LhTejNzDVakizSzY8iDoFfqGEumSNLXUQ93fQnkMdNArMRci6ea8Pk319FPhK0Bs xNyRWn/A8qd6YtZI5yU92e0uazWnrc3vKtn003fPENssWaquIINJVifg6OeW/sZVfHaY DCQ0DoGJ6GwiV1mJXxzvXZ4T/xmwXceDyjkwoYnOc5KKl8NWBLf+XOFIlyFQDnq21YZL 5hpwyWMb4eD9W4Jhdu8xu7gphTNJNQRqKL7oeDf2w3RYM0kxqZCrvhh9ZT20o/3dlWGb 4eNo/Q92V46OXlPWRbIZ2yRR5a7BD+hpT1M+I8DkVaYoEtMhrbBk0cDqq2mP/tqWR60o yUgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690474871; x=1691079671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z/odzKdmyEPbBzzMSszAZAD9v3Trah6OzbxWCSFaBlI=; b=FWVGsy3hvKpy52SepBntxmrVpc21A2NcsBp4kCtQj92U/hnJ9g+UqS1RqwTKdIA66G ZVYAON+32+Fdtr6MPVyQ9vdDCWkQ0t2IhR8OaL1vVlGa7HQCmnWHYDTkGQNWTnkKy26o 942YVnoAj45xKgxHdxx3wsHkd81g5xFlFtvfrw+Gh7KgeUckCHjg4hb0kb38Dc2E8hY1 NjJLmshn61eI7TNejEqbkR0hyeNSOCGbmS3X9AmHgvPQg13XzkDu+/RC/b8aX0Yp++xr 4SrJ3ugVzw50nRyhTHDtf0dY8WBW1bhZxfGUhlWI/nmqaC3cvel0Mvdae4xbhDqqBsC9 m7nw== X-Gm-Message-State: ABy/qLa7NgSYC8an9BQCw1EHm8ysfvV6eQMngrFKD7/+FMmR8Gr1Kd1R nwVatY0TCQFojeMtHB/JIiNMeg== X-Google-Smtp-Source: APBJJlGafRM25b5sc/vyKh5ECWjQXZt/sJOqK0IPTwyP0etH8Ly6ji359kOnH4K4aPaHDaujXjYe7Q== X-Received: by 2002:a05:6402:1810:b0:51e:5322:a642 with SMTP id g16-20020a056402181000b0051e5322a642mr2237347edy.27.1690474870945; Thu, 27 Jul 2023 09:21:10 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a15-20020aa7d90f000000b00521953ce6e0sm808027edr.93.2023.07.27.09.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 09:21:10 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 4/7] drm/msm/dpu: enable INTF TE operations only when supported by HW Date: Thu, 27 Jul 2023 19:21:01 +0300 Message-Id: <20230727162104.1497483-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> References: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The DPU_INTF_TE bit is set for all INTF blocks on DPU >= 5.0, however only INTF_1 and INTF_2 actually support tearing control. Rather than trying to fix the DPU_INTF_TE, check for the presense of the corresponding interrupt line. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c index 7ca772791a73..8abdf9553f3b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c @@ -557,7 +557,7 @@ struct dpu_hw_intf *dpu_hw_intf_init(const struct dpu_intf_cfg *cfg, c->ops.setup_misr = dpu_hw_intf_setup_misr; c->ops.collect_misr = dpu_hw_intf_collect_misr; - if (cfg->features & BIT(DPU_INTF_TE)) { + if (cfg->intr_tear_rd_ptr) { c->ops.enable_tearcheck = dpu_hw_intf_enable_te; c->ops.disable_tearcheck = dpu_hw_intf_disable_te; c->ops.connect_external_te = dpu_hw_intf_connect_external_te; From patchwork Thu Jul 27 16:21:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9758EC04A6A for ; Thu, 27 Jul 2023 16:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233675AbjG0QVR (ORCPT ); Thu, 27 Jul 2023 12:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233524AbjG0QVP (ORCPT ); Thu, 27 Jul 2023 12:21:15 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E56E19B for ; Thu, 27 Jul 2023 09:21:14 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe0fe622c3so2010024e87.2 for ; Thu, 27 Jul 2023 09:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690474873; x=1691079673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k6RuNhMjGuYTebSwzychmeBGRpmSV/TMmOX+Xvl9+Bc=; b=hWh+ClRXxKBLO8OLzvZ3V78VX/0pCeIMl0m9xrXg86cEgWTcEIMYJA7s10hlvEwYGT 1qMQZEMJaMFk0/Vurc4KD9x6mXVQBwkNoIcpR2lxBdbvKC2O7oi/qV08v0d5jUmxvf8M CdqclkXvmfxFq84AxiEuC7/xmlBUmJEr2LMbvR/GViUvcNRmGv92MkXMwIkVD6dg1vye +mMHF3B+ykGgXRJGZWKMY+f7HBH/K1dHTcN91veuxNy2Mye4sHksfa2kzwYVLMoCqFDk gu4Hiy2vs80y/3z9rf5MDm13LCs3RQoFN9VAUi59fFa7mnVS7Wal4tU7AnMHmLQuwZQl wIgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690474873; x=1691079673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k6RuNhMjGuYTebSwzychmeBGRpmSV/TMmOX+Xvl9+Bc=; b=YhKAjWcFM0fGDGiUycvztSpGDQxmBCufEnIcH8PG8hcaslSB1KNJhL+QNzU7SgaALA GKqsGm9Iw4GMyW5TBGe35f1XP8um9pnoFqO+f/q31+yK5XAhltp/jBQFDlPjyB54gNQk 7d5V+7+SCs6P7aPC3WLWWO5ZOyWUfNZElhuhWBF2jrmNLs+7Co1ho/zPG2VR/WK0E3hk +juOR5GYOdiQ/Dm6SFLoSOAtvQbKDgaTZu6s/Z1QNywOOh0/CgNiGDdtcdBe8981pRot Mct7RhUH+uCw1KAi+5QkzHePGGWG9nbjvbTInTSwLQTX6DcMYnQsLs9xxANoS6PdO90l Q68A== X-Gm-Message-State: ABy/qLaPxsfUp7M61VPJi0ONdrtk6UAPPHohyFixGnDX70bEi7p9x2ah BUJtEFcA/DypkDI8lH3EF/inYw== X-Google-Smtp-Source: APBJJlFhuVF3dar1Q85kZVZI/DnSddUpRi3j/echqLX5rwVYduApQc1u6H+2yOX4R2Vnetdnwj9KVA== X-Received: by 2002:a05:6512:32a7:b0:4fb:7da3:de4 with SMTP id q7-20020a05651232a700b004fb7da30de4mr2484529lfe.13.1690474873032; Thu, 27 Jul 2023 09:21:13 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a15-20020aa7d90f000000b00521953ce6e0sm808027edr.93.2023.07.27.09.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 09:21:12 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 6/7] drm/msm/dpu: drop useless check from dpu_encoder_phys_cmd_te_rd_ptr_irq() Date: Thu, 27 Jul 2023 19:21:03 +0300 Message-Id: <20230727162104.1497483-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> References: <20230727162104.1497483-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The dpu_encoder_phys_cmd_te_rd_ptr_irq() function uses neither hw_intf nor hw_pp data, so we can drop the corresponding check. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index 60d4dd88725e..04a1106101a7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -108,14 +108,6 @@ static void dpu_encoder_phys_cmd_te_rd_ptr_irq(void *arg) struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys_cmd *cmd_enc; - if (phys_enc->has_intf_te) { - if (!phys_enc->hw_intf) - return; - } else { - if (!phys_enc->hw_pp) - return; - } - DPU_ATRACE_BEGIN("rd_ptr_irq"); cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);