All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v4 4/4] v4l: vsp1: Remove redundant pipe->dl usage from drm
Date: Tue, 14 Feb 2017 02:32:20 +0200	[thread overview]
Message-ID: <3425555.AA2EBS2zFK@avalon> (raw)
In-Reply-To: <920ab93c049e3887510ee030082dc81e64bd760c.1483704413.git-series.kieran.bingham+renesas@ideasonboard.com>

Hi Kieran,

Thank you for the patch.

On Friday 06 Jan 2017 12:15:31 Kieran Bingham wrote:
> The pipe->dl is used only inside vsp1_du_atomic_flush(), and can be
> obtained and stored locally to simplify the code.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

As I still have issues with patch 3/4, I propose moving this one earlier in 
the series.

> ---
>  drivers/media/platform/vsp1/vsp1_drm.c  | 20 ++++++++++----------
>  drivers/media/platform/vsp1/vsp1_pipe.h |  2 --
>  2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drm.c
> b/drivers/media/platform/vsp1/vsp1_drm.c index b4b583f7137a..d7ec980300dd
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_drm.c
> +++ b/drivers/media/platform/vsp1/vsp1_drm.c
> @@ -220,9 +220,6 @@ void vsp1_du_atomic_begin(struct device *dev)
>  	struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
> 
>  	vsp1->drm->num_inputs = pipe->num_inputs;
> -
> -	/* Prepare the display list. */
> -	pipe->dl = vsp1_dl_list_get(pipe->output->dlm);
>  }
>  EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
> 
> @@ -426,10 +423,14 @@ void vsp1_du_atomic_flush(struct device *dev)
>  	struct vsp1_pipeline *pipe = &vsp1->drm->pipe;
>  	struct vsp1_rwpf *inputs[VSP1_MAX_RPF] = { NULL, };
>  	struct vsp1_entity *entity;
> +	struct vsp1_dl_list *dl;
>  	unsigned long flags;
>  	unsigned int i;
>  	int ret;
> 
> +	/* Prepare the display list. */
> +	dl = vsp1_dl_list_get(pipe->output->dlm);
> +
>  	/* Count the number of enabled inputs and sort them by Z-order. */
>  	pipe->num_inputs = 0;
> 
> @@ -484,26 +485,25 @@ void vsp1_du_atomic_flush(struct device *dev)
>  			struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev);
> 
>  			if (!pipe->inputs[rpf->entity.index]) {
> -				vsp1_dl_list_write(pipe->dl, entity->route-
>reg,
> +				vsp1_dl_list_write(dl, entity->route->reg,
>  						   VI6_DPR_NODE_UNUSED);
>  				continue;
>  			}
>  		}
> 
> -		vsp1_entity_route_setup(entity, pipe->dl);
> +		vsp1_entity_route_setup(entity, dl);
> 
>  		if (entity->ops->configure) {
> -			entity->ops->configure(entity, pipe, pipe->dl,
> +			entity->ops->configure(entity, pipe, dl,
>  					       VSP1_ENTITY_PARAMS_INIT);
> -			entity->ops->configure(entity, pipe, pipe->dl,
> +			entity->ops->configure(entity, pipe, dl,
>  					       VSP1_ENTITY_PARAMS_RUNTIME);
> -			entity->ops->configure(entity, pipe, pipe->dl,
> +			entity->ops->configure(entity, pipe, dl,
>  					       VSP1_ENTITY_PARAMS_PARTITION);
>  		}
>  	}
> 
> -	vsp1_dl_list_commit(pipe->dl);
> -	pipe->dl = NULL;
> +	vsp1_dl_list_commit(dl);
> 
>  	/* Start or stop the pipeline if needed. */
>  	if (!vsp1->drm->num_inputs && pipe->num_inputs) {
> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.h
> b/drivers/media/platform/vsp1/vsp1_pipe.h index fff122b4874d..e59bef2653f6
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_pipe.h
> +++ b/drivers/media/platform/vsp1/vsp1_pipe.h
> @@ -108,8 +108,6 @@ struct vsp1_pipeline {
> 
>  	struct list_head entities;
> 
> -	struct vsp1_dl_list *dl;
> -
>  	unsigned int div_size;
>  	unsigned int partitions;
>  	struct v4l2_rect partition;

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2017-02-14  0:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 12:11 [PATCH v4 0/4] v4l: vsp1: Fix suspend/resume and race on M2M pipelines Kieran Bingham
2017-01-06 12:15 ` Kieran Bingham
2017-01-06 12:15 ` [PATCH v4 1/4] v4l: vsp1: Prevent multiple streamon race commencing pipeline early Kieran Bingham
2017-02-14  0:25   ` Laurent Pinchart
2017-01-06 12:15 ` [PATCH v4 2/4] v4l: vsp1: Move vsp1_video_setup_pipeline() Kieran Bingham
2017-02-14  0:27   ` Laurent Pinchart
2017-01-06 12:15 ` [PATCH v4 3/4] v4l: vsp1: Repair suspend resume operations for video pipelines Kieran Bingham
2017-02-14  0:57   ` Laurent Pinchart
2017-01-06 12:15 ` [PATCH v4 4/4] v4l: vsp1: Remove redundant pipe->dl usage from drm Kieran Bingham
2017-02-14  0:32   ` Laurent Pinchart [this message]

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=3425555.AA2EBS2zFK@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.