From patchwork Wed Dec 21 23:19:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 35562 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp32848wrn; Wed, 21 Dec 2022 15:20:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtNgb9uUCVnMYu4gG0A22hfRqJ1oKCDsxhm73WHTUEc6Ay8I3Y1lr3zs/RucZiLN9YcJ6hX X-Received: by 2002:a05:6a20:d2c6:b0:af:7233:5bfc with SMTP id ir6-20020a056a20d2c600b000af72335bfcmr23664981pzb.8.1671664839106; Wed, 21 Dec 2022 15:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671664839; cv=none; d=google.com; s=arc-20160816; b=kssKtytwvoAPd/UbMp4GIKni8DKntgCur8v5oce1ObISX6DrdV6FxXd6kXbTSA1dNM yOVNo3BldCWIbKKQGkMlhpM7N26YT8uY7urL4jjQL/7WBm8EKQKuwWsjyHqaJ6DZaPaR vaCDKG+gYJikFbNjhORilLjRyd5RwFdmEjSvkrfIhS9GHomxjp+vjNQL/Mq0tLgU/N9g Cwex3+OUY6hRD6M+f0HN9WiXwBRgsMWsFZVc50naXTeQChGzVTO1daq8lUFwR5J2+YCe c1mAFOizt9dOeDFbu/sbihjrZCmo1Qo1pysav725q2oX29SmBtgL0HxZN5tLytxYX59J jB1Q== 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=42g40dS8Uw0aEE174K1Ao9X/ahD5NIZAu6JR2g6Aj70=; b=hMjVbiLcL2oYDXJ+ZGjw/aiiIdLtSzbhZZcLaYRbs7qkS7X0CqKESd/+Jhfo1mK4LR DvQ8AlEBVi9XhVUEek5vbAi3jyxvsyBb9tlzYIHKu3GAH9snAtBnFUS6+ThumQeKd0iA 9S6fopp4WuB8RywW3728AqumRexazdUMKckwNesFriaQzn2iS52jGAexGBrTB7rtL5UC 8z+YSJOLZkGI4VPgh4E8436zBg5DfGG22KWsfZWipoPHqlH5MIqKr9LSZzCrO2X8A2g9 ThUOe7TyXd6jY2R61GNsz900Wk8kdg48bU+QmPFydvsJMGflwQM5Xgdus1OptqpJFlQb Y0gg== 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 e26-20020a63745a000000b00477bbd92cf5si18150148pgn.118.2022.12.21.15.20.25; Wed, 21 Dec 2022 15:20:39 -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 S234888AbiLUXUD (ORCPT + 99 others); Wed, 21 Dec 2022 18:20:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbiLUXT6 (ORCPT ); Wed, 21 Dec 2022 18:19:58 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C2B61A06D; Wed, 21 Dec 2022 15:19:57 -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 0A86B20385; Thu, 22 Dec 2022 00:19:55 +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: [PATCH v2 1/8] drm/msm/dpu: Wire up DSC mask for active CTL configuration Date: Thu, 22 Dec 2022 00:19:36 +0100 Message-Id: <20221221231943.1961117-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221221231943.1961117-1-marijn.suijten@somainline.org> References: <20221221231943.1961117-1-marijn.suijten@somainline.org> 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?1752867630130130967?= X-GMAIL-MSGID: =?utf-8?q?1752867630130130967?= Active CTLs have to configure what DSC block(s) have to be enabled, and what DSC block(s) have to be flushed; this value was initialized to zero resulting in the necessary register writes to never happen (or would write zero otherwise). This seems to have gotten lost in the DSC v4->v5 series while refactoring how the combination with merge_3d was handled. Fixes: 58dca9810749 ("drm/msm/disp/dpu1: Add support for DSC in encoder") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index ae28b2b93e69..35791f93c33d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -61,6 +61,7 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg( intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD; intf_cfg.stream_sel = cmd_enc->stream_sel; intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); + intf_cfg.dsc = dpu_encoder_helper_get_dsc(phys_enc); ctl->ops.setup_intf_cfg(ctl, &intf_cfg); /* setup which pp blk will connect to this intf */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 0f71e8fe7be7..9ee3a7306a5f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -274,6 +274,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine( intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID; intf_cfg.stream_sel = 0; /* Don't care value for video mode */ intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); + intf_cfg.dsc = dpu_encoder_helper_get_dsc(phys_enc); if (phys_enc->hw_pp->merge_3d) intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx;