1
0
Fork 0
Commit Graph

19 Commits (2d9888c5b28d872e0f1d9bb7005a1c6b2d1e9615)

Author SHA1 Message Date
Sylwester Nawrocki bae4500399 [media] exynos4-is: Add missing entity function initialization
Suppresses following warnings:

s5p-fimc-md camera: Entity type for entity FIMC.0 was not initialized!
s5p-fimc-md camera: Entity type for entity FIMC.1 was not initialized!
s5p-fimc-md camera: Entity type for entity s5p-mipi-csis.0 was not initialized!
s5p-fimc-md camera: Entity type for entity s5p-mipi-csis.1 was not initialized!
s5p-fimc-md camera: Entity type for entity FIMC-LITE.0 was not initialized!
s5p-fimc-md camera: Entity type for entity FIMC-LITE.1 was not initialized!
s5p-fimc-md camera: Entity type for entity FIMC-IS-ISP was not initialized!

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22 10:14:56 -03:00
Mauro Carvalho Chehab ab22e77cd3 [media] media framework: rename pads init function to media_entity_pads_init()
With the MC next gen rework, what's left for media_entity_init()
is to just initialize the PADs. However, certain devices, like
a FLASH led/light doesn't have any input or output PAD.

So, there's no reason why calling media_entity_init() would be
mandatory. Also, despite its name, what this function actually
does is to initialize the PADs data. So, rename it to
media_entity_pads_init() in order to reflect that.

The media entity actual init happens during entity register,
at media_device_register_entity(). We should move init of
num_links and num_backlinks to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11 12:19:03 -02:00
Mauro Carvalho Chehab 1809510715 [media] media: get rid of unused "extra_links" param on media_entity_init()
Currently, media_entity_init() creates an array with the links,
allocated at init time. It provides a parameter (extra_links)
that would allocate more links than the current needs, but this
is not used by any driver.

As we want to be able to do dynamic link allocation/removal,
we'll need to change the implementation of the links. So,
before doing that, let's first remove that extra unused
parameter, in order to cleanup the interface first.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11 12:18:39 -02:00
Hans Verkuil f7234138f1 [media] v4l2-subdev: replace v4l2_subdev_fh by v4l2_subdev_pad_config
If a subdevice pad op is called from a bridge driver, then there is
no v4l2_subdev_fh struct that can be passed to the subdevice. This
made it hard to use such subdevs from a bridge driver.

This patch replaces the v4l2_subdev_fh pointer by a v4l2_subdev_pad_config
pointer in the pad ops. This allows bridge drivers to use the various
try_ pad ops by creating a v4l2_subdev_pad_config struct and passing it
along to the pad op.

The v4l2_subdev_get_try_* macros had to be changed because of this, so
I also took the opportunity to use the full name of the v4l2_subdev_get_try_*
functions in the __V4L2_SUBDEV_MK_GET_TRY macro arguments: if you now do
'git grep v4l2_subdev_get_try_format' you will actually find the header
where it is defined.

