Message ID | 20230411-dpu-intf-te-v3-0-693b17fe6500@somainline.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3731753vqo; Tue, 25 Apr 2023 16:40:08 -0700 (PDT) X-Google-Smtp-Source: AKy350ZvKkHG60IJxhl3WwxwqHyjY4pIy0p6SmotpN+CZJ6pzzEIRVUBanHpPERoSw82cd0868ca X-Received: by 2002:a05:6a20:4418:b0:f2:b6d6:e3fa with SMTP id ce24-20020a056a20441800b000f2b6d6e3famr20992490pzb.38.1682466007908; Tue, 25 Apr 2023 16:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682466007; cv=none; d=google.com; s=arc-20160816; b=phTTNbv9L74YW8CFb5nT8fcOd1zYJjSPRzUJs7PtP1sIosV7Uv+c8wE+N57+xXQKQv ne5k9XCx4AYdPu0i+ru0zncydkFMA2MpMGLdAbHKAlt3iGm2OKSEbwwqFge+k4SXZmrY Fo050d+4mdL8tP2e9eXSEDLT+M/C2qt1b8tdoy7UmsFEEQ+pZyosBRuwkVOHNVNt33Ue 2Z6QprpNUsIMGWlKRQuPRICOhTC29k/IO58a9Vac53Al5OLBjKX8PE6/JwHuuCChcob8 R9qjlo8wNRptPbW1IUAsU48NI86rjUYnxg/JS31xRGFQ3cdmC3ePe4fR0MmMe+6K+8nc EWAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=JZTXhMk0YldDVUf1JidaDHtWdHDFDGsRfwk1vZDWxv0=; b=PZ8sm/Gt/fc9lXUmkV0z3W6DWgAkY0J5u5orXnZp+8lgmkar7mJSPNTSihuyO7Sobx DZkpsNQp5KW81GhiNatJ3iCIY8mQeiIIK5QMixJUyGGNmAN19OexuNEpUSkW8w+6b6mK 2zlLNJdNEeQMJ4/3g3YqlQIl4jLcmGVgSW9K2SVXrsVUdCqCMcawB0baFkxqNCMpWCqh wPG4kZE+/+3Ma/qzWpu+KSNo5dZFDS3d3HkLfvgc0nkn9GP5uvjIiLYpZ7ihGd1V6rv4 W7Z5nnfFR0vpjpWbuHDbfWrMor8ZMf54nnaH+EB6tYMW4GOPqlLp8SIS2+hxnekAOORF bzsg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a63fb54000000b0052501cedc33si8416425pgj.661.2023.04.25.16.39.53; Tue, 25 Apr 2023 16:40:07 -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 S236215AbjDYXGP (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Tue, 25 Apr 2023 19:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234826AbjDYXGH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Apr 2023 19:06:07 -0400 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [IPv6:2001:4b7a:2000:18::164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FD09B21E; Tue, 25 Apr 2023 16:06:05 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 733321F9B4; Wed, 26 Apr 2023 01:06:01 +0200 (CEST) From: Marijn Suijten <marijn.suijten@somainline.org> Subject: [PATCH v3 00/21] drm/msm/dpu: Implement tearcheck support on INTF block Date: Wed, 26 Apr 2023 01:05:51 +0200 Message-Id: <20230411-dpu-intf-te-v3-0-693b17fe6500@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIANBcSGQC/2XOQQ6CMBCF4auYrh3SabGgK+9hXCAMMERa0kKjI dxdIHHF8n/JfJlZBPJMQdxOs/AUObCza+jzSZRtYRsCrtYWSiotU0SohgnYjjWMBFSYPK1Rk8y 1WC8GTzV/du3xXLvlMDr/3fGI27o5CpVGhRcpTaIQcyMBoS88dzYJE3cj2XtwfcH2zZYS5xuxY VH9geMjUYEEqjNT5llGr2t2AJZl+QGdXnRT7AAAAA== To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Adam Skladowski <a39.skl@gmail.com>, Loic Poulain <loic.poulain@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Kuogee Hsieh <quic_khsieh@quicinc.com>, Robert Foss <rfoss@kernel.org>, Vinod Koul <vkoul@kernel.org>, Neil Armstrong <neil.armstrong@linaro.org> Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Martin Botka <martin.botka@somainline.org>, Jami Kettunen <jami.kettunen@somainline.org>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jordan Crouse <jordan@cosmicpenguin.net>, Jessica Zhang <quic_jesszhan@quicinc.com>, Marijn Suijten <marijn.suijten@somainline.org>, Konrad Dybcio <konrad.dybcio@somainline.org> X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764193476733699308?= X-GMAIL-MSGID: =?utf-8?q?1764193476733699308?= |
Series |
drm/msm/dpu: Implement tearcheck support on INTF block
|
|
Message
Marijn Suijten
April 25, 2023, 11:05 p.m. UTC
Since DPU 5.0.0 the TEARCHECK registers and interrupts moved out of the PINGPONG block and into the INTF. Implement the necessary callbacks in the INTF block, and use these callbacks together with the INTF_TEAR interrupts. Additionally, disable previous register writes and remove unused interrupts in the PINGPONG and MDP_TOP blocks for these newer platforms. With these patches the devices on DPU >= 5.0.0 listed below now update their panels at 60fps without tearing (nor sluggishness), and without repeated timeouts in dmesg. Tested on the following devices with command-mode panels and TE pins: - Sony Xperia XZ3 (sdm845, DPU 4.0.0, cmdmode panel): no regressions on PINGPONG TE; - Sony Xperia 5 (sm8150, DPU 5.0.0); - Sony Xperia 10 II (sm6125, DPU 5.0.4). --- Changes in v3: - Use new commit hashes in Fixes: tags after drm-msm's msm-next was force-pushed; - Rename dpu_hw_setup_vsync_source to dpu_hw_setup_vsync_source_and_vsync_sel and drop _v1 suffix from dpu_hw_setup_vsync_source_v1; - Refactor dpu_hw_interrupts register offsets to take the block offset as argument and compute the actual register with a base offset and stride, rather than hardcoding the many per-INTF and per-AD4 register offsets with fixed stride manually; - Split INTF_TEAR interrupt additions into a core (dpu_hw_interrupts.c) and catalog patch; - Add new patch to make DITHER sub-block of SM8[34]50 and SC8280XP V2 instead of V1. v2: https://lore.kernel.org/r/20230411-dpu-intf-te-v2-0-ef76c877eb97@somainline.org Changes in v2: - Rebase on -next with all the new SC8280XP and SM8[345]50 support; - Remove duplicate PP_BLK_TE macro now that .features is an argument; - Fix PP_BLK_DIPHER -> DITHER typo that was added recently; - Add INTF_TEAR interrupt blocks for DPU 7.0.0 (moved to different register range); - Describe INTF_TEAR support for the newly added SM8350, SM8450, SM8550 and SC8280XP SoCs; - Remove TE2 subblocks from 8[34]50 and sc8280xp (new patch); - Rebase on -next with DPU catalog rework; - Remove dpu_hw_intf_v1_get_status which was inlined in the original dpu_hw_intf_get_status function in e3969eadc8ee ("drm/msm/disp/dpu: get timing engine status from intf status register"); - Many changes to move all catalog edits to separate files; - Add documentation for DPU_MDP_VSYNC_SEL; - Fix sdm8150_mdp typo, should be sm8150_mdp; - Move unrelated INTF_INTR offsets out of hwio header (new patch); - Remove _reg argument from INTF_BLK, since we now have a third interrupt with a different base register. To prevent confusion all three interrupts should provide the final value from DPU_IRQ_IDX directly. - Only request the new tear_rd_ptr in a new INTF_BLK_DSI_TE macro; - Drop stray INTF_MISR_SIGNATURE register definition; - Clean up registers in dpu_hw_intf.c (many new patches); - merged setup_tearcheck() and enable_tearcheck() callbacks; - replaced enable_tearcheck(false) with new disable_tearcheck() callback; - Moved dpu_encoder_phys_cmd_enable_te intestines (just autorefresh disablement) to INTF and PP block, replacing 3 callbacks in both blocks with just a single disable_autorefresh() callback. v1: https://lore.kernel.org/r/20221231215006.211860-1-marijn.suijten@somainline.org --- Konrad Dybcio (1): drm/msm/dpu: Move dpu_hw_{tear_check,pp_vsync_info} to dpu_hw_mdss.h Marijn Suijten (20): drm/msm/dpu: Remove unused INTF0 interrupt mask from SM6115/QCM2290 drm/msm/dpu: Remove TE2 block and feature from DPU >= 7.0.0 hardware drm/msm/dpu: Move non-MDP_TOP INTF_INTR offsets out of hwio header drm/msm/dpu: Reindent REV_7xxx interrupt masks with tabs drm/msm/dpu: Fix PP_BLK_DIPHER -> DITHER typo drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP drm/msm/dpu: Remove duplicate register defines from INTF drm/msm/dpu: Remove extraneous register define indentation drm/msm/dpu: Sort INTF registers numerically drm/msm/dpu: Take INTF index as parameter in interrupt register defines drm/msm/dpu: Drop unused poll_timeout_wr_ptr PINGPONG callback drm/msm/dpu: Move autorefresh disable from CMD encoder to pingpong drm/msm/dpu: Disable pingpong TE on DPU 5.0.0 and above drm/msm/dpu: Disable MDP vsync source selection on DPU 5.0.0 and above drm/msm/dpu: Factor out shared interrupt register in INTF_BLK macro drm/msm/dpu: Describe TEAR interrupt registers for DSI interfaces drm/msm/dpu: Add TEAR-READ-pointer interrupt to INTF block drm/msm/dpu: Merge setup_- and enable_tearcheck pingpong callbacks drm/msm/dpu: Implement tearcheck support on INTF block drm/msm/dpu: Remove intr_rdptr from DPU >= 5.0.0 pingpong config .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 26 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 26 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 40 +-- .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 48 ++-- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 40 +-- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 16 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 15 +- .../drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 15 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 40 +-- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 22 +- .../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 64 +++-- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 46 ++-- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 36 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 10 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 210 ++++++++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 48 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 9 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 183 +++++++------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 4 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 268 ++++++++++++++++++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 25 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 48 ++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 83 ++++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 64 +---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 50 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h | 3 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 + drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 14 ++ 29 files changed, 978 insertions(+), 490 deletions(-) --- base-commit: f600e0bbde8562a06bee31b3eb1b69d49acac4c5 change-id: 20230411-dpu-intf-te-ea684f13e083 Best regards,