26 Mar, 2019

21 commits


20 Mar, 2019

19 commits

  • Checkpatch wants to use 'help' instead of '---help---':

    WARNING: prefer 'help' over '---help---' for new help texts

    Let's change it globally at the media subsystem, as otherwise people
    would keep using the old way.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • This is not how ACPI tables are written. Add a deprecation note and refer
    to the proper documentation.

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

    Sakari Ailus
     
  • Set the entity function for the four CSI-2 receiver sub-devices the driver
    creates. This avoids a kernel warning from each as well.

    Signed-off-by: Sakari Ailus
    Reviewed-by: Bingbu Cao
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     
  • The lens drivers had ended up under the video decoder section; add a new
    one just for them, between the camera sensors and flash drivers.

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

    Sakari Ailus
     
  • ti-vpe driver parsed the remote endpoints for properties but ignored the
    local ones. Fix this by parsing the local endpoint properties instead.

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

    Sakari Ailus
     
  • V4L2 fwnode matching right now still works based on device nodes, not port
    nodes. Fix this.

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

    Sakari Ailus
     
  • C-PHY has no clock lanes. Therefore the first data lane is 0 by default.

    Fixes: edc6d56c2e7e ("media: v4l: fwnode: Support parsing of CSI-2 C-PHY endpoints")

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

    Sakari Ailus
     
  • The lack of defaults provided by the caller to
    v4l2_fwnode_endpoint_parse() signals the use of the default lane mapping.
    The default lane mapping must not be used however if the firmmare contains
    the lane mapping. Disable the default lane mapping in that case, and
    improve the debug messages telling of the use of the defaults.

    This was missed previously since the default mapping will only unsed in
    this case if the bus type is set, and no driver did both while still
    needing the lane mapping configuration.

    Fixes: b4357d21d674 ("media: v4l: fwnode: Support default CSI-2 lane mapping for drivers")

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

    Sakari Ailus
     
  • Since commit 3d6a8fe25605 ("media: ov7670: hook s_power onto v4l2 core"),
    the device is actually powered off while the video stream is stopped.

    So now set_format and s_frame_interval could be called while the device
    is powered off, but these callbacks try to change the register settings
    at this time.

    The frame format and framerate will be restored right after power-up, so
    we can just postpone applying these changes at these callbacks if the
    device is not powered up.

    Fixes: 3d6a8fe25605 ("media: ov7670: hook s_power onto v4l2 core")

    Cc: Jonathan Corbet
    Signed-off-by: Akinobu Mita
    Reviewed-by: Lubomir Rintel
    Tested-by: Lubomir Rintel
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Akinobu Mita
     
  • Since commit 3d6a8fe25605 ("media: ov7670: hook s_power onto v4l2 core"),
    the device is actually powered off while the video stream is stopped.

    The frame format and framerate are restored right after power-up, but
    restoring the default register settings is forgotten.

    Fixes: 3d6a8fe25605 ("media: ov7670: hook s_power onto v4l2 core")

    Cc: Jonathan Corbet
    Signed-off-by: Akinobu Mita
    Reviewed-by: Lubomir Rintel
    Tested-by: Lubomir Rintel
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Akinobu Mita
     
  • The imgu_css_queue structure is too large to be put on the kernel
    stack, as we can see in 32-bit builds:

    drivers/staging/media/ipu3/ipu3-css.c: In function 'imgu_css_fmt_try':
    drivers/staging/media/ipu3/ipu3-css.c:1863:1: error: the frame size of 1172 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

    By dynamically allocating this array, the stack usage goes down to an
    acceptable 140 bytes for the same x86-32 configuration.

    Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add css pipeline programming")

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Cao, Bingbu
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The imgu_rpm_dummy_cb() looks like an API misuse that is explained
    in the comment above it. Aside from that, it also causes a warning
    when power management support is disabled:

    drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function]

    The warning is at least easy to fix by marking the function as
    __maybe_unused.

    Fixes: 7fc7af649ca7 ("media: staging/intel-ipu3: Add imgu top level pci device driver")

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The v4l2_pix_format_mplane structure is too large to be put on the kernel
    stack, as we can see in 32-bit builds:

    drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt':
    drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

    By dynamically allocating this array, the stack usage goes down to an
    acceptable 272 bytes for the same x86-32 configuration.

    Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework")

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • When start_streaming was called both last_src_buf and last_dst_buf
    pointers were set to NULL, but this depends on whether the capture
    or output queue starts streaming.

    When decoding with resolution changes in between the capture queue
    has to restart streaming whenever a resolution change occurs. And
    that would reset last_src_buf as well, which causes a problem if
    the decoder was stopped by the application. Since last_src_buf
    is now NULL, the LAST flag is never set for the last capture
    buffer.

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

    Hans Verkuil
     
  • Some functions like enum_fmt use the buffer type as was passed
    from userspace, which might cause the switch to fall into the
    default case. Just drop the WARN_ON(1) to avoid kernel log pollution.

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

    Hans Verkuil
     
  • Don't populate the array addr_list on the stack but instead make it
    static. Makes the object code smaller by 20 bytes

    Before:
    text data bss dec hex filename^M
    16929 3626 384 20939 51cb ../usb/em28xx/em28xx-input.o

    After:
    text data bss dec hex filename^M
    16829 3706 384 20919 51b7 ../usb/em28xx/em28xx-input.o

    (gcc version 8.3.0, aarch64)

    Signed-off-by: Colin Ian King
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Colin Ian King
     
  • This patch add support for Avermedia TD310 usb stick.

    Signed-off-by: Jose Alberto Reguero
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Jose Alberto Reguero
     
  • i2c bus is already needed when the frontend is probed, so init it already
    in it930x_frontend_attach. That prevents errors like:

    si2168: probe of 6-0067 failed with error -5

    Signed-off-by: Andreas Kemnade
    Signed-off-by: Jose Alberto Reguero
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Andreas Kemnade
     
  • si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find
    that "val_tmp" will be an uninitialized value when regmap_read() fails.
    "val_tmp" is then assigned to "val". So if si2165_readreg8() fails,
    "val" will be a random value. Further use will lead to undefined
    behaviors. The fix checks if si2165_readreg8() fails, and if so, returns
    its error code upstream.

    Signed-off-by: Kangjie Lu
    Reviewed-by: Matthias Schwarzott
    Tested-by: Matthias Schwarzott
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Kangjie Lu