Re: adv7280: Scrolling images on imx6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.04.21 15:27, Fabio Estevam wrote:
On Mon, Apr 26, 2021 at 1:14 PM Fabio Estevam <festevam@xxxxxxxxx> wrote:

Hi Tim,

I am back at trying to get a proper image captured by the ADV7280 on
an imx6dl board connected to the parallel CSI bus.

I tried your patches against 5.4 and 5.12:

https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FGateworks%2Flinux-imx6%2Fcommit%2F959fbd4&amp;data=04%7C01%7Cfrieder.schrempf%40kontron.de%7Cbe8362b204924f7c141008d909804d4a%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637551268920096235%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2ZBhpF3FRT1hpXKH95KHnoNJm42p9gHzi6h54Fokvvk%3D&amp;reserved=0
and
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.kernel.org%2Fproject%2Flinux-media%2Fpatch%2F20190827215539.1286-1-mmichilot%40gateworks.com%2F&amp;data=04%7C01%7Cfrieder.schrempf%40kontron.de%7Cbe8362b204924f7c141008d909804d4a%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637551268920096235%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6h1N8qQ7J4w2xJujKOQp4spJDiOGLm%2FxTx0SIbBpgGs%3D&amp;reserved=0

,but I am still getting horizontal scrolling images after running:

The analog camera I am using produces PAL content. If I force the
initial curr_norm to PAL like this:

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index e780969cc2f2..4ffe85ef02a0 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1346,7 +1346,7 @@ static int adv7180_probe(struct i2c_client *client,

   state->irq = client->irq;
   mutex_init(&state->mutex);
- state->curr_norm = V4L2_STD_NTSC;
+ state->curr_norm = V4L2_STD_PAL;
   if (state->chip_info->flags & ADV7180_FLAG_RESET_POWERED)
   state->powered = true;
   else

Then I get stable image and no more scrolling.

This patch from Steve is still needed though:
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FGateworks%2Flinux-imx6%2Fcommit%2F959fbd4&amp;data=04%7C01%7Cfrieder.schrempf%40kontron.de%7Cbe8362b204924f7c141008d909804d4a%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C637551268920096235%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2ZBhpF3FRT1hpXKH95KHnoNJm42p9gHzi6h54Fokvvk%3D&amp;reserved=0

What would be the correct way to fix this NTSC versus PAL selection?

I tried passing the norm property like this, but it gives me an error:

# gst-launch-1.0 -v  v4l2src norm=PAL device=/dev/video2 ! kmssink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 800
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 480
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Failed to set norm for device '/dev/video2'.
Additional debug info:
../gst-plugins-good-1.18.2/sys/v4l2/v4l2_calls.c(779):
gst_v4l2_set_norm (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Inappropriate ioctl for device

Appreciate any suggestions, thanks

I don't know much about the v4l/media subsystem, but in my case I was able to switch to PAL like this:

v4l2-ctl --device /dev/v4l-subdev2 --set-standard PAL

Though your subdev is probably a different one as I was running this on i.MX8MM without IPU.



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux