From patchwork Sat Dec 31 21:49:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 638179 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 D92F1C4167B for ; Sat, 31 Dec 2022 21:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbiLaVu3 (ORCPT ); Sat, 31 Dec 2022 16:50:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbiLaVu1 (ORCPT ); Sat, 31 Dec 2022 16:50:27 -0500 Received: from relay06.th.seeweb.it (relay06.th.seeweb.it [IPv6:2001:4b7a:2000:18::167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC3E647B for ; Sat, 31 Dec 2022 13:50:26 -0800 (PST) Received: from localhost.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-r2.th.seeweb.it (Postfix) with ESMTPSA id 4E05D3ED63; Sat, 31 Dec 2022 22:50:18 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Abhinav Kumar , Dmitry Baryshkov , Neil Armstrong Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Stephen Boyd , Vinod Koul , Bjorn Andersson , Kuogee Hsieh , Jessica Zhang , Konrad Dybcio , Loic Poulain , Vinod Polimera , Adam Skladowski , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/7] drm/msm/dpu: Implement tearcheck support on INTF block Date: Sat, 31 Dec 2022 22:49:59 +0100 Message-Id: <20221231215006.211860-1-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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). Konrad Dybcio (1): drm/msm/dpu: Move dpu_hw_{tear_check,pp_vsync_info} to dpu_hw_mdss.h Marijn Suijten (6): drm/msm/dpu: Remove unused INTF0 interrupt mask from sm6115/qcm2290 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: Document and enable TEAR interrupts on DSI interfaces drm/msm/dpu: Implement tearcheck support on INTF block drm/msm/dpu: Remove intr_rdptr from DPU >= 5.0.0 pingpong config drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 11 + .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 10 +- .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 108 +++++++-- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 181 +++++++++------ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 7 +- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 12 + .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 2 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 206 ++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 29 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 48 ++++ .../gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 18 +- .../gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 22 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 52 +++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h | 3 + 14 files changed, 570 insertions(+), 139 deletions(-) Reviewed-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov --- 2.39.0