20 Jun, 2017

40 commits

  • This is a wrapper around the media entity get_fwnode_pad operation.

    Signed-off-by: Niklas Söderlund
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The optional operation can be used by entities to report how it maps its
    fwnode endpoints to media pad numbers. This is useful for devices which
    require advanced mappings of pads.

    Signed-off-by: Niklas Söderlund
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • Add a check for v4l2_dev to v4l2_async_notifier_register() as to fail as
    early as possible since this will fail later in v4l2_async_test_notify().

    Signed-off-by: Niklas Söderlund
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The new Renesas R-Car H3 ES2.0 platforms have a new hw version register.
    Update the driver accordingly, defaulting to the new hw revision, and
    differentiating the older revision as ES1

    Signed-off-by: Kieran Bingham
    Reviewed-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Kieran Bingham
     
  • Remove useless variable assignment in function tc358743_isr().

    The value stored in variable _intstatus_ at line 1299 is
    overwritten at line 1302, just before it can be used.

    Addresses-Coverity-ID: 1397678

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Gustavo A. R. Silva
     
  • Updating my personal email address in solo6x10.

    Signed-off-by: Andrey Utkin
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Andrey Utkin
     
  • Anton Sviridenko is now in charge of drivers in Bluecherry.

    Signed-off-by: Andrey Utkin
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Andrey Utkin
     
  • The davinci VPIF is a single hardware block, but the existing driver
    is broken up into a common library (vpif.c), output (vpif_display.c) and
    intput (vpif_capture.c).

    When migrating to DT, to better model the hardware, and because
    registers, interrupts, etc. are all common,it was decided to
    have a single VPIF hardware node[1].

    Because davinci uses legacy, non-DT boot on several SoCs still, the
    platform_drivers need to remain. But they are also needed in DT boot.
    Since there are no DT nodes for the display/capture parts in DT
    boot (there is a single node for the parent/common device) we need to
    create platform_devices somewhere to instantiate the platform_drivers.

    When VPIF display/capture are needed for a DT boot, the VPIF node
    will have endpoints defined for its subdevs. Therefore, vpif_probe()
    checks for the presence of endpoints, and if detected manually creates
    the platform_devices for the display and capture platform_drivers.

    [1] Documentation/devicetree/bindings/media/ti,da850-vpif.txt

    Signed-off-by: Kevin Hilman
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Kevin Hilman
     
  • 'call_ptr_memop' can return NULL, so we must test its return value with
    'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless.

    Signed-off-by: Christophe JAILLET
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Christophe JAILLET
     
  • As long as only one CODA context is running we get alternating device_run()
    and wait_for_completion() calls, but when more then one CODA context is
    active, other VDOA slots can be inserted between those calls for one context.

    Make sure to wait on job completion before running a different context and
    before destroying the currently active context.

    Signed-off-by: Lucas Stach
    Reviewed-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Lucas Stach
     
  • This implements a simple handler for the case where decode did not finish
    sucessfully. This might be helpful during normal streaming, but for now it
    only handles the case where the context would deadlock with userspace,
    i.e. userspace issued DEC_CMD_STOP and waits for EOS, but after the failed
    decode run we would hold the context and wait for userspace to queue more
    buffers.

    Signed-off-by: Lucas Stach
    Reviewed-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Lucas Stach
     
  • The mvcol buffer needs to be placed behind the chroma plane(s), so
    use the real offset including any required rounding.

    Signed-off-by: Lucas Stach
    Reviewed-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Lucas Stach
     
  • This makes firmware name and path part of venus_resources
    structure and initialize it properly depending on the SoC and
    firmware version.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This adds support for V4L2_CID_MIN_BUFFERS_FOR_CAPTURE get control
    in venus decoder, it is usable in case when the userspace wants
    to know minimum capture buffers before calling request_buf for
    capture queue in mem2mem drivers. Also this will fix an issue
    found gstreamer v4l2videodec element, i.e. the video decoder
    element cannot continue because the buffers are insufficient.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes the following compile error ocured when building
    with gcc7:

    drivers/media/platform/qcom/venus/venc.c:1150
    venc_close() error: dereferencing freed memory 'inst'

    by moving kfree as a last call.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes the following compile error ocured when building
    with gcc7:

    drivers/media/platform/qcom/venus/vdec.c:1022
    vdec_close() error: dereferencing freed memory 'inst'

    by moving kfree as a last call.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes a warning found when building with gcc7:

    drivers/media/platform/qcom/venus/hfi_msgs.c:465:40:
    warning: variable 'domain' set but not used [-Wunused-but-set-variable]
    u32 rem_bytes, num_props, codecs = 0, domain = 0;
    ^~~~~~
    drivers/media/platform/qcom/venus/hfi_msgs.c:465:28:
    warning: variable 'codecs' set but not used [-Wunused-but-set-variable]
    u32 rem_bytes, num_props, codecs = 0, domain = 0;

    The warning is avoided by deleting the variables declaration.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes a warning found when building with gcc7:

    drivers/media/platform/qcom/venus/hfi_venus.c:998
    venus_isr_thread() warn: variable dereferenced before check
    'hdev' (see line 994)

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes a warning found when building the driver with gcc7:

    drivers/media/platform/qcom/venus/helpers.c:157
    load_per_instance() warn: variable dereferenced before check
    'inst' (see line 153)

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixes a warning found when building the driver with gcc7:

    drivers/media/platform/qcom/venus/hfi_cmds.c:415
    pkt_session_set_property_1x() warn: variable dereferenced before
    check 'pkt' (see line 412)
    drivers/media/platform/qcom/venus/hfi_cmds.c:1177
    pkt_session_set_property_3xx() warn: variable dereferenced before
    check 'pkt' (see line 1174)

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This fixed a warning when build driver with gcc7:

    drivers/media/platform/qcom/venus/hfi.c:171
    hfi_core_ping() warn: inconsistent returns 'mutex:&core->lock'.
    Locked on: line 159
    Unlocked on: line 171

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This adds Venus driver Makefile and changes v4l2 platform
    Makefile/Kconfig in order to enable building of the driver.

    Note that in this initial version the COMPILE_TEST-ing is not
    supported because the drivers specific to ARM builds are still
    in process of enabling the aforementioned compile testing.
    Once that disadvantage is fixed the Venus driver compile testing
    will be possible with follow-up changes.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • Here is the implementation of Venus video accelerator low-level
    functionality. It contanins code which setup the registers and
    startup uthe processor, allocate and manipulates with the shared
    memory used for sending commands and receiving messages.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This is the implementation of HFI. It is charged with the
    responsibility to comunicate with the firmware through an
    interface commands and messages.

    - hfi.c has interface functions used by the core, decoder
    and encoder parts to comunicate with the firmware. For example
    there are functions for session and core initialisation.

    - hfi_cmds has packetization operations which preparing
    packets to be send from host to firmware.

    - hfi_msgs takes care of messages sent from firmware to the
    host.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This adds encoder part of the driver plus encoder controls.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • This consists of video decoder implementation plus decoder
    controls.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • * core.c has implemented the platform driver methods, file
    operations and v4l2 registration.

    * helpers.c has implemented common helper functions for:
    - buffer management

    - vb2_ops and functions for format propagation,

    - functions for allocating and freeing buffers for
    internal usage. The buffer parameters describing internal
    buffers depends on current format, resolution and codec.

    - functions for calculation of current load of the
    hardware. Depending on the count of instances and
    resolutions it selects the best clock rate for the video
    core.

    * firmware loader

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • Add an entry for Venus video encoder/decoder accelerator driver.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • Add binding document for Venus video encoder/decoder driver

    Cc: Rob Herring
    Cc: devicetree@vger.kernel.org
    Acked-by: Rob Herring
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • this add functions for:
    - remove buffers from src/dst queue by index
    - remove exact buffer from src/dst queue

    also extends m2m API to iterate over a list of src/dst buffers
    in safely and non-safely manner.

    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Stanimir Varbanov
     
  • Linux 4.12-rc6

    * tag 'v4.12-rc6': (813 commits)
    Linux 4.12-rc6
    mm: larger stack guard gap, between vmas
    virtio_balloon: disable VIOMMU support
    mm: correct the comment when reclaimed pages exceed the scanned pages
    userfaultfd: shmem: handle coredumping in handle_userfault()
    mm: numa: avoid waiting on freed migrated pages
    swap: cond_resched in swap_cgroup_prepare()
    mm/memory-failure.c: use compound_head() flags for huge pages
    perf unwind: Report module before querying isactivation in dwfl unwind
    fs: pass on flags in compat_writev
    objtool: Add fortify_panic as __noreturn function
    powerpc/debug: Add missing warn flag to WARN_ON's non-builtin path
    USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
    drm: mxsfb_crtc: Reset the eLCDIF controller
    drm/mgag200: Fix to always set HiPri for G200e4 V2
    i2c: ismt: fix wrong device address when unmap the data buffer
    i2c: rcar: use correct length when unmapping DMA
    powerpc/xive: Fix offset for store EOI MMIOs
    drm/tegra: Correct idr_alloc() minimum id
    drm/tegra: Fix lockup on a use of staging API
    ...

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • As reported by gcc:

    drivers/media/i2c/ov13858.c:953:20: warning: duplicate const
    drivers/media/i2c/ov13858.c:953:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
    static const const s64 link_freq_menu_items[OV13858_NUM_OF_LINK_FREQS] = {
    ^~~~~

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • There is no need to split long string literals.
    Join them back.

    No functional change intended.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Andy Shevchenko
     
  • DW9714 is a 10 bit DAC, designed for linear
    control of voice coil motor.

    This driver creates a V4L2 subdevice and
    provides control to set the desired focus.

    [Sakari Ailus: Add MAINTAINERS entry.]

    Signed-off-by: Rajmohan Mani
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Rajmohan Mani
     
  • This patch adds driver for Omnivision's ov13858
    sensor, the driver supports following features:

    - manual exposure/gain(analog and digital) control support
    - two link frequencies
    - VBLANK/HBLANK support
    - test pattern support
    - media controller support
    - runtime pm support
    - supported resolutions
    + 4224x3136 at 30FPS
    + 2112x1568 at 30FPS(default) and 60FPS
    + 2112x1188 at 30FPS(default) and 60FPS
    + 1056x784 at 30FPS(default) and 60FPS

    [Sakari Ailus: use V4L2_CID_DIGITAL_GAIN instead, add MAINTAINERS entry.]

    Signed-off-by: Hyungwoo Yang
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Hyungwoo Yang
     
  • Elaborate the differences between V4L2_CID_GAIN and gain-type specific
    V4L2_CID_DIGITAL_GAIN and V4L2_CID_ANALOGUE_GAIN.

    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     
  • Add V4L2_CID_DIGITAL_GAIN to control explicitly digital gain.

    We already have analogue gain control which the digital gain control
    complements. Typically higher quality images are obtained using analogue
    gain only as the digital gain does not add information to the image
    (rather it may remove it).

    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     
  • Add maintainer entry for the imx-media driver.

    Signed-off-by: Steve Longerbeam
    Acked-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Steve Longerbeam
     
  • Calling S_STREAM OFF multiple times on a video device is valid, although
    dubious, practice. Instead of warning about it and setting stream count
    lower than zero, just ignore the subsequent S_STREAM calls and correct
    the stream count to zero.

    Signed-off-by: Marek Vasut
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Marek Vasut
     
  • This patch adds a call to imx_media_fill_default_mbus_fields() in the
    *_try_fmt() functions at the sink pads, to set empty field order and
    colorimetry parameters.

    If the field order is set to ANY, choose the currently set field order
    at the sink pad. If the colorspace is set to DEFAULT, choose the
    current colorspace at the sink pad. If any of xfer_func, ycbcr_enc
    or quantization are set to DEFAULT, either choose the current sink pad
    setting, or the default setting for the new colorspace, if non-DEFAULT
    colorspace was given.

    If a format is destined to be routed through the Image Converter,
    fixed quantization and Y`CbCr encoding must be set.

    Colorimetry is also propagated from sink to source pads anywhere
    this has not already been done.

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Philipp Zabel
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Steve Longerbeam