linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-media <linux-media@vger.kernel.org>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH v7] media: imx: add mem2mem device
Date: Tue, 12 Feb 2019 11:01:49 -0800	[thread overview]
Message-ID: <CAJ+vNU0HCBr2vz-D=Z8zC+JAmZ6bhsi7TCRhB827uPQj-8esDQ@mail.gmail.com> (raw)
In-Reply-To: <20190117155032.3317-1-p.zabel@pengutronix.de>

On Thu, Jan 17, 2019 at 7:50 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
> Add a single imx-media mem2mem video device that uses the IPU IC PP
> (image converter post processing) task for scaling and colorspace
> conversion.
> On i.MX6Q/DL SoCs with two IPUs currently only the first IPU is used.
>
> The hardware only supports writing to destination buffers up to
> 1024x1024 pixels in a single pass, arbitrary sizes can be achieved
> by rendering multiple tiles per frame.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> [slongerbeam@gmail.com: use ipu_image_convert_adjust(), fix
>  device_run() error handling, add missing media-device header,
>  unregister and remove the mem2mem device in error paths in
>  imx_media_probe_complete() and in imx_media_remove()]
> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
> ---
> Changes since v6 [1]:
>  - Change driver name in querycap to imx-media-csc-scaler
>  - Drop V4L2_SEL_TGT_COMPOSE_PADDED from vidioc_g_selection
>  - Simplify error handling in ipu_csc_scaler_init_controls
>
> [1] https://patchwork.linuxtv.org/patch/53757/
> ---

Hi Philipp,

Thanks for this driver - this is providing support that I need to
overcome direct CSI->IC limitations.

Can you give me some examples on how your using this? I'm testing this
on top of linux-media and trying the following gstreamer pipelines
(gstreamer recent master) and running into trouble but it could very
likely be me doing something wrong in my pipelines:

# upscale
gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240 !
v4l2convert output-io-mode=dmabuf-import !
video/x-raw,width=640,height=480 ! kmssink
^^^ fails with
ERROR: from element
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms:
GStreamer encountered a general resource error.
Additional debug info:
gstkmssink.c(1529): gst_kms_sink_show_frame ():
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms:
drmModeSetPlane failed: No space left on device (-28)
perhaps this is something strange with kmssink or is a buffer size not
being set properly in the mem2mem scaler?

# downscale
gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480 !
v4l2convert output-io-mode=dmabuf-import !
video/x-raw,width=320,height=280 ! kmssink
(gst-launch-1.0:15493): GStreamer-CRITICAL **: 18:06:49.029:
gst_buffer_resize_range: assertion 'bufmax >= bufoffs + offset + size'
failed
ERROR: from element
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data
stream error.
Additional debug info:
gstbasesrc.c(3064): gst_base_src_loop ():
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

# downscale using videotstsrc defaults
gst-launch-1.0 videotestsrc ! v4l2convert output-io-mode=dmabuf-import
! video/x-raw,width=100,height=200 ! kmssink
^^^ works

# rotation
gst-launch-1.0 videotestsrc ! v4l2convert output-io-mode=dmabuf-import
extra-controls=cid,rotate=90 ! kmssink
^^^ shows no rotation in displayed video but kernel debugging shows
ipu_csc_scaler_s_ctrl getting called with V4L2_CID_ROTATE,
ctrl->val=90 and ipu_degrees_to_rot_mode sets rot_mode=IPU_ROT_BIT_90
and returns no error. I also see that
ipu_image_convert_adjust gets called with rot_mode=IPU_ROT_BIT_90

I'm also not sure how to specify hflip/vflip... I don't think
extra-controls parses 'hflip', 'vflip' as ipu_csc_scaler_s_ctrl gets
called with V4L2_CID_HFLIP/V4L2_CID_VFLIP but ctrl->val is always 0.

Thanks,

Tim

  parent reply	other threads:[~2019-02-12 19:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 15:50 [PATCH v7] media: imx: add mem2mem device Philipp Zabel
2019-01-18  9:30 ` Hans Verkuil
2019-01-18 11:18   ` Philipp Zabel
2019-01-18 12:41     ` Hans Verkuil
2019-01-18 13:42       ` Philipp Zabel
2019-01-18 13:45         ` Hans Verkuil
2019-01-18 14:17           ` Philipp Zabel
2019-01-18 16:51     ` Philipp Zabel
2019-01-19  9:28       ` Hans Verkuil
2019-02-12 19:01 ` Tim Harvey [this message]
2019-02-13 17:22   ` Nicolas Dufresne
2019-02-15 11:10   ` Philipp Zabel
2019-02-15 16:24     ` Nicolas Dufresne
2019-02-15 23:36       ` Tim Harvey
2019-02-15 23:34     ` Tim Harvey

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='CAJ+vNU0HCBr2vz-D=Z8zC+JAmZ6bhsi7TCRhB827uPQj-8esDQ@mail.gmail.com' \
    --to=tharvey@gateworks.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=slongerbeam@gmail.com \
    /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).