One remark regarding the drivers/staging/media/davinci_vpfe patches: the
*_init_formats() functions assumed that fh could be NULL. However, that's
not true for this driver, it's always set. This is almost certainly a copy
and paste from the omap3isp driver. I've updated the code to reflect the
fact that fh is never NULL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-23 11:41:36 -07:00
Boris BREZILLON 27ffaeb0ab [media] platform: Make use of media_bus_format enum
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Reference new definitions in all platform drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:54:08 -02:00
Sylwester Nawrocki 34947b8aeb [media] exynos4-is: Add the FIMC-IS ISP capture DMA driver
Add a video capture node for the FIMC-IS ISP IP block. The Exynos4x12
FIMC-IS ISP IP block has 2 DMA interfaces that allow to capture raw
Bayer and YUV data to memory.  Currently only the DMA2 output is and
raw Bayer data capture is supported.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 10:37:12 -03:00
Joe Perches 2028c71d54 [media] media: Remove unnecessary semicolons
These aren't necessary after switch and while statements.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:51:57 -03:00
Sylwester Nawrocki c1cd2b96e2 [media] exynos4-is: Initialize the ISP subdev sd->owner field
Set the subdevs owner module so the exynos4_fimc_is module cannot
be unloaded when the FIMC-IS driver is in use.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24 04:51:25 -03:00
Sylwester Nawrocki 949457305e [media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
Ensure there is a valid initial resolution and pixel format set
at the FIMC-IS-ISP subdev pads.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-28 15:32:37 -03:00
Sylwester Nawrocki 5cfaad64d8 [media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev
Ensure TRY formats are propagated from the sink pad to the source pads
of the FIMC-IS-ISP subdev and the TRY and ACTIVE formats are separated.

[mchehab@redhat.com: Whitespace cleanup]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungin.park@samsung.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-28 15:32:17 -03:00
Mauro Carvalho Chehab 37c1d2e409 Merge branch 'linus' into patchwork
* linus: (1465 commits)
  ARM: tegra30: clocks: Fix pciex clock registration
  lseek(fd, n, SEEK_END) does *not* go to eof - n
  Linux 3.10-rc6
  smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device
  sctp: fully initialize sctp_outq in sctp_outq_init
  netiucv: Hold rtnl between name allocation and device registration.
  ...
2013-06-20 05:19:09 -03:00
Sylwester Nawrocki 4434adff80 [media] exynos4-is: Add isp_dbg() macro
Add a debug trace macro for the FIMC-IS ISP subdev and the ISP video
node drivers which are going to be added in subsequent patches.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-12 22:06:04 -03:00
Phil Carmody 0e761b21b9 [media] exynos4-is: Simplify bitmask usage
Merge the two sets of flags into one array to simplify accessing
arbitrary bits from them.

Signed-off-by: Phil Carmody <phil.carmody@partner.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-12 22:04:09 -03:00
Sylwester Nawrocki ac2a4a8664 [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
The FIMC-IS-ISP handles only Bayer formats thus V4L2_COLORSPACE_SRGB
should be used. This change applies to the code first added in v3.10.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08 19:53:39 -03:00
Sylwester Nawrocki 5a66561f42 [media] exynos4-is: Fix initialization of subdev 'flags' field
Ensure the value of struct v4l2_subdev::flags field as set
in v4l2_subdev_init() is preserved when initializing it in
the subdev drivers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 09:35:03 -03:00
Sylwester Nawrocki b54373c549 [media] exynos4-is: Disable debug trace by default in fimc-isp.c
Make sure the debug level is properly set initially so any debug
information is not printed to the kernel log without explicitly
enabling it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:52:57 -03:00
Sylwester Nawrocki 3530ef0a6e [media] exynos4-is: Rename the ISP chain configuration data structure
More appropriate names for the ISP chain data structure.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:51:56 -03:00
Sylwester Nawrocki a6f5635e63 [media] exynos4-is: Improve the ISP chain parameter count calculation
Instead of incrementing p_region_num field each time we set a bit
in the parameter mask calculate the number of bits set only when
this information is needed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:50:31 -03:00
Sylwester Nawrocki 9a761e4368 [media] exynos4-is: Add Exynos4x12 FIMC-IS driver
This patch adds a set of core files of the Exynos4x12 FIMC-IS
V4L2 driver. This includes main functionality like allocating
memory, loading the firmware, FIMC-IS register interface and
host CPU <-> IS command and error code definitions.
The driver currently exposes a single subdev named FIMC-IS-ISP,
which corresponds to the FIMC-IS ISP and DRC IP blocks.
The FIMC-IS-ISP subdev currently supports only a subset of user
controls. For other controls we need several extensions at the
V4L2 API. The supported standard controls are:
brightness, contrast, saturation, hue, sharpness, 3a_lock,
exposure_time_absolute, white_balance_auto_preset,
iso_sensitivity, iso_sensitivity_auto, exposure_metering_mode.

Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:59:24 -03:00