From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org,
Liviu Dudau <Liviu.Dudau@arm.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH v6 10/18] media: vsp1: drm: Extend frame completion API to the DU driver
Date: Wed, 13 Mar 2019 11:26:14 +0000 [thread overview]
Message-ID: <481d3ccd-ad52-9998-2edf-e7774f03145d@ideasonboard.com> (raw)
In-Reply-To: <20190313000532.7087-11-laurent.pinchart+renesas@ideasonboard.com>
Hi Laurent,
On 13/03/2019 00:05, Laurent Pinchart wrote:
> The VSP1 driver will need to pass extra flags to the DU through the
> frame completion API. Replace the completed bool flag by a bitmask to
> support this.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 ++--
> drivers/media/platform/vsp1/vsp1_drm.c | 4 ++--
> drivers/media/platform/vsp1/vsp1_drm.h | 2 +-
> include/media/vsp1.h | 4 +++-
> 4 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> index 76a39eee7c9c..28bfeb8c24fb 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -26,14 +26,14 @@
> #include "rcar_du_kms.h"
> #include "rcar_du_vsp.h"
>
> -static void rcar_du_vsp_complete(void *private, bool completed, u32 crc)
> +static void rcar_du_vsp_complete(void *private, unsigned int status, u32 crc)
> {
> struct rcar_du_crtc *crtc = private;
>
> if (crtc->vblank_enable)
> drm_crtc_handle_vblank(&crtc->crtc);
>
> - if (completed)
> + if (status & VSP1_DU_STATUS_COMPLETE)
> rcar_du_crtc_finish_page_flip(crtc);
>
> drm_crtc_add_crc_entry(&crtc->crtc, false, 0, &crc);
> diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
> index 5601a787688b..0367f88135bf 100644
> --- a/drivers/media/platform/vsp1/vsp1_drm.c
> +++ b/drivers/media/platform/vsp1/vsp1_drm.c
> @@ -34,14 +34,14 @@ static void vsp1_du_pipeline_frame_end(struct vsp1_pipeline *pipe,
> unsigned int completion)
> {
> struct vsp1_drm_pipeline *drm_pipe = to_vsp1_drm_pipeline(pipe);
> - bool complete = completion & VSP1_DL_FRAME_END_COMPLETED;
>
> if (drm_pipe->du_complete) {
> struct vsp1_entity *uif = drm_pipe->uif;
> + unsigned int status = completion & VSP1_DU_STATUS_COMPLETE;
Why do you mask the bit(s) here?
Can't we just pass completion into
drm_pipe->du_complete(p, completion, c); ?
[(edit: no, because completion contains things such as
VSP1_DL_FRAME_END_INTERNAL)]
Or are you relying on the fact that,
VSP1_DL_FRAME_END_COMPLETED == VSP1_DU_STATUS_COMPLETE
in which case perhaps we should be more explicit somehow, either in code
or with a comment that this section is converting between the two
bitfield types.
However you resolve, the rest looks fine:
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> u32 crc;
>
> crc = uif ? vsp1_uif_get_crc(to_uif(&uif->subdev)) : 0;
> - drm_pipe->du_complete(drm_pipe->du_private, complete, crc);
> + drm_pipe->du_complete(drm_pipe->du_private, status, crc);
> }
>
> if (completion & VSP1_DL_FRAME_END_INTERNAL) {
> diff --git a/drivers/media/platform/vsp1/vsp1_drm.h b/drivers/media/platform/vsp1/vsp1_drm.h
> index 8dfd274a59e2..e85ad4366fbb 100644
> --- a/drivers/media/platform/vsp1/vsp1_drm.h
> +++ b/drivers/media/platform/vsp1/vsp1_drm.h
> @@ -42,7 +42,7 @@ struct vsp1_drm_pipeline {
> struct vsp1_du_crc_config crc;
>
> /* Frame synchronisation */
> - void (*du_complete)(void *data, bool completed, u32 crc);
> + void (*du_complete)(void *data, unsigned int status, u32 crc);
> void *du_private;
> };
>
> diff --git a/include/media/vsp1.h b/include/media/vsp1.h
> index 1cf868360701..877496936487 100644
> --- a/include/media/vsp1.h
> +++ b/include/media/vsp1.h
> @@ -17,6 +17,8 @@ struct device;
>
> int vsp1_du_init(struct device *dev);
>
> +#define VSP1_DU_STATUS_COMPLETE BIT(0)
> +
> /**
> * struct vsp1_du_lif_config - VSP LIF configuration
> * @width: output frame width
> @@ -32,7 +34,7 @@ struct vsp1_du_lif_config {
> unsigned int height;
> bool interlaced;
>
> - void (*callback)(void *data, bool completed, u32 crc);
> + void (*callback)(void *data, unsigned int status, u32 crc);
> void *callback_data;
> };
>
>
--
Regards
--
Kieran
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-13 11:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 0:05 [PATCH v6 00/18] R-Car DU display writeback support Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 01/18] Revert "[media] v4l: vsp1: Supply frames to the DU continuously" Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 02/18] media: vsp1: wpf: Fix partition configuration for display pipelines Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 03/18] media: vsp1: Replace leftover occurrence of fragment with body Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 04/18] media: vsp1: Fix addresses of display-related registers for VSP-DL Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 05/18] media: vsp1: Replace the display list internal flag with a flags field Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 06/18] media: vsp1: Add vsp1_dl_list argument to .configure_stream() operation Laurent Pinchart
2019-03-13 10:36 ` Kieran Bingham
2019-03-13 0:05 ` [PATCH v6 07/18] media: vsp1: dl: Allow chained display lists for display pipelines Laurent Pinchart
2019-03-13 11:07 ` Kieran Bingham
2019-03-13 0:05 ` [PATCH v6 08/18] media: vsp1: wpf: Add writeback support Laurent Pinchart
2019-03-13 10:59 ` Kieran Bingham
2019-03-13 11:15 ` Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 09/18] media: vsp1: drm: Split RPF format setting to separate function Laurent Pinchart
2019-03-13 11:12 ` Kieran Bingham
2019-03-13 11:17 ` Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 10/18] media: vsp1: drm: Extend frame completion API to the DU driver Laurent Pinchart
2019-03-13 11:26 ` Kieran Bingham [this message]
2019-03-13 15:50 ` Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 11/18] media: vsp1: drm: Implement writeback support Laurent Pinchart
2019-03-13 11:42 ` Kieran Bingham
2019-03-13 15:56 ` Laurent Pinchart
2019-03-14 8:28 ` Kieran Bingham
2019-03-14 12:09 ` Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 12/18] drm: writeback: Cleanup job ownership handling when queuing job Laurent Pinchart
2019-03-13 11:45 ` Kieran Bingham
2019-03-13 0:05 ` [PATCH v6 13/18] drm: writeback: Fix leak of writeback job Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 14/18] drm: writeback: Add job prepare and cleanup operations Laurent Pinchart
2019-03-15 17:54 ` Liviu Dudau
2019-03-13 0:05 ` [PATCH v6 15/18] drm: rcar-du: Fix rcar_du_crtc structure documentation Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 16/18] drm: rcar-du: Store V4L2 fourcc in rcar_du_format_info structure Laurent Pinchart
2019-03-13 0:05 ` [PATCH v6 17/18] drm: rcar-du: vsp: Extract framebuffer (un)mapping to separate functions Laurent Pinchart
2019-03-13 11:54 ` Kieran Bingham
2019-03-13 0:05 ` [PATCH v6 18/18] drm: rcar-du: Add writeback support for R-Car Gen3 Laurent Pinchart
2019-03-13 12:06 ` Kieran Bingham
2019-03-13 16:08 ` Laurent Pinchart
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=481d3ccd-ad52-9998-2edf-e7774f03145d@ideasonboard.com \
--to=kieran.bingham@ideasonboard.com \
--cc=Liviu.Dudau@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox