Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3466761rwr; Sun, 7 May 2023 12:25:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HT7DC3e7kpnMgwrmbvsH1QCXFHSP7dRq9sOqk8ofsSNygwP259ST8OqJWpbz548ObRIyM X-Received: by 2002:a17:902:e5d2:b0:1ac:7969:cd67 with SMTP id u18-20020a170902e5d200b001ac7969cd67mr1234615plf.21.1683487522780; Sun, 07 May 2023 12:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683487522; cv=none; d=google.com; s=arc-20160816; b=C35E7PWwRHudnhi0LkKajA3+S31GR9sCtyWqbnKwgguaPlwjl/jIIZICs/5EdiFDJd SeUUY6HsYtsuNXfsWxldk1sb/T229iQAtlpoyoZ6rp+KkBfn0AsriDkucexgGRMedKtn 5RHDH5U4o3lRgtcc1A2UThyLF8c6iaOPbBVb14vc/jul4yeYdcJPi0MvSVXcZYmADn3h tXBklZ1n4I/Ea5JDs3BdcjpENB4OR3+YaRTnrBPGEcUcXpZ59kJOYdCAiUbj/vS8GDI2 lc8fr8bCGFsKvAbANY/KPPQlGui+UT9dEPIy0K98nraenThSHbzY/nqLBsiwpuDJVQCO n4rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ilIaaUgGIe/T7VjBbDBUFv46HH+1cV1VktC13wAxqEM=; b=F7cQHBIkFE6SR07fPbIsLVNIEiDxiQqaNP7bVvAoxDvmgFrbNCSVch+pWD1zRR5Npi 3UAjfjOrUw8Q0OGXUhpi1fjbs9WVaKqKLgDhKhFm7jHTr8rMCR2CZ/vh/fUCQPKoPEw5 qEc512nCwy7MUE487ghzW1Db6moxayxQVXZWRA+kUoifampNlAc8hhxCizpzbXmQC21K 0vup3nubLFv8QhGqUSLOlhh3wR5qWz9QFzSy+Z8UBPOcTahUgjfe+514C00URb6+VOmY p/FySbOkPCONXkRkolVEQml3u7uRAEnVSGyxYwtRR6upvPrL2n/JSCnkFiOmQWKV7iX6 K1SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g8cXPVF3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v22-20020a17090331d600b001ab0993941bsi5957586ple.311.2023.05.07.12.25.06; Sun, 07 May 2023 12:25:22 -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; dkim=pass header.i=@linaro.org header.s=google header.b=g8cXPVF3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbjEGTVl (ORCPT + 99 others); Sun, 7 May 2023 15:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbjEGTVk (ORCPT ); Sun, 7 May 2023 15:21:40 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EFC2421E for ; Sun, 7 May 2023 12:21:38 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f13d8f74abso4240739e87.0 for ; Sun, 07 May 2023 12:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683487297; x=1686079297; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ilIaaUgGIe/T7VjBbDBUFv46HH+1cV1VktC13wAxqEM=; b=g8cXPVF3pEcCTTAy3eb0rCKWBlCxNp6qmWHuZTFdU/+q3z2PgtqroklmpF+v/9JC1Z JUYFHn0L3VebnZ5hp+5P+HPJgZjLE1DgMXAZWR6GPhwHwmzHLTSjkqj8n2A0mKzNLfDL Trv7Ct1xARNspxDPn26WJyA0Au/2nlAxwCEMLnd2TVmdHSI0h3yUhFWxaR3MyZuboTU4 iP+M5baSMnTWBM0aNsrxhfBkC5zKBaSca2ku4hiQlYomsTwGK2Wran66j+CSm5taUeko jn9pVFaLPgtws/qmDswrOXKNo1/+UahwjDMzRGf2oGUsSq32Z1vfUvikHszcp+apqC23 JOhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683487297; x=1686079297; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ilIaaUgGIe/T7VjBbDBUFv46HH+1cV1VktC13wAxqEM=; b=IybZx1GmMgLi3kH3PdVREFgpfQVNe1BvWTZTKXKwDFAj1OyJu3D5hcjrGO9uOYJflm IXAEMYUk/5vRLAzosoeriPhdn/R3Asjw2cXXNlAoMLrq28K4n2Xi9aSwNIALuwRgYuZW fPLCMoXMvWcP4PSU4hsAERi90EE92msNn2HhNppB9H9RYGN5kFTRVbV9izEmeKW79CcG xR6kHn7Hj8pdF5s1BHw1XM52Pz3qvsWn3c1RzZ1zQVReMosDGtzhzsaJGoAPFfMCwzkp MZ5SQZ703/JBjG7rsI0jJejUpwMiykfxH2iQ2oMl/Ug36EzoBdD7ACJgUUNpd5ZD1bQa DElg== X-Gm-Message-State: AC+VfDwNDdaq+I7/aE6elSt8sR0UQOfIATmFb/u53adSB+8Lg3mRZPRf QdkQBqYpMbmPVboKnEQkCTBEtQ== X-Received: by 2002:a19:ae1a:0:b0:4f2:4d0a:7bdf with SMTP id f26-20020a19ae1a000000b004f24d0a7bdfmr469302lfc.52.1683487296869; Sun, 07 May 2023 12:21:36 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id k8-20020ac24568000000b004efeaaabdcdsm1047700lfm.30.2023.05.07.12.21.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 May 2023 12:21:36 -0700 (PDT) Message-ID: Date: Sun, 7 May 2023 22:21:35 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 3/4] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag Content-Language: en-GB To: Marijn Suijten , Jessica Zhang Cc: Rob Clark , Abhinav Kumar , 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 References: <20230405-add-dsc-support-v2-0-1072c70e9786@quicinc.com> <20230405-add-dsc-support-v2-3-1072c70e9786@quicinc.com> From: Dmitry Baryshkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 07/05/2023 19:00, Marijn Suijten wrote: > 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). Yeah, that's why I had the idea of including at least the DPU major in the mask name. It looks like we should enable DPU_DATA_HCTL_EN at least for sm8150/sm8250 (and other DPU 6.x) too. I am not sure if it is present on sdm845. > > [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 >> -- With best wishes Dmitry