mbox series

[0/3] atomisp: add support for enum frame rate and sizes

Message ID cover.1636651027.git.mchehab+huawei@kernel.org (mailing list archive)
Headers show
Series atomisp: add support for enum frame rate and sizes | expand

Message

Mauro Carvalho Chehab Nov. 11, 2021, 5:27 p.m. UTC
Adding support for those two ioctls are trivial, and allow testing
different resolutions with the driver.

Together with some improvements I made at camorama, it is now
possible to change the atomisp sensor's resolution at the GUI.

Talking about camorama, I also added there an option to disable
the Gtk cairo_scale() calls. On my tests here, placing ov2680 on
its maximum resolution, I'm getting a framerate of 26 fps, which
sounds reasonable, as the maximum would be 30fps, and I'm not
using daylight.

When letting cairo_scale() to run, the rate reduces to 8 fps, meaning 
that Gtk is not using GPU acceleration.

Funny enough, when resolution is lower, atomisp is giving a very
bad framerate (around 3fps, even with the scaler disabled).

This is a very weird result, probably indicating some problems inside
the driver. That requires further investigation.

Mauro Carvalho Chehab (3):
  media: atomisp-ov2680: implement enum frame intervals
  media: atomisp-ov2680: adjust the maximum frame rate
  media: atomisp: implement enum framesize/frameinterval

 .../media/atomisp/i2c/atomisp-ov2680.c        | 21 ++++++++
 drivers/staging/media/atomisp/i2c/ov2680.h    | 14 ++---
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 53 +++++++++++++++++++
 3 files changed, 81 insertions(+), 7 deletions(-)

Comments

Mauro Carvalho Chehab Nov. 12, 2021, 12:03 p.m. UTC | #1
Em Thu, 11 Nov 2021 17:27:55 +0000
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Adding support for those two ioctls are trivial, and allow testing
> different resolutions with the driver.
> 
> Together with some improvements I made at camorama, it is now
> possible to change the atomisp sensor's resolution at the GUI.
> 
> Talking about camorama, I also added there an option to disable
> the Gtk cairo_scale() calls. On my tests here, placing ov2680 on
> its maximum resolution, I'm getting a framerate of 26 fps, which
> sounds reasonable, as the maximum would be 30fps, and I'm not
> using daylight.
> 
> When letting cairo_scale() to run, the rate reduces to 8 fps, meaning 
> that Gtk is not using GPU acceleration.
> 
> Funny enough, when resolution is lower, atomisp is giving a very
> bad framerate (around 3fps, even with the scaler disabled).
> 
> This is a very weird result, probably indicating some problems inside
> the driver. That requires further investigation.

Ok, when the sensor's resolution is not the highest one, what happens is
that  the frame is retrieved via some timeout logic:

[10447.865064] ov2680 i2c-OVTI2680:00: ov2680_s_stream one
[10447.865491] atomisp-isp2 0000:00:03.0: timeout recovery handling done
[10450.029956] atomisp-isp2 0000:00:03.0: [WARNING]asd 0 pipe ATOMISP ISP PREVIEW output ISP timeout 1!
[10450.030099] atomisp-isp2 0000:00:03.0: pipe on asd0 timeout cnt: (0, 0, 1, 0) of 2, recover = 1
[10450.030137] atomisp-isp2 0000:00:03.0: pipe on asd1 timeout cnt: (0, 0, 0, 0) of 2, recover = 1

It sounds that it can't properly detect the end of frame when the
sensor is not on its highest resolution.

Basically atomisp_wdt_work() is triggered by a 
IA_CSS_EVENT_TYPE_FW_ASSERT event. Identifying why this is happening 
is not trivial, though.

Regards,
Mauro