16 Apr, 2014

1 commit

  • VIDEO_TIMBERDALE selects TIMB_DMA which itself depends on
    MFD_TIMBERDALE, so VIDEO_TIMBERDALE should either select or depend on
    MFD_TIMBERDALE as well. I chose to make it depend on it because I
    think it makes more sense and it is consistent with what other options
    are doing.

    Adding a "|| HAS_IOMEM" to the TIMB_DMA dependencies silenced the
    kconfig warning about unmet direct dependencies but it was wrong:
    without MFD_TIMBERDALE, TIMB_DMA is useless as the driver has no
    device to bind to.

    Signed-off-by: Jean Delvare
    Cc: Vinod Koul
    Cc: Dan Williams
    Cc: Mauro Carvalho Chehab
    Signed-off-by: Vinod Koul

    Jean Delvare
     

08 Apr, 2014

2 commits


07 Apr, 2014

13 commits

  • The dequed CAPTURE_MPLANE type buffers don't contain the flags that the
    originally queued OUTPUT_MPLANE type buffers have. This breaks compliance.

    Copy the source v4l2_buffer flags to the destination v4l2_buffer flags before
    they are dequed.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • The vpe driver wasn't setting the correct field parameter for dequed CAPTURE
    type buffers for the case where the captured output is progressive.

    Set the field to V4L2_FIELD_NONE for the completed destination buffers when
    the captured output is progressive.

    For OUTPUT type buffers, a queued buffer's field is forced to V4L2_FIELD_NONE
    if the pixel format(configured through s_fmt for the buffer type
    V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE specifies) the field type isn't interlaced.
    If the pixel format specified was V4L2_FIELD_ALTERNATE, and the queued buffer's
    field isn't V4L2_FIELD_TOP or V4L2_FIELD_BOTTOM, the vb2 buf_prepare op returns
    an error.

    This ensures compliance, and that the dequeued output and captured buffers
    contain the field type that the driver used internally.

    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • Zero out the reserved formats in v4l2_pix_format_mplane and
    v4l2_plane_pix_format members of the returned v4l2_format pointer when passed
    through TRY_FMT ioctl.

    This ensures that the user doesn't interpret the non-zero fields as some data
    passed by the driver, and ensures compliance.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • The vpe output and capture queues are initially configured to default values in
    vpe_open(). A G_FMT before any S_FMTs will result in these values being
    populated.

    The colorspace and bytesperline parameter of this initial configuration are
    incorrect. This breaks compliance when as we get 'TRY_FMT(G_FMT) != G_FMT'.

    Fix the initial queue configuration such that it wouldn't need to be fixed by
    try_fmt.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • The bus_info parameter in v4l2_capabilities expects a 'platform_' prefix. This
    wasn't done in the driver and hence was breaking compliance. Update the bus_info
    parameter accordingly.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • querycap currently returns V4L2_CAP_VIDEO_M2M as a capability, this should be
    V4L2_CAP_VIDEO_M2M_MPLANE instead, as the driver supports multiplanar formats.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • The minimum width and height for VPE input/output was kept as 128 pixels. VPE
    doesn't have a constraint on the image height, it requires the image width to
    be at least 16 bytes.

    Change the minimum supported dimensions to 32x32. This allows us to de-interlace
    qcif content. A smaller image size than 32x32 didn't make much sense, so stopped
    at this.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • The video_device struct is currently embedded in the driver data struct vpe_dev.
    A vpe_dev instance is allocated by the driver, and the memory for the vfd is a
    part of this struct.

    The v4l2 core, however, manages the removal of the vfd region, through the
    video_device's .release() op, which currently is the helper
    video_device_release. This causes memory corruption, and leads to issues when
    we try to re-insert the vpe module.

    Use the video_device_release_empty helper function instead.

    Reviewed-by: Hans Verkuil
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • VPE has a ctrl parameter which decides how many mem to mem transactions the
    active job from the job queue can perform.

    The driver's job_ready() made sure that the number of ready source buffers are
    sufficient for the job to execute successfully. But it didn't make sure if
    there are sufficient ready destination buffers in the capture queue for the
    VPE output.

    If the time taken by VPE to process a single frame is really slow, then it's
    possible that we don't need to imply such a restriction on the dst queue, but
    really fast transactions(small resolution, no de-interlacing) may cause us to
    hit the condition where we don't have any free buffers for the VPE to write on.

    Add the extra check in job_ready() to make sure we have the sufficient amount
    of destination buffers.

    Acked-by: Kamil Debski
    Signed-off-by: Archit Taneja
    Signed-off-by: Mauro Carvalho Chehab

    Archit Taneja
     
  • Add sleep ops to lgdt3304_ops to invoke lgdt3305_sleep() to be called
    from dvb_frontend_suspend(). lgdt3305_soft_reset() is called for both
    3304 and 3305 devices. soft_reset and sleep touch LGDT3305_GEN_CTRL_3
    on 3304 and 3305 devices. Hence, adding sleep to lgdt3304_ops will help
    suspend 3304 properly from dvb_frontend_suspend().

    Signed-off-by: Shuah Khan
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Shuah Khan
     
  • The Kconfig entry for "Micronas DRX-J demodulator" defaults to modular
    if DVB_FE_CUSTOMISE is set. But that Kconfig symbol was replaced with
    MEDIA_SUBDRV_AUTOSELECT as of v3.7. So use the new symbol. And negate
    the logic, because MEDIA_SUBDRV_AUTOSELECT's logic is the opposite of
    the former logic.

    Signed-off-by: Paul Bolle
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Paul Bolle
     
  • fix the following warnings:
    m88rs2000.c:300:16: warning: symbol 'm88rs2000_setup' was not declared. Should it be static?
    m88rs2000.c:318:16: warning: symbol 'm88rs2000_shutdown' was not declared. Should it be static?
    m88rs2000.c:328:16: warning: symbol 'fe_reset' was not declared. Should it be static?
    m88rs2000.c:366:16: warning: symbol 'fe_trigger' was not declared. Should it be static?

    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Malcolm Priestley
     
  • Correct the initialization values at the start of the function
    and use proper variable sizes to prevent overflow.

    Signed-off-by: Benjamin Larsson
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Benjamin Larsson
     

06 Apr, 2014

6 commits

  • The generic scancode filtering has questionable value and makes it
    impossible to determine from userspace if there is an actual
    scancode hw filter present or not.

    So revert the generic parts.

    Based on a patch from James Hogan , but this
    version also makes sure that only the valid sysfs files are created
    in the first place.

    Signed-off-by: David Härdeman
    Acked-by: James Hogan
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • Overloading dev->s_filter to do two different functions (set wakeup filters
    and generic hardware filters) makes it impossible to tell what the
    hardware actually supports, so create a separate dev->s_wakeup_filter and
    make the distinction explicit.

    Signed-off-by: David Härdeman
    Acked-by: James Hogan
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • This reverts 18bc17448147e93f31cc9b1a83be49f1224657b2 and changes
    the code at img-ir-nec.c to use the order used by the other NEC decoders.

    The original patch ignored the fact that NEC32 scancodes are generated not
    only in the NEC raw decoder but also directly in some drivers. Whichever
    approach is chosen it should be consistent across drivers and this patch
    needs more discussion.

    Furthermore, I'm convinced that we have to stop playing games trying to
    decipher the "meaning" of NEC scancodes (what's the customer/vendor/address,
    which byte is the MSB, etc).

    Signed-off-by: David Härdeman
    Acked-by: James Hogan
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • That ID was added twice mistakenly.
    1st commit ac298ccdde4fe9b0a966e548a232ff4e8a6b8a31
    2nd commit 1c1b8734094551eb4075cf68cf76892498c0da61

    Revert commit 1c1b8734094551eb4075cf68cf76892498c0da61

    Reported-by: Jan Vcelak
    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Coverity CID 1196501: Missing break in switch (MISSING_BREAK)

    I introduced that bug recently by commit
    96a5b3a869e3dc7d55bf04a48a8dca8a4025787e.
    As a result, it will flood unintentionally error message to log.

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

    Antti Palosaari
     
  • Pull exynos media updates from Mauro Carvalho Chehab:
    "These are the remaining patches I have for the merge windows. It
    basically adds a new sensor and adds the needed DT bits for it to
    work"

    * 'topic/exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] s5p-fimc: Remove reference to outdated macro
    [media] s5p-jpeg: Fix broken indentation in jpeg-regs.h
    [media] exynos4-is: Add the FIMC-IS ISP capture DMA driver
    [media] exynos4-is: Add support for asynchronous subdevices registration
    [media] exynos4-is: Add clock provider for the SCLK_CAM clock outputs
    [media] exynos4-is: Use external s5k6a3 sensor driver
    [media] V4L: s5c73m3: Add device tree support
    [media] V4L: Add driver for s5k6a3 image sensor
    [media] Documentation: devicetree: Update Samsung FIMC DT binding
    [media] Documentation: dt: Add binding documentation for S5C73M3 camera
    [media] Documentation: dt: Add binding documentation for S5K6A3 image sensor

    Linus Torvalds
     

