Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp472201rwr; Thu, 20 Apr 2023 01:55:24 -0700 (PDT) X-Google-Smtp-Source: AKy350amTSK/re9aWcysu66VwWSaz7uUtzqueQtcDtZCzJe5YG3Tr/hFCS5bPrxf7OY/BtgrGj9I X-Received: by 2002:a17:90a:17e4:b0:239:ea16:5b13 with SMTP id q91-20020a17090a17e400b00239ea165b13mr1014338pja.14.1681980924169; Thu, 20 Apr 2023 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681980924; cv=none; d=google.com; s=arc-20160816; b=ieHoLCuuzz+ba4KPnY/mgdiJA9yqkO4ylIBY0SgcI8yMkIn9flbNEAxq3kTwECb4QZ BfINzP5SwKKK/LTIIQ68KnrflLKkehRgbKH+plj24BaoPJMBWfZWRLH+zzV3raDxMZ7o SMwL+/B1dbH8jAP/3sKoNmKhYDxx0NuzGBIoPwbaI7ZZOe99QDe+OFBa++tufs8Y6JPO C2YlLDnIG7nvMXq6YH7fqCvo7vEVzxwkCeB1XMwirwMHijrgD0r2t2PlnDdy0Pt2jcon Cr+o8QqrGAuMGsK3j7GpSsDUk48OtO//Dx6SOUOLoKr0C/8zNHIF4MQjEqT5tDjHpPs3 v1dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=T5oAqCslyeZbhwZTq6RFTTQ4PQFGAxsJkatHKOyp9J0=; b=L9wjNuN1fWjBrk5v4VjueBTIcidbd5T0w8fLOLQz0SacbzE8GgntX24XxHb+/PtyLc xepKoaWxYE518L1DrfmoLU5WKSZeGoeEnGrneze/yVFXjHK1cIht24WREJ/J8YIELLhg vh+n319YW2SY1ZHWtLkU8yFfgoZdJBzbANCnCyt34/kkGQ1RCdGCATKEa2LCL/3KQFUy 8q8ILqbIc1wFl40wA0rfcKkrvlhzdBd7kRxT/fkB2hdzw2gpVPwq9GtZTBwVjhg+/W8a bAHtI1+4anUN2i66F9GFPQ1dPPWY4NTAa2xpHk2R62lZIb5DcpsY4wavs514b2thxzCf EsmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bxyEIQuc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d63-20020a17090a6f4500b00247304b4a27si1352760pjk.173.2023.04.20.01.55.12; Thu, 20 Apr 2023 01:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bxyEIQuc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234316AbjDTIs6 (ORCPT + 99 others); Thu, 20 Apr 2023 04:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234055AbjDTIsH (ORCPT ); Thu, 20 Apr 2023 04:48:07 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB11D4695 for ; Thu, 20 Apr 2023 01:47:52 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id j15so1642447ybl.10 for ; Thu, 20 Apr 2023 01:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681980472; x=1684572472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=T5oAqCslyeZbhwZTq6RFTTQ4PQFGAxsJkatHKOyp9J0=; b=bxyEIQuckrZovTT6ZFDvK22g7vQcjK9MDIwUGnHTk7f1r03inGlP8Hg9uKZa89pY2F B3CdN9Si8aiLyM5WkeIVd0OS07FeUt/8E9sp7wOC4wSLOOgSLMRu620yYy+6ouQkBHHU OrRntp7qLe1qDjiVgICBWJqoGb24YPjPlc4oXe6bqvwmnzFg63ZMtNQDai3YN0ouObvz DtgFueQzO3xaAVO8HU5DHmuGly+qIhBGxBt8k6nddjhT4RXBfuAErQ07j5zQuzK/w1Pr eyw7x9OYffXFfglyZ1E3bla8PnYZVQpnFyc/5NbE27VDNtomqydwHgJ7tFs+QXm7X/EA m4aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681980472; x=1684572472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T5oAqCslyeZbhwZTq6RFTTQ4PQFGAxsJkatHKOyp9J0=; b=VUap/YwHFaV9H5+C+44EL1Wz5C44Fsj8aGQO0434+mY4T6el6yR+wcjJQEBKrgnjQN W4MydeFOGBNIPoI4i+1ows+ueHRMLijhqWCTMy+tj3ak3x1Uqd7jtEo/PvKSSey7me6M sC2VioEz1DW5WZiF/c9jRBK2+YG61f0GPXmAXhfD9b9RIQBPwjy1Srh2sx+7cuBDGWr9 dYzWB2XO5zctjck57qulioUm5VPtw8Bgh9kzYOH0vpsNfiSJmuVxhelSQOsz8HthKYmC dH0T4uMjfaEhM1mzenhB1WHV+sdUW3ngVuZez6ZgrjTsVux9COxQjPeybskhAggvAYw4 R4rA== X-Gm-Message-State: AAQBX9c83bhqpQ0xrX48rA0TlaLpPUhhcm+VfmvhPq55iqyxODn0li1I 3Sw5gnyA+a3UCzODm+39Z+rVnPFwftaHmtOWUgTC+A== X-Received: by 2002:a25:d181:0:b0:b79:6c89:86c0 with SMTP id i123-20020a25d181000000b00b796c8986c0mr662624ybg.42.1681980471793; Thu, 20 Apr 2023 01:47:51 -0700 (PDT) MIME-Version: 1.0 References: <20230419-dpu-tweaks-v1-0-d1bac46db075@freebox.fr> <20230419-dpu-tweaks-v1-7-d1bac46db075@freebox.fr> <405ff057-e4da-3f2f-b860-ce2eeacaab94@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Thu, 20 Apr 2023 11:47:40 +0300 Message-ID: Subject: Re: [PATCH 07/11] drm/msm/dpu: add sspp cursor blocks to msm8998 hw catalog To: Arnaud Vrac Cc: Rob Clark , Abhinav Kumar , Sean Paul , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Apr 2023 at 10:06, Arnaud Vrac wrote: > > Le jeu. 20 avr. 2023 =C3=A0 01:10, Dmitry Baryshkov > a =C3=A9crit : > > > > On 19/04/2023 17:41, Arnaud Vrac wrote: > > > Now that cursor sspp blocks can be used for cursor planes, enable the= m > > > on msm8998. The dma sspp blocks that were assigned to cursor planes c= an > > > now be used for overlay planes instead. > > > > While the change is correct, there is more about it. Composers, using > > universal planes, will see this plane too. They have no obligations to > > use it only for the cursor. At the minimum could you please extend the > > plane_atomic_check to check for the plane dimensions for the CURSOR pip= es? > > Hum, I had assumed the generic atomic checks would already do this, Atomic will have these checks for the legacy cursor API (using the mode_config.cursor_width/cursor_height that you have added). But I don't think there is a generic API for telling the core 'this plane is slightly limited'. Fortunately, once the virtual planes land and are taught about the SSPP_CURSOR peculiarities, it should not matter, since the driver will know that it should not select these pipes in the inappropriate cases. > but it's not the case. I'll add the check when the pipe is of type > SSPP_CURSOR in another patch coming before, thanks. > > > > > For this change: > > > > Reviewed-by: Dmitry Baryshkov > > > > > > > > Signed-off-by: Arnaud Vrac > > > --- > > > .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 8 +++-- > > > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 34 +++++++++++= +++++++++++ > > > 2 files changed, 40 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h = b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h > > > index b07e8a9941f79..7de393b0f91d7 100644 > > > --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h > > > +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h > > > @@ -90,10 +90,14 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = =3D { > > > sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0)= , > > > SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1ac, DMA_MSM8998_MASK, > > > sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1)= , > > > - SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1ac, DMA_CURSOR_MSM89= 98_MASK, > > > + SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1ac, DMA_MSM8998_MASK= , > > > sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2)= , > > > - SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1ac, DMA_CURSOR_MSM89= 98_MASK, > > > + SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1ac, DMA_MSM8998_MASK= , > > > sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3= ), > > > + SSPP_BLK("sspp_12", SSPP_CURSOR0, 0x34000, 0x1ac, DMA_CURSOR_MS= M8998_MASK, > > > + msm8998_cursor_sblk_0, 2, SSPP_TYPE_CURSOR, DPU_CLK_CTR= L_CURSOR0), > > > + SSPP_BLK("sspp_13", SSPP_CURSOR1, 0x36000, 0x1ac, DMA_CURSOR_MS= M8998_MASK, > > > + msm8998_cursor_sblk_1, 10, SSPP_TYPE_CURSOR, DPU_CLK_CT= RL_CURSOR1), > > > }; > > > > > > static const struct dpu_lm_cfg msm8998_lm[] =3D { > > > 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 8d5d782a43398..f34fa704936bc 100644 > > > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > > > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c > > > @@ -242,6 +242,22 @@ static const uint32_t wb2_formats[] =3D { > > > DRM_FORMAT_XBGR4444, > > > }; > > > > > > +static const uint32_t cursor_formats[] =3D { > > > + DRM_FORMAT_ARGB8888, > > > + DRM_FORMAT_ABGR8888, > > > + DRM_FORMAT_RGBA8888, > > > + DRM_FORMAT_BGRA8888, > > > + DRM_FORMAT_XRGB8888, > > > + DRM_FORMAT_ARGB1555, > > > + DRM_FORMAT_ABGR1555, > > > + DRM_FORMAT_RGBA5551, > > > + DRM_FORMAT_BGRA5551, > > > + DRM_FORMAT_ARGB4444, > > > + DRM_FORMAT_ABGR4444, > > > + DRM_FORMAT_RGBA4444, > > > + DRM_FORMAT_BGRA4444, > > > +}; > > > + > > > /************************************************************* > > > * SSPP sub blocks config > > > *************************************************************/ > > > @@ -300,6 +316,19 @@ static const uint32_t wb2_formats[] =3D { > > > .virt_num_formats =3D ARRAY_SIZE(plane_formats), \ > > > } > > > > > > +#define _CURSOR_SBLK(num) \ > > > + { \ > > > + .maxdwnscale =3D SSPP_UNITY_SCALE, \ > > > + .maxupscale =3D SSPP_UNITY_SCALE, \ > > > + .smart_dma_priority =3D 0, \ > > > + .src_blk =3D {.name =3D STRCAT("sspp_src_", num), \ > > > + .id =3D DPU_SSPP_SRC, .base =3D 0x00, .len =3D 0x150,},= \ > > > + .format_list =3D cursor_formats, \ > > > + .num_formats =3D ARRAY_SIZE(cursor_formats), \ > > > + .virt_format_list =3D cursor_formats, \ > > > + .virt_num_formats =3D ARRAY_SIZE(cursor_formats), \ > > > + } > > > + > > > static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 =3D > > > _VIG_SBLK("0", 0, DPU_SSPP_SCALER_QSEED= 3); > > > static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 =3D > > > @@ -309,6 +338,11 @@ static const struct dpu_sspp_sub_blks msm8998_vi= g_sblk_2 =3D > > > static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 =3D > > > _VIG_SBLK("3", 0, DPU_SSPP_SCALER_QSEED= 3); > > > > > > +static const struct dpu_sspp_sub_blks msm8998_cursor_sblk_0 =3D > > > + _CURSOR_SBLK("12"); > > > +static const struct dpu_sspp_sub_blks msm8998_cursor_sblk_1 =3D > > > + _CURSOR_SBLK("13"); > > > + > > > static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 =3D { > > > .rot_maxheight =3D 1088, > > > .rot_num_formats =3D ARRAY_SIZE(rotation_v2_formats), > > > > > > > -- > > With best wishes > > Dmitry > > --=20 With best wishes Dmitry