Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp111882rwl; Tue, 11 Apr 2023 15:19:37 -0700 (PDT) X-Google-Smtp-Source: AKy350bmJf93ZGG4db+nL44b/iUwuUiBn9dScYzJVmORyF7Q9uKkEi+QfmEVN2dfPgfaF8LsGl35 X-Received: by 2002:a17:906:a2c3:b0:92f:b290:78c with SMTP id by3-20020a170906a2c300b0092fb290078cmr11166871ejb.21.1681251576765; Tue, 11 Apr 2023 15:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681251576; cv=none; d=google.com; s=arc-20160816; b=hjhrvc+L3SN0cqQx3t2UhXki52PsZQ7GZQpjFGlw9TSd8My4q5DsYsyJuzWMBqq2dp Jddqa2zsiaYeJuahwswSMpvnieIR4hzFoNv5f41BkZLb8YosO3Nb9ywSIGUUAgvnrG8A Fe4+vP4xVkFnCk5Y4Tb+ruGQUS6oCGzn5NTQnBqfU6TazdAI5BBTgv6C0uG8PDLJedDd M5wpB2xRZd7MJJb71tmo1Pd2QHyioOVsJrXKttSc7hb/PNBW80V7Ic/EwXGYburjCZcF 4OKWYzgvx2Xg2kTKWVX0Gq+HHEOYprUiu7yYpHih86ZBDaY8H2nbwhOXgKtZCyJr/AuT jn3w== 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=anjgC9bpC9QkTlPJqhsqwitlxQ/Yov2A0LrW5izHwtM=; b=Ywll/XocN9BTdXEA5wSqKAwGnF5fCMknfCm5B4b/WIWaviX0YyniXugmNvVRd0IJMX rdJEEZJL3bIAX7ivwSX2JsvJierY+a235MnVNEMnFXwSr4AXWk4INCxOEWLaPO2aKoAI sFpPEpy0CdSgfSUZaJ98relGBrQWjmMLSc8xnRwGsmPYQITqhFXNHyzt2oZiC0LRJaCB DXVz0a7Qv945DWT61XqCFCblv0c1cNEx+IoxYZc/2jHummroymeJSOj4C+7cG6AlXAmn aldMS0eKFkXRMBur2lz/Q0bxcn7ZlSn1v4fGHa49F5lXSEQCHrq2KtjZlY4FQk/TXhdH wOsA== 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 gx4-20020a1709068a4400b0094a54025296si1728504ejc.896.2023.04.11.15.18.48; Tue, 11 Apr 2023 15:19:36 -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 S229551AbjDKWOP (ORCPT + 99 others); Tue, 11 Apr 2023 18:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjDKWON (ORCPT ); Tue, 11 Apr 2023 18:14:13 -0400 Received: from m-r2.th.seeweb.it (m-r2.th.seeweb.it [IPv6:2001:4b7a:2000:18::171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 901C02D66 for ; Tue, 11 Apr 2023 15:14:11 -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-r2.th.seeweb.it (Postfix) with ESMTPSA id 8ECB13FF95; Wed, 12 Apr 2023 00:14:07 +0200 (CEST) Date: Wed, 12 Apr 2023 00:14:05 +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] drm/msm/dpu: always program dsc active bits Message-ID: References: <1681247095-1201-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: <1681247095-1201-1-git-send-email-quic_khsieh@quicinc.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Full-caps DSC in the title, as discussed previously. On that note, don't forget to CC those who have reviewed your patches previously, as also brought up in earlier review. On 2023-04-11 14:04:55, Kuogee Hsieh wrote: > In current code, the dsc active bits are set only if the cfg->dsc is set. Some typo nits: DSC* active bits. s/are set/are written/ (the variable is set, registers are written). Drop `the` before `cfg->dsc` (and you could replace `s/is set/is non-zero/). > 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. > > Fixes: ede3c6bb00c ("drm/msm/disp/dpu1: Add DSC support in hw_ctl") > Signed-off-by: Kuogee Hsieh If you have validated that it is fine to write these registers on _every_ platform supported by DPU1, and after fixing the above nits and the Fixes: commit hash as pointed out by Abhinav: Reviewed-by: Marijn Suijten And see one question below. > --- > 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); Does this flush all DSCs programmed in CTL_DSC_FLUSH as set above? That is currently still in `if (cfg->dsc)` and never overwritten if all DSCs are disabled, should it be taken out of the `if` to make sure no DSCs are inadvertently flushed, or otherwise cache the "previous mask" to make sure we flush exactly the right DSC blocks? Thanks! - Marijn > + 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 >