Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1182140rwe; Fri, 14 Apr 2023 16:04:26 -0700 (PDT) X-Google-Smtp-Source: AKy350bDnVyV/m70196tQJuI1V7XfhvXF8Fll3S3zqIVUSJiZae6x1+jloNPwjetxs99W3NFNAQ4 X-Received: by 2002:a17:902:6944:b0:19e:e001:6a75 with SMTP id k4-20020a170902694400b0019ee0016a75mr4522190plt.6.1681513466473; Fri, 14 Apr 2023 16:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681513466; cv=none; d=google.com; s=arc-20160816; b=VN5iY8qsTM/SaFJoYqTwgtnOFisv7JdPCAfp19kKmG6Tzi0eQecuS3lzbLEurTK96i w2fLeuOSo6mGKNp/S9AziEuvuLkZcrRm0I7mqwpZGStdhFX1ydDK79NdgJUdz1rPmEy6 hU3BEwB6zLiLAKdwwitppdJowgPe3CM0bie4GK9yqkgI4RIhy3SkhCjnbngoOX2UH/yX qb7vrOqs4NkLRtrvFXSN7QvGkZ9x9kdrVvFOROlK4TzQUOT96ucCZGyeFCSDLhy1pRoW OC8JVG4DeY6FfXuJKeyST0TbjP2eGnlId0VGcv0RNubbqmFup2cewiMq5v0HX9IixSx5 5Tyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=vjiJXVj4aDiZ7MiKovIv9zROQd8HglJQztfmvE0wUaY=; b=mB2pbcEzmRxvd9wFTebsnKQc489pAqfiDEE30wq9FcCshyOARfZ/ryNz51AIsqKtbm fy6NsTZ8ZtIi1ZHQQWjdc3z8OzPi618FLbtotAaxF7COXwH21ZlcG5mqKe9eS6WiV1xu D7/EbRqpg133Wmm4THRnD7NImd2rPn3BXybLvtaAxiAYDluU+VVoeBKegm8lZ2b2hNi8 kb40nli0FKKaFg2wiX+Fqo+Ot6p6XaQMwXjf0mjKW9NQglQvKNJJWGjgd22F4DungeSJ L61G8SZ74HrV6WnyxLX9lJNkPo2npSw+7wUsdPUQnRDGvXWpjQhMinuqxvHVPbKzqTBO 4FSw== 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 q7-20020a17090311c700b001a500cb53bbsi6156379plh.426.2023.04.14.16.04.15; Fri, 14 Apr 2023 16:04:26 -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; 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 S229764AbjDNXCx (ORCPT + 99 others); Fri, 14 Apr 2023 19:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjDNXCv (ORCPT ); Fri, 14 Apr 2023 19:02:51 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2DB440E1; Fri, 14 Apr 2023 16:02:50 -0700 (PDT) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 5F82420069; Sat, 15 Apr 2023 01:02:48 +0200 (CEST) Date: Sat, 15 Apr 2023 01:02:47 +0200 From: Marijn Suijten To: Kuogee Hsieh Cc: robdclark@gmail.com, sean@poorly.run, swboyd@chromium.org, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@gmail.com, agross@kernel.org, dmitry.baryshkov@linaro.org, andersson@kernel.org, quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] drm/msm/dpu: always program DSC active bits Message-ID: References: <1681490777-15351-1-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1681490777-15351-1-git-send-email-quic_khsieh@quicinc.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 2023-04-14 09:46:17, Kuogee Hsieh wrote: > In current code, the dsc active bits are set only if the cfg->dsc is set. This is the old sentence from v1 again, did you accidentally send the wrong patch as the improvements from v2 are missing? > However, for displays which are hot-pluggable, there can be a use-case > of disconnecting a DSC supported sink and connecting a non-DSC sink. > > For those cases we need to clear DSC active bits during teardown. At least teardown is one word again, v2 had "tear down" which is wrong. > As discuss at [1], clear DSC active bit will handled at reset_intf_cfg() discussed* as pointed out by Dmitry, and make it clear that this is about clearing CTL_DSC_ACTIVE (and CTL_DSC_FLUSH?) specifically. Once that is moved to reset_intf_cfg(), this patch should be reverted as there is no need to write the registers once again when cfg->dsc equals 0. - Marijn > Signed-off-by: Kuogee Hsieh > Fixes: 77f6da90487c ("drm/msm/disp/dpu1: Add DSC support in hw_ctl") > Reviewed-by: Abhinav Kumar > Reviewed-by: Marijn Suijten > > [1] https://lore.kernel.org/linux-arm-msm/ec045d6b-4ffd-0f8c-4011-8db45edc6978@quicinc.com/ > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > index bbdc95c..88e4efe 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > @@ -541,10 +541,9 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx, > if (cfg->merge_3d) > DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, > BIT(cfg->merge_3d - MERGE_3D_0)); > - if (cfg->dsc) { > - DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, DSC_IDX); > - DPU_REG_WRITE(c, CTL_DSC_ACTIVE, cfg->dsc); > - } > + > + DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, DSC_IDX); > + DPU_REG_WRITE(c, CTL_DSC_ACTIVE, cfg->dsc); > } > > static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx, > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >