Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp151108rwb; Tue, 13 Dec 2022 15:27:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4BCtycOIdcK81PtqyMWx7el0ZsiPDuC2+E0Wx3PJf18mgHqpQhS42R3EgQ7ISnBW6KNH8o X-Received: by 2002:a05:6402:913:b0:46c:fe2d:a588 with SMTP id g19-20020a056402091300b0046cfe2da588mr17523107edz.18.1670974023744; Tue, 13 Dec 2022 15:27:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670974023; cv=none; d=google.com; s=arc-20160816; b=gC3raCEw693Nu0FfrBxBMVlt/310H34IUz+Nc/FXOmCAOu7a5NCw6Kr06AjLGRSHuS cY8oDmu98ptuZ43ftllBGfW2qoqv/TbXAp3E1J6O6mW0M0PHJiieGEsrbxY4BNdCukHs CcHuXAH/napj0AZBz7X7m0fvJar+LjH8GIaRAkSx6X1VQzkg1CAjKeE0rpLi87Sp34ot R2yoGZaDjKjYGPjIvJ0NPDJKYil6PnMQfOAI1q4Oq3yAk9HPJ1EjiNU9ILi4NpnohHZx 7Wm1LXlyXuBG2oZL9zYCZUG26HZQ2FwidzU6gTZUx6T+aaavZj9ehGSeph2ND2V/X7gw 5vJQ== 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 Return-Path: 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.26.45; Tue, 13 Dec 2022 15:27:03 -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 + 73 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?q?Ville=20Syrj=C3=A4l=C3=A4?= , 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 Content-Transfer-Encoding: 8bit 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 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