mbox series

[00/11] media: exynos4-is: Improve support for s5pv210 and parallel ports

Message ID BN6PR04MB06602E7221CC7455F3142540A3AE0@BN6PR04MB0660.namprd04.prod.outlook.com (mailing list archive)
Headers show
Series media: exynos4-is: Improve support for s5pv210 and parallel ports | expand

Message

Jonathan Bakker April 26, 2020, 2:26 a.m. UTC
This patchset improves support in the exynos4-is driver for s5pv210
platforms as well as for sensors connected to the parallel ports
and not using the CSIS device.

Fixes range from nullptr exceptions to probe fixes to JPEG fixes.

Notably, it also changes the fwnode probing of parallel port sensors
to match the binding doc.  The binding doc said port A = reg 0 and
port B = reg 1 but the driver implemented A=1 and B=2.  The only in-tree
user of parallel ports is currently Goni, which notes that it uses port
A but has reg = 1.  Also note that the sensor driver is not mainlined
despite being present.  I have left the DTS as-is.

Some patches cleaning up non-DT support are also included.

The patches have been tested on a first-gen Galaxy S GT-i900M device based
on S5PV210.  Two sensors (CE147 and S5KA3DFX, both with non-mainline
drivers), both attached to port A, were succesfully used.

Jonathan Bakker (10):
  media: exynos4-is: Remove static driver data for S5PV210 FIMC variants
  media: exynos4-is: Fix nullptr when no CSIS device present
  media: exynos4-is: Correct missing entity function initialization
  media: exynos4-is: Improve support for sensors with multiple pads
  media: exynos4-is: Properly set JPEG options when not using CSIS
  media: exynos4-is: Add support for multiple sensors on one port
  media: exynos4-is: Remove inh_sensor_ctrls
  media: exynos4-is: Remove unused struct member input_index
  media: exynos4-is: Prevent duplicate call to media_pipeline_stop
  media: exynos4-is: Correct parallel port probing

Tomasz Figa (1):
  media: exynos4-is: Request syscon only if ISP writeback is present

 .../media/platform/exynos4-is/fimc-capture.c  | 22 ++----
 drivers/media/platform/exynos4-is/fimc-core.c | 67 ++----------------
 drivers/media/platform/exynos4-is/fimc-core.h |  5 --
 drivers/media/platform/exynos4-is/fimc-reg.c  |  7 ++
 drivers/media/platform/exynos4-is/media-dev.c | 68 ++++++++++++++-----
 drivers/media/platform/exynos4-is/media-dev.h |  1 +
 include/media/drv-intf/exynos-fimc.h          |  2 +-
 7 files changed, 72 insertions(+), 100 deletions(-)

Comments

Hans Verkuil June 24, 2020, 11:39 a.m. UTC | #1
Can someone from Samsung or someone who knows this SoC take a look at this series?

This series looks sane to me, so I'll probably merge this if nobody replies
in the next two weeks or so.

Regards,

	Hans

On 26/04/2020 04:26, Jonathan Bakker wrote:
> This patchset improves support in the exynos4-is driver for s5pv210
> platforms as well as for sensors connected to the parallel ports
> and not using the CSIS device.
> 
> Fixes range from nullptr exceptions to probe fixes to JPEG fixes.
> 
> Notably, it also changes the fwnode probing of parallel port sensors
> to match the binding doc.  The binding doc said port A = reg 0 and
> port B = reg 1 but the driver implemented A=1 and B=2.  The only in-tree
> user of parallel ports is currently Goni, which notes that it uses port
> A but has reg = 1.  Also note that the sensor driver is not mainlined
> despite being present.  I have left the DTS as-is.
> 
> Some patches cleaning up non-DT support are also included.
> 
> The patches have been tested on a first-gen Galaxy S GT-i900M device based
> on S5PV210.  Two sensors (CE147 and S5KA3DFX, both with non-mainline
> drivers), both attached to port A, were succesfully used.
> 
> Jonathan Bakker (10):
>   media: exynos4-is: Remove static driver data for S5PV210 FIMC variants
>   media: exynos4-is: Fix nullptr when no CSIS device present
>   media: exynos4-is: Correct missing entity function initialization
>   media: exynos4-is: Improve support for sensors with multiple pads
>   media: exynos4-is: Properly set JPEG options when not using CSIS
>   media: exynos4-is: Add support for multiple sensors on one port
>   media: exynos4-is: Remove inh_sensor_ctrls
>   media: exynos4-is: Remove unused struct member input_index
>   media: exynos4-is: Prevent duplicate call to media_pipeline_stop
>   media: exynos4-is: Correct parallel port probing
> 
> Tomasz Figa (1):
>   media: exynos4-is: Request syscon only if ISP writeback is present
> 
>  .../media/platform/exynos4-is/fimc-capture.c  | 22 ++----
>  drivers/media/platform/exynos4-is/fimc-core.c | 67 ++----------------
>  drivers/media/platform/exynos4-is/fimc-core.h |  5 --
>  drivers/media/platform/exynos4-is/fimc-reg.c  |  7 ++
>  drivers/media/platform/exynos4-is/media-dev.c | 68 ++++++++++++++-----
>  drivers/media/platform/exynos4-is/media-dev.h |  1 +
>  include/media/drv-intf/exynos-fimc.h          |  2 +-
>  7 files changed, 72 insertions(+), 100 deletions(-)
>
Krzysztof Kozlowski June 24, 2020, 11:54 a.m. UTC | #2
On Wed, Jun 24, 2020 at 01:39:50PM +0200, Hans Verkuil wrote:
> Can someone from Samsung or someone who knows this SoC take a look at this series?
> 
> This series looks sane to me, so I'll probably merge this if nobody replies
> in the next two weeks or so.

