From patchwork Tue Dec 13 23:22:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 2932 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp419309wrn; Tue, 13 Dec 2022 15:25:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JL75U2wO49ADNCEIU1Fwb1IQMSGJoZhwMtJgJ/mpRen//FDsThJ32MQcr1QpKlXrMZudC X-Received: by 2002:a05:6402:913:b0:46c:fe2d:a588 with SMTP id g19-20020a056402091300b0046cfe2da588mr17520613edz.18.1670973956091; Tue, 13 Dec 2022 15:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670973956; cv=none; d=google.com; s=arc-20160816; b=NFG98dEa7TOpA3EPVKzSf1uDENMG0m8cFy7UEBXHA3uGd++u6SH7UxPA2uTfPSRgFk 9rNkgXXpWAnjNa7XKOo9lx5vMRjbVVaK0WcBlCGipqyzY1Q0j883G+IiPOAC6BHO9pY4 87QAxTeCgBYq8C4ZxvTGac2aOs4pd2XgXlJc7Cbxwd4FBTX0jhiZluukLLb2cziLhr1Y jUi6AA8JzgzpINlU0XTr6juAfKQsR+SVge5ogv2hwG788GjuqLSCBH4IX4UNFPWjkToC u9zxugIiCPquBOr0BFj9zI3LNPnOGVLaGFllGX2LHMqBOt6x2XazABSKAZ0ydCnHll9l lcNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nXI6EWLhW/mJ3qY92WgwHhDAGysOS2rgJoClMzyhBUA=; b=Q3lkiq/S7eTf4ia1mDU+IUzbS0Tvm6JDQFfUNTgagD8Hb74+xhOFogMT8kH9TI6fjy pcasqrc9yd7Z8QqDqGC/nSzXCAHScvD8WatcMBzkmHQydhumZuLCG0dWQ9R2zMqMiPmD 0nMyeCTmMvvhx2IA8mPIV0poygptviFNrhzgWysSgbPLX/VRN8E3yYOX7KOB8yoJ3Lf4 FPhrWrNtL+zwkxt7Wp4GwFPlO+I+VOvvvSWJLc63AL00cKp8uEF+zgNGq+dGaON64pDe q50DWWI0U802zxKhLILtWMLo6WHwCddtLj7O10Y2Lzfm7JZqib8eXq5CY3JTuV5bi5Ps 469A== 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 y2-20020a056402440200b0046b62140386si13553659eda.576.2022.12.13.15.25.32; Tue, 13 Dec 2022 15:25:56 -0800 (PST) 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 S236799AbiLMXWX (ORCPT + 99 others); Tue, 13 Dec 2022 18:22:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236990AbiLMXWV (ORCPT ); Tue, 13 Dec 2022 18:22:21 -0500 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C52E1B1FF for ; Tue, 13 Dec 2022 15:22:19 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (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 B691E1F99C; Wed, 14 Dec 2022 00:22:16 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Vinod Koul Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Sean Paul , David Airlie , Daniel Vetter , Stephen Boyd , Bjorn Andersson , Jessica Zhang , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Kuogee Hsieh , Jani Nikula , sunliming , Sam Ravnborg , Haowen Bai , Konrad Dybcio , Loic Poulain , Vinod Polimera , Douglas Anderson , Vladimir Lypak , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/6] drm/msm: DSC Electric Boogaloo for sm8[12]50 Date: Wed, 14 Dec 2022 00:22:01 +0100 Message-Id: <20221213232207.113607-1-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752143186930466480?= X-GMAIL-MSGID: =?utf-8?q?1752143186930466480?= This preliminary Display Stream Compression support package for (initially tested on) sm8[12]50 is based on comparing DSC behaviour between downstream and mainline. Some new callbacks are added (for binding blocks on active CTLs), logic bugs are corrected, zeroed struct members are now assigned proper values, and RM allocation and hw block retrieval now hand out (or not) DSC blocks without causing null-pointer dereferences. Unfortunately it is not yet enough to get rid of completely corrupted display output on the boards I tested here: - Sony Xperia 1 (sm8150), 1644x3840 or 1096x2560 pixels; - Sony Xperia 5II (sm8250), 1080x2520, at 60 or 120Hz; - (can include more Xperia boards if desired) Both devices use the DUALPIPE_DSCMERGE topology downstream: dual LM, PP and DSC, but only a single INTF/encoder/DSI-link. Hopefully this spawns some community/upstream interest to help rootcause our corruption issues (after we open a drm/msm report on GitLab for more appropriate tracking). The Sony Xperia XZ3 (sdm845) was fully tested and validated with this series to not cause any regressions (an one of the math fixes now allows us to change slice_count in the panel driver, which would corrupt previously). Marijn Suijten (6): drm/msm/dpu1: Implement DSC binding to PP block for CTL V1 drm/msm/dpu1: Add DSC config for sm8150 and sm8250 drm/msm/dpu1: Wire up DSC mask for active CTL configuration drm/msm/dsi: Use DSC slice(s) packet size to compute word count drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf drm/msm/dpu: Disallow unallocated (DSC) resources to be returned drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +++ .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 1 + .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 1 + .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 2 ++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 23 +++++++++++----- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 9 +++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 27 +++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 4 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 10 +++++++ drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++--- 10 files changed, 77 insertions(+), 9 deletions(-) --- 2.38.1