From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: linux-media <linux-media@vger.kernel.org>,
Rui Miguel Silva <rmfrfs@gmail.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Ezequiel Garcia <ezequiel@collabora.com>
Subject: Re: [PATCH 00/75] media: imx: Miscellaneous fixes and cleanups for i.MX7
Date: Wed, 6 Jan 2021 17:41:27 +0200 [thread overview]
Message-ID: <X/XaJ0UA04ekdWpi@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAOMZO5CaWvRGV0Zc4AS6Uexh5uR5jkCG4MkEMkW-YU3NPOVg8g@mail.gmail.com>
Hi Fabio,
On Tue, Jan 05, 2021 at 02:45:40PM -0300, Fabio Estevam wrote:
> On Tue, Jan 5, 2021 at 12:31 PM Laurent Pinchart wrote:
> >
> > Hello,
> >
> > This large patch series has been sitting in my tree for way too long. I
> > haven't posted it yet as I'm running into an issue on my test hardware
> > that I can't prove is not a regression from this series, but the
> > pressure has grown and the patches are better on the list for review.
> >
> > There's really not much to detail in the cover letter as there are
> > "just" fixes and cleanups I developed while bringing up camera support
> > for an i.MX7D platform, and later on an i.MX8MM that shares the same
> > MIPI-CSI2 and CSI IP cores (with some differences).
> >
> > The issue I've noticed is that the CSI writes two images consecutively
> > to the same buffer, overwritting memory after the end of the buffer. I
> > believe this bug to already be present in mainline, but I can't prove it
> > as my sensor won't work without some of the patches in this series. The
> > problem could also be sensor-specific.
> >
> > Rui, would you be able to test this on your i.MX7 hardware to make sure
> > there's no regression ?
>
> Thanks for your series.
>
> I tested it on a imx6ul-evk board.
Thank you.
> There is a build error introduced by patch 74/75. I fixed it like this:
>
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -193,6 +193,8 @@
> #define MIPI_CSIS_SDW_RESOL_CH(n) (0x84 + (n) * 0x10)
> #define MIPI_CSIS_SDW_SYNC_CH(n) (0x88 + (n) * 0x10)
>
> +/* Debug Control register */
> +#define MIPI_CSIS_DBG_CTRL 0x20
> /* Non-image packet data buffers */
> #define MIPI_CSIS_PKTDATA_ODD 0x2000
> #define MIPI_CSIS_PKTDATA_EVEN 0x3000
Oops. I have a debug patch in my branch on top of the series that adds
the macro, that's why I haven't noticed compilation broke. Sorry about
that.
> Then I applied my patch and Rui's to fix the imx6ul regression as per
> the other thread we have been discussing, but I was not able to
> capture:
Would you be able to bisect this ?
> # gst-launch-1.0 -v v4l2src device=/dev/video1 ! v4l2convert ! fbdevsink
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
> video/x-raw, format=(string)BGRx, width=(int)3840, height=(int)2160,
> framerate=(fraction)120/1, interlace-mode=(string)progressive,
> colorimetr
> y=(string)1:1:5:1
> /GstPipeline:pipeline0/v4l2convert:v4l2convert0.GstPad:src: caps =
> video/x-raw, format=(string)BGRx, width=(int)3840, height=(int)2160,
> framerate=(fraction)120/1, interlace-mode=(string)progressive, color
> imetry=(string)1:1:5:1
> /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0.GstPad:sink: caps =
> video/x-raw, format=(string)BGRx, width=(int)3840, height=(int)2160,
> framerate=(fraction)120/1, interlace-mode=(string)progressive, color
> imetry=(string)1:1:5:1
> /GstPipeline:pipeline0/v4l2convert:v4l2convert0.GstPad:sink: caps =
> video/x-raw, format=(string)BGRx, width=(int)3840, height=(int)2160,
> framerate=(fraction)120/1, interlace-mode=(string)progressive, colo
> rimetry=(string)1:1:5:1
> [ 32.783736] cma: cma_alloc: alloc failed, req-size: 8100 pages, ret: -12
> [ 32.791332] imx7-csi 21c4000.csi: dma_alloc_coherent of size 33177600 failed
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed
> to allocate required memory.
> Additional debug info:
> ../sys/v4l2/gstv4l2src.c(659): gst_v4l2src_decide_allocation ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Buffer pool activation failed
> Execution ended after 0:00:00.214658125
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> As shown above the dimensions and framerate are incorrectly reported
> as: width=(int)3840, height=(int)2160, framerate=(fraction)120/1
>
> Previously it was:
>
> # gst-launch-1.0 -v v4l2src device=/dev/video1 ! v4l2convert ! fbdevsink
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
> video/x-raw, format=(string)UYVY, width=(int)320, height=(int)240,
> framerate=(fraction)30000/1001, interlace-mode=(string)progressive,
> colorim
> etry=(string)1:4:7:1
> /GstPipeline:pipeline0/v4l2convert:v4l2convert0.GstPad:src: caps =
> video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240,
> framerate=(fraction)30000/1001, interlace-mode=(string)progressive
> /GstPipeline:pipeline0/GstFBDEVSink:fbdevsink0.GstPad:sink: caps =
> video/x-raw, format=(string)BGRx, width=(int)320, height=(int)240,
> framerate=(fraction)30000/1001, interlace-mode=(string)progressive
> /GstPipeline:pipeline0/v4l2convert:v4l2convert0.GstPad:sink: caps =
> video/x-raw, format=(string)UYVY, width=(int)320, height=(int)240,
> framerate=(fraction)30000/1001, interlace-mode=(string)progressive, c
> olorimetry=(string)1:4:7:1
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2021-01-06 15:42 UTC|newest]
Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 15:27 [PATCH 00/75] media: imx: Miscellaneous fixes and cleanups for i.MX7 Laurent Pinchart
2021-01-05 15:27 ` [PATCH 01/75] media: imx: Drop dependency on I2C Laurent Pinchart
2021-01-06 14:21 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 02/75] media: imx: Move dependency on VIDEO_DEV to common Kconfig symbol Laurent Pinchart
2021-01-06 14:21 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 03/75] media: imx: Drop manual dependency on VIDEO_IMX_MEDIA Laurent Pinchart
2021-01-06 14:22 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 04/75] media: imx: Move IMX_IPUV3_CORE dependency to VIDEO_IMX_CSI Laurent Pinchart
2021-01-06 14:24 ` Philipp Zabel
2021-01-06 15:42 ` Laurent Pinchart
2021-01-05 15:27 ` [PATCH 05/75] media: imx: Compile imx6-media-objs only for CONFIG_VIDEO_IMX_CSI Laurent Pinchart
2021-01-08 17:42 ` Ezequiel Garcia
2021-01-08 17:47 ` Laurent Pinchart
2021-01-08 18:05 ` Ezequiel Garcia
2021-01-05 15:27 ` [PATCH 06/75] media: imx: Set default sizes through macros in all drivers Laurent Pinchart
2021-01-05 15:27 ` [PATCH 07/75] media: imx: utils: Add ability to filter pixel formats by mbus code Laurent Pinchart
2021-01-05 15:27 ` [PATCH 08/75] media: imx: capture: Use dev_* instead of v4l2_* to log messages Laurent Pinchart
2021-01-06 14:25 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 09/75] media: imx: capture: Use device name to construct bus_info Laurent Pinchart
2021-01-06 14:26 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 10/75] media: imx: capture: Remove forward declaration of capture_qops Laurent Pinchart
2021-01-06 14:26 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 11/75] media: imx: capture: Handle errors from v4l2_fh_open() Laurent Pinchart
2021-01-06 14:27 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 12/75] media: imx: capture: Clean up capture_priv structure Laurent Pinchart
2021-01-05 15:27 ` [PATCH 13/75] media: imx: capture: Remove capture_priv stop field Laurent Pinchart
2021-01-06 14:29 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 14/75] media: imx: capture: Move queue and ctrl handler init to init function Laurent Pinchart
2021-01-06 14:30 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 15/75] media: imx: capture: Initialize video_device programmatically Laurent Pinchart
2021-01-06 14:31 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 16/75] media: imx: capture: Register the video device after completing init Laurent Pinchart
2021-01-05 15:27 ` [PATCH 17/75] media: imx: capture: Store v4l2_pix_format in imx_media_video_dev Laurent Pinchart
2021-01-06 14:33 ` Philipp Zabel
2021-01-05 15:27 ` [PATCH 18/75] media: imx: capture: Move default format init to a separate function Laurent Pinchart
2021-01-05 15:27 ` [PATCH 19/75] media: imx: capture: Rename querycap handler to capture_querycap Laurent Pinchart
2021-01-06 17:45 ` Steve Longerbeam
2021-01-05 15:27 ` [PATCH 20/75] media: imx: capture: Rename ioctl operations with legacy prefix Laurent Pinchart
2021-01-06 17:51 ` Steve Longerbeam
2021-01-07 10:52 ` Philipp Zabel
2021-01-08 0:03 ` Fabio Estevam
2021-01-09 1:09 ` Laurent Pinchart
2021-01-11 8:40 ` Philipp Zabel
2021-02-14 21:33 ` Laurent Pinchart
2021-01-05 15:27 ` [PATCH 21/75] media: imx: capture: Add a mechanism to disable control inheritance Laurent Pinchart
2021-01-05 15:27 ` [PATCH 22/75] media: imx: capture: Remove unneeded variable in __capture_legacy_try_fmt Laurent Pinchart
2021-01-06 17:55 ` Steve Longerbeam
2021-01-05 15:28 ` [PATCH 23/75] media: imx: capture: Pass v4l2_pix_format to __capture_legacy_try_fmt() Laurent Pinchart
2021-01-06 17:57 ` Steve Longerbeam
2021-01-05 15:28 ` [PATCH 24/75] media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 25/75] media: imx: capture: Extract format lookup from __capture_legacy_try_fmt Laurent Pinchart
2021-01-05 15:28 ` [PATCH 26/75] media: imx: capture: Simplify capture_validate_fmt() implementation Laurent Pinchart
2021-01-05 15:28 ` [PATCH 27/75] media: imx: capture: Simplify __capture_legacy_try_fmt() Laurent Pinchart
2021-01-06 17:59 ` Steve Longerbeam
2021-01-05 15:28 ` [PATCH 28/75] media: imx: capture: Decouple video node from source with MC-centric API Laurent Pinchart
2021-01-05 15:28 ` [PATCH 29/75] media: imx: capture: Expose V4L2_CAP_IO_MC for the " Laurent Pinchart
2021-01-05 15:28 ` [PATCH 30/75] media: imx: imx7-media-csi: Disable legacy video node API Laurent Pinchart
2021-01-05 15:28 ` [PATCH 31/75] media: imx: capture: Support creating immutable link to capture device Laurent Pinchart
2021-01-06 17:44 ` Steve Longerbeam
2021-01-09 0:41 ` Laurent Pinchart
2021-01-08 17:37 ` Ezequiel Garcia
2021-01-09 0:48 ` Laurent Pinchart
2021-01-05 15:28 ` [PATCH 32/75] media: imx: imx7-media-csi: Remove control handler Laurent Pinchart
2021-01-05 15:28 ` [PATCH 33/75] media: imx: imx7-media-csi: Move (de)init from link setup to .s_stream() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 34/75] media: imx: imx7-media-csi: Create immutable link to capture device Laurent Pinchart
2021-01-05 15:28 ` [PATCH 35/75] media: imx: imx7-media-csi: Replace CSICR*_RESET_VAL with values Laurent Pinchart
2021-01-05 15:28 ` [PATCH 36/75] media: imx: imx7-media-csi: Tidy up register fields macros Laurent Pinchart
2021-01-05 15:28 ` [PATCH 37/75] media: imx: imx7-media-csi: Reorganize code in sections Laurent Pinchart
2021-01-05 15:28 ` [PATCH 38/75] media: imx: imx7-media-csi: Validate capture format in .link_validate() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 39/75] media: imx: imx7-media-csi: Rename imx7_csi_dma_start() to *_setup() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 40/75] media: imx: imx7-media-csi: Split imx7_csi_dma_stop() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 41/75] media: imx: imx7-media-csi: Move CSI configuration before source start Laurent Pinchart
2021-01-05 15:28 ` [PATCH 42/75] media: imx: imx7-media-csi: Merge streaming_start() with csi_enable() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 43/75] media: imx: imx7-media-csi: Merge hw_reset() with init_interface() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 44/75] media: imx: imx7-media-csi: Set the MIPI data type based on the bus code Laurent Pinchart
2021-01-05 15:28 ` [PATCH 45/75] media: imx: imx7-media-csi: Don't set the buffer stride when disabling Laurent Pinchart
2021-01-05 15:28 ` [PATCH 46/75] media: imx: imx7-media-csi: Merge all config in imx7_csi_configure() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 47/75] media: imx: imx7-media-csi: Clear all configurable CSICR18 fields Laurent Pinchart
2021-01-05 15:28 ` [PATCH 48/75] media: imx: imx7-media-csi: Set RFF burst type in imx7_csi_configure() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 49/75] media: imx: imx7-media-csi: Simplify imx7_csi_rx_fifo_clear() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 50/75] media: imx: imx7-media-csi: Don't double-enable the CSI Laurent Pinchart
2021-01-05 15:28 ` [PATCH 51/75] media: imx: imx7-media-csi: Don't double-enable the RxFIFO Laurent Pinchart
2021-01-05 15:28 ` [PATCH 52/75] media: imx: imx7-media-csi: Remove double reflash of DMA controller Laurent Pinchart
2021-01-05 15:28 ` [PATCH 53/75] media: imx: imx7-media-csi: Don't enable SOF and EOF interrupts Laurent Pinchart
2021-01-05 15:28 ` [PATCH 54/75] media: imx: imx7_media-csi: Add support for additional Bayer patterns Laurent Pinchart
2021-01-05 15:28 ` [PATCH 55/75] media: v4l2-mc: Add link flags to v4l2_create_fwnode_links_to_pad() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 56/75] media: imx: imx7_media-csi: Create immutable link to source device Laurent Pinchart
2021-01-05 15:28 ` [PATCH 57/75] dt-bindings: media: Convert i.MX7 MIPI CSI-2 receiver binding to YAML Laurent Pinchart
2021-01-05 15:43 ` Laurent Pinchart
2021-01-05 15:28 ` [PATCH 58/75] dt-bindings: media: fsl,imx7-mipi-csi2: Drop the reset-names property Laurent Pinchart
2021-01-05 15:28 ` [PATCH 59/75] dt-bindings: media: fsl,imx7-mipi-csi2: Drop fsl,csis-hs-settle property Laurent Pinchart
2021-01-06 22:49 ` Sakari Ailus
2021-01-06 22:53 ` Sakari Ailus
2021-01-05 15:28 ` [PATCH 60/75] media: imx: imx7_mipi_csis: Acquire reset control without naming it Laurent Pinchart
2021-01-05 15:28 ` [PATCH 61/75] media: imx: imx7_mipi_csis: Fix input size alignment Laurent Pinchart
2021-01-05 15:28 ` [PATCH 62/75] media: imx: imx7_mipi_csis: Make source .s_power() optional Laurent Pinchart
2021-01-05 15:28 ` [PATCH 63/75] media: imx: imx7_mipi_csis: Avoid double get of wrap clock Laurent Pinchart
2021-01-05 15:28 ` [PATCH 64/75] media: imx: imx7_mipi_csis: Drop 10-bit YUV support Laurent Pinchart
2021-01-05 15:28 ` [PATCH 65/75] media: imx: imx7_mipi_csis: Fix UYVY8 media bus format Laurent Pinchart
2021-01-05 15:28 ` [PATCH 66/75] media: imx: imx7_mipi_csis: Inline mipi_csis_set_hsync_settle() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 67/75] media: imx: imx7_mipi_csis: Move link setup check out of locked section Laurent Pinchart
2021-01-05 15:28 ` [PATCH 68/75] media: imx: imx7_mipi_csis: Calculate Ths_settle from source pixel rate Laurent Pinchart
2021-01-06 22:59 ` Sakari Ailus
2021-01-09 0:52 ` Laurent Pinchart
2021-01-11 9:39 ` Rui Miguel Silva
2021-01-05 15:28 ` [PATCH 69/75] media: imx: imx7_mipi_csis: Turn register access macros into functions Laurent Pinchart
2021-01-05 15:28 ` [PATCH 70/75] media: imx: imx7_mipi_csis: Fully initialize MIPI_CSIS_DPHYCTRL register Laurent Pinchart
2021-01-05 15:28 ` [PATCH 71/75] media: imx: imx7_mipi_csis: Define macros for DPHY_BCTRL_L fields Laurent Pinchart
2021-01-05 15:28 ` [PATCH 72/75] media: imx: imx7_mipi_csis: Make ISP registers macros take channel ID Laurent Pinchart
2021-01-05 15:28 ` [PATCH 73/75] media: imx: imx7_mipi_csis: Rename register macros to match datasheet Laurent Pinchart
2021-01-05 15:28 ` [PATCH 74/75] media: imx: imx7_mipi_csis: Use register macros in mipi_csis_dump_regs() Laurent Pinchart
2021-01-05 15:28 ` [PATCH 75/75] media: imx: imx7_mipi_csis: Print shadow registers " Laurent Pinchart
2021-01-05 17:45 ` [PATCH 00/75] media: imx: Miscellaneous fixes and cleanups for i.MX7 Fabio Estevam
2021-01-05 19:00 ` Fabio Estevam
2021-01-06 15:41 ` Laurent Pinchart [this message]
2021-01-06 21:10 ` Fabio Estevam
2021-01-09 1:10 ` Laurent Pinchart
2021-01-09 1:47 ` Fabio Estevam
2021-02-15 0:23 ` Laurent Pinchart
2021-01-05 19:29 ` Rui Miguel Silva
2021-01-11 9:53 ` Rui Miguel Silva
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=X/XaJ0UA04ekdWpi@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=ezequiel@collabora.com \
--cc=festevam@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rmfrfs@gmail.com \
--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