Message ID | 20231208050641.32582-6-quic_abhinavk@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5249221vqy; Thu, 7 Dec 2023 21:07:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHj3OmTmU8+CSofX70B96t0d4iaKp+sA5vYQE5xnWbQ+fLQX9Xdbcu7alY+u+dcd2JCnOOT X-Received: by 2002:a05:6358:50c6:b0:170:17eb:3785 with SMTP id m6-20020a05635850c600b0017017eb3785mr4080817rwm.45.1702012064321; Thu, 07 Dec 2023 21:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702012064; cv=none; d=google.com; s=arc-20160816; b=sagDIIxSiIcPK3YSubcWaPoMR2RYNGknrdZs2HGpNjfYAmzJH+/KADwxwqqPydj6jG 7YCnNYlLLFaPnxOCMjaauflOHyzeSb66V6tIf8LlX0UQWrewZ+67yek3nQU4b0LqOfn2 4Cm9MfZGc9tmWHvTN+Iov/Se5UjEW6dxow7Lw+nZ8k0pPwiD+GJnkX/Q5RtSb30BsLDn q57+hnaZ9KiVXE1ML30jpIlxiY3cXE+//Ph32hD0SYwqUBTmfF0F7TnLsuGo281Ev5ah Yx7MawpijTg3Iyam9JyZG3pkex8OXKYGFn5rxe4Lx84nxvXGZSIFPbSy3jQE+CbcIR8a 6WJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qufTH3tvzRf/H9h1z2QwfvJTD84GSipvatU1W8BM0J8=; fh=bCPr6FtHW7vqpnFZy/5ChZdmzRzyfr1lCT+1Yh+hWj4=; b=hb+ip3h7y/dnck9CUwtbWPznLw8ZWJ/vQhfJf/aL/ondEiwX392ovMC25H9HhEaO6Q prjSNjCg06WFjvpKg94V2ZEHVxNtHhgDNypwvD6a2do1jvMAITrG0NM6V6DwiC/HwJGO pYajvXf0zT3mhrc5ZsEGp8ySYBsubVkab9ePnmgfC8dRPUz6TzI78kxQJx9+abPRBN/O AEq6DkK8xgXCzHB+PrWNJHqqoZfOJPQ2jiu5/qvopOY3rIcblmX+epwl+uOrqeeElucd L54f18Wp+RWRqqwmMHHrMmYq/UryONdMWmB3Si6NyILGkhZPBVsVUXBL0r0w0oyZ1A5b B1nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=KxNqKvFR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z11-20020aa7888b000000b006ceb1a0fa60si924207pfe.8.2023.12.07.21.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 21:07:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=KxNqKvFR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2DBAD823D9E5; Thu, 7 Dec 2023 21:07:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235732AbjLHFHR (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 8 Dec 2023 00:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbjLHFHI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 8 Dec 2023 00:07:08 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D95510F8; Thu, 7 Dec 2023 21:07:14 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B84hBbE011864; Fri, 8 Dec 2023 05:07:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=qufTH3tvzRf/H9h1z2QwfvJTD84GSipvatU1W8BM0J8=; b=KxNqKvFRbxHB10JkoAR5zPtZGoE6pdwR/9RjMAeKYGM1+Tf0/Qik9j8wD8kbAH0gzevi ck6AOjWQxWh2JvBnvFlLbIqUGsPKabPXLfwRb6lv1JB2mQU1PR++W1Rvmx7zDElht967 iwfEs6jv13/26p3a7rdy4t1xTifaxyn5a5LZVO6F5auLilPvI2vYFmXB6OKVqr/9ZzuK CLo48XNMX8DLB/jienQMgPuPE+UzkoCj5ENVMb4YYYRZZxtcDFQH9+tGqkEHehgREpvf mYnWbJ7PbLcpj0eecusxQ9QueOrNiM39hCtacgGitFy3RBHkrzl8BSIatFUv6WQ8/EnF hQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uu8p0b0b1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 05:07:08 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B8577Af006838 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 8 Dec 2023 05:07:07 GMT Received: from abhinavk-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 7 Dec 2023 21:07:06 -0800 From: Abhinav Kumar <quic_abhinavk@quicinc.com> To: <freedreno@lists.freedesktop.org>, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Marijn Suijten <marijn.suijten@somainline.org>, David Airlie <airlied@gmail.com>, "Daniel Vetter" <daniel@ffwll.ch> CC: <dri-devel@lists.freedesktop.org>, <quic_jesszhan@quicinc.com>, <quic_parellan@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 05/16] drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog Date: Thu, 7 Dec 2023 21:06:30 -0800 Message-ID: <20231208050641.32582-6-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231208050641.32582-1-quic_abhinavk@quicinc.com> References: <20231208050641.32582-1-quic_abhinavk@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: BDrhApKgYejpcaE-3uzf3JPZODBCc6xT X-Proofpoint-ORIG-GUID: BDrhApKgYejpcaE-3uzf3JPZODBCc6xT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 mlxscore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080038 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 pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 21:07:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784689002456426261 X-GMAIL-MSGID: 1784689002456426261 |
Series |
[v2,01/16] drm/msm/dpu: add formats check for writeback encoder
|
|
Commit Message
Abhinav Kumar
Dec. 8, 2023, 5:06 a.m. UTC
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 <quic_abhinavk@quicinc.com>
---
.../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(+)
Comments
On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > --- > .../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(+) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > --- > .../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. > + *************************************************************/ > +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, > +}; > + > /************************************************************* > * 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 >
On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> >> --- >> .../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 :( >> + >> /************************************************************* >> * 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 >> > >
On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > > > On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > > On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > >> --- > >> .../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? > > >> + > >> /************************************************************* > >> * 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 > >> > > > >
On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: > On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >> >> >> >> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: >>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> >>>> --- >>>> .../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. 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 >>>> >>> >>> > > >
On Mon, 11 Dec 2023 at 23:32, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > > > On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: > > On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >> > >> > >> > >> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > >>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > >>>> --- > >>>> .../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 > >>>> > >>> > >>> > > > > > >
On 12/11/2023 1:42 PM, Dmitry Baryshkov wrote: > On Mon, 11 Dec 2023 at 23:32, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >> >> >> >> On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: >>> On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >>>> >>>> >>>> >>>> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: >>>>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> >>>>>> --- >>>>>> .../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. >> We always list 0x4 more than the last offset. In chipsets sdm845 and msm8998, I only see the last offset of CDM as 0x220 but in sm8250 and sc7280, the last offset is 0x224. Hence the total length is more in sc7280/sm8250 as compared to sdm845/msm8998. I didnt follow that you do not see any registers after 0x204. The CDM_MUX is the last offset which has an offset 0x224 from the base address. So thats the last offset. The newer chipsets have CDM_MUX and the older ones did not. Hence the difference in length. >> 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 >>>>>> >>>>> >>>>> >>> >>> >>> > > >
On Mon, 11 Dec 2023 at 23:48, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > > > On 12/11/2023 1:42 PM, Dmitry Baryshkov wrote: > > On Mon, 11 Dec 2023 at 23:32, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >> > >> > >> > >> On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: > >>> On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >>>> > >>>> > >>>> > >>>> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > >>>>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > >>>>>> --- > >>>>>> .../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. > >> > > We always list 0x4 more than the last offset. Yes, so this makes it correct for several latest DT files, which have qcom,sde-cdm-size = <0x220>. However all the previous DT files (from msm8998 to sm8450) had qcom,sde-cdm-size = <0x224>; > > In chipsets sdm845 and msm8998, I only see the last offset of CDM as > 0x220 but in sm8250 and sc7280, the last offset is 0x224. Hence the > total length is more in sc7280/sm8250 as compared to sdm845/msm8998. > > I didnt follow that you do not see any registers after 0x204. > > The CDM_MUX is the last offset which has an offset 0x224 from the base > address. So thats the last offset. Ack > > The newer chipsets have CDM_MUX and the older ones did not. Hence the > difference in length. > > >> 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 > >>>>>> > >>>>> > >>>>> > >>> > >>> > >>> > > > > > >
Hi Abhinav, On Tue, 12 Dec 2023 at 08:49, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > On Mon, 11 Dec 2023 at 23:48, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > > > > > > > On 12/11/2023 1:42 PM, Dmitry Baryshkov wrote: > > > On Mon, 11 Dec 2023 at 23:32, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > >> > > >> > > >> > > >> On 12/11/2023 1:31 PM, Dmitry Baryshkov wrote: > > >>> On Mon, 11 Dec 2023 at 23:16, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > >>>> > > >>>> > > >>>> > > >>>> On 12/8/2023 3:19 AM, Dmitry Baryshkov wrote: > > >>>>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> 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 <quic_abhinavk@quicinc.com> > > >>>>>> --- > > >>>>>> .../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. > > >> > > > > We always list 0x4 more than the last offset. > > Yes, so this makes it correct for several latest DT files, which have > qcom,sde-cdm-size = <0x220>. > However all the previous DT files (from msm8998 to sm8450) had > qcom,sde-cdm-size = <0x224>; Ok, I think I got it, what you were writing about. And we can ignore the sde-cdm-size from the DT files. > > > > > In chipsets sdm845 and msm8998, I only see the last offset of CDM as > > 0x220 but in sm8250 and sc7280, the last offset is 0x224. Hence the > > total length is more in sc7280/sm8250 as compared to sdm845/msm8998. > > > > I didnt follow that you do not see any registers after 0x204. > > > > The CDM_MUX is the last offset which has an offset 0x224 from the base > > address. So thats the last offset. > > Ack > > > > > The newer chipsets have CDM_MUX and the older ones did not. Hence the > > difference in length. > > > > >> 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
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 + *************************************************************/ +static const struct dpu_cdm_cfg sc7280_cdm = { + .name = "cdm_0", + .id = CDM_0, + .len = 0x228, + .base = 0x79200, +}; + /************************************************************* * 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,