Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Arnaud Vrac <avrac@freebox.fr>, Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/11] drm/msm/dpu: add sspp cursor blocks to msm8998 hw catalog
Date: Thu, 20 Apr 2023 02:10:38 +0300	[thread overview]
Message-ID: <405ff057-e4da-3f2f-b860-ce2eeacaab94@linaro.org> (raw)
In-Reply-To: <20230419-dpu-tweaks-v1-7-d1bac46db075@freebox.fr>

On 19/04/2023 17:41, Arnaud Vrac wrote:
> Now that cursor sspp blocks can be used for cursor planes, enable them
> on msm8998. The dma sspp blocks that were assigned to cursor planes can
> 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 pipes?

For this change:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> 
> Signed-off-by: Arnaud Vrac <avrac@freebox.fr>
> ---
>   .../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[] = {
>   		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_MSM8998_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_MSM8998_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_MSM8998_MASK,
> +		msm8998_cursor_sblk_0, 2, SSPP_TYPE_CURSOR, DPU_CLK_CTRL_CURSOR0),
> +	SSPP_BLK("sspp_13", SSPP_CURSOR1, 0x36000, 0x1ac, DMA_CURSOR_MSM8998_MASK,
> +		msm8998_cursor_sblk_1, 10, SSPP_TYPE_CURSOR, DPU_CLK_CTRL_CURSOR1),
>   };
>   
>   static const struct dpu_lm_cfg msm8998_lm[] = {
> 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[] = {
>   	DRM_FORMAT_XBGR4444,
>   };
>   
> +static const uint32_t cursor_formats[] = {
> +	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[] = {
>   	.virt_num_formats = ARRAY_SIZE(plane_formats), \
>   	}
>   
> +#define _CURSOR_SBLK(num) \
> +	{ \
> +	.maxdwnscale = SSPP_UNITY_SCALE, \
> +	.maxupscale = SSPP_UNITY_SCALE, \
> +	.smart_dma_priority = 0, \
> +	.src_blk = {.name = STRCAT("sspp_src_", num), \
> +		.id = DPU_SSPP_SRC, .base = 0x00, .len = 0x150,}, \
> +	.format_list = cursor_formats, \
> +	.num_formats = ARRAY_SIZE(cursor_formats), \
> +	.virt_format_list = cursor_formats, \
> +	.virt_num_formats = ARRAY_SIZE(cursor_formats), \
> +	}
> +
>   static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 =
>   				_VIG_SBLK("0", 0, DPU_SSPP_SCALER_QSEED3);
>   static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 =
> @@ -309,6 +338,11 @@ static const struct dpu_sspp_sub_blks msm8998_vig_sblk_2 =
>   static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 =
>   				_VIG_SBLK("3", 0, DPU_SSPP_SCALER_QSEED3);
>   
> +static const struct dpu_sspp_sub_blks msm8998_cursor_sblk_0 =
> +				_CURSOR_SBLK("12");
> +static const struct dpu_sspp_sub_blks msm8998_cursor_sblk_1 =
> +				_CURSOR_SBLK("13");
> +
>   static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
>   	.rot_maxheight = 1088,
>   	.rot_num_formats = ARRAY_SIZE(rotation_v2_formats),
> 

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-04-19 23:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 14:41 [PATCH 00/11] drm/msm/dpu: tweaks for better hardware resources allocation Arnaud Vrac
2023-04-19 14:41 ` [PATCH 01/11] drm/msm/dpu: tweak msm8998 hw catalog values Arnaud Vrac
2023-04-19 22:15   ` Dmitry Baryshkov
2023-04-25 21:33   ` Abhinav Kumar
2023-04-19 14:41 ` [PATCH 02/11] drm/msm/dpu: use the actual lm maximum width instead of a hardcoded value Arnaud Vrac
2023-04-19 22:23   ` Dmitry Baryshkov
2023-04-20 17:47     ` [Freedreno] " Jeykumar Sankaran
2023-05-20 20:49       ` Dmitry Baryshkov
2023-05-22  9:30         ` Arnaud Vrac
2023-04-19 14:41 ` [PATCH 03/11] drm/msm/dpu: use hsync/vsync polarity set by the encoder Arnaud Vrac
2023-04-19 22:29   ` Dmitry Baryshkov
2023-04-20 18:01   ` [Freedreno] " Jeykumar Sankaran
2023-04-20 18:36     ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 04/11] drm/msm/dpu: allow using lm mixer base stage Arnaud Vrac
2023-04-19 22:43   ` Dmitry Baryshkov
2023-04-20  7:26     ` Arnaud Vrac
2023-04-20  9:53       ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 05/11] drm/msm/dpu: allow using all lm mixer stages Arnaud Vrac
2023-04-19 22:44   ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 06/11] drm/msm/dpu: support cursor sspp hw blocks Arnaud Vrac
2023-04-19 22:57   ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 07/11] drm/msm/dpu: add sspp cursor blocks to msm8998 hw catalog Arnaud Vrac
2023-04-19 23:10   ` Dmitry Baryshkov [this message]
2023-04-20  7:06     ` Arnaud Vrac
2023-04-20  8:47       ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 08/11] drm/msm/dpu: fix cursor block register bit offset in " Arnaud Vrac
2023-04-19 23:11   ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 09/11] drm/msm/dpu: set max cursor width to 512x512 Arnaud Vrac
2023-04-19 22:59   ` Dmitry Baryshkov
2023-04-19 14:41 ` [PATCH 10/11] drm/msm/dpu: tweak lm pairings in msm8998 hw catalog Arnaud Vrac
2023-04-19 23:15   ` Dmitry Baryshkov
2023-04-25  1:05   ` Abhinav Kumar
2023-04-19 14:41 ` [PATCH 11/11] drm/msm/dpu: do not use mixer that supports dspp when not required Arnaud Vrac
2023-04-19 23:18   ` Dmitry Baryshkov
2023-04-20  7:08     ` Arnaud Vrac
2023-04-28 20:11 ` (subset) [PATCH 00/11] drm/msm/dpu: tweaks for better hardware resources allocation Abhinav Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=405ff057-e4da-3f2f-b860-ce2eeacaab94@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=avrac@freebox.fr \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox