linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: kieran.bingham+renesas@ideasonboard.com
Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 11/11] drm: rcar-du: Support interlaced video output through vsp1
Date: Wed, 18 Jul 2018 11:55:27 +0300	[thread overview]
Message-ID: <6606380.Aa3oybNsgi@avalon> (raw)
In-Reply-To: <14ede71e-fa99-01d3-eb27-f171e5f3d082@ideasonboard.com>

Hi Kieran,

On Tuesday, 17 July 2018 23:32:56 EEST Kieran Bingham wrote:
> On 17/07/18 14:51, Laurent Pinchart wrote:
> > On Monday, 16 July 2018 20:20:30 EEST Kieran Bingham wrote:
> >> On 24/05/18 12:50, Laurent Pinchart wrote:
> >>> On Thursday, 3 May 2018 16:36:22 EEST Kieran Bingham wrote:
> >>>> Use the newly exposed VSP1 interface to enable interlaced frame support
> >>>> through the VSP1 lif pipelines.
> >>> 
> >>> s/lif/LIF/
> >> 
> >> Fixed.
> >> 
> >>>> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> >>>> ---
> >>>> 
> >>>>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 +
> >>>>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c  | 3 +++
> >>>>  2 files changed, 4 insertions(+)
> >>>> 
> >>>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> >>>> b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index
> >>>> d71d709fe3d9..206532959ec9
> >>>> 100644
> >>>> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> >>>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> >>>> @@ -289,6 +289,7 @@ static void rcar_du_crtc_set_display_timing(struct
> >>>> rcar_du_crtc *rcrtc)
> >>>> 
> >>>>  	/* Signal polarities */
> >>>>  	value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
> >>>>  	
> >>>>  	      | ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
> >>>> 
> >>>> +	      | ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? DSMR_ODEV : 0)
> >>> 
> >>> How will this affect Gen2 ?.
> >> 
> >> The bit is documented identically for Gen2. Potentially / Probably it
> >> 'might' reverse the fields... I'm not certain yet. I don't have access
> >> to a Gen2 platform to test.
> >> 
> >> I'll see if this change can be dropped, but I think it is playing a role
> >> in ensuring that the field detection occurs in VSP1 through the
> >> VI6_STATUS_FLD_STD() field. (see vsp1_dlm_irq_frame_end())
> >> 
> >>> Could you document what this change does in the
> >>> commit message ?
> >> 
> >> This sets the position in the buffer of the ODDF. With this set, the ODD
> >> field is located in the second half (BOTTOM) of the same frame of the
> >> interlace display.
> >> 
> >> Otherwise, it's in the first half (TOP)
> >> 
> >> I faced some issues as to the ordering when testing, so I suspect this
> >> might actually be related to that. (re VI6_STATUS_FLD_STD in
> >> vsp1_dlm_irq_frame_end()).
> >> 
> >> As you mention - this may have a negative effect on the Gen2
> >> implementation - so it needs considering with that.
> >> 
> >> 
> >> /me to investigate further.
> > 
> > Thank you. I don't object to this change, but I'd like to know what its
> > implications are on Gen2. It might even fix a bug :-) Let me know if you'd
> > like me to run tests on a Lager board.
> 
> I've done some testing with this (removing the DSMR change, and
> inverting the VI6_STATUS_FLD_STD handling) and had some odd results.
> Perhaps my testing needs refinement.
> 
> So, yes please - I think I'd really like to know what the effects are on
> a Lager platform.
> 
> Would you (or anyone with a Gen2 and interest in vsp1/du) be able to
> test my latest vsp1/du/interlaced branch/tag on your local Gen2 platform
> please?

I can test it when I'll come back home on the 24th (or rather on the next day 
as I'll land in the evening). Could you please ping me on the 25th ?

> I'm testing interlaced with:
> 
> kmstest # sanity test.
> kmstest -c 1 -r 1920x1080i --flip

My monitors don't support interlaced modes, so this won't be easy :-/

Also, what's the expected outcome of the above command in the working and non-
working cases ?

