From patchwork Tue Dec 13 23:22:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 32983 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp420213wrn; Tue, 13 Dec 2022 15:28:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4B3Ek+6NTl2JvnC1RfD+x/MgBHUZvDhacmrTukyTO37H3arYLK/My7GzderAe3GDEuuS/4 X-Received: by 2002:a17:906:c2cc:b0:7c0:f118:624b with SMTP id ch12-20020a170906c2cc00b007c0f118624bmr18756411ejb.44.1670974100175; Tue, 13 Dec 2022 15:28:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670974100; cv=none; d=google.com; s=arc-20160816; b=dD+SsX94x7B3bC20JGx8Ce9TtwFB5lXWdxkrAbbIbtSKTnr8gVcUxC+RGFvDj3blCr uwCNlDKLWGKZKmIusYBFHHuqahqfIAVO1cJwXsfoWf1Y9TYk3IBTpDhz/Q6zsZ+d/iPc T/oST+AV25TMpDcpRzapNXzEG0HVTBRAHGMgby9t+756kv9ds27pHa6a0wSFDCErjjVC 1Hyz7MK2zAwbI4jUcJ6ZC8bCUbLddIM6uJngK+3cBdRWaIscEwW0E8Tk6e4QVv7vcfDX LzOul0LK6TaOqkprTuYxefitQhbhioScC32S2Pi0qbkrYSWs5cL9wPReoeFJPOfGLrOy 7P1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=N35f+OpJtipFSu5vnzYR1XmaC2YOKT6kzW0sPq19gVo=; b=H8t310V3Qu/gxcJvebditbyP9xxFjr0T+oE/BRnEwDYBE6zGsq6eQLSMm7yyDPSDUn yRp962tNUSeTeddJe/6TyH1eLpQ6q1aExR2+sPcKVDmAjhji4OuqSLHQmEXmAomlCyFo CZQJpmfUnIEzDpujMtjG19d8ygwru5/G4Auz2bcK1mT+tMAg/Favc6ze0aV7ZtvOJmkP sLKZ7eEv0enHzGrZgWLkzFOo87Apcnh8Dinhju0R+zqYPHagH2QAOE30xl0eWycT432S gcMHyeMwrIOLZXpVDhDN47ln4jrxSNMQqNECN2oYjyOF/LEhxfEjjW0qAP8Xx6k/C22F B9tA== 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 b8-20020a170906194800b007ad8bd5b636si8007748eje.377.2022.12.13.15.27.54; Tue, 13 Dec 2022 15:28:20 -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 S237022AbiLMXWq (ORCPT + 99 others); Tue, 13 Dec 2022 18:22:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236999AbiLMXWa (ORCPT ); Tue, 13 Dec 2022 18:22:30 -0500 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CAD326ACB; Tue, 13 Dec 2022 15:22:29 -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 7A476200D5; Wed, 14 Dec 2022 00:22:26 +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 2/6] drm/msm/dpu1: Add DSC config for sm8150 and sm8250 Date: Wed, 14 Dec 2022 00:22:03 +0100 Message-Id: <20221213232207.113607-3-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213232207.113607-1-marijn.suijten@somainline.org> References: <20221213232207.113607-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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?1752143338196215681?= X-GMAIL-MSGID: =?utf-8?q?1752143338196215681?= These blocks on CTL V1 support setting a PINGPONG idx to send pixel output to. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) 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 318f0b4dbf6e..114ad8ca4554 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -1566,18 +1566,25 @@ static const struct dpu_merge_3d_cfg sm8150_merge_3d[] = { /************************************************************* * DSC sub blocks config *************************************************************/ -#define DSC_BLK(_name, _id, _base) \ +#define DSC_BLK(_name, _id, _base, _features) \ {\ .name = _name, .id = _id, \ .base = _base, .len = 0x140, \ - .features = 0, \ + .features = _features, \ } static struct dpu_dsc_cfg sdm845_dsc[] = { - DSC_BLK("dsc_0", DSC_0, 0x80000), - DSC_BLK("dsc_1", DSC_1, 0x80400), - DSC_BLK("dsc_2", DSC_2, 0x80800), - DSC_BLK("dsc_3", DSC_3, 0x80c00), + DSC_BLK("dsc_0", DSC_0, 0x80000, 0), + DSC_BLK("dsc_1", DSC_1, 0x80400, 0), + DSC_BLK("dsc_2", DSC_2, 0x80800, 0), + DSC_BLK("dsc_3", DSC_3, 0x80c00, 0), +}; + +static struct dpu_dsc_cfg sm8150_dsc[] = { + DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)), + DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)), + DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)), + DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)), }; /************************************************************* @@ -2474,6 +2481,8 @@ static const struct dpu_mdss_cfg sm8150_dpu_cfg = { .mixer = sm8150_lm, .dspp_count = ARRAY_SIZE(sm8150_dspp), .dspp = sm8150_dspp, + .dsc_count = ARRAY_SIZE(sm8150_dsc), + .dsc = sm8150_dsc, .pingpong_count = ARRAY_SIZE(sm8150_pp), .pingpong = sm8150_pp, .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), @@ -2524,6 +2533,8 @@ static const struct dpu_mdss_cfg sm8250_dpu_cfg = { .mixer = sm8150_lm, .dspp_count = ARRAY_SIZE(sm8150_dspp), .dspp = sm8150_dspp, + .dsc_count = ARRAY_SIZE(sm8150_dsc), + .dsc = sm8150_dsc, .pingpong_count = ARRAY_SIZE(sm8150_pp), .pingpong = sm8150_pp, .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),