Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4079384rwr; Mon, 8 May 2023 02:31:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oarJiBhinQqZ8IMkK7nTmEFvoDBev2UoOhkhuSuL8Shh6ixHVyZh5L6vF1FVjKrjA9VIE X-Received: by 2002:a05:6a21:33a7:b0:ff:b84d:f1be with SMTP id yy39-20020a056a2133a700b000ffb84df1bemr7421075pzb.56.1683538261427; Mon, 08 May 2023 02:31:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683538261; cv=none; d=google.com; s=arc-20160816; b=z8BFMlm+BhnuoQolN2zFKd+/AOPWCaqXEz/ZSY4xIqrHXcUY78Tx7xPeFNFKFUBGB5 Gm5Fcr+kawAXDiZUnCnIfLSGcsM4mavB10mQsSfhXdbKB+ssTfNpD9pKFetUQ2VOKDCl 4SnhfI2ZPvgKj386J1o/x6XBf060jZzM8j1KdOlaA3EWL3C4SuL3/331J0d4dde6pe37 jaFtq+PgKftxwnbh1wDetem5Iw7ohePwkPfrIBZzz/HmRkTg1rT9zsgpQseB7ctPlDvW pPY5u1euzSvT6zjhGmC6R+8ZyxxCeiwPt4jR39hqNQ7gljXc3MBCWOo7XWRwKD+OXTjM I17A== 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=7vOeK6NJXfng1Er3sfGOPlcD75JIf3x+ne87klUAZe8=; b=LczWsK0btAglbeg9CEoK2H3tLtz6IhyLHA8SCFk1ipBu9x2efuOfgF8JQqV6BUweUT EMMTUnZHmCzKT9gn+5M0m9XdNM3emZ5+NPuQvfFfiIdcIgORtrmF6LQ3mNqxf9eX4sGM VuChKlbISZ8FR3zjq8r7DMDLNX4h8KqcvfhFOfOSWPAAkUEUmaoPuNtAQqJiQyfuQDlf DO+86HFO5bOar/Km/eSZjPWbiutBNdfCSBlSgchdBxCJncxwd8sBqlcinusq9w0VmtsC /huNlDRZVsDHVgMlqSCpMktVK9ZgHqqyNVbvh0YBhue5jENGHS4py7nQa/A42PVLAn86 GwRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VjTc2e0t; 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 k189-20020a6384c6000000b0052dcd67347asi4771727pgd.382.2023.05.08.02.30.47; Mon, 08 May 2023 02:31:01 -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=VjTc2e0t; 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 S229567AbjEHIgR (ORCPT + 99 others); Mon, 8 May 2023 04:36:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233117AbjEHIgP (ORCPT ); Mon, 8 May 2023 04:36:15 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BFD35249 for ; Mon, 8 May 2023 01:36:13 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4ec8133c59eso4788294e87.0 for ; Mon, 08 May 2023 01:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683534971; x=1686126971; 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=7vOeK6NJXfng1Er3sfGOPlcD75JIf3x+ne87klUAZe8=; b=VjTc2e0tCdENNTGTlYaTu6SbmL+2zAqbhOvhqn8Ke3GrBw0BulOfpPKx61Gnsq+pau M97jxNpDaGyMW/osQhp3kBshxpA+lq1IZikHIjue/85Ye3S+zucnAIriJRfMjfKv91XR LXpKbcxRWPMkjOWfzBeqUKqb7sO5Tha6rVHExUgAiWXPOrk0KZsN1S5+VrT+AcbkXMhC nPuVH3iUsGdjUPSI/8SaEMgn4GZohy/J/J2mdHV6i/+9haCNoFx6/BYxpxKFTdSW8qXJ J/O3SefH9o5JXrkzC7cwR4tc+su3M2iLQcHon98PVnTrwxciiN7ExjmgJRWaQ83ztIYC sBEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683534971; x=1686126971; 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=7vOeK6NJXfng1Er3sfGOPlcD75JIf3x+ne87klUAZe8=; b=WRxl81P6y9Tiu729EWkw+DZ+XNdlZUfP3FCTdFiXRDeFuZ0P3NJKMxvlXWlPrTF2W5 6ybUE3iV674SKhYpY0QjWhBKP3VYIdOg35VJ7e5JljEZJkKPW+UEn+8sO15sOdzgZYKw itxzItNln8m3emUchhHn2Jh2PCCMPZX85+PYIdw7uyaxiXWBE6pygHOOWJbXWVaYO+O3 BPhjNC67t0ZtxPv5ufu0wYXPHSrC4dHMjHJ3jrR/UpJa8PeLrFtnAuKJZFjh6uzZI6sI lmlDlF7sB4dLVWAB/1B8u4jPzk4YIFgZ/sP4AP41YsIjKnQZY9taRGhfljsT2nh1U65h CCYg== X-Gm-Message-State: AC+VfDypP0tiHIMxeGlwlzxHxzSGlcJbjJGv2MD98O42psFjkmiM712y 7DN2zoH7CUdbEB9HXWcsR2NYPw== X-Received: by 2002:ac2:47e5:0:b0:4ef:ec94:9678 with SMTP id b5-20020ac247e5000000b004efec949678mr2744507lfp.20.1683534971320; Mon, 08 May 2023 01:36:11 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id v9-20020ac25609000000b004efee4ff266sm1230248lfd.67.2023.05.08.01.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 01:36:10 -0700 (PDT) Message-ID: <6b93e2a9-58aa-bb91-f615-3fdec52596da@linaro.org> Date: Mon, 8 May 2023 10:36:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v2 3/4] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag Content-Language: en-US To: Marijn Suijten , Jessica Zhang Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , 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: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 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 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 7.05.2023 18: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). > > [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'll adapt my patches. Jessica, no changes required on your side. > > I still see value in inlining and removing these defines, though that > brings a host of other complexity. right, we should totally do it after we settle down from the patch flurry Konrad > > - 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 >>