Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@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 v6 2/9] drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check
Date: Fri, 25 Oct 2024 12:00:20 -0700	[thread overview]
Message-ID: <1dcf786e-463f-4e51-af71-66ee6077b5f1@quicinc.com> (raw)
In-Reply-To: <20241025-dpu-virtual-wide-v6-2-0310fd519765@linaro.org>



On 10/24/2024 5:20 PM, Dmitry Baryshkov wrote:
> In preparation for virtualized planes support, move pstate->pipe
> initialization from dpu_plane_reset() to dpu_plane_atomic_check(). In
> case of virtual planes the plane's pipe will not be known up to the
> point of atomic_check() callback.
> 

I had R-bed this in v5. Did anything change in v6?

But one comment below.

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 25 +++++++++++--------------
>   1 file changed, 11 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 37faf5b238b0..725c9a5826fd 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -797,13 +797,22 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
>   	uint32_t max_linewidth;
>   	unsigned int rotation;
>   	uint32_t supported_rotations;
> -	const struct dpu_sspp_cfg *pipe_hw_caps = pstate->pipe.sspp->cap;
> -	const struct dpu_sspp_sub_blks *sblk = pstate->pipe.sspp->cap->sblk;
> +	const struct dpu_sspp_cfg *pipe_hw_caps;
> +	const struct dpu_sspp_sub_blks *sblk;
>   
>   	if (new_plane_state->crtc)
>   		crtc_state = drm_atomic_get_new_crtc_state(state,
>   							   new_plane_state->crtc);
>   
> +	pipe->sspp = dpu_rm_get_sspp(&kms->rm, pdpu->pipe);
> +	r_pipe->sspp = NULL;
> +
> +	if (!pipe->sspp)
> +		return -EINVAL;
> +
> +	pipe_hw_caps = pipe->sspp->cap;
> +	sblk = pipe->sspp->cap->sblk;
> +
>   	min_scale = FRAC_16_16(1, sblk->maxupscale);
>   	ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
>   						  min_scale,

Do you think it will be better to move the get_sspp() call after the 
drm_atomic_helper_check_plane_state()?

> @@ -820,7 +829,6 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
>   	pipe->multirect_mode = DPU_SSPP_MULTIRECT_NONE;
>   	r_pipe->multirect_index = DPU_SSPP_RECT_SOLO;
>   	r_pipe->multirect_mode = DPU_SSPP_MULTIRECT_NONE;
> -	r_pipe->sspp = NULL;
>   
>   	pstate->stage = DPU_STAGE_0 + pstate->base.normalized_zpos;
>   	if (pstate->stage >= pdpu->catalog->caps->max_mixer_blendstages) {
> @@ -1286,7 +1294,6 @@ static void dpu_plane_reset(struct drm_plane *plane)
>   {
>   	struct dpu_plane *pdpu;
>   	struct dpu_plane_state *pstate;
> -	struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane);
>   
>   	if (!plane) {
>   		DPU_ERROR("invalid plane\n");
> @@ -1308,16 +1315,6 @@ static void dpu_plane_reset(struct drm_plane *plane)
>   		return;
>   	}
>   
> -	/*
> -	 * Set the SSPP here until we have proper virtualized DPU planes.
> -	 * This is the place where the state is allocated, so fill it fully.
> -	 */
> -	pstate->pipe.sspp = dpu_rm_get_sspp(&dpu_kms->rm, pdpu->pipe);
> -	pstate->pipe.multirect_index = DPU_SSPP_RECT_SOLO;
> -	pstate->pipe.multirect_mode = DPU_SSPP_MULTIRECT_NONE;
> -
> -	pstate->r_pipe.sspp = NULL;
> -
>   	__drm_atomic_helper_plane_reset(plane, &pstate->base);
>   }
>   
> 

  reply	other threads:[~2024-10-25 19:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  0:20 [PATCH v6 0/9] drm/msm/dpu: support virtual wide planes Dmitry Baryshkov
2024-10-25  0:20 ` [PATCH v6 1/9] drm/msm/dpu: use drm_rect_fp_to_int() Dmitry Baryshkov
2024-10-25  0:20 ` [PATCH v6 2/9] drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check Dmitry Baryshkov
2024-10-25 19:00   ` Abhinav Kumar [this message]
2024-10-28 10:46     ` Dmitry Baryshkov
2024-10-29 20:42       ` Abhinav Kumar
2024-10-25  0:20 ` [PATCH v6 3/9] drm/msm/dpu: drop virt_formats from SSPP subblock configuration Dmitry Baryshkov
2024-10-25  0:20 ` [PATCH v6 4/9] drm/msm/dpu: move scaling limitations out of the hw_catalog Dmitry Baryshkov
2024-10-25 23:15   ` Abhinav Kumar
2024-10-25  0:20 ` [PATCH v6 5/9] drm/msm/dpu: split dpu_plane_atomic_check() Dmitry Baryshkov
2024-10-25 23:21   ` Abhinav Kumar
2024-10-25  0:20 ` [PATCH v6 6/9] drm/msm/dpu: move rot90 checking to dpu_plane_atomic_check_sspp() Dmitry Baryshkov
2024-10-29 21:00   ` Abhinav Kumar
2024-10-25  0:20 ` [PATCH v6 7/9] drm/msm/dpu: add support for virtual planes Dmitry Baryshkov
2024-10-29 21:30   ` Abhinav Kumar
2024-10-30 10:48     ` Dmitry Baryshkov
2024-10-30 19:26       ` Abhinav Kumar
2024-10-31 15:11         ` Dmitry Baryshkov
2024-10-31 15:17           ` Dmitry Baryshkov
2024-10-31 20:06           ` Abhinav Kumar
2024-10-31 21:03             ` Dmitry Baryshkov
2024-11-01 20:37               ` Abhinav Kumar
2024-11-01 20:53                 ` Dmitry Baryshkov
2024-11-01 21:27                   ` Abhinav Kumar
2024-11-01 23:30                     ` Abhinav Kumar
2024-10-25  0:20 ` [PATCH v6 8/9] drm/msm/dpu: allow using two SSPP blocks for a single plane Dmitry Baryshkov
2024-10-29 22:07   ` Abhinav Kumar
2024-10-30 10:03     ` Dmitry Baryshkov
2024-10-25  0:20 ` [PATCH v6 9/9] drm/msm/dpu: include SSPP allocation state into the dumped state Dmitry Baryshkov
2024-11-02  1:08 ` [PATCH v6 0/9] drm/msm/dpu: support virtual wide planes Dmitry Baryshkov

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=1dcf786e-463f-4e51-af71-66ee6077b5f1@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --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=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /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