1
0
Fork 0
Commit Graph

25 Commits (b3491d8430dd25f0a4e00c33d60da22a9bd9d052)

Author SHA1 Message Date
Linus Torvalds b3491d8430 media updates for v4.20-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJb2F9AAAoJEAhfPr2O5OEVm5YP/Ak53aAEI1oJNequwdTYKc+/
 2xWRpYWREa1g+x4MlqWO+szlPWbGXCUVwye8ii2N/xihLapsKVrLCr/dDd5khsvw
 bDux33BzpU3Ug/ncQKD6ZZv4vVRzG8DMPcpkOwSs0OoboJns6AkHVGCugR32qZsH
 3SH/r1aJce0oK1rrzgbYYZHTvaPshvY2IOLPKrtFmO+73iCVRhpSdWjFsY+q2Alp
 +3Ho/06iQYB2i+enXrwoIKHAYoXArXYbxS2dhaNz+NURrOAytmgfMisvvt67heHx
 IEilE0AcSjjlN/eyOxp+WCZrg9JLXVzZLX6ZnqqM2OEu1AS/XBultJBsGaN0hOiV
 dir2enoHNNOStI40hNSdbumg9I0Txmag2jtpaGyaBnnGmGRJ/JIYegCPRVMLygAf
 HHFHjR4fnRnqZrlh9OGAHaqc9RNlUgFVdlyqFtdyIah+aNeuij3o69mWM35QMLhw
 /0dTXBUXw9aD1dEg1cZ6PdzLWJgDd7n1gIdfzzzzLnzmBwmmhqxW8+evu9qSAXsP
 rnEZuE77HYKVfiacWMwpZK6+lT51STAE8ouo3N8fmaC+4RQmpq0dYXtR8RnlcSUD
 hKpJ6UsIIb5A6xKX7ed8x6FxV14TEEaa042A4eclxsAFiqqkNfWSozqV0vfW5vCD
 2lrsuN3knpfh7XDBSr0y
 =V4X4
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull new experimental media request API from Mauro Carvalho Chehab:
 "A new media request API

  This API is needed to support device drivers that can dynamically
  change their parameters for each new frame. The latest versions of
  Google camera and codec HAL depends on such feature.

  At this stage, it supports only stateless codecs.

  It has been discussed for a long time (at least over the last 3-4
  years), and we finally reached to something that seem to work.

  This series contain both the API and core changes required to support
  it and a new m2m decoder driver (cedrus).

  As the current API is still experimental, the only real driver using
  it (cedrus) was added at staging[1]. We intend to keep it there for a
  while, in order to test the API. Only when we're sure that this API
  works for other cases (like encoders), we'll move this driver out of
  staging and set the API into a stone.

  [1] We added support for the vivid virtual driver (used only for
  testing) to it too, as it makes easier to test the API for the ones
  that don't have the cedrus hardware"

* tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (53 commits)
  media: dt-bindings: Document the Rockchip VPU bindings
  media: platform: Add Cedrus VPU decoder driver
  media: dt-bindings: media: Document bindings for the Cedrus VPU driver
  media: v4l: Add definition for the Sunxi tiled NV12 format
  media: v4l: Add definitions for MPEG-2 slice format and metadata
  media: videobuf2-core: Rework and rename helper for request buffer count
  media: v4l2-ctrls.c: initialize an error return code with zero
  media: v4l2-compat-ioctl32.c: add missing documentation for a field
  media: media-request: update documentation
  media: media-request: EPERM -> EACCES/EBUSY
  media: v4l2-ctrls: improve media_request_(un)lock_for_update
  media: v4l2-ctrls: use media_request_(un)lock_for_access
  media: media-request: add media_request_(un)lock_for_access
  media: vb2: set reqbufs/create_bufs capabilities
  media: videodev2.h: add new capabilities for buffer types
  media: buffer.rst: only set V4L2_BUF_FLAG_REQUEST_FD for QBUF
  media: v4l2-ctrls: return -EACCES if request wasn't completed
  media: media-request: return -EINVAL for invalid request_fds
  media: vivid: add request support
  media: vivid: add mc
  ...
2018-10-31 10:53:29 -07:00
Hans Verkuil db03401824 media: replace ADOBERGB by OPRGB
The CTA-861 standards have been updated to refer to opRGB instead
of AdobeRGB. The official standard is in fact named opRGB, so
switch to that.

The two old defines referring to ADOBERGB in the public API are
put under #ifndef __KERNEL__ and a comment mentions that they are
deprecated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-24 09:21:47 -04:00
Hans Verkuil da1b1aeac1 media: v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev
Add a 'bool from_other_dev' argument: set to true if the two
handlers refer to different devices (e.g. it is true when
inheriting controls from a subdev into a main v4l2 bridge
driver).

This will be used later when implementing support for the
request API since we need to skip such controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-31 11:09:34 -04:00
Hans Verkuil 83a729530a media: vivid: fix gain when autogain is on
In the vivid driver you want gain to continuous change while autogain
is on. However, dev->jiffies_vid_cap doesn't actually change. It probably
did in the past, but changes in the code caused this to be a fixed value
that is only set when you start streaming.

Replace it by jiffies, which is always changing.

[mchehab@kernel.org: use jiffies_to_msecs() instead of dividing by HZ]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-04 08:18:33 -04:00
Hans Verkuil 65243386f4 media: vivid: fix incorrect capabilities for radio
The vivid driver has two custom controls that change the behavior of RDS.
Depending on the control setting the V4L2_CAP_READWRITE capability is toggled.
However, after an earlier commit the capability was no longer set correctly.
This is now fixed.