> Any (easy) other methods for testing interlaced pipelines are welcome.
> 
> Is it possible to set the mode for kmscube? (--help doesn't look promising)

Not that I know of, but I think that shouldn't be too difficult to add.

> I have various test streams of interlaced media content in my media
> library, but not an easy way of decoding and presenting these on the
> screen on the Gen3.
> 
> I believe GStreamer now has a drm/kms sink ... Perhaps I should get that
> recompiled. (That would help me with other tasks too actually)
> 
> >>>>  	      | DSMR_DIPM_DISP | DSMR_CSPM;
> >>>>  	
> >>>>  	rcar_du_crtc_write(rcrtc, DSMR, value);
> >>>> 
> >>>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> >>>> b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index
> >>>> af7822a66dee..c7b37232ee91
> >>>> 100644
> >>>> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> >>>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> >>>> @@ -186,6 +186,9 @@ static void rcar_du_vsp_plane_setup(struct
> >>>> rcar_du_vsp_plane *plane)
> >>>>  	};
> >>>>  	unsigned int i;
> >>>> 
> >>>> +	cfg.interlaced = !!(plane->plane.state->crtc->mode.flags
> >>>> +			    & DRM_MODE_FLAG_INTERLACE);
> >>>> +
> >>>>  	cfg.src.left = state->state.src.x1 >> 16;
> >>>>  	cfg.src.top = state->state.src.y1 >> 16;
> >>>>  	cfg.src.width = drm_rect_width(&state->state.src) >> 16;

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2018-07-18  8:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 13:36 [PATCH v4 00/11] R-Car DU Interlaced support through VSP1 Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 01/11] media: vsp1: drm: Fix minor grammar error Kieran Bingham
2018-05-24 10:24   ` Laurent Pinchart
2018-05-03 13:36 ` [PATCH v4 02/11] media: vsp1: Remove packed attributes from aligned structures Kieran Bingham
2018-05-24 10:47   ` Laurent Pinchart
2018-07-13 10:17     ` Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 03/11] media: vsp1: Rename dl_child to dl_next Kieran Bingham
2018-05-24 10:51   ` Laurent Pinchart
2018-05-03 13:36 ` [PATCH v4 04/11] media: vsp1: Remove unused display list structure field Kieran Bingham
2018-05-24 10:51   ` Laurent Pinchart
2018-05-03 13:36 ` [PATCH v4 05/11] media: vsp1: Clean up DLM objects on error Kieran Bingham
2018-05-24 10:58   ` Laurent Pinchart
2018-05-03 13:36 ` [PATCH v4 06/11] media: vsp1: Provide VSP1 feature helper macro Kieran Bingham
2018-05-24 11:00   ` Laurent Pinchart
2018-05-03 13:36 ` [PATCH v4 07/11] media: vsp1: Use header display lists for all WPF outputs linked to the DU Kieran Bingham
2018-05-24 11:10   ` Laurent Pinchart
2018-07-13 10:39     ` Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 08/11] media: vsp1: Add support for extended display list headers Kieran Bingham
2018-05-24 11:44   ` Laurent Pinchart
2018-07-16 17:14     ` Kieran Bingham
2018-07-17 10:53       ` Laurent Pinchart
2018-07-17 15:01         ` Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 09/11] media: vsp1: Provide support for extended command pools Kieran Bingham
2018-05-24 12:12   ` Laurent Pinchart
2018-07-17 15:59     ` Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 10/11] media: vsp1: Support Interlaced display pipelines Kieran Bingham
2018-05-24 12:51   ` Laurent Pinchart
2018-07-16 18:21     ` Kieran Bingham
2018-07-17 12:52       ` Laurent Pinchart
2018-07-17 16:08         ` Kieran Bingham
2018-07-17 17:42           ` Laurent Pinchart
2018-07-17 14:23       ` Kieran Bingham
2018-05-03 13:36 ` [PATCH v4 11/11] drm: rcar-du: Support interlaced video output through vsp1 Kieran Bingham
2018-05-24 11:50   ` Laurent Pinchart
2018-07-16 17:20     ` Kieran Bingham
2018-07-17 13:51       ` Laurent Pinchart
2018-07-17 20:32         ` Kieran Bingham
2018-07-18  8:55           ` Laurent Pinchart [this message]
2018-07-18  9:55             ` Kieran Bingham

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=6606380.Aa3oybNsgi@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).