Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3339082rwr; Sun, 7 May 2023 09:29:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6aO4M2UA2HSJAZoAikNBh9eYm86KPE00JMj+Z4Ns2CmxaPI7hRxG7j/kvMbZ3gJKZx2cTy X-Received: by 2002:a05:6a20:428f:b0:100:64b0:d10e with SMTP id o15-20020a056a20428f00b0010064b0d10emr1153204pzj.37.1683476975444; Sun, 07 May 2023 09:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683476975; cv=none; d=google.com; s=arc-20160816; b=YA8ac+XY2szTc5Zn4pSmo8b0dJPXzFiY734hg9DhwK11NGuSuAnoJNh+bdGwTmWg8c 6susAKnNfqTCCL00cfY15yGnB3BmRjY2AepuBezSwb6foBRp0MMrdrlplRAz1YD5GHWc Hw823Mr9EEuloagOv6InGAJ/6gRl3smaTJahRvL+iehu7fjDMbOGlTYYa+HTBrUcI1Hy vY3QdFRzkYwRbWmV3LT7WPwmsv5v7BF7j8uK5OF0lc/svZ5dVPgEadr35nA16qP5pMV/ EZRB0tlULmriSAtWInW3VywNE99vb1ilFrGtytFOt5j0NCBjBlciiO+HPgo4B3D1AVE+ Piwg== 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=0OUmiD5js/7wKP8IwNa+uV3lSQOa+NRR+1l0PQjU698=; b=UBzotoQWL9I2cMrp6dxGtvj1GCObYvV7OebMtVWot+BVfVHbJrFlimHBC4O9ezoDuj ML4JmkiIeT/3NUQtfNvfmRS+343M8YAO1G+KdSCzF00whqq6j4dw9bd09djOfGc2UfpH QSkdlQzl4/SvSWZR7ZHIpJDWZgvb58eFcvu/F7vZN9kzKjJc1qYOAWyiGXMCT7wxlD7z qnbs2SfI6MV3ZUjxkWt2TkDwo/kN9/rWqlMhAmRvN5knlj3H6VI5ojj33aih+IdqApwl xK4QJ9EdGJQLjwaXWCRr8+vYZJc9fA00/iZVInQDRGcuoE6Ci1Dwjc9GZAHwU7ePDvhj aSFg== 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 l62-20020a638841000000b005300293ab4asi2006397pgd.842.2023.05.07.09.29.20; Sun, 07 May 2023 09:29:35 -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 S231491AbjEGQAt (ORCPT + 99 others); Sun, 7 May 2023 12:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjEGQAs (ORCPT ); Sun, 7 May 2023 12:00:48 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [5.144.164.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF75132A6 for ; Sun, 7 May 2023 09:00:47 -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 2C4803F1C4; Sun, 7 May 2023 18:00:44 +0200 (CEST) Date: Sun, 7 May 2023 18:00:42 +0200 From: Marijn Suijten To: Jessica Zhang Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Konrad Dybcio , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag Message-ID: References: <20230405-add-dsc-support-v2-0-1072c70e9786@quicinc.com> <20230405-add-dsc-support-v2-3-1072c70e9786@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230405-add-dsc-support-v2-3-1072c70e9786@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=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 On 2023-05-05 14:23:50, Jessica Zhang wrote: > Add DATA_COMPRESS feature flag to DPU INTF block. > > In DPU 7.x and later, DSC/DCE enablement registers have been moved from > PINGPONG to INTF. > > As core_rev (and related macros) was removed from the dpu_kms struct, the > most straightforward way to indicate the presence of this register would be > to have a feature flag. Irrelevant. Even though core_rev was still in mainline until recently, we always hardcoded the features in the catalog and only used core_rev to select a dpu_mdss_cfg catalog entry. There is no "if version >= X then enable feature Y" logic, this manually-enabled feature flag is the only, correct way to do it. > Changes in v2: > - Changed has_data_compress dpu_cap to a DATA_COMPRESS INTF feature flag > > Signed-off-by: Jessica Zhang Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > 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 7944481d0a33..c74051906d05 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > @@ -104,7 +104,7 @@ > #define INTF_SC7180_MASK \ > (BIT(DPU_INTF_INPUT_CTRL) | BIT(DPU_INTF_TE) | BIT(DPU_INTF_STATUS_SUPPORTED)) > > -#define INTF_SC7280_MASK INTF_SC7180_MASK | BIT(DPU_DATA_HCTL_EN) > +#define INTF_SC7280_MASK INTF_SC7180_MASK | BIT(DPU_DATA_HCTL_EN) | BIT(DPU_INTF_DATA_COMPRESS) Konrad: Your SM6350/SM6375 series v3 [1] switched from INTF_SC7180_MASK to INTF_SC7280_MASK to enable HCTL on SM6375, but that will now erroneously also receive this feature flag and write the new DATA_COMPESS mask even if it's DPU 6.9 (< 7.x where it got added). [1]: https://lore.kernel.org/linux-arm-msm/80b46fcb-d6d0-1998-c273-5401fa924c7d@linaro.org/T/#u Depending on who lands first, this flag should be split. I still see value in inlining and removing these defines, though that brings a host of other complexity. - Marijn > #define WB_SM8250_MASK (BIT(DPU_WB_LINE_MODE) | \ > BIT(DPU_WB_UBWC) | \ > 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 4eda2cc847ef..01c65f940f2a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > @@ -185,6 +185,7 @@ enum { > * @DPU_DATA_HCTL_EN Allows data to be transferred at different rate > * than video timing > * @DPU_INTF_STATUS_SUPPORTED INTF block has INTF_STATUS register > + * @DPU_INTF_DATA_COMPRESS INTF block has DATA_COMPRESS register > * @DPU_INTF_MAX > */ > enum { > @@ -192,6 +193,7 @@ enum { > DPU_INTF_TE, > DPU_DATA_HCTL_EN, > DPU_INTF_STATUS_SUPPORTED, > + DPU_INTF_DATA_COMPRESS, > DPU_INTF_MAX > }; > > > -- > 2.40.1 >