Message ID | 20231208050641.32582-16-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 r17csp5249880vqy; Thu, 7 Dec 2023 21:09:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHg3xrDQHjxrJCmCPmZKatcFCzL2OLklSffONys9ot3DneY8xp0IBk5HpUwAMq7OL1pexNl X-Received: by 2002:a17:902:f693:b0:1d0:a357:7224 with SMTP id l19-20020a170902f69300b001d0a3577224mr3058034plg.132.1702012176405; Thu, 07 Dec 2023 21:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702012176; cv=none; d=google.com; s=arc-20160816; b=RagU1F9DbAddq73wF2hLIHXZ6/XZOB8OMwogUIwKFRbIio+UBUMkHwOqEDA334ei1b hsinuDsK4DUQZmMH2+LRHoiUSd6R/dsIKnJ4QTgDqDxx2WRho7wlQ6lI5vNLrJ+C7QcK +M06puTlRe9KDk0V+6Whz5LIZlphB92pNHJyujdtXHqSzKxk2Zd2cQ+OEXck35jQm+YE giW5oK6rDkS8ek9TuNZc7gd4dTgVr1BDx7H8zdL6ruS+hbbDHsONIntWg/kNkYTPxzIT DHjbCrdFdJ4JJ//YI1yWNz59X7NWGBdfO6L9L87CqtGDdlTV2DZSsIyKu0YJnY20HPnF ZlhQ== 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=aUeRu0dXdCgFI4/z42XQa8Jx1MuYsQAmnLvIYCdgrO4=; fh=bCPr6FtHW7vqpnFZy/5ChZdmzRzyfr1lCT+1Yh+hWj4=; b=INd3nFPH+ebymHd2O1cONtA0wlhpW0gqJFuoGTn+vH4HhQcH/8RGzTRBxlgWQoIv21 gvl6Dvmum+guIUQCEcbUx46uFI9CDdI9+gSdz6uN0wzDlcL4oU18p+7S4xaAufCjYyYJ G7xeKFM7EZTOIWKy0V60DHjX2bDQUEy8XccwSpA6XhsRH4uKnTSCsqcla0aQhDyRDLJZ u90FLoJ9Z2ubPjOkvXbUs3F9GVdvY4yZ4kGVZzSO2Eddmdd/tjfp9hEAfXBe6yYu13M9 UXyKCOopKm+MCjyGV2bi1nQIlL9+qxPt70LPGGJEIw/jCrgvWldjMc63bYOeL8eSyhp/ 66pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="kkXu2/t8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u5-20020a170903124500b001d0a0ee28e3si953173plh.367.2023.12.07.21.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 21:09:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="kkXu2/t8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 9FF8C81067AC; Thu, 7 Dec 2023 21:09:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235840AbjLHFIp (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 8 Dec 2023 00:08:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235826AbjLHFII (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 8 Dec 2023 00:08:08 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98A891738; Thu, 7 Dec 2023 21:07:35 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B850C9N016457; Fri, 8 Dec 2023 05:07:27 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=aUeRu0dXdCgFI4/z42XQa8Jx1MuYsQAmnLvIYCdgrO4=; b=kkXu2/t8CwnXW0wStKru6iu4Gj44ypPjmExq8J16cf9qwOqymx8AYvesCMH0YBBhyM1O DxkX2iCzlKpy4i8uADsBtzGNY1rFcSDsiDr5H/CYNmXMo9LB+uDH1yrzNAHGp9BCL8rU pLYlsM06InYXYYYWANJdCTif5I/8yds1ZJYlqs1xBSbHeVS4u5al+kJV2ISZWzI2emSS bHtq1qbBeWrZUTWWxWuKKMZAdBGBN6ToM+gdhN1Di8qZEWEh94sE5+LnHttcmRBx+rip YXm2cHI2w/5Fd3CNrLwhSx8C2HzbpoKXAiIZBGIRD1EeXvhB9HbN52plAeTOhOQHEtnZ ZA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uuuu4r2u0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 05:07:27 +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 3B857Qg8007456 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 8 Dec 2023 05:07:26 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:26 -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 15/16] drm/msm/dpu: introduce separate wb2_format arrays for rgb and yuv Date: Thu, 7 Dec 2023 21:06:40 -0800 Message-ID: <20231208050641.32582-16-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: PCtkxtSde2KgnKPGCBpckJRGdq0FKnZO X-Proofpoint-ORIG-GUID: PCtkxtSde2KgnKPGCBpckJRGdq0FKnZO 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 clxscore=1015 priorityscore=1501 bulkscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=803 adultscore=0 malwarescore=0 impostorscore=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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 07 Dec 2023 21:09:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784689120106180426 X-GMAIL-MSGID: 1784689120106180426 |
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
Lets rename the existing wb2_formats array wb2_formats_rgb to indicate
that it has only RGB formats and can be used on any chipset having a WB
block.
Introduce a new wb2_formats_rgb_yuv array to the catalog to
indicate support for YUV formats to writeback in addition to RGB.
Chipsets which have support for CDM block will use the newly added
wb2_formats_rgb_yuv array.
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
.../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +-
.../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +-
.../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +-
.../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +-
.../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +-
.../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++-
6 files changed, 46 insertions(+), 11 deletions(-)
Comments
On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > Lets rename the existing wb2_formats array wb2_formats_rgb to indicate > that it has only RGB formats and can be used on any chipset having a WB > block. > > Introduce a new wb2_formats_rgb_yuv array to the catalog to > indicate support for YUV formats to writeback in addition to RGB. > > Chipsets which have support for CDM block will use the newly added > wb2_formats_rgb_yuv array. This means that the catalog can go out of sync, if one adds a CDM block but doesn't update wb_formats and vice versa. Can we deduce the format list from the WB code? Is the format list really static or does it change between platforms (please keep msm8996 / msm8998 in mind). > > Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > --- > .../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- > .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- > .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- > .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- > .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- > .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++- > 6 files changed, 46 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > index 04d2a73dd942..eb5dfff2ec4f 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { > .name = "wb_2", .id = WB_2, > .base = 0x65000, .len = 0x2c8, > .features = WB_SM8250_MASK, > - .format_list = wb2_formats, > - .num_formats = ARRAY_SIZE(wb2_formats), > + .format_list = wb2_formats_rgb, > + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > .xin_id = 6, > .vbif_idx = VBIF_RT, > .maxlinewidth = 4096, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > index 58b0f50518c8..a57d50b1f028 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { > .name = "wb_2", .id = WB_2, > .base = 0x65000, .len = 0x2c8, > .features = WB_SM8250_MASK, > - .format_list = wb2_formats, > - .num_formats = ARRAY_SIZE(wb2_formats), > + .format_list = wb2_formats_rgb_yuv, > + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > .clk_ctrl = DPU_CLK_CTRL_WB2, > .xin_id = 6, > .vbif_idx = VBIF_RT, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > index bcfedfc8251a..7382ebb6e5b2 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { > .name = "wb_2", .id = WB_2, > .base = 0x65000, .len = 0x2c8, > .features = WB_SM8250_MASK, > - .format_list = wb2_formats, > - .num_formats = ARRAY_SIZE(wb2_formats), > + .format_list = wb2_formats_rgb, > + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > .clk_ctrl = DPU_CLK_CTRL_WB2, > .xin_id = 6, > .vbif_idx = VBIF_RT, > 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 19c2b7454796..2f153e0b5c6a 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 > @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { > .name = "wb_2", .id = WB_2, > .base = 0x65000, .len = 0x2c8, > .features = WB_SM8250_MASK, > - .format_list = wb2_formats, > - .num_formats = ARRAY_SIZE(wb2_formats), > + .format_list = wb2_formats_rgb_yuv, > + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > .clk_ctrl = DPU_CLK_CTRL_WB2, > .xin_id = 6, > .vbif_idx = VBIF_RT, > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > index bf56265967c0..ad48defa154f 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { > .name = "wb_2", .id = WB_2, > .base = 0x65000, .len = 0x2c8, > .features = WB_SM8250_MASK, > - .format_list = wb2_formats, > - .num_formats = ARRAY_SIZE(wb2_formats), > + .format_list = wb2_formats_rgb, > + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > .xin_id = 6, > .vbif_idx = VBIF_RT, > .maxlinewidth = 4096, > 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 1be3156cde05..c52cac7a2288 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { > /* TODO add formats after validation */ > }; > > -static const uint32_t wb2_formats[] = { > +static const uint32_t wb2_formats_rgb[] = { > DRM_FORMAT_RGB565, > DRM_FORMAT_BGR565, > DRM_FORMAT_RGB888, > @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { > DRM_FORMAT_XBGR4444, > }; > > +static const uint32_t wb2_formats_rgb_yuv[] = { > + DRM_FORMAT_RGB565, > + DRM_FORMAT_BGR565, > + DRM_FORMAT_RGB888, > + DRM_FORMAT_ARGB8888, > + DRM_FORMAT_RGBA8888, > + DRM_FORMAT_ABGR8888, > + DRM_FORMAT_XRGB8888, > + DRM_FORMAT_RGBX8888, > + DRM_FORMAT_XBGR8888, > + DRM_FORMAT_ARGB1555, > + DRM_FORMAT_RGBA5551, > + DRM_FORMAT_XRGB1555, > + DRM_FORMAT_RGBX5551, > + DRM_FORMAT_ARGB4444, > + DRM_FORMAT_RGBA4444, > + DRM_FORMAT_RGBX4444, > + DRM_FORMAT_XRGB4444, > + DRM_FORMAT_BGR565, > + DRM_FORMAT_BGR888, > + DRM_FORMAT_ABGR8888, > + DRM_FORMAT_BGRA8888, > + DRM_FORMAT_BGRX8888, > + DRM_FORMAT_XBGR8888, > + DRM_FORMAT_ABGR1555, > + DRM_FORMAT_BGRA5551, > + DRM_FORMAT_XBGR1555, > + DRM_FORMAT_BGRX5551, > + DRM_FORMAT_ABGR4444, > + DRM_FORMAT_BGRA4444, > + DRM_FORMAT_BGRX4444, > + DRM_FORMAT_XBGR4444, > + DRM_FORMAT_NV12, > +}; > + > /************************************************************* > * SSPP sub blocks config > *************************************************************/ > -- > 2.40.1 >
On 12/8/2023 3:44 AM, Dmitry Baryshkov wrote: > On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >> >> Lets rename the existing wb2_formats array wb2_formats_rgb to indicate >> that it has only RGB formats and can be used on any chipset having a WB >> block. >> >> Introduce a new wb2_formats_rgb_yuv array to the catalog to >> indicate support for YUV formats to writeback in addition to RGB. >> >> Chipsets which have support for CDM block will use the newly added >> wb2_formats_rgb_yuv array. > > This means that the catalog can go out of sync, if one adds a CDM > block but doesn't update wb_formats and vice versa. > Can we deduce the format list from the WB code? Is the format list > really static or does it change between platforms (please keep msm8996 > / msm8998 in mind). > Yes this is a valid concern. catalog could potentially go out of sync. I checked a few chipsets now and the WB formats didnt change among them. I do need to check more chipsets but downstream does not maintain this in devicetree which means we can just move these arrays to WB code instead of maintaining them in the catalog. We will still need to maintain two arrays. One to be used if CDM block has been added and the other if not. I must confess one point though. I have not seen any chipset yet where WB block is present but CDM block is not. So at this point, the only purpose of the two arrays will be till the point where CDM blk has been added to all the required chipsets in the catalog. Then we can drop the RGB only array and maintain the one which has all formats. >> >> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> >> --- >> .../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- >> .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- >> .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- >> .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- >> .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- >> .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++- >> 6 files changed, 46 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >> index 04d2a73dd942..eb5dfff2ec4f 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >> @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { >> .name = "wb_2", .id = WB_2, >> .base = 0x65000, .len = 0x2c8, >> .features = WB_SM8250_MASK, >> - .format_list = wb2_formats, >> - .num_formats = ARRAY_SIZE(wb2_formats), >> + .format_list = wb2_formats_rgb, >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >> .xin_id = 6, >> .vbif_idx = VBIF_RT, >> .maxlinewidth = 4096, >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >> index 58b0f50518c8..a57d50b1f028 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >> @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { >> .name = "wb_2", .id = WB_2, >> .base = 0x65000, .len = 0x2c8, >> .features = WB_SM8250_MASK, >> - .format_list = wb2_formats, >> - .num_formats = ARRAY_SIZE(wb2_formats), >> + .format_list = wb2_formats_rgb_yuv, >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), >> .clk_ctrl = DPU_CLK_CTRL_WB2, >> .xin_id = 6, >> .vbif_idx = VBIF_RT, >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >> index bcfedfc8251a..7382ebb6e5b2 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >> @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { >> .name = "wb_2", .id = WB_2, >> .base = 0x65000, .len = 0x2c8, >> .features = WB_SM8250_MASK, >> - .format_list = wb2_formats, >> - .num_formats = ARRAY_SIZE(wb2_formats), >> + .format_list = wb2_formats_rgb, >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >> .clk_ctrl = DPU_CLK_CTRL_WB2, >> .xin_id = 6, >> .vbif_idx = VBIF_RT, >> 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 19c2b7454796..2f153e0b5c6a 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 >> @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { >> .name = "wb_2", .id = WB_2, >> .base = 0x65000, .len = 0x2c8, >> .features = WB_SM8250_MASK, >> - .format_list = wb2_formats, >> - .num_formats = ARRAY_SIZE(wb2_formats), >> + .format_list = wb2_formats_rgb_yuv, >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), >> .clk_ctrl = DPU_CLK_CTRL_WB2, >> .xin_id = 6, >> .vbif_idx = VBIF_RT, >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >> index bf56265967c0..ad48defa154f 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >> @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { >> .name = "wb_2", .id = WB_2, >> .base = 0x65000, .len = 0x2c8, >> .features = WB_SM8250_MASK, >> - .format_list = wb2_formats, >> - .num_formats = ARRAY_SIZE(wb2_formats), >> + .format_list = wb2_formats_rgb, >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >> .xin_id = 6, >> .vbif_idx = VBIF_RT, >> .maxlinewidth = 4096, >> 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 1be3156cde05..c52cac7a2288 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >> @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { >> /* TODO add formats after validation */ >> }; >> >> -static const uint32_t wb2_formats[] = { >> +static const uint32_t wb2_formats_rgb[] = { >> DRM_FORMAT_RGB565, >> DRM_FORMAT_BGR565, >> DRM_FORMAT_RGB888, >> @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { >> DRM_FORMAT_XBGR4444, >> }; >> >> +static const uint32_t wb2_formats_rgb_yuv[] = { >> + DRM_FORMAT_RGB565, >> + DRM_FORMAT_BGR565, >> + DRM_FORMAT_RGB888, >> + DRM_FORMAT_ARGB8888, >> + DRM_FORMAT_RGBA8888, >> + DRM_FORMAT_ABGR8888, >> + DRM_FORMAT_XRGB8888, >> + DRM_FORMAT_RGBX8888, >> + DRM_FORMAT_XBGR8888, >> + DRM_FORMAT_ARGB1555, >> + DRM_FORMAT_RGBA5551, >> + DRM_FORMAT_XRGB1555, >> + DRM_FORMAT_RGBX5551, >> + DRM_FORMAT_ARGB4444, >> + DRM_FORMAT_RGBA4444, >> + DRM_FORMAT_RGBX4444, >> + DRM_FORMAT_XRGB4444, >> + DRM_FORMAT_BGR565, >> + DRM_FORMAT_BGR888, >> + DRM_FORMAT_ABGR8888, >> + DRM_FORMAT_BGRA8888, >> + DRM_FORMAT_BGRX8888, >> + DRM_FORMAT_XBGR8888, >> + DRM_FORMAT_ABGR1555, >> + DRM_FORMAT_BGRA5551, >> + DRM_FORMAT_XBGR1555, >> + DRM_FORMAT_BGRX5551, >> + DRM_FORMAT_ABGR4444, >> + DRM_FORMAT_BGRA4444, >> + DRM_FORMAT_BGRX4444, >> + DRM_FORMAT_XBGR4444, >> + DRM_FORMAT_NV12, >> +}; >> + >> /************************************************************* >> * SSPP sub blocks config >> *************************************************************/ >> -- >> 2.40.1 >> > >
On Fri, 8 Dec 2023 at 19:53, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > On 12/8/2023 3:44 AM, Dmitry Baryshkov wrote: > > On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >> > >> Lets rename the existing wb2_formats array wb2_formats_rgb to indicate > >> that it has only RGB formats and can be used on any chipset having a WB > >> block. > >> > >> Introduce a new wb2_formats_rgb_yuv array to the catalog to > >> indicate support for YUV formats to writeback in addition to RGB. > >> > >> Chipsets which have support for CDM block will use the newly added > >> wb2_formats_rgb_yuv array. > > > > This means that the catalog can go out of sync, if one adds a CDM > > block but doesn't update wb_formats and vice versa. > > Can we deduce the format list from the WB code? Is the format list > > really static or does it change between platforms (please keep msm8996 > > / msm8998 in mind). > > > > Yes this is a valid concern. catalog could potentially go out of sync. > > I checked a few chipsets now and the WB formats didnt change among them. > > I do need to check more chipsets but downstream does not maintain this > in devicetree which means we can just move these arrays to WB code > instead of maintaining them in the catalog. I think we should be comparing to some of the oldest generations, like msm8998/sdm660 or ideally even msm8996/37/17/53. > We will still need to maintain two arrays. One to be used if CDM block > has been added and the other if not. Yes. > I must confess one point though. I have not seen any chipset yet where > WB block is present but CDM block is not. I think this was the case for some of mdp5 1.x chips, but according to my data this is correct for all the platforms that we want to support. > So at this point, the only purpose of the two arrays will be till the > point where CDM blk has been added to all the required chipsets in the > catalog. Then we can drop the RGB only array and maintain the one which > has all formats. > > >> > >> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > >> --- > >> .../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- > >> .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- > >> .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- > >> .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- > >> .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- > >> .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++- > >> 6 files changed, 46 insertions(+), 11 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >> index 04d2a73dd942..eb5dfff2ec4f 100644 > >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >> @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { > >> .name = "wb_2", .id = WB_2, > >> .base = 0x65000, .len = 0x2c8, > >> .features = WB_SM8250_MASK, > >> - .format_list = wb2_formats, > >> - .num_formats = ARRAY_SIZE(wb2_formats), > >> + .format_list = wb2_formats_rgb, > >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >> .xin_id = 6, > >> .vbif_idx = VBIF_RT, > >> .maxlinewidth = 4096, > >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >> index 58b0f50518c8..a57d50b1f028 100644 > >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >> @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { > >> .name = "wb_2", .id = WB_2, > >> .base = 0x65000, .len = 0x2c8, > >> .features = WB_SM8250_MASK, > >> - .format_list = wb2_formats, > >> - .num_formats = ARRAY_SIZE(wb2_formats), > >> + .format_list = wb2_formats_rgb_yuv, > >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > >> .clk_ctrl = DPU_CLK_CTRL_WB2, > >> .xin_id = 6, > >> .vbif_idx = VBIF_RT, > >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >> index bcfedfc8251a..7382ebb6e5b2 100644 > >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >> @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { > >> .name = "wb_2", .id = WB_2, > >> .base = 0x65000, .len = 0x2c8, > >> .features = WB_SM8250_MASK, > >> - .format_list = wb2_formats, > >> - .num_formats = ARRAY_SIZE(wb2_formats), > >> + .format_list = wb2_formats_rgb, > >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >> .clk_ctrl = DPU_CLK_CTRL_WB2, > >> .xin_id = 6, > >> .vbif_idx = VBIF_RT, > >> 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 19c2b7454796..2f153e0b5c6a 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 > >> @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { > >> .name = "wb_2", .id = WB_2, > >> .base = 0x65000, .len = 0x2c8, > >> .features = WB_SM8250_MASK, > >> - .format_list = wb2_formats, > >> - .num_formats = ARRAY_SIZE(wb2_formats), > >> + .format_list = wb2_formats_rgb_yuv, > >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > >> .clk_ctrl = DPU_CLK_CTRL_WB2, > >> .xin_id = 6, > >> .vbif_idx = VBIF_RT, > >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >> index bf56265967c0..ad48defa154f 100644 > >> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >> @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { > >> .name = "wb_2", .id = WB_2, > >> .base = 0x65000, .len = 0x2c8, > >> .features = WB_SM8250_MASK, > >> - .format_list = wb2_formats, > >> - .num_formats = ARRAY_SIZE(wb2_formats), > >> + .format_list = wb2_formats_rgb, > >> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >> .xin_id = 6, > >> .vbif_idx = VBIF_RT, > >> .maxlinewidth = 4096, > >> 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 1be3156cde05..c52cac7a2288 100644 > >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >> @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { > >> /* TODO add formats after validation */ > >> }; > >> > >> -static const uint32_t wb2_formats[] = { > >> +static const uint32_t wb2_formats_rgb[] = { > >> DRM_FORMAT_RGB565, > >> DRM_FORMAT_BGR565, > >> DRM_FORMAT_RGB888, > >> @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { > >> DRM_FORMAT_XBGR4444, > >> }; > >> > >> +static const uint32_t wb2_formats_rgb_yuv[] = { > >> + DRM_FORMAT_RGB565, > >> + DRM_FORMAT_BGR565, > >> + DRM_FORMAT_RGB888, > >> + DRM_FORMAT_ARGB8888, > >> + DRM_FORMAT_RGBA8888, > >> + DRM_FORMAT_ABGR8888, > >> + DRM_FORMAT_XRGB8888, > >> + DRM_FORMAT_RGBX8888, > >> + DRM_FORMAT_XBGR8888, > >> + DRM_FORMAT_ARGB1555, > >> + DRM_FORMAT_RGBA5551, > >> + DRM_FORMAT_XRGB1555, > >> + DRM_FORMAT_RGBX5551, > >> + DRM_FORMAT_ARGB4444, > >> + DRM_FORMAT_RGBA4444, > >> + DRM_FORMAT_RGBX4444, > >> + DRM_FORMAT_XRGB4444, > >> + DRM_FORMAT_BGR565, > >> + DRM_FORMAT_BGR888, > >> + DRM_FORMAT_ABGR8888, > >> + DRM_FORMAT_BGRA8888, > >> + DRM_FORMAT_BGRX8888, > >> + DRM_FORMAT_XBGR8888, > >> + DRM_FORMAT_ABGR1555, > >> + DRM_FORMAT_BGRA5551, > >> + DRM_FORMAT_XBGR1555, > >> + DRM_FORMAT_BGRX5551, > >> + DRM_FORMAT_ABGR4444, > >> + DRM_FORMAT_BGRA4444, > >> + DRM_FORMAT_BGRX4444, > >> + DRM_FORMAT_XBGR4444, > >> + DRM_FORMAT_NV12, > >> +}; > >> + > >> /************************************************************* > >> * SSPP sub blocks config > >> *************************************************************/ > >> -- > >> 2.40.1 > >> > > > >
On 12/8/2023 12:45 PM, Dmitry Baryshkov wrote: > On Fri, 8 Dec 2023 at 19:53, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >> On 12/8/2023 3:44 AM, Dmitry Baryshkov wrote: >>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >>>> >>>> Lets rename the existing wb2_formats array wb2_formats_rgb to indicate >>>> that it has only RGB formats and can be used on any chipset having a WB >>>> block. >>>> >>>> Introduce a new wb2_formats_rgb_yuv array to the catalog to >>>> indicate support for YUV formats to writeback in addition to RGB. >>>> >>>> Chipsets which have support for CDM block will use the newly added >>>> wb2_formats_rgb_yuv array. >>> >>> This means that the catalog can go out of sync, if one adds a CDM >>> block but doesn't update wb_formats and vice versa. >>> Can we deduce the format list from the WB code? Is the format list >>> really static or does it change between platforms (please keep msm8996 >>> / msm8998 in mind). >>> >> >> Yes this is a valid concern. catalog could potentially go out of sync. >> >> I checked a few chipsets now and the WB formats didnt change among them. >> >> I do need to check more chipsets but downstream does not maintain this >> in devicetree which means we can just move these arrays to WB code >> instead of maintaining them in the catalog. > > I think we should be comparing to some of the oldest generations, like > msm8998/sdm660 or ideally even msm8996/37/17/53. > I compared msm8998 just now and it does have different wb2 formats supported as compared to sc7280/sm8250. So unfortunately, this will have to remain in catalog for now. >> We will still need to maintain two arrays. One to be used if CDM block >> has been added and the other if not. > > Yes. > >> I must confess one point though. I have not seen any chipset yet where >> WB block is present but CDM block is not. > > I think this was the case for some of mdp5 1.x chips, but according to > my data this is correct for all the platforms that we want to support. > >> So at this point, the only purpose of the two arrays will be till the >> point where CDM blk has been added to all the required chipsets in the >> catalog. Then we can drop the RGB only array and maintain the one which >> has all formats. >> I think if we have to generalize this, some more study is needed of how to maintain this in the catalog without missing out on some more formats. But for now, what do you think of below approach: 1) We have these two arrays as I have added these only for sc7280/sm8250 and have confirmed that the formats listed there are accurate. At the very least, they do not expose more formats than what is supported. So even if someone adds CDM for other chipsets, they can re-use wb2_formats_rgb_and_yuv. It will certainly work just that its not the full list of supported formats. 2) Even if we do add CDM to other chipsets, what I can confirm is this will not break them as the list of formats we have right now are only lesser than the full list and not more. 3) In the follow up RFT which we discussed in the cover letter, let me try to re-factor wb2_formats based on the list of chipsets that are present in catalog including the older ones you have listed. The issue is wb2_formats (so writeback) and not CDM itself as these are supported WB formats. So I think we need to re-work this a bit. >>>> >>>> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> >>>> --- >>>> .../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- >>>> .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- >>>> .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- >>>> .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- >>>> .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- >>>> .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++- >>>> 6 files changed, 46 insertions(+), 11 deletions(-) >>>> >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >>>> index 04d2a73dd942..eb5dfff2ec4f 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h >>>> @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { >>>> .name = "wb_2", .id = WB_2, >>>> .base = 0x65000, .len = 0x2c8, >>>> .features = WB_SM8250_MASK, >>>> - .format_list = wb2_formats, >>>> - .num_formats = ARRAY_SIZE(wb2_formats), >>>> + .format_list = wb2_formats_rgb, >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >>>> .xin_id = 6, >>>> .vbif_idx = VBIF_RT, >>>> .maxlinewidth = 4096, >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>> index 58b0f50518c8..a57d50b1f028 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h >>>> @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { >>>> .name = "wb_2", .id = WB_2, >>>> .base = 0x65000, .len = 0x2c8, >>>> .features = WB_SM8250_MASK, >>>> - .format_list = wb2_formats, >>>> - .num_formats = ARRAY_SIZE(wb2_formats), >>>> + .format_list = wb2_formats_rgb_yuv, >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, >>>> .xin_id = 6, >>>> .vbif_idx = VBIF_RT, >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>> index bcfedfc8251a..7382ebb6e5b2 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h >>>> @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { >>>> .name = "wb_2", .id = WB_2, >>>> .base = 0x65000, .len = 0x2c8, >>>> .features = WB_SM8250_MASK, >>>> - .format_list = wb2_formats, >>>> - .num_formats = ARRAY_SIZE(wb2_formats), >>>> + .format_list = wb2_formats_rgb, >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, >>>> .xin_id = 6, >>>> .vbif_idx = VBIF_RT, >>>> 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 19c2b7454796..2f153e0b5c6a 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 >>>> @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { >>>> .name = "wb_2", .id = WB_2, >>>> .base = 0x65000, .len = 0x2c8, >>>> .features = WB_SM8250_MASK, >>>> - .format_list = wb2_formats, >>>> - .num_formats = ARRAY_SIZE(wb2_formats), >>>> + .format_list = wb2_formats_rgb_yuv, >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, >>>> .xin_id = 6, >>>> .vbif_idx = VBIF_RT, >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >>>> index bf56265967c0..ad48defa154f 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h >>>> @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { >>>> .name = "wb_2", .id = WB_2, >>>> .base = 0x65000, .len = 0x2c8, >>>> .features = WB_SM8250_MASK, >>>> - .format_list = wb2_formats, >>>> - .num_formats = ARRAY_SIZE(wb2_formats), >>>> + .format_list = wb2_formats_rgb, >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), >>>> .xin_id = 6, >>>> .vbif_idx = VBIF_RT, >>>> .maxlinewidth = 4096, >>>> 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 1be3156cde05..c52cac7a2288 100644 >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c >>>> @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { >>>> /* TODO add formats after validation */ >>>> }; >>>> >>>> -static const uint32_t wb2_formats[] = { >>>> +static const uint32_t wb2_formats_rgb[] = { >>>> DRM_FORMAT_RGB565, >>>> DRM_FORMAT_BGR565, >>>> DRM_FORMAT_RGB888, >>>> @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { >>>> DRM_FORMAT_XBGR4444, >>>> }; >>>> >>>> +static const uint32_t wb2_formats_rgb_yuv[] = { >>>> + DRM_FORMAT_RGB565, >>>> + DRM_FORMAT_BGR565, >>>> + DRM_FORMAT_RGB888, >>>> + DRM_FORMAT_ARGB8888, >>>> + DRM_FORMAT_RGBA8888, >>>> + DRM_FORMAT_ABGR8888, >>>> + DRM_FORMAT_XRGB8888, >>>> + DRM_FORMAT_RGBX8888, >>>> + DRM_FORMAT_XBGR8888, >>>> + DRM_FORMAT_ARGB1555, >>>> + DRM_FORMAT_RGBA5551, >>>> + DRM_FORMAT_XRGB1555, >>>> + DRM_FORMAT_RGBX5551, >>>> + DRM_FORMAT_ARGB4444, >>>> + DRM_FORMAT_RGBA4444, >>>> + DRM_FORMAT_RGBX4444, >>>> + DRM_FORMAT_XRGB4444, >>>> + DRM_FORMAT_BGR565, >>>> + DRM_FORMAT_BGR888, >>>> + DRM_FORMAT_ABGR8888, >>>> + DRM_FORMAT_BGRA8888, >>>> + DRM_FORMAT_BGRX8888, >>>> + DRM_FORMAT_XBGR8888, >>>> + DRM_FORMAT_ABGR1555, >>>> + DRM_FORMAT_BGRA5551, >>>> + DRM_FORMAT_XBGR1555, >>>> + DRM_FORMAT_BGRX5551, >>>> + DRM_FORMAT_ABGR4444, >>>> + DRM_FORMAT_BGRA4444, >>>> + DRM_FORMAT_BGRX4444, >>>> + DRM_FORMAT_XBGR4444, >>>> + DRM_FORMAT_NV12, >>>> +}; >>>> + >>>> /************************************************************* >>>> * SSPP sub blocks config >>>> *************************************************************/ >>>> -- >>>> 2.40.1 >>>> >>> >>> > > >
On Sat, 9 Dec 2023 at 01:09, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > > > On 12/8/2023 12:45 PM, Dmitry Baryshkov wrote: > > On Fri, 8 Dec 2023 at 19:53, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >> On 12/8/2023 3:44 AM, Dmitry Baryshkov wrote: > >>> On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > >>>> > >>>> Lets rename the existing wb2_formats array wb2_formats_rgb to indicate > >>>> that it has only RGB formats and can be used on any chipset having a WB > >>>> block. > >>>> > >>>> Introduce a new wb2_formats_rgb_yuv array to the catalog to > >>>> indicate support for YUV formats to writeback in addition to RGB. > >>>> > >>>> Chipsets which have support for CDM block will use the newly added > >>>> wb2_formats_rgb_yuv array. > >>> > >>> This means that the catalog can go out of sync, if one adds a CDM > >>> block but doesn't update wb_formats and vice versa. > >>> Can we deduce the format list from the WB code? Is the format list > >>> really static or does it change between platforms (please keep msm8996 > >>> / msm8998 in mind). > >>> > >> > >> Yes this is a valid concern. catalog could potentially go out of sync. > >> > >> I checked a few chipsets now and the WB formats didnt change among them. > >> > >> I do need to check more chipsets but downstream does not maintain this > >> in devicetree which means we can just move these arrays to WB code > >> instead of maintaining them in the catalog. > > > > I think we should be comparing to some of the oldest generations, like > > msm8998/sdm660 or ideally even msm8996/37/17/53. > > > > I compared msm8998 just now and it does have different wb2 formats > supported as compared to sc7280/sm8250. > > So unfortunately, this will have to remain in catalog for now. > > >> We will still need to maintain two arrays. One to be used if CDM block > >> has been added and the other if not. > > > > Yes. > > > > >> I must confess one point though. I have not seen any chipset yet where > >> WB block is present but CDM block is not. > > > > I think this was the case for some of mdp5 1.x chips, but according to > > my data this is correct for all the platforms that we want to support. > > > >> So at this point, the only purpose of the two arrays will be till the > >> point where CDM blk has been added to all the required chipsets in the > >> catalog. Then we can drop the RGB only array and maintain the one which > >> has all formats. > >> > > I think if we have to generalize this, some more study is needed of how > to maintain this in the catalog without missing out on some more > formats. But for now, what do you think of below approach: As the list of formats differ from platform to platform, I'm fine with listing them in the catalog (as we do with your patchset). Later we can generalise or clean that up. > > 1) We have these two arrays as I have added these only for sc7280/sm8250 > and have confirmed that the formats listed there are accurate. At the > very least, they do not expose more formats than what is supported. So > even if someone adds CDM for other chipsets, they can re-use > wb2_formats_rgb_and_yuv. It will certainly work just that its not the > full list of supported formats. > > 2) Even if we do add CDM to other chipsets, what I can confirm is this > will not break them as the list of formats we have right now are only > lesser than the full list and not more. > > 3) In the follow up RFT which we discussed in the cover letter, let me > try to re-factor wb2_formats based on the list of chipsets that are > present in catalog including the older ones you have listed. Sounds good! Thank you for checking the msm8998. > > The issue is wb2_formats (so writeback) and not CDM itself as these are > supported WB formats. So I think we need to re-work this a bit. > > >>>> > >>>> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > >>>> --- > >>>> .../msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 4 +- > >>>> .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 4 +- > >>>> .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 4 +- > >>>> .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 4 +- > >>>> .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 4 +- > >>>> .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 37 ++++++++++++++++++- > >>>> 6 files changed, 46 insertions(+), 11 deletions(-) > >>>> > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >>>> index 04d2a73dd942..eb5dfff2ec4f 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h > >>>> @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { > >>>> .name = "wb_2", .id = WB_2, > >>>> .base = 0x65000, .len = 0x2c8, > >>>> .features = WB_SM8250_MASK, > >>>> - .format_list = wb2_formats, > >>>> - .num_formats = ARRAY_SIZE(wb2_formats), > >>>> + .format_list = wb2_formats_rgb, > >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >>>> .xin_id = 6, > >>>> .vbif_idx = VBIF_RT, > >>>> .maxlinewidth = 4096, > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >>>> index 58b0f50518c8..a57d50b1f028 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h > >>>> @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { > >>>> .name = "wb_2", .id = WB_2, > >>>> .base = 0x65000, .len = 0x2c8, > >>>> .features = WB_SM8250_MASK, > >>>> - .format_list = wb2_formats, > >>>> - .num_formats = ARRAY_SIZE(wb2_formats), > >>>> + .format_list = wb2_formats_rgb_yuv, > >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, > >>>> .xin_id = 6, > >>>> .vbif_idx = VBIF_RT, > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >>>> index bcfedfc8251a..7382ebb6e5b2 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h > >>>> @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { > >>>> .name = "wb_2", .id = WB_2, > >>>> .base = 0x65000, .len = 0x2c8, > >>>> .features = WB_SM8250_MASK, > >>>> - .format_list = wb2_formats, > >>>> - .num_formats = ARRAY_SIZE(wb2_formats), > >>>> + .format_list = wb2_formats_rgb, > >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, > >>>> .xin_id = 6, > >>>> .vbif_idx = VBIF_RT, > >>>> 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 19c2b7454796..2f153e0b5c6a 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 > >>>> @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { > >>>> .name = "wb_2", .id = WB_2, > >>>> .base = 0x65000, .len = 0x2c8, > >>>> .features = WB_SM8250_MASK, > >>>> - .format_list = wb2_formats, > >>>> - .num_formats = ARRAY_SIZE(wb2_formats), > >>>> + .format_list = wb2_formats_rgb_yuv, > >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), > >>>> .clk_ctrl = DPU_CLK_CTRL_WB2, > >>>> .xin_id = 6, > >>>> .vbif_idx = VBIF_RT, > >>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >>>> index bf56265967c0..ad48defa154f 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h > >>>> @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { > >>>> .name = "wb_2", .id = WB_2, > >>>> .base = 0x65000, .len = 0x2c8, > >>>> .features = WB_SM8250_MASK, > >>>> - .format_list = wb2_formats, > >>>> - .num_formats = ARRAY_SIZE(wb2_formats), > >>>> + .format_list = wb2_formats_rgb, > >>>> + .num_formats = ARRAY_SIZE(wb2_formats_rgb), > >>>> .xin_id = 6, > >>>> .vbif_idx = VBIF_RT, > >>>> .maxlinewidth = 4096, > >>>> 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 1be3156cde05..c52cac7a2288 100644 > >>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > >>>> @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { > >>>> /* TODO add formats after validation */ > >>>> }; > >>>> > >>>> -static const uint32_t wb2_formats[] = { > >>>> +static const uint32_t wb2_formats_rgb[] = { > >>>> DRM_FORMAT_RGB565, > >>>> DRM_FORMAT_BGR565, > >>>> DRM_FORMAT_RGB888, > >>>> @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { > >>>> DRM_FORMAT_XBGR4444, > >>>> }; > >>>> > >>>> +static const uint32_t wb2_formats_rgb_yuv[] = { > >>>> + DRM_FORMAT_RGB565, > >>>> + DRM_FORMAT_BGR565, > >>>> + DRM_FORMAT_RGB888, > >>>> + DRM_FORMAT_ARGB8888, > >>>> + DRM_FORMAT_RGBA8888, > >>>> + DRM_FORMAT_ABGR8888, > >>>> + DRM_FORMAT_XRGB8888, > >>>> + DRM_FORMAT_RGBX8888, > >>>> + DRM_FORMAT_XBGR8888, > >>>> + DRM_FORMAT_ARGB1555, > >>>> + DRM_FORMAT_RGBA5551, > >>>> + DRM_FORMAT_XRGB1555, > >>>> + DRM_FORMAT_RGBX5551, > >>>> + DRM_FORMAT_ARGB4444, > >>>> + DRM_FORMAT_RGBA4444, > >>>> + DRM_FORMAT_RGBX4444, > >>>> + DRM_FORMAT_XRGB4444, > >>>> + DRM_FORMAT_BGR565, > >>>> + DRM_FORMAT_BGR888, > >>>> + DRM_FORMAT_ABGR8888, > >>>> + DRM_FORMAT_BGRA8888, > >>>> + DRM_FORMAT_BGRX8888, > >>>> + DRM_FORMAT_XBGR8888, > >>>> + DRM_FORMAT_ABGR1555, > >>>> + DRM_FORMAT_BGRA5551, > >>>> + DRM_FORMAT_XBGR1555, > >>>> + DRM_FORMAT_BGRX5551, > >>>> + DRM_FORMAT_ABGR4444, > >>>> + DRM_FORMAT_BGRA4444, > >>>> + DRM_FORMAT_BGRX4444, > >>>> + DRM_FORMAT_XBGR4444, > >>>> + DRM_FORMAT_NV12, > >>>> +}; > >>>> + > >>>> /************************************************************* > >>>> * SSPP sub blocks config > >>>> *************************************************************/ > >>>> -- > >>>> 2.40.1 > >>>> > >>> > >>> > > > > > >
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h index 04d2a73dd942..eb5dfff2ec4f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h @@ -341,8 +341,8 @@ static const struct dpu_wb_cfg sm8650_wb[] = { .name = "wb_2", .id = WB_2, .base = 0x65000, .len = 0x2c8, .features = WB_SM8250_MASK, - .format_list = wb2_formats, - .num_formats = ARRAY_SIZE(wb2_formats), + .format_list = wb2_formats_rgb, + .num_formats = ARRAY_SIZE(wb2_formats_rgb), .xin_id = 6, .vbif_idx = VBIF_RT, .maxlinewidth = 4096, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h index 58b0f50518c8..a57d50b1f028 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h @@ -336,8 +336,8 @@ static const struct dpu_wb_cfg sm8250_wb[] = { .name = "wb_2", .id = WB_2, .base = 0x65000, .len = 0x2c8, .features = WB_SM8250_MASK, - .format_list = wb2_formats, - .num_formats = ARRAY_SIZE(wb2_formats), + .format_list = wb2_formats_rgb_yuv, + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, .vbif_idx = VBIF_RT, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h index bcfedfc8251a..7382ebb6e5b2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h @@ -157,8 +157,8 @@ static const struct dpu_wb_cfg sc7180_wb[] = { .name = "wb_2", .id = WB_2, .base = 0x65000, .len = 0x2c8, .features = WB_SM8250_MASK, - .format_list = wb2_formats, - .num_formats = ARRAY_SIZE(wb2_formats), + .format_list = wb2_formats_rgb, + .num_formats = ARRAY_SIZE(wb2_formats_rgb), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, .vbif_idx = VBIF_RT, 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 19c2b7454796..2f153e0b5c6a 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 @@ -169,8 +169,8 @@ static const struct dpu_wb_cfg sc7280_wb[] = { .name = "wb_2", .id = WB_2, .base = 0x65000, .len = 0x2c8, .features = WB_SM8250_MASK, - .format_list = wb2_formats, - .num_formats = ARRAY_SIZE(wb2_formats), + .format_list = wb2_formats_rgb_yuv, + .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv), .clk_ctrl = DPU_CLK_CTRL_WB2, .xin_id = 6, .vbif_idx = VBIF_RT, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h index bf56265967c0..ad48defa154f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h @@ -315,8 +315,8 @@ static const struct dpu_wb_cfg sm8550_wb[] = { .name = "wb_2", .id = WB_2, .base = 0x65000, .len = 0x2c8, .features = WB_SM8250_MASK, - .format_list = wb2_formats, - .num_formats = ARRAY_SIZE(wb2_formats), + .format_list = wb2_formats_rgb, + .num_formats = ARRAY_SIZE(wb2_formats_rgb), .xin_id = 6, .vbif_idx = VBIF_RT, .maxlinewidth = 4096, 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 1be3156cde05..c52cac7a2288 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -202,7 +202,7 @@ static const u32 rotation_v2_formats[] = { /* TODO add formats after validation */ }; -static const uint32_t wb2_formats[] = { +static const uint32_t wb2_formats_rgb[] = { DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, DRM_FORMAT_RGB888, @@ -236,6 +236,41 @@ static const uint32_t wb2_formats[] = { DRM_FORMAT_XBGR4444, }; +static const uint32_t wb2_formats_rgb_yuv[] = { + DRM_FORMAT_RGB565, + DRM_FORMAT_BGR565, + DRM_FORMAT_RGB888, + DRM_FORMAT_ARGB8888, + DRM_FORMAT_RGBA8888, + DRM_FORMAT_ABGR8888, + DRM_FORMAT_XRGB8888, + DRM_FORMAT_RGBX8888, + DRM_FORMAT_XBGR8888, + DRM_FORMAT_ARGB1555, + DRM_FORMAT_RGBA5551, + DRM_FORMAT_XRGB1555, + DRM_FORMAT_RGBX5551, + DRM_FORMAT_ARGB4444, + DRM_FORMAT_RGBA4444, + DRM_FORMAT_RGBX4444, + DRM_FORMAT_XRGB4444, + DRM_FORMAT_BGR565, + DRM_FORMAT_BGR888, + DRM_FORMAT_ABGR8888, + DRM_FORMAT_BGRA8888, + DRM_FORMAT_BGRX8888, + DRM_FORMAT_XBGR8888, + DRM_FORMAT_ABGR1555, + DRM_FORMAT_BGRA5551, + DRM_FORMAT_XBGR1555, + DRM_FORMAT_BGRX5551, + DRM_FORMAT_ABGR4444, + DRM_FORMAT_BGRA4444, + DRM_FORMAT_BGRX4444, + DRM_FORMAT_XBGR4444, + DRM_FORMAT_NV12, +}; + /************************************************************* * SSPP sub blocks config *************************************************************/