05 Apr, 2014

1 commit

  • Pull media updates from Mauro Carvalho Chehab:
    "The main set of series of patches for media subsystem, including:
    - document RC sysfs class
    - added an API to setup scancode to allow waking up systems using the
    Remote Controller
    - add API for SDR devices. Drivers are still on staging
    - some API improvements for getting EDID data from media
    inputs/outputs
    - new DVB frontend driver for drx-j (ATSC)
    - one driver (it913x/it9137) got removed, in favor of an improvement
    on another driver (af9035)
    - added a skeleton V4L2 PCI driver at documentation
    - added a dual flash driver (lm3646)
    - added a new IR driver (img-ir)
    - added an IR scancode decoder for the Sharp protocol
    - some improvements at the usbtv driver, to allow its core to be
    reused.
    - added a new SDR driver (rtl2832u_sdr)
    - added a new tuner driver (msi001)
    - several improvements at em28xx driver to fix PM support, device
    removal and to split the V4L2 specific bits into a separate
    sub-driver
    - one driver got converted to videobuf2 (s2255drv)
    - the e4000 tuner driver now follows an improved binding model
    - some fixes at V4L2 compat32 code
    - several fixes and enhancements at videobuf2 code
    - some cleanups at V4L2 API documentation
    - usual driver enhancements, new board additions and misc fixups"

    [ NOTE! This merge effective drops commit 4329b93b283c ("of: Reduce
    indentation in of_graph_get_next_endpoint").

    The of_graph_get_next_endpoint() function was moved and renamed by
    commit fd9fdb78a9bf ("[media] of: move graph helpers from
    drivers/media/v4l2-core to drivers/of"). It was originally called
    v4l2_of_get_next_endpoint() and lived in the file
    drivers/media/v4l2-core/v4l2-of.c.

    In that original location, it was then fixed to support empty port
    nodes by commit b9db140c1e46 ("[media] v4l: of: Support empty port
    nodes"), and that commit clashes badly with the dropped "Reduce
    intendation" commit. I had to choose one or the other, and decided
    that the "Support empty port nodes" commit was more important ]

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (426 commits)
    [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
    Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding"
    [media] em28xx: fix PCTV 290e LNA oops
    [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
    [media] m88ds3103: fix bug on .set_tone()
    [media] saa7134: fix WARN_ON during resume
    [media] v4l2-dv-timings: add module name, description, license
    [media] videodev2.h: add parenthesis around macro arguments
    [media] saa6752hs: depends on CRC32
    [media] si4713: fix Kconfig dependencies
    [media] Sensoray 2255 uses videobuf2
    [media] adv7180: free an interrupt on failure paths in init_device()
    [media] e4000: make VIDEO_V4L2 dependency optional
    [media] af9033: Don't export functions for the hardware filter
    [media] af9035: use af9033 PID filters
    [media] af9033: implement PID filter
    [media] rtl2832_sdr: do not use dynamic stack allocation
    [media] e4000: fix 32-bit build error
    [media] em28xx-audio: make sure audio is unmuted on open()
    [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format
    ...

    Linus Torvalds
     

03 Apr, 2014

1 commit

  • Pull compat time conversion changes from Peter Anvin:
    "Despite the branch name this is really neither an x86 nor an
    x32-specific patchset, although it the implementation of the
    discussions that followed the x32 security hole a few months ago.

    This removes get/put_compat_timespec/val() and replaces them with
    compat_get/put_timespec/val() which are savvy as to the current status
    of COMPAT_USE_64BIT_TIME.

    It removes several unused and/or incorrect/misleading functions (like
    compat_put_timeval_convert which doesn't in fact do any conversion)
    and also replaces several open-coded implementations what is now
    called compat_convert_timespec() with that function"

    * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    compat: Fix sparse address space warnings
    compat: Get rid of (get|put)_compat_time(val|spec)

    Linus Torvalds
     

02 Apr, 2014

2 commits

  • Pull staging driver updates from Greg KH:
    "Here's the huge drivers/staging/ update for 3.15-rc1.

    Loads of cleanup fixes, a few drivers removed, and some new ones
    added.

    All have been in linux-next for a while"

    * tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits)
    staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI
    staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig
    staging: comedi: poc: remove obsolete driver
    staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE
    staging: octeon-usb: prevent memory corruption
    staging: usbip: fix line over 80 characters
    staging: usbip: fix quoted string split across lines
    Staging: unisys: Remove RETINT macro
    Staging: unisys: Remove FAIL macro
    Staging: unisys: Remove RETVOID macro
    Staging: unisys: Remove RETPTR macro
    Staging: unisys: Remove RETBOOL macro
    Staging: unisys: Remove FAIL_WPOSTCODE_1 macro
    Staging: unisys: Cleanup macros to get rid of goto statements
    Staging: unisys: include: Remove unused macros from timskmod.h
    staging: dgap: fix the rest of the checkpatch warnings in dgap.c
    Staging: bcm: Remove unnecessary parentheses
    staging: wlags49_h2: Delete unnecessary braces
    staging: wlags49_h2: Do not use assignment in if condition
    staging: wlags49_h2: Enclose macro in a do-while loop
    ...

    Linus Torvalds
     
  • Pull driver core and sysfs updates from Greg KH:
    "Here's the big driver core / sysfs update for 3.15-rc1.

    Lots of kernfs updates to make it useful for other subsystems, and a
    few other tiny driver core patches.

    All have been in linux-next for a while"

    * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits)
    Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()"
    kernfs: cache atomic_write_len in kernfs_open_file
    numa: fix NULL pointer access and memory leak in unregister_one_node()
    Revert "driver core: synchronize device shutdown"
    kernfs: fix off by one error.
    kernfs: remove duplicate dir.c at the top dir
    x86: align x86 arch with generic CPU modalias handling
    cpu: add generic support for CPU feature based module autoloading
    sysfs: create bin_attributes under the requested group
    driver core: unexport static function create_syslog_header
    firmware: use power efficient workqueue for unloading and aborting fw load
    firmware: give a protection when map page failed
    firmware: google memconsole driver fixes
    firmware: fix google/gsmi duplicate efivars_sysfs_init()
    drivers/base: delete non-required instances of include
    kernfs: fix kernfs_node_from_dentry()
    ACPI / platform: drop redundant ACPI_HANDLE check
    kernfs: fix hash calculation in kernfs_rename_ns()
    kernfs: add CONFIG_KERNFS
    sysfs, kobject: add sysfs wrapper for kernfs_enable_ns()
    ...

    Linus Torvalds
     

31 Mar, 2014

2 commits

  • Add missing m88ts2022 module reference counts as removing that module
    is not allowed when it is used by em28xx-dvb module. That same module
    was not unregistered correctly, fix it too.

    Error cases validated by returning errors from m88ds3103, m88ts2022
    and a8293 probe().

    Signed-off-by: Antti Palosaari
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • The first hunk of this patch got merged wrong, likely due to some
    changes at the em28xx resume code. Revert it to reapply it right.

    This reverts commit 37571b163c15831cd0a213151c21387363dbf15b.

    Reported-by: Chris Lee
    Reported-by: Hans Verkuil
    Cc: stable@vger.kernel.org # Don't apply this patch or 37571b163c15
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

29 Mar, 2014

7 commits

  • Pointer to device state has been moved to different location during
    some change. PCTV 290e LNA function still uses old pointer, carried
    over FE priv, and it crash.

    Reported-by: Janne Kujanpää
    Signed-off-by: Antti Palosaari
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Add missing m88ts2022 module reference counts as removing that module
    is not allowed when it is used by em28xx-dvb module. That same module
    was not unregistered correctly, fix it too.

    Error cases validated by returning errors from m88ds3103, m88ts2022
    and a8293 probe().

    Signed-off-by: Antti Palosaari
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Band switching didn't worked always reliably as there was one
    register bit set wrong.

    Thanks to Robert Schlabbach for pointing this bug and solution.

    Reported-by: Robert Schlabbach
    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Do not attempt to reload the tuner modules when resuming after a suspend.
    This triggers a WARN_ON in kernel/kmod.c:148 __request_module.

    This fixes https://bugzilla.kernel.org/show_bug.cgi?id=69581.

    This has always been wrong, but it was never noticed until the WARN_ON
    was added in 3.9.

    Signed-off-by: Hans Verkuil
    Cc: stable@vger.kernel.org # for v3.9 and up
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • I completely forgot to add them when I made this module. Loading this module
    without it will taint the kernel, which is not intended.

    Signed-off-by: Hans Verkuil
    Cc: stable@vger.kernel.org # for v3.12 and up
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Have saa6752hs select CRC32.

    Signed-off-by: Hans Verkuil
    Reported-by: kbuild test robot
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on
    I2C as well.

    Signed-off-by: Hans Verkuil
    Reported-by: Paul Bolle
    Reported-by: Richard Weinberger
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

25 Mar, 2014

3 commits

  • commit 340a30c514 "s2255drv: upgrade to videobuf2" changed the API
    used by the s2255 driver, but did not modify the Kconfig statement,
    which can lead to build errors when no other driver already uses
    VIDEOBUF2_VMALLOC. This patch does the necessary Kconfig change.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • There is request_irq() in init_device(), but the interrupt is not removed
    on failure paths. The patch adds proper error handling.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Alexey Khoroshilov
     
  • That tuner driver is mainly for DVB API, but there is some V4L2 API
    controls for SDR usage. Make driver compile conditional so that V4L2
    is not mandatory. Without the V4L2 support driver is build as a DVB
    only, without SDR controls.

    Fixes following errors reported by kbuild test robot:
    ERROR: "v4l2_ctrl_auto_cluster" [drivers/media/tuners/e4000.ko] undefined!
    ERROR: "v4l2_ctrl_new_std" [drivers/media/tuners/e4000.ko] undefined!
    ERROR: "v4l2_ctrl_handler_init_class" [drivers/media/tuners/e4000.ko] undefined!
    ERROR: "v4l2_ctrl_handler_free" [drivers/media/tuners/e4000.ko] undefined!

    Reported-by: kbuild test robot
    Cc: Hans Verkuil
    Signed-off-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     

15 Mar, 2014

2 commits

  • Exporting functions for hardware filter is a bad idea, as it
    breaks compilation if:
    CONFIG_DVB_USB_AF9035=y
    CONFIG_DVB_AF9033=m

    Because the PID filter function calls would be hardcoded at
    af9035.

    The same doesn't happen with af9033_attach() because the
    dvb_attach() doesn't hardcode it. Instead, it dynamically
    links it at runtime.

    However, calling dvb_attach() multiple times is problematic,
    as it increments module kref.

    So, the better is to pass one parameter for the af9033 module
    to fill the hardware filters, and then use it inside af9035.

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

    Mauro Carvalho Chehab
     
  • PID filters are property of af9033 demod. Use PID filters from af9033
    driver as it provides those now.

    Allow possible dual mode on USB 1.1 mode too as bandwidth could be
    just enough when filters are used on both frontends.

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

    Antti Palosaari