09 Jan, 2012

1 commit


01 Jan, 2012

1 commit

  • The current gspca core code has a regression where it no longer properly
    falls back to lower alt settings when there is not enough bandwidth.

    This causes many iso based usb-1 cameras to not work when plugged into a
    usb2 hub or a sandybridge chipset motherboard!

    This patch fixes this.

    Signed-off-by: Hans de Goede
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Linus Torvalds

    Mauro Carvalho Chehab
     

30 Dec, 2011

1 commit

  • The new iso bandwidth calculation code accidentally has broken support
    for bulk mode cameras. This has broken the following drivers:
    finepix, jeilinj, ovfx2, ov534, ov534_9, se401, sq905, sq905c, sq930x,
    stv0680, vicam.

    Thix patch fixes this. Fix tested with: se401, sq905, sq905c, stv0680 & vicam
    cams.

    Signed-off-by: Hans de Goede
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Linus Torvalds

    Hans de Goede
     

24 Dec, 2011

1 commit


21 Dec, 2011

1 commit

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
    Revert "[media] af9015: limit I2C access to keep FW happy"
    [media] s5p-fimc: Fix camera input configuration in subdev operations
    [media] m5mols: Fix logic in sanity check
    [media] ati_remote: switch to single-byte scancodes
    [media] V4L: mt9m111: fix uninitialised mutex
    [media] V4L: omap1_camera: fix missing include
    [media] V4L: mt9t112: use after free in mt9t112_probe()
    [media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
    [media] s5p_mfc_enc: fix s/H264/H263/ typo
    [media] omap_vout: Fix compile error in 3.1
    [media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
    [media] au0828: add missing USB ID 2040:7213
    [media] au0828: add missing USB ID 2040:7260
    [media] [trivial] omap24xxcam-dma: Fix logical test
    [media] omap_vout: fix crash if no driver for a display
    [media] media: video: s5p-tv: fix build break
    [media] omap3isp: fix compilation of ispvideo.c
    [media] m5mols: Fix set_fmt to return proper pixel format code
    [media] s5p-fimc: Use correct fourcc for RGB565 colour format
    [media] s5p-fimc: Fail driver probing when sensor configuration is wrong
    ...

    Linus Torvalds
     

20 Dec, 2011

1 commit


13 Dec, 2011

1 commit

  • This reverts commit ff83bd82cb343d37b5ab8e402aaad9ef33d03f1e.

    As requested by Antti:
    From a talk with him at #linuxtv irc, he strong feeling that some apps
    like MythTV will do a lot a lot of I2C I/O and now it adds locks,
    with utimatelly means more delays. This could cause bad effects.

    There is a new patch for 3.3 that re-writes af9013 in order to limit
    I2C I/O. and thus those patches could be nice to have together
    because those user who has has problems are most likely MythTV users.

    So, let's revert this commit for now.

    Requested-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

11 Dec, 2011

12 commits


10 Dec, 2011

1 commit


07 Dec, 2011

1 commit


05 Dec, 2011

1 commit

  • Eliminate the public omap_find_iommu_device() method, and don't
    expect clients to provide the omap_iommu handle anymore.

    Instead, OMAP's iommu driver now utilizes dev_archdata's private iommu
    extension to be able to access the required iommu information.

    This way OMAP IOMMU users are now able to use the generic IOMMU API without
    having to call any omap-specific binding method.

    Update omap3isp appropriately.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Laurent Pinchart
    Acked-by: Tony Lindgren
    Cc: Hiroshi Doyu

    Ohad Ben-Cohen
     

25 Nov, 2011

14 commits

  • This patch fixes following build break:

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Mauro Carvalho Chehab

    Marek Szyprowski
     
  • Fix following build error by explicitely including
    header file.

    CC drivers/media/video/omap3isp/ispvideo.o

    Signed-off-by: Dmitry Artamonow
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Dmitry Artamonow
     
  • In case pixel format is modified in set_fmt by the driver,
    the changes are not propagated back to the caller. Fix this
    by adjusting passed data for TRY and ACTIVE format.

    Also remove redundant pixel format code information from
    struct m5mols_info, it's already available in 'ffmt' array.
    Remove pad number validation in set/get_fmt, this is already
    done in the core.

    Signed-off-by: Sylwester Nawrocki
    Acked-by: HeungJun Kim
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • With 16-bit RGB565 colour format pixels are stored by the device in memory
    in the following order:

    | b3 | b2 | b1 | b0 |
    ~+-----+-----+-----+-----+
    | R5 G6 B5 | R5 G6 B5 |

    This corresponds to V4L2_PIX_FMT_RGB565 fourcc, not V4L2_PIX_FMT_RGB565X.
    This change is required to avoid trouble when setting up video pipeline
    with the s5p-tv devices, so the colour formats at both devices can be
    properly matched.

    Cc:
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • When a sensor with MIPI-CSI interface is attached through platform
    data definition and the MIPI-CSI receiver is not selected in kernel
    configuration s5p-fimc driver probe() will now succeed, issuing only
    a warning. It was done this way to allow the driver to work even if
    system configuration is not exactly right.

    Instead make the driver's probe() fail if a MIPI-CSI sensor was
    requested but s5p-csis module is not present.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Minimum vertical pixel size alignment for input and output DMA and
    the scaler depend on color format, rotation, the IP instance and revision.

    Make vertical pixel size of format and crop better fit for each SoC
    revision and the IP instance by adding min_vsize_align attribute to
    the FIMC variant data structure. It's now common for the DMA engines
    and the scaler.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • The "s5p-fimc-md" platform device platform_data is used to pass
    attached camera sensor data. Not allowing device probe() to succeed
    when it's null prevents using FIMC as a mem-to-mem device only.
    Fix this by removing the platform_data check against null and
    registering sensors only if platform_data is specified.
    Also add logging of the information which /dev/video is assigned
    to which device during probe().

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • When requested more than 2 buffers the buffer dequeue order was wrong
    due to erroneous updating FIMC registers in every interrupt handler
    call. This also fixes regression of resetting the output DMA buffer
    pointer at wrong time, when some buffers are already queued in hardware.
    The hardware is reset in the start_streaming callback in order to align
    the H/W state with the software output buffer pointer (buf_index).

    Additionally a simple write to S5P_CISCCTRL register is replaced with
    a read/modification/write to make sure the scaler is not being disabled
    in fimc_hw_set_scaler().

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • ST_LPM bit must not be initially set, so the first resume helper
    call properly quiesce the device's operation.
    Also fimc_runtime_suspend() at device remove is unneeded and
    leads to unbalanced clock disable so remove it.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Make sure the subdev pointer is cleared when the subdev object
    has been freed.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • After i2c_unregister_device() has been called the client object can already
    be freed and thus using the client pointer may lead to dereferencing freed
    memory. Avoid this by saving the adapter pointer for further use before
    i2c_unregister_device() call.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Register to read should be written to register 0xfb and then
    perform I2C read to get reg value.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Default IF for 6 MHz bandwidth is 3 MHz. Use that.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • AF9015 firmware does not like if it gets interrupted by I2C adapter
    request on some critical phases. During normal operation I2C adapter
    is used only 2nd demodulator and tuner on dual tuner devices.

    Override demodulator callbacks and use mutex for limit access to
    those "critical" paths to keep AF9015 happy.

    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     

12 Nov, 2011

1 commit

  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
    [media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
    [media] v4l2-event: Remove pending events from fh event queue when unsubscribing
    [media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
    [media] MAINTAINERS: add a maintainer for s5p-mfc driver
    [media] v4l: s5p-mfc: fix reported capabilities
    [media] media: vb2: reset queued list on REQBUFS(0) call
    [media] media: vb2: set buffer length correctly for all buffer types
    [media] media: vb2: add a check for uninitialized buffer
    [media] mxl111sf: fix build warning
    [media] mxl111sf: remove pointless if condition in mxl111sf_config_spi
    [media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config
    [media] mxl111sf: fix return value of mxl111sf_idac_config
    [media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls

    Linus Torvalds
     

09 Nov, 2011

1 commit


08 Nov, 2011

2 commits

  • Otherwise the fh changing the master control won't get the inactive state
    change event for the slave controls.

    Signed-off-by: Hans de Goede
    Signed-off-by: Mauro Carvalho Chehab

    Hans de Goede
     
  • Setting sev->fh to NULL causes problems for the del op added in the next
    patch of this series, since this op needs a way to get to its own data
    structures, and typically this will be done by using container_of on an
    embedded v4l2_fh struct.

    The reason the original code is setting sev->fh to NULL is to signal
    to users of the event framework that the unsubscription has happened,
    but since their is no shared lock between the event framework and users
    of it, this is inherently racy, and it also turns out to be unnecessary
    as long as both the event framework and the user of the framework do their
    own locking properly and the user guarantees that it holds no references
    to the subcribed_event structure after its del operation has been called.

    This is best explained by looking at the only code currently checking for
    sev->fh being set to NULL on unsubscribe, which is the v4l2-ctrls.c send_event
    function. Here is the relevant code from v4l2-ctrls: send_event():

    if (sev->fh && (sev->fh != fh ||
    (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK)))
    v4l2_event_queue_fh(sev->fh, &ev);

    Now lets say that v4l2_event_unsubscribe and v4l2-ctrls: send_event() race
    on the same sev, then the following could happens:

    1) send_event checks sev->fh, finds it is not NULL

    2) v4l2_event_unsubscribe sets sev->fh NULL
    3) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
    as the thread calling send_event holds the ctrl_lock

    4) send_event calls v4l2_event_queue_fh(sev->fh, &ev) which not is equivalent
    to calling: v4l2_event_queue_fh(NULL, &ev)
    5) oops, NULL pointer deref.

    Now again without setting sev->fh to NULL in v4l2_event_unsubscribe and
    without the (now senseless since always true) sev->fh != NULL check in

    1) send_event is about to call v4l2_event_queue_fh(sev->fh, &ev)

    2) v4l2_event_unsubscribe removes sev->list from the fh->subscribed list

    3) send_event calls v4l2_event_queue_fh(sev->fh, &ev)
    4) v4l2_event_queue_fh blocks on the fh_lock spinlock

    5) v4l2_event_unsubscribe unlocks the fh_lock spinlock
    6) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
    as the thread calling send_event holds the ctrl_lock

    8) v4l2_event_queue_fh takes the fh_lock
    7) v4l2_event_queue_fh calls v4l2_event_subscribed, does not find it since
    sev->list has been removed from fh->subscribed already -> does nothing
    9) v4l2_event_queue_fh releases the fh_lock
    10) the caller of send_event releases the ctrl lock (mutex)

    11) v4l2_ctrls del_event takes the ctrl lock
    12) v4l2_ctrls del_event removes sev->node from the ev_subs list
    13) v4l2_ctrls del_event releases the ctrl lock
    14) v4l2_event_unsubscribe frees the sev, to which no references are being
    held anymore

    Signed-off-by: Hans de Goede
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans de Goede