Fixes: 9765a32cd8 ("vivid: set device_caps in video_device")

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26 08:00:53 -05:00
Hans Verkuil 67a5135a64 media: vivid: add SPDX license info
Replace the old license information with the corresponding SPDX
license.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-14 13:14:31 -05:00
Hans Verkuil 0fa2c5f954 media: vivid: fix module load error when enabling fb and no_error_inj=1
If the framebuffer is enabled and error injection is disabled, then
creating the controls for the video output device would fail with an
error.

This is because the Clear Framebuffer control uses the 'vivid control
class' and that control class isn't added if error injection is disabled.

In addition, this control was added to e.g. vbi devices as well, which
makes no sense.

Move this control to its own control handler and handle it correctly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: <stable@vger.kernel.org>      # for v4.15 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-30 07:18:22 -05:00
Ricardo Ribalda Delgado 429175e41f [media] vivid: Add support for HSV encoding
Support HSV encoding. Most of the logic is replicated from ycbcr_enc.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 15:54:16 -02:00
Hans Verkuil d0a3a275e5 [media] vivid: don't mention the obsolete sYCC Y'CbCr encoding
This encoding is identical to the 601 encoding. The old duplicate
SYCC define is about to be removed for use in the kernel, so remove
its use in vivid first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:18:21 -03:00
Junghak Sung d6dd645eae [media] media: videobuf2: Move timestamp to vb2_buffer
Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer
for common use, and change its type to u64 in order to handling
y2038 problem. This patch also includes all device drivers' changes related to
this restructuring.

Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18 13:53:31 -02:00
Prashant Laddha c79aa6aead [media] vivid-capture: add control for reduced frame rate
A boolean control Reduced Framerate is added to vivid controls for
controlling the reduced fps option for vivid capture from gui.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 15:06:00 -02:00
Hans Verkuil f6de9f6085 [media] vivid: fix compliance error
If vivid is loaded with the no_error_inj=1 option, then v4l2-compliance will
fail for the video and vbi output nodes because the vivid control class has no
controls.

Don't add the control class for video and vbi output if no_error_inj is true.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17 14:34:23 -02:00
Hans Verkuil c732e647ba [media] vivid: add support for SMPTE 2084 transfer function
Support the new SMPTE 2084 transfer function in the vivid test driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-30 19:49:41 -03:00
Hans Verkuil 1d78053549 [media] vivid: add support for the DCI-P3 colorspace
Support this new colorspace in vivid.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-30 19:47:17 -03:00
Hans Verkuil ff1447267b [media] vivid: use ARRAY_SIZE to calculate max control value
The max value of various menu controls is hardcoded, and it is easy to forget
to update it after adding a new menu item.

So use ARRAY_SIZE instead to calculate this value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-30 19:39:04 -03:00
Antti Palosaari f335c3f229 [media] vivid: SDR cap: add control for FM deviation
Add user control to adjust generated FM deviation.
Default it to 75kHz like public FM radio broadcast.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-25 17:21:13 -03:00
Hans Verkuil 63344b6592 [media] vivid: move video loopback control to the capture device
This has been on my TODO list for some time now: the control that enables the video
loopback was part of the controls of the video output device instead of the video
capture device. In practice this was quite annoying since you expect it at the capture
side since that's where you want to make the decision whether to use the TPG or looped
video.

This patch moves the control from the output to the capture side.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-06 07:33:17 -03:00
Hans Verkuil ca5316db08 [media] vivid: add xfer_func support
Add support for the transfer function: create a new control for it,
and support it for both capture and output sides.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 11:49:53 -03:00
Hans Verkuil 4a20334959 [media] vivid: use V4L2_DV_FL_IS_CE_VIDEO instead of V4L2_DV_BT_STD_CEA861
Don't rely on V4L2_DV_BT_STD_CEA861 since that include the
640x480p format, which is an IT format, not CE.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:38:56 -03:00
Hans Verkuil eb79dbf6c2 [media] vivid: use consistent colorspace/Y'CbCr Encoding strings
Keep the colorspace and encoding names consistent with what is
used elsewhere (primarily the utilities in v4l-utils.git).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02 11:08:28 -02:00
Hans Verkuil 3e8a78d139 [media] vivid: add support for YCbCr encoding and quantization
Implement controls to set the YCbCr encoding and the quantization
range for the colorspace.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02 11:18:09 -02:00
Hans Verkuil cd8adbe701 [media] vivid: add new colorspaces
Add AdobeRGB and BT.2020 support.

The colorspace control now orders the colorspaces according to how often
they are used. So rarely used colorspaces are moved to the end. This makes
it more logical when testing colorspace support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02 11:18:08 -02:00
Prabhakar Lad eab34eabe4 [media] media: vivid: use vb2_start_streaming_called() helper
this patch adds support for using vb2_start_streaming_called()
for vivid driver.

Signed-off-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 18:16:26 -02:00
Hans Verkuil 24c4942d29 [media] vivid: add test array controls
Add array controls to test support for such controls. There is one
array with just one element, one 8x16 matrix control and one 4 dimensional
2x3x4x5 control.

This makes it possible to experiment with such controls without requiring
hard-to-get hardware.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:47:58 -02:00
Hans Verkuil 73c3f48230 [media] vivid: add the control handling code
The vivid-ctrls code sets up and processes the various V4L2 controls
that are needed by this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02 17:07:44 -03:00