Unfortunately I don't know the media part on S5Pv210 at all so I cannot
provide any feedback. There are not many active users of these SoCs
nowadays. One of hem is Jonathan, so if he wants to change something he will
mostly break/affect his own setup. :) Therefore I think it is safe to merge.

Best regards,
Krzysztof
Tomasz Figa June 24, 2020, 11:58 a.m. UTC | #3
On Wed, Jun 24, 2020 at 1:54 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, Jun 24, 2020 at 01:39:50PM +0200, Hans Verkuil wrote:
> > Can someone from Samsung or someone who knows this SoC take a look at this series?
> >
> > This series looks sane to me, so I'll probably merge this if nobody replies
> > in the next two weeks or so.
>
> Unfortunately I don't know the media part on S5Pv210 at all so I cannot
> provide any feedback. There are not many active users of these SoCs
> nowadays. One of hem is Jonathan, so if he wants to change something he will
> mostly break/affect his own setup. :) Therefore I think it is safe to merge.

I think this driver is also used on Exynos4210 and on some setups with
4412 where the ISP is not used.

I can't promise anything, but I'll try to do a high level review.
Hopefully I still have some memory from the time I used to play with
this hardware.

Best regards,
Tomasz
Jonathan Bakker June 24, 2020, 9:14 p.m. UTC | #4
Hi Tomasz,

On 2020-06-24 4:58 a.m., Tomasz Figa wrote:
> On Wed, Jun 24, 2020 at 1:54 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Wed, Jun 24, 2020 at 01:39:50PM +0200, Hans Verkuil wrote:
>>> Can someone from Samsung or someone who knows this SoC take a look at this series?
>>>
>>> This series looks sane to me, so I'll probably merge this if nobody replies
>>> in the next two weeks or so.
>>
>> Unfortunately I don't know the media part on S5Pv210 at all so I cannot
>> provide any feedback. There are not many active users of these SoCs
>> nowadays. One of hem is Jonathan, so if he wants to change something he will
>> mostly break/affect his own setup. :) Therefore I think it is safe to merge.
> 
> I think this driver is also used on Exynos4210 and on some setups with
> 4412 where the ISP is not used.

Yes, this driver is also used by Exynos4210 and Exynos4412, notably by the Galaxy S3 series.
They don't use the parallel ports, but rather the CSIS.  I don't believe I've broken support
for that, but I don't have the hardware to test.

My other remaining concern is whether to adjust the camera port A/camera port B to match the
device tree documentation or to update the documentation to match the driver.  I decided to
update the driver in these patches, but it is much simpler to simply update the binding doc.
The only mainline user of the parallel ports is the Goni dev board which appears to be setup
for the driver way of numbering as opposed to the binding doc.  I have no strong preference
on which way to actually go.

> 
> I can't promise anything, but I'll try to do a high level review.
> Hopefully I still have some memory from the time I used to play with
> this hardware.

Thanks, that would be appreciated,
Jonathan

> 
> Best regards,
> Tomasz
>