Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4259118rdb; Mon, 11 Dec 2023 13:43:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHe9ZwTCsTPqW0KEUX+9wvbMmjy0WU+rXGqxJKJUKmrYhwMIIm3C427PIHrYtQAIkrB4hv1 X-Received: by 2002:a17:902:cec3:b0:1d0:cbef:2efd with SMTP id d3-20020a170902cec300b001d0cbef2efdmr2694881plg.21.1702330985753; Mon, 11 Dec 2023 13:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702330985; cv=none; d=google.com; s=arc-20160816; b=tMkrJHFYr5qshLkOFj3WQ0oizBC4TctJ208UzFXbMbcnAnHXYsa2J62pxXdHH40GSI TAyx/G1XsYDGiOvGdDjZsf1ET3eJUIhwPJejzrxVNafJ0/GxkVOd79NYG/jC0fpycMca oVvz7mpwPJDuWBLLfZeS0uGuh/PRiNEH1SfGHP4k9XqPQ2Rz+c0wds5s5oc4ukSaWU1j 7eEedQmfEH5GMWXAnD+XZWJQPxaVIrMZ+XEYPN0M3KO2kE3/5ZeuoVQ234iuN7mBFLRU picltven7OkdNqjxVgRgST2ne1pgp328X2HTw5BdWOQOxKyODTmGdAXAzS/l98bJ9Rmi GTTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DLp53bQ81f9gTNP0ce9syP67cX2Q/gFvgHzh0s16PlE=; fh=Yias+B+ublIpfTmCWjyyJOlGiyDsLmv5jAhv3Wd/ZAc=; b=zwTD/LfRQnUVVRXBXHPNitYqFAVwYPXxqDG04VzlZ3Z+DjFEZ2JnbmVmse/wGLrrfp XKAYrIKC91Q/e1MN81Gz6dAOnYZLztmAq5VI5HUJIzDKCdqgYZ2HbBp8Izqn0/YhK6so WWCh1EhDKv3Ru/cYUwAgFSSEaBgs+fjHkxwF1AZuYHBQl3rIMOZxlpB+xPSLUdMPlj2L XNaSZC8631YAVcz+jcBlPrBq2Xpaeqn9f66VoG7WhFwv25C7eKX2c8sZErFuTSqwDpC1 OKWD8bzwXCsQUQ1nTDRAHTpR8I/MBeNBWkEi5xtyHeaX0eE3FnSFQXlFjiVAhuqu8hzs dXjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZDK8IbF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ja13-20020a170902efcd00b001d0545646d0si6580521plb.312.2023.12.11.13.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 13:43:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZDK8IbF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D216F805EB3D; Mon, 11 Dec 2023 13:43:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbjLKVms (ORCPT + 99 others); Mon, 11 Dec 2023 16:42:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjLKVmr (ORCPT ); Mon, 11 Dec 2023 16:42:47 -0500 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DA7BCE for ; Mon, 11 Dec 2023 13:42:53 -0800 (PST) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5c08c47c055so48622597b3.1 for ; Mon, 11 Dec 2023 13:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702330972; x=1702935772; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DLp53bQ81f9gTNP0ce9syP67cX2Q/gFvgHzh0s16PlE=; b=XZDK8IbFtkO4COAD/6F7jLEvKG7N6/uDqVAOFsfLNn386FCfzrmxtLz4nVsFI+FUlv Kc0BlhUNYXJFdm3Tn9SFejCg8TA2zAkuEtLKduVF55X9odRMHjesPEO6bP1zCXztSiHR k9D7tkraO+aqzmRwRXP42Ff0qKoteKiakChM0O53fyKnF7YyI+1N0a0g2a7WVoPVstHd eesFKhPgCYckaQ4/ygJ2O0aHLRJvp6a5TG3KZkpWP4KufW83KO+vUtlXmxFkhZYrPhy+ IKxnnS1dfBucxLqmSzZqchRpyyWIrs+y6Fr4da4XlOwskyWf1pHcFhJZKT/MAK89D9+B kayw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702330972; x=1702935772; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DLp53bQ81f9gTNP0ce9syP67cX2Q/gFvgHzh0s16PlE=; b=pfoSIYY9UMDdCJucBul04fFeN3sMfb33gwjD48D0SvJKdCl0Q8gh5QPgfiim+PTupR kf5xC7pJJQtS/HNQE760dxMWSa1gdWENCMxd5ywGUu4KmSAuZv1U1Evm00zUewL9eMdl 0awQ70ve4KfkXQovjop2IQNo20s7y7nX8sSQUBKMRG1fOTsHHzlHHnkr04wDsOFwVbym W0qwolbZCQ2NC9q3/KCtQtipCtMDg2E2XVBeVD/nKwGoJ4Du+uJKAU+ouWcMHnV3xGby Z8wDTOmVbPp5akvsxSVpo1ky/SiSIu/lINrKyHvWFcs52zRDbFmp0q7oFJDT5mGU1COp sa1g== X-Gm-Message-State: AOJu0YyKb6EKRRRfV1ZFAilKRyUJfHUjjAXNM3x8aklp2Knc5W9muKir pK9s4SQOVL6DzyIO6wL0Eim/BGOJhDRj6LU7tOOgsg== X-Received: by 2002:a81:7b05:0:b0:5d7:1940:53cd with SMTP id w5-20020a817b05000000b005d7194053cdmr4072587ywc.69.1702330972489; Mon, 11 Dec 2023 13:42:52 -0800 (PST) MIME-Version: 1.0 References: <20231208050641.32582-1-quic_abhinavk@quicinc.com> <20231208050641.32582-6-quic_abhinavk@quicinc.com> <4966bfa0-ef50-a02d-a917-86d82429e45e@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Mon, 11 Dec 2023 23:42:41 +0200 Message-ID: Subject: Re: [PATCH v2 05/16] drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog To: Abhinav Kumar Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Clark , quic_parellan@quicinc.com, Daniel Vetter , quic_jesszhan@quicinc.com, Marijn Suijten , David Airlie , Sean Paul Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 13:43:03 -0800 (PST) On Mon, 11 Dec 2023 at 23:32, Abhinav Kumar wrote: > > > > On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: > > On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar wrote: > >> > >> > >> > >> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > >>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar wrote: > >>>> > >>>> Add CDM blocks to the sc7280 dpu_hw_catalog to support > >>>> YUV format output from writeback block. > >>>> > >>>> changes in v2: > >>>> - remove explicit zero assignment for features > >>>> - move sc7280_cdm to dpu_hw_catalog from the sc7280 > >>>> catalog file as its definition can be re-used > >>>> > >>>> Signed-off-by: Abhinav Kumar > >>>> --- > >>>> .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 1 + > >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 10 ++++++++++ > >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 13 +++++++++++++ > >>>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 5 +++++ > >>>> 4 files changed, 29 insertions(+) > >>>> > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h > >>>> index 209675de6742..19c2b7454796 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h > >>>> @@ -248,6 +248,7 @@ const struct dpu_mdss_cfg dpu_sc7280_cfg = { > >>>> .mdss_ver = &sc7280_mdss_ver, > >>>> .caps = &sc7280_dpu_caps, > >>>> .mdp = &sc7280_mdp, > >>>> + .cdm = &sc7280_cdm, > >>>> .ctl_count = ARRAY_SIZE(sc7280_ctl), > >>>> .ctl = sc7280_ctl, > >>>> .sspp_count = ARRAY_SIZE(sc7280_sspp), > >>>> 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 d52aae54bbd5..1be3156cde05 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >>>> @@ -426,6 +426,16 @@ static const struct dpu_dsc_sub_blks dsc_sblk_1 = { > >>>> .ctl = {.name = "ctl", .base = 0xF80, .len = 0x10}, > >>>> }; > >>>> > >>>> +/************************************************************* > >>>> + * CDM sub block config > >>> > >>> Nit: it is not a subblock config. > >>> > >> > >> Ack. > >> > >>>> + *************************************************************/ > >>>> +static const struct dpu_cdm_cfg sc7280_cdm = { > >>> > >>> I know that I have r-b'ed this patch. But then one thing occurred to > >>> me. If this definition is common to all (or almost all) platforms, can > >>> we just call it dpu_cdm or dpu_common_cdm? > >>> > >>>> + .name = "cdm_0", > >>>> + .id = CDM_0, > >>>> + .len = 0x228, > >>>> + .base = 0x79200, > >>>> +}; > >> > >> hmmm .... almost common but not entirely ... msm8998's CDM has a shorter > >> len of 0x224 :( > > > > Then sdm845_cdm? > > > > That also has a shorter cdm length. Could you please clarify. According to the downstream DT files all CDM blocks up to (but not including) sm8550 had length 0x224. SM8550 and SM8650 got qcom,sde-cdm-size = <0x220>. But I don't see any registers after 0x204. > > BTW, sdm845 is not in this series. It will be part of RFT as we discussed. > > >> > >>>> + > >>>> /************************************************************* > >>>> * VBIF sub blocks config > >>>> *************************************************************/ > >>>> 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 e3c0d007481b..ba82ef4560a6 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h > >>>> @@ -682,6 +682,17 @@ struct dpu_vbif_cfg { > >>>> u32 memtype[MAX_XIN_COUNT]; > >>>> }; > >>>> > >>>> +/** > >>>> + * struct dpu_cdm_cfg - information of chroma down blocks > >>>> + * @name string name for debug purposes > >>>> + * @id enum identifying this block > >>>> + * @base register offset of this block > >>>> + * @features bit mask identifying sub-blocks/features > >>>> + */ > >>>> +struct dpu_cdm_cfg { > >>>> + DPU_HW_BLK_INFO; > >>>> +}; > >>>> + > >>>> /** > >>>> * Define CDP use cases > >>>> * @DPU_PERF_CDP_UDAGE_RT: real-time use cases > >>>> @@ -805,6 +816,8 @@ struct dpu_mdss_cfg { > >>>> u32 wb_count; > >>>> const struct dpu_wb_cfg *wb; > >>>> > >>>> + const struct dpu_cdm_cfg *cdm; > >>>> + > >>>> u32 ad_count; > >>>> > >>>> u32 dspp_count; > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > >>>> index a6702b2bfc68..f319c8232ea5 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h > >>>> @@ -185,6 +185,11 @@ enum dpu_dsc { > >>>> DSC_MAX > >>>> }; > >>>> > >>>> +enum dpu_cdm { > >>>> + CDM_0 = 1, > >>>> + CDM_MAX > >>>> +}; > >>>> + > >>>> enum dpu_pingpong { > >>>> PINGPONG_NONE, > >>>> PINGPONG_0, > >>>> -- > >>>> 2.40.1 > >>>> > >>> > >>> > > > > > > -- With best wishes Dmitry