Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3001589rwr; Fri, 28 Apr 2023 21:47:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uaPTO8khnSL9mv683inc87UYP03IC/7CqBBWGQQoVLPjrZ2PKPMYj1UbxYslVGfzzOoCF X-Received: by 2002:a17:902:ecca:b0:1a9:581b:fbaa with SMTP id a10-20020a170902ecca00b001a9581bfbaamr8991959plh.2.1682743623996; Fri, 28 Apr 2023 21:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682743623; cv=none; d=google.com; s=arc-20160816; b=qMHe5TgseYU0ouJaLH8Ks4PQIoRXUgcnB2YOSfP2R5p4UoPu584MvWZc3VXQ72Sbx4 0QRtR2VRMRkfuWRVp9R0EoKqX1MwW5wqIYPINZsLDxVeSzz9eTrdWcnXzKn9Dowe34KD FiQt/46K1p0mgHbK3Ryui3QD6gijxUPzy2qrTh+rXxp2KS8ACq2xBkQX3Zlw+LecK+vl P9Qo0EpFs+5c9tG7cjw09l4AkzBl1VfuCGLAmIhkymuvdyHYkR4sq3Fwn4cxDZNHjpTb 3Ar1CvLofNOGjvuphytfT8mF1fd9Cira5/ZI4bdxT4zWauWcuoEvIkH/Y4SA8usjMtnF lUBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/+uzVo6uOLNEtU/P2RtmvZc/MMkbFE8uZhi2q0U8RcY=; b=OL8FUbhMVjqZfhxqkSDUv/tFJN/TvdV7Wgg/yHQ7/jtlS9EKhSBZC2f40xVDq1+W7O suI/ipA4Lj/HJaGJxmn0Pynldf1pzAvTNgU9ZdvRbJfLb+Xr1/K1HvuUABK7sHUZCQSb PBmrBspQEsGcUVsx5jB8JAETkbDf/gEOOu/0KJpx6c5J3JnUvsjg7+Q1Wp/GhAMnHHGp NYTm5+xv3KzrMnl46qXb8RFjlQY2+PkG0890vBWCtHHQPejNu400PD3ScNVFqZieOBUs RIv6ITWa9MvpwazSXeYtiFAM6/U4Ek/EBSvDpyG39I7hOP/8DYcQRocBl02ccihqH9gC jF0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XxPbCPCD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170903230d00b001a1a44cc945si24819684plh.580.2023.04.28.21.46.51; Fri, 28 Apr 2023 21:47:03 -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; dkim=pass header.i=@linaro.org header.s=google header.b=XxPbCPCD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347188AbjD2EgD (ORCPT + 99 others); Sat, 29 Apr 2023 00:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbjD2EgB (ORCPT ); Sat, 29 Apr 2023 00:36:01 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F6B2D7F for ; Fri, 28 Apr 2023 21:35:56 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f315712406so81199565e9.0 for ; Fri, 28 Apr 2023 21:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682742955; x=1685334955; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/+uzVo6uOLNEtU/P2RtmvZc/MMkbFE8uZhi2q0U8RcY=; b=XxPbCPCD200XEut0EoPNJGHsMBUCD4SmjzXj6/RhKvBrTinGw42Q9sSNsSIgbUKrxd EyAI2ZVqDeHrP4siWKMOPvqzt58/CvuwHXRWkpB01iSd5SU0TgsS0Rzid4C+XbPn7o9Y 8+nZ5eJt7QV+sbyR4lqB6AFlrCu8DRRFRlVuWXyS97i7S8geBPwqzyNwJzHrntW56XeI HhWKxyy4lF4+Asuf1ixXGeKh0aLqE3zNi2A6u96TL1vYXvyFX0Mo83BF4M4g2Y5MfW1i IQDeXLhNv3JAl/MHtCiDDc5EUiveGuyGTwI4hj+TNBZxObh6mJQJGbMvvYJOMRw1+X6h E/3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682742955; x=1685334955; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/+uzVo6uOLNEtU/P2RtmvZc/MMkbFE8uZhi2q0U8RcY=; b=Z1HbTyysQsUyCT9NcFpZpv2C2y/Tbd78nhaMk02sX675MfkTA7GbgByA1gMOxZfSXB d5fk4cYc/m1//NRRd4YlcsMVOFhWh0/LD50bhZ35yGndrbpAWMaGa6mcySiDa1IUjuJI VDvID4tg8AwpZrq8aPRw6vGluni04AKx/r9utxJuKO8UT06M6EYX4/y+sAfCcoN9pKPE BAv+qOHgQRTcVidb4o+IMZtr6tnedl+b2ET1wFsYc7jntFsJYD5GxbuqtWW/w5kDnFY2 j3bZAxgiJfvH1DY3vE7uz6cBQZxcOfEJ00HeluWd+WhN8+lD68iX4xRGJN3Qh/SlECl4 Tulw== X-Gm-Message-State: AC+VfDwQZGvZScGR3/R/CKzb9YHxIE+gGZQ4AR2VMTLpsoE1KJ2gsdvU /H5HkZN32OV03iwW/am9fqMBfw== X-Received: by 2002:a05:600c:474e:b0:3f1:7510:62e8 with SMTP id w14-20020a05600c474e00b003f1751062e8mr8354130wmo.3.1682742954913; Fri, 28 Apr 2023 21:35:54 -0700 (PDT) Received: from [10.6.30.123] ([212.140.138.202]) by smtp.gmail.com with ESMTPSA id u5-20020a7bc045000000b003f32c9ea20fsm1527627wmc.11.2023.04.28.21.35.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Apr 2023 21:35:54 -0700 (PDT) Message-ID: Date: Sat, 29 Apr 2023 07:35:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [Freedreno] [PATCH v2 5/7] drm/msm/dpu: add DPU_PINGPONG_DSC feature PP_BLK and PP_BLK_TE To: Abhinav Kumar Cc: vkoul@kernel.org, quic_sbillaka@quicinc.com, airlied@gmail.com, andersson@kernel.org, freedreno@lists.freedesktop.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, swboyd@chromium.org, robdclark@gmail.com, agross@kernel.org, daniel@ffwll.ch, linux-arm-msm@vger.kernel.org, marijn.suijten@somainline.org, Kuogee Hsieh , sean@poorly.run, linux-kernel@vger.kernel.org References: <1682725511-18185-1-git-send-email-quic_khsieh@quicinc.com> <1682725511-18185-6-git-send-email-quic_khsieh@quicinc.com> <772a63ca-9b88-3c98-e769-7e614968c127@linaro.org> <09d34749-d571-ed04-9681-4abf48c7f053@quicinc.com> <7e40f51b-693e-d42f-b99e-695cb6478e2d@quicinc.com> Content-Language: en-GB From: Dmitry Baryshkov In-Reply-To: <7e40f51b-693e-d42f-b99e-695cb6478e2d@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 29/04/2023 07:04, Abhinav Kumar wrote: > > > On 4/28/2023 8:21 PM, Dmitry Baryshkov wrote: >> On Sat, 29 Apr 2023 at 05:50, Abhinav Kumar >> wrote: >>> >>> >>> >>> On 4/28/2023 6:41 PM, Dmitry Baryshkov wrote: >>>> On 29/04/2023 04:08, Abhinav Kumar wrote: >>>>> >>>>> >>>>> On 4/28/2023 5:45 PM, Dmitry Baryshkov wrote: >>>>>> On 29/04/2023 02:45, Kuogee Hsieh wrote: >>>>>>> Legacy DPU requires PP hardware block involved into setting up DSC >>>>>> >>>>>> Nit: to be envolved >>>>>> >>>>>>> data path. This patch add DDPU_PINGPONG_DSC feature bit to both >>>>>> >>>>>> adds >>>>>> >>>>>>> PP_BLK and PP_BLK_TE so that both dpu_hw_pp_setup_dsc() and >>>>>>> dpu_hw_pp_dsc_enable() will be executed during DSC path setup. >>>>>> >>>>>> Would it be easier to add PP_BLK_NO_DSC instead and make DSC enabled >>>>>> by default for PP_BLK / PP_BLK_TE? >>>>>> >>>>> >>>>> No because for some chipsets like qcm2290, it has a ping pong block >>>>> but no DSC. >>>> >>>> And so it will use PP_BLK_NO_DSC (like msm8998 for PP_2/_3). But this >>> >>> Ok so you meant adding another PP_BLK_* macro. I mistook it for a >>> feature flag. >>> >>> This is getting a bit confusing with many PP_BLK_* variations. >> >> Yes. As I wrote it might be not the optimal solution. >> >>> >>>> might be not the optimal solution. Let's check all possible cases: >>>> >>>> - PP (or PP_TE?) with no DSC support, >>> >>> Yes correct for chipsets like qcm2290. >>> >>>> - PP/PP_TE tightly bound to the particular DSC instance, should be >>>> allocated together, >>> >>> I need to check which exact chipset does this (I recall one does) but >>> perhaps msm8998 fits here. >> >> All targets earlier than sm8150. SDE driver sets SDE_DSC_OUTPUT_CTRL >> if for v1 CTL blocks (sm8150+). >> >>> >>>> - PP/PP_TE which can use any DSC block. >>> >>> This is what DPU_PINGPONG_DSC feature flag should mean today and should >>> cover most of the DSC 1.1 chipsets present in upstream today. >> >> Then it should probably be renamed to DPU_PINGPONG_ANY_DSC >> > > Actually that "any" is incorrect. As part of the DSC pairing logic > change it will become clear but not all ping-pongs can pair with all > DSCs. So any is not right. > > This is why I think we should go with this feature flag first. Lets > identify a pattern and then work on unifying or cleaning up the PP_BLK_* > masks. Then I'd like to see the series sent together so that we don't have to be wondering in the myst. At least the RM changes might better go into this series (together with the topology changes. I think RM will depend on 1 DSC topology support). I went on and checked the SDE. It has condition that pp % 2 == dsc % 2. Does this condition apply only to "newest" DSC/PP combo (DITHER + 1.2) or to the older ones too? Are there any other conditionals? > >>>> - all PP_DITHER probably support any DSC? >>>> >>> >>> No, PP_DITHER means that there is no DSC in ping-pong block. Its >>> actually DSC 1.2. From our standpoint, this is same as PP_BLK_NO_DSC >>> then as the PP blk has no DSC. This is where the confusion will come. >> >> But we should still bind the DSC to the PP block, shouldn't we? So >> from the software point of view it is the same situation: PP_DITHER >> supports any DSC (1.2) and should be bound to it. >> > > Yes, the DSC ctl will need to be programmed correctly to tell which > ping-pong but like I said, any is not right. There are some conditions. > > Please refer to _sde_rm_reserve_dsc() in downstream. > >>>> Is this list correct? If so, we'd need to be able to specify the DSC id >>>> in the PP block description. >>>> >>> >>> Is this for the PP bound to a particular DSC case? If so, the goal of >>> this is then you want to not allocate DSCs from RM for this case or what >>> would be the purpose of specifying the DSC id in the ping-pong? >> >> I think it would be better to still return PP from the RM. It's that >> the RM will have to return PP/DSC in pairs. >> > > Yes, I was trying to understand what would be the purpose of this DSC id > in the ping-pong block then. > >>> >>>   From this classification, it looks like this case shall fit >>> PP_BLK_NO_DSC but we have to then migrate PP_BLK_DITHER to this as well >>> and add dither to that. >>> >>> Seems like this can be a separate effort to cleanup the PP_BLK_* macros >>> first and go with this feature flag first instead of undertaking a >>> PP_BLK_* macro cleanup in this series. >>> >>>>> >>>>>>> >>>>>>> Reported-by : Marijn Suijten >>>>>>> Signed-off-by: Kuogee Hsieh >>>>>>> --- >>>>>>>    .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h    | 12 >>>>>>> +++++----- >>>>>>>    .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h |  8 +++---- >>>>>>>    .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 26 >>>>>>> ++++++++++------------ >>>>>>>    .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h    | 24 >>>>>>> ++++++++++---------- >>>>>>>    .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 26 >>>>>>> ++++++++++------------ >>>>>>>    .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h |  4 ++-- >>>>>>>    .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h |  2 +- >>>>>>>    .../drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h    |  2 +- >>>>>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |  8 +++---- >>>>>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |  2 ++ >>>>>>>    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |  9 +++++--- >>>>>>>    11 files changed, 62 insertions(+), 61 deletions(-) >>>>>>> >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h >>>>>>> index 17f821c..b7cd746 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h >>>>>>> @@ -112,16 +112,16 @@ static const struct dpu_lm_cfg msm8998_lm[] >>>>>>> = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg msm8998_pp[] = { >>>>>>> -    PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, >>>>>>> sdm845_pp_sblk_te, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>> +    PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, >>>>>>> +            sdm845_pp_sblk_te, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>> -    PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, >>>>>>> sdm845_pp_sblk_te, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>> +    PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, >>>>>>> +            sdm845_pp_sblk_te, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), >>>>>>> -    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, 0, sdm845_pp_sblk, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), >>>>>>> -    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, 0, sdm845_pp_sblk, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), >>>>>>>    }; >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h >>>>>>> index ceca741..8888bd9 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h >>>>>>> @@ -110,16 +110,16 @@ static const struct dpu_lm_cfg sdm845_lm[] = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sdm845_pp[] = { >>>>>>> -    PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, >>>>>>> sdm845_pp_sblk_te, >>>>>>> +    PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, sdm845_pp_sblk_te, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>> -    PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, >>>>>>> sdm845_pp_sblk_te, >>>>>>> +    PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, sdm845_pp_sblk_te, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), >>>>>>> -    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, sdm845_pp_sblk, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), >>>>>>> -    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, >>>>>>> BIT(DPU_PINGPONG_DSC), 0, sdm845_pp_sblk, >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), >>>>>>>    }; >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h >>>>>>> index 42b0e58..3a7dffa 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h >>>>>>> @@ -128,24 +128,22 @@ static const struct dpu_dspp_cfg sm8150_dspp[] >>>>>>> = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sm8150_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>> -    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>> +    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), >>>>>>> -    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>> +    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), >>>>>>> -    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>> +    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), >>>>>>> -    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), >>>>>>> -            -1), >>>>>>> -    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), >>>>>>> -            -1), >>>>>>> +    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, >>>>>>> 30), -1), >>>>>>> +    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, >>>>>>> 31), -1), >>>>>>>    }; >>>>>>>    static const struct dpu_merge_3d_cfg sm8150_merge_3d[] = { >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h >>>>>>> index 5bb9882..e766a2d 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h >>>>>>> @@ -116,23 +116,23 @@ static const struct dpu_lm_cfg sc8180x_lm[] >>>>>>> = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sc8180x_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>> -    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>> +    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), >>>>>>> -    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>> +    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), >>>>>>> -    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>> +    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), >>>>>>> -    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), >>>>>>> +    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), >>>>>>>                -1), >>>>>>> -    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), >>>>>>> +    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), >>>>>>>                -1), >>>>>>>    }; >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>>>>> index ed130582..137b151 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>>>>> @@ -129,24 +129,22 @@ static const struct dpu_dspp_cfg sm8250_dspp[] >>>>>>> = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sm8250_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>> -    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>> +    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_0, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), >>>>>>> -    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>> +    PP_BLK("pingpong_2", PINGPONG_2, 0x71000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), >>>>>>> -    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>> +    PP_BLK("pingpong_3", PINGPONG_3, 0x71800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_1, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), >>>>>>>                DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), >>>>>>> -    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), >>>>>>> -            -1), >>>>>>> -    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, >>>>>>> sdm845_pp_sblk, >>>>>>> -            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), >>>>>>> -            -1), >>>>>>> +    PP_BLK("pingpong_4", PINGPONG_4, 0x72000, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, >>>>>>> 30), -1), >>>>>>> +    PP_BLK("pingpong_5", PINGPONG_5, 0x72800, >>>>>>> BIT(DPU_PINGPONG_DSC), MERGE_3D_2, >>>>>>> +            sdm845_pp_sblk, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, >>>>>>> 31), -1), >>>>>>>    }; >>>>>>>    static const struct dpu_merge_3d_cfg sm8250_merge_3d[] = { >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>>>>> index a46b117..e5631a2 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>>>>> @@ -80,8 +80,8 @@ static const struct dpu_dspp_cfg sc7180_dspp[] = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sc7180_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk, >>>>>>> -1, -1), >>>>>>> -    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk, >>>>>>> -1, -1), >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, 0, sdm845_pp_sblk, >>>>>>> -1, -1), >>>>>>> +    PP_BLK("pingpong_1", PINGPONG_1, 0x70800, 0, 0, sdm845_pp_sblk, >>>>>>> -1, -1), >>>>>>>    }; >>>>>>>    static const struct dpu_intf_cfg sc7180_intf[] = { >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h >>>>>>> index 988d820..7b4ad0f 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h >>>>>>> @@ -60,7 +60,7 @@ static const struct dpu_dspp_cfg sm6115_dspp[] = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg sm6115_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, 0, sdm845_pp_sblk, >>>>>>>            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>>    }; >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h >>>>>>> index c9003dc..20d4d14 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h >>>>>>> @@ -57,7 +57,7 @@ static const struct dpu_dspp_cfg qcm2290_dspp[] >>>>>>> = { >>>>>>>    }; >>>>>>>    static const struct dpu_pingpong_cfg qcm2290_pp[] = { >>>>>>> -    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk, >>>>>>> +    PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, 0, sdm845_pp_sblk, >>>>>>>            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), >>>>>>>            DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), >>>>>>>    }; >>>>>>> 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 91bfc8a..83c0cd9 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >>>>>>> @@ -501,21 +501,21 @@ static const struct dpu_pingpong_sub_blks >>>>>>> sc7280_pp_sblk = { >>>>>>>        .intr_done = _done, \ >>>>>>>        .intr_rdptr = _rdptr, \ >>>>>>>        } >>>>>>> -#define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk, _done, >>>>>>> _rdptr) \ >>>>>>> +#define PP_BLK_TE(_name, _id, _base, _features, _merge_3d, _sblk, >>>>>>> _done, _rdptr) \ >>>>>>>        {\ >>>>>>>        .name = _name, .id = _id, \ >>>>>>>        .base = _base, .len = 0xd4, \ >>>>>>> -    .features = PINGPONG_SDM845_SPLIT_MASK, \ >>>>>>> +    .features = PINGPONG_SDM845_SPLIT_MASK | _features, \ >>>>>>>        .merge_3d = _merge_3d, \ >>>>>>>        .sblk = &_sblk, \ >>>>>>>        .intr_done = _done, \ >>>>>>>        .intr_rdptr = _rdptr, \ >>>>>>>        } >>>>>>> -#define PP_BLK(_name, _id, _base, _merge_3d, _sblk, _done, >>>>>>> _rdptr) \ >>>>>>> +#define PP_BLK(_name, _id, _base, _features, _merge_3d, _sblk, >>>>>>> _done, _rdptr) \ >>>>>>>        {\ >>>>>>>        .name = _name, .id = _id, \ >>>>>>>        .base = _base, .len = 0xd4, \ >>>>>>> -    .features = PINGPONG_SDM845_MASK, \ >>>>>>> +    .features = PINGPONG_SDM845_MASK | _features, \ >>>>>>>        .merge_3d = _merge_3d, \ >>>>>>>        .sblk = &_sblk, \ >>>>>>>        .intr_done = _done, \ >>>>>>> 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 fc87db1..6b49171 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h >>>>>>> @@ -144,6 +144,7 @@ enum { >>>>>>>     * @DPU_PINGPONG_SPLIT      PP block supports split fifo >>>>>>>     * @DPU_PINGPONG_SLAVE      PP block is a suitable slave for >>>>>>> split >>>>>>> fifo >>>>>>>     * @DPU_PINGPONG_DITHER,    Dither blocks >>>>>>> + * @DPU_PINGPONG_DSC,        PP block binding to DSC >>>>>>>     * @DPU_PINGPONG_MAX >>>>>>>     */ >>>>>>>    enum { >>>>>>> @@ -152,6 +153,7 @@ enum { >>>>>>>        DPU_PINGPONG_SPLIT, >>>>>>>        DPU_PINGPONG_SLAVE, >>>>>>>        DPU_PINGPONG_DITHER, >>>>>>> +    DPU_PINGPONG_DSC, >>>>>>>        DPU_PINGPONG_MAX >>>>>>>    }; >>>>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c >>>>>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c >>>>>>> index 3822e06..f255a04 100644 >>>>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c >>>>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c >>>>>>> @@ -264,9 +264,12 @@ static void _setup_pingpong_ops(struct >>>>>>> dpu_hw_pingpong *c, >>>>>>>        c->ops.get_autorefresh = dpu_hw_pp_get_autorefresh_config; >>>>>>>        c->ops.poll_timeout_wr_ptr = dpu_hw_pp_poll_timeout_wr_ptr; >>>>>>>        c->ops.get_line_count = dpu_hw_pp_get_line_count; >>>>>>> -    c->ops.setup_dsc = dpu_hw_pp_setup_dsc; >>>>>>> -    c->ops.enable_dsc = dpu_hw_pp_dsc_enable; >>>>>>> -    c->ops.disable_dsc = dpu_hw_pp_dsc_disable; >>>>>>> + >>>>>>> +    if (features & BIT(DPU_PINGPONG_DSC)) { >>>>>>> +        c->ops.setup_dsc = dpu_hw_pp_setup_dsc; >>>>>>> +        c->ops.enable_dsc = dpu_hw_pp_dsc_enable; >>>>>>> +        c->ops.disable_dsc = dpu_hw_pp_dsc_disable; >>>>>>> +    } >>>>>>>        if (test_bit(DPU_PINGPONG_DITHER, &features)) >>>>>>>            c->ops.setup_dither = dpu_hw_pp_setup_dither; >>>>>> >>>> >> >> >> -- With best wishes Dmitry