From: Hans Verkuil
Rather than returning width/height values of 0, just default to
a format. Formats in V4L2 are always supposed to be valid, there
is no concept of an invalid format.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 26 ++-
1 file
From: Hans Verkuil
Setting the encoder output format to e.g. 1920x1080 will set the
crop rectangle to 1920x1080, the coded resolution to 1920x1088 and
the capture coded resolution and sizeimage to 1920x1088 as well.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c
From: Hans Verkuil
last_buffer_dequeued was set to true in __fill_v4l2_buffer, but this
is called for qbuf as well. Move it to vb2_dqbuf.
Signed-off-by: Hans Verkuil
---
drivers/media/common/videobuf2/videobuf2-v4l2.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
From: Hans Verkuil
This RFC series fixes vicodec to conform to the upcoming version
of the codec specs.
This is RFC since the decoder side isn't done yet (missing compliance
tests) and the last patch isn't fully verified.
I pushed most of the compliance tests for the stateful encoder, but
some
From: Hans Verkuil
Correctly handle stopping and restarting the encoder, keeping
track of the stop and drain states.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 121 +++---
1 file changed, 100 insertions(+), 21 deletions(-)
diff --git a/drivers/
From: Hans Verkuil
The stateful encoder requires the presence of this control.
Since a single buffer is sufficient for vicodec, we just
set this control to 1.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
From: Hans Verkuil
These two patches replace patches 1-3 of the vicodec v5 patch
series: https://www.spinics.net/lists/linux-media/msg147923.html
The original patch 2/23 (videodev2.h: add V4L2_BUF_CAP_REQUIRES_REQUESTS)
was dropped. This needs a bit more thought.
Patch 1 now returns EBADR if an
From: Hans Verkuil
Stateless codecs require the use of the Request API as opposed of it
being optional.
So add a bit to indicate this and let vb2 check for this.
If an attempt is made to queue a buffer without an associated request,
then the EBADR error is returned to userspace.
Doing this che
From: Hans Verkuil
The cedrus stateless decoder requires the use of request, so
indicate this by setting requires_requests to 1.
Note that the cedrus driver never checked for this, and as far
as I can tell would just crash if an attempt was made to queue
a buffer without a request.
Signed-off-b
From: Hans Verkuil
The cec chardev kobject has no name, which made it hard to
debug when kobject debugging is turned on.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/cec/cec-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/cec/cec-core.c
From: Hans Verkuil
Ensure that this pointer is set to NULL after it is freed.
The vimc driver has a static media_entity and after
unbinding and rebinding the vimc device the media code will
try to free this pointer again since it wasn't set to NULL.
Signed-off-by: Hans Verkuil
---
drivers/medi
From: Hans Verkuil
It is not possible to use devm_kzalloc since that memory is
freed immediately when the device instance is unbound.
Various objects like the video device may still be in use
since someone has the device node open, and when that is closed
it expects the memory to be around.
So
From: Hans Verkuil
When vivid is unloaded it used vfree to free dev->bitmap_out,
but it was actually allocated using kmalloc. Use vzalloc
instead, conform what vivid-vid-cap.c does.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/vivid/vivid-vid-out.c | 14
From: Hans Verkuil
The media chardev kobject has no name, which made it hard to
debug when kobject debugging is turned on.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/media-devnode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/media-devnod
From: Hans Verkuil
The module ownership refcounting was done in media_entity_get/put,
but that was very confusing and it did not work either in case an
application had a v4l-subdevX device open and the module was
unbound. When the v4l-subdevX device was closed the media_entity_put
was never calle
From: Hans Verkuil
Don't free vimc_cap_device immediately, instead do this
in the video_device release function which is called when the
last user closes the video device. Only then is it safe to
free the memory.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/plat
From: Hans Verkuil
If the subdevice created a device node, then the v4l2_subdev cannot
be freed until the last user of the device node closes it.
This means that we need a release() callback in v4l2_subdev_internal_ops
that is called from the video_device release function so the subdevice
driver
From: Hans Verkuil
Various fixes for bugs that I found while working on the
regression test-media script.
The CONFIG_DEBUG_KOBJECT_RELEASE=y option in particular found
a bunch of bugs where things were not released in the right
order.
Note that the first two patches are not bug fixes, but they
From: Hans Verkuil
Use the new v4l2_subdev_internal_ops release op to free the
subdev memory only once the last user closed the file handle.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/vimc/vimc-common.c | 2 ++
drivers/media/platform/vimc/vimc-commo
From: Hans Verkuil
Ensure that this pointer is set to NULL after it is freed.
The vimc driver has a static media_entity and after
unbinding and rebinding the vimc device the media code will
try to free this pointer again since it wasn't set to NULL.
Signed-off-by: Hans Verkuil
---
drivers/medi
From: Hans Verkuil
Use the new v4l2_subdev_internal_ops release op to free the
subdev memory only once the last user closed the file handle.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vimc/vimc-common.c | 2 ++
drivers/media/platform/vimc/vimc-common.h | 2 ++
drivers/media/pla
From: Hans Verkuil
It is not possible to use devm_kzalloc since that memory is
freed immediately when the device instance is unbound.
Various objects like the video device may still be in use
since someone has the device node open, and when that is closed
it expects the memory to be around.
So
From: Hans Verkuil
Don't free vimc_cap_device immediately, instead do this
in the video_device release function which is called when the
last user closes the video device. Only then is it safe to
free the memory.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/plat
From: Hans Verkuil
When vivid is unloaded it used vfree to free dev->bitmap_out,
but it was actually allocated using kmalloc. Use vzalloc
instead, conform what vivid-vid-cap.c does.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/platform/vivid/vivid-vid-out.c | 14
From: Hans Verkuil
If the subdevice created a device node, then the v4l2_subdev cannot
be freed until the last user of the device node closes it.
This means that we need a release() callback in v4l2_subdev_internal_ops
that is called from the video_device release function so the subdevice
driver
From: Hans Verkuil
Various fixes for bugs that I found while working on the
regression test-media script.
The CONFIG_DEBUG_KOBJECT_RELEASE=y option in particular found
a bunch of bugs where things were not released in the right
order.
Note that the first two patches are not bug fixes, but they
From: Hans Verkuil
The media chardev kobject has no name, which made it hard to
debug when kobject debugging is turned on.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/media-devnode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/media-devnod
From: Hans Verkuil
The module ownership refcounting was done in media_entity_get/put,
but that was very confusing and it did not work either in case an
application had a v4l-subdevX device open and the module was
unbound. When the v4l-subdevX device was closed the media_entity_put
was never calle
From: Hans Verkuil
The cec chardev kobject has no name, which made it hard to
debug when kobject debugging is turned on.
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
---
drivers/media/cec/cec-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/cec/cec-core.c
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in vb2_core_poll() and vb2_poll(). Fix this,
otherwise epoll() would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
Reported-by: Yi Qi
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in media_request_poll(). Fix this, otherwise
epoll() would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
---
drivers/media/media-req
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in videobuf_poll_stream(). Fix this, otherwise
epoll() would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-co
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in cec_poll(). Fix this, otherwise epoll()
would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
---
drivers/media/cec/cec-api.c | 2 +
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in v4l2_m2m_poll(). Fix this, otherwise
epoll() would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l2
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in dvb_demux_poll(), dvb_dvr_poll() and
dvb_ca_en50221_io_poll(). Fix this, otherwise epoll()
can timeout when it shouldn't.
Signed-off-by: Han
From: Hans Verkuil
As was reported by Yi Qingliang
(http://lkml.iu.edu/hypermail/linux/kernel/1812.3/02144.html)
the epoll support in v4l2 is broken.
After researching this some more it turns out that we never
really understood when poll_wait() should be called, and that in
fact it is broken in
From: Hans Verkuil
The v4l2_m2m_poll function didn't check whether q->error
was set for either of the two queues. Add support for this.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l2-mem2mem.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media
From: Hans Verkuil
The epoll function expects that whenever the poll file op is
called, the poll_wait function is also called. That didn't
always happen in v4l2_ctrl_poll(). Fix this, otherwise epoll()
would timeout when it shouldn't.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l
From: Hans Verkuil
The bool type is not recommended for use in structs, so replace these
by bitfields.
Signed-off-by: Hans Verkuil
---
drivers/media/common/videobuf2/videobuf2-core.c | 12 ++--
include/media/videobuf2-core.h | 4 ++--
2 files changed, 8 insertions(+),
From: Hans Verkuil
If a stream is stopped, or if a USERPTR/DMABUF buffer is queued
backed by a different user address or dmabuf fd, then the timestamp
should be skipped by vb2_find_timestamp since the memory it refers
to is no longer valid.
So keep track of a 'copied_timestamp' state: it is set
From: Hans Verkuil
This supersedes my previous patch:
https://www.mail-archive.com/linux-media@vger.kernel.org/msg144099.html
Rather than marking a timestamp of 0 as 'special', I add a bitfield
to keep track of the validity of the timestamp.
The last patch also adds extra checks to verify that
From: Hans Verkuil
When finding a buffer vb2_find_buffer() should also check if the
properties of the found buffer (i.e. number of planes and plane sizes)
match the properties of the 'match' buffer.
Update the cedrus driver accordingly.
Signed-off-by: Hans Verkuil
---
drivers/media/common/vid
From: Hans Verkuil
The teletext interface has been dead for years now, just
remove it.
Signed-off-by: Hans Verkuil
---
Documentation/media/uapi/v4l/dev-teletext.rst | 41 ---
Documentation/media/uapi/v4l/devices.rst | 1 -
2 files changed, 42 deletions(-)
delete mode 100
From: Hans Verkuil
The "Codec Interface" chapter is poorly named since codecs are just one
use-case of the Memory-to-Memory Interface. Rename it and clean up the
text a bit.
Signed-off-by: Hans Verkuil
---
.../media/uapi/mediactl/request-api.rst | 4 ++--
.../v4l/{dev-codec.rst => dev-m
From: Hans Verkuil
We never had an effect interface, and if you want to do such
things you use the mem2mem interface instead.
Just drop this from the spec.
Signed-off-by: Hans Verkuil
---
Documentation/media/uapi/v4l/dev-effect.rst | 28 -
Documentation/media/uapi/v4l/devi
From: Hans Verkuil
Drop the obsolete Effect and Teletext interfaces. Rename the
Codec Interface to Video Memory To Memory Interface, which is
more accurate.
This also makes more sense when the detailed codec APIs are
added.
Regards,
Hans
Hans Verkuil (3):
dev-effect.rst: remove unus
From: Hans Verkuil
This function is no longer used, so drop it.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l2-common.c | 10 --
include/media/v4l2-common.h | 9 -
2 files changed, 19 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-common.c
b/d
From: Hans Verkuil
Internally use ktime_get_ns() to get the timestamp of the event.
Only convert to timespec when interfacing with userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l2-event.c | 19 +--
include/media/v4l2-event.h | 2 ++
2 files cha
From: Hans Verkuil
This patch series modifies v4l2-event, videobuf and various
drivers that do not use vb2 or videobuf at all to store the
event and buffer timestamps internally as a u64 (ktime_get_ns()).
Only when interfacing with the userspace API are these timestamps
converted to a timespec o
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/usb/stkwebcam/stk-webcam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/usb/usbvision/usbvision-core.c | 2 +-
drivers/media/usb/usbvision/usbvision-video.c | 4 ++-
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/pci/meye/meye.c | 8
drivers/media/pci/meye/meye.h | 2 +-
2 files changed, 5 insert
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/usb/cpia2/cpia2.h | 2 +-
drivers/media/usb/cpia2/cpia2_usb.c | 2 +-
drivers/media/usb
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/staging/media/zoran/zoran.h| 2 +-
drivers/staging/media/zoran/zoran_device.c | 4 ++--
dri
From: Hans Verkuil
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.
Signed-off-by: Hans Verkuil
---
drivers/media/common/saa7146/saa7146_fops.c | 2 +-
drivers/media/pci/bt8xx/bttv-driver.c | 8 +
From: Hans Verkuil
This is a test stub driver for soc_camera. Since soc_camera is
being deprecated (and in fact, nobody is using it anymore)
there's no sense in keeping this test driver.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/soc_camera/Kconfig | 6 -
drivers/media/platfo
From: Jacopo Mondi
As the tw9910 subdevice is registered through the v4l2-async framework,
use the v4l2-async provided function to register it.
Fixes: 7b20f325a566 ("media: i2c: tw9910: Remove soc_camera dependencies")
Signed-off-by: Jacopo Mondi
Signed-off-by: Hans Verkuil
---
drivers/media/
From: Hans Verkuil
This driver got converted to not depend on soc_camera in commit
762c28121d7c ("media: i2c: ov772x: Remove soc_camera dependencies").
There's no sense in keeping the old version there.
Signed-off-by: Hans Verkuil
---
drivers/media/i2c/soc_camera/Kconfig |6 -
driver
From: Hans Verkuil
The soc_mt9t112, soc_ov772x and soc_tw9910 drivers now have
non-soc-camera replacements, so those three drivers can be
removed.
The soc_camera sh_mobile_ceu_camera platform driver also has
a non-soc-camera replacement, so remove this driver as well.
This driver was also the l
From: Hans Verkuil
With the removal of sh_mobile_ceu_camera.c this code is no
longer used and can be removed.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/soc_camera/Kconfig | 3 -
drivers/media/platform/soc_camera/Makefile| 1 -
.../platform/soc_camera/soc_scale_crop.c
From: Hans Verkuil
This driver got converted to not depend on soc_camera in commit
7b20f325a566 ("media: i2c: tw9910: Remove soc_camera dependencies").
There's no sense in keeping the old version there.
Signed-off-by: Hans Verkuil
---
drivers/media/i2c/soc_camera/Kconfig | 6 -
drivers
From: Hans Verkuil
This driver got converted to not depend on soc_camera in commit
6a26f141bf62 ("media: i2c: mt9t112: Remove soc_camera dependencies").
There's no sense in keeping the old version there.
Signed-off-by: Hans Verkuil
---
drivers/media/i2c/soc_camera/Kconfig |6 -
driv
From: Hans Verkuil
This driver got converted to not depend on soc_camera in commit
32e5a70dc8f4 ("media: platform: Add Renesas CEU driver").
There's no sense in keeping the old version there.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/soc_camera/Kconfig |9 -
drivers/media
From: Hans Verkuil
This include isn't use anymore, so drop it.
Signed-off-by: Hans Verkuil
---
include/media/i2c/tw9910.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/media/i2c/tw9910.h b/include/media/i2c/tw9910.h
index bec8f7bce745..2f93799d5a21 100644
--- a/include/media/i2c
From: Hans Verkuil
Validate the field for an output buffer. This ensures that the
field is validated when the buffer is queued to a request, and
not when the request itself is queued, which is too late.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vivid/vivid-vid-out.c | 23 +
From: Hans Verkuil
When queueing a buffer to a request the 'field' value is not validated.
That field is only validated when the _buf_prepare() is called,
which happens when the request is queued.
However, this validation should happen at QBUF time, since you want
to know about this as soon as p
From: Hans Verkuil
Validate the field for an output buffer. This ensures that the
field is validated when the buffer is queued to a request, and
not when the request itself is queued, which is too late.
Signed-off-by: Hans Verkuil
---
drivers/staging/media/sunxi/cedrus/cedrus_video.c | 9 +
From: Hans Verkuil
Validate the field for an output buffer. This ensures that the
field is validated when the buffer is queued to a request, and
not when the request itself is queued, which is too late.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vim2m.c | 27 ---
From: Hans Verkuil
The buf_out_validate is required for output queues in combination
with requests. Check this.
Signed-off-by: Hans Verkuil
---
drivers/media/common/videobuf2/videobuf2-v4l2.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/common/videobuf2/videobuf2-v4
From: Hans Verkuil
When queueing a buffer to a request the 'field' value is not validated.
That field is only validated when the _buf_prepare() is called,
which happens when the request is queued.
However, this validation should happen at QBUF time, since you want
to know about this as soon as p
From: Hans Verkuil
Adding the request API uncovered a pre-existing problem with
validating output buffers.
The problem is that for output buffers the driver has to validate
the 'field' field of struct v4l2_buffer. This is critical when
encoding or deinterlacing interlaced video.
Drivers always
From: Hans Verkuil
Adding the request API uncovered a pre-existing problem with
validating output buffers.
The problem is that for output buffers the driver has to validate
the 'field' field of struct v4l2_buffer. This is critical when
encoding or deinterlacing interlaced video.
Drivers always
From: Hans Verkuil
Split off the field validation from buf_prepare into a new
buf_out_validate function. Field validation for output buffers should
be done there since buf_prepare is not guaranteed to be called at
QBUF time.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vim2m.c | 16 +
From: Hans Verkuil
Split off the field validation from buf_prepare into a new
buf_out_validate function. Field validation for output buffers should
be done there since buf_prepare is not guaranteed to be called at
QBUF time.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vivid/vivid-vi
From: Hans Verkuil
The layout of the compound controls has changed to fix
32/64 bit alignment issues and the use of timestamps instead of
buffer indices to refer to buffers.
Signed-off-by: Hans Verkuil
---
.../media/uapi/v4l/extended-controls.rst | 28 +++
1 file changed,
From: Hans Verkuil
Use v4l2_timeval_to_ns instead of timeval_to_ns to ensure that
both kernelspace and userspace will use the same conversion
function.
Next add a new vb2_find_timestamp() function to find buffers
with a specific timestamp.
This function will only look at DEQUEUED and DONE buffe
From: Hans Verkuil
We want to be able to uniquely identify buffers for stateless
codecs. The internal timestamp (a u64) as stored internally in the
kernel is a suitable candidate for that, but in struct v4l2_buffer
it is represented as a struct timeval.
Add a v4l2_timeval_to_ns() function that c
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data helper function and use
timestamps to refer to reference frames instead of using
buffer indices.
Also remove the padding fields in the structs, that's a bad
idea. Just use the right types to keep everything aligned.
Signed-off-by: Hans Verku
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data() function in vicodec.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/platform/vicodec/vicodec-core.c
b/drivers/m
From: Hans Verkuil
Memory-to-memory devices should copy various parts of
struct v4l2_buffer from the output buffer to the capture buffer.
Add a helper function that does that to simplify the driver code.
Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Reviewed-by: Alexandre Courbot
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data() function in vim2m.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vim2m.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index d0182
From: Hans Verkuil
V4L2_BUF_FLAG_TIMECODE is not video capture specific, so drop that
part.
The 'Timecodes' section was a bit messy, so that's cleaned up.
Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Reviewed-by: Alexandre Courbot
---
Documentation/media/uapi/v4l/buffer.rst |
From: Hans Verkuil
As was discussed here (among other places):
https://lkml.org/lkml/2018/10/19/440
using capture queue buffer indices to refer to reference frames is
not a good idea.
Instead, after a long irc discussion:
https://linuxtv.org/irc/irclogger_log/v4l?date=2018-12-12,Wed
it was
From: Hans Verkuil
The m2m framework works well for a stateful decoder: in job_ready()
you can process all output buffers until the whole compressed frame
is available for decoding, and then you return true to signal that
the decoder can start. The decoder decodes to a single capture buffer,
and
From: Hans Verkuil
With the new mem2mem functionality it is now easy to write the
result of the encoder to multiple buffers.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 91 +++
1 file changed, 75 insertions(+), 16 deletions(-)
diff --git a/d
From: Hans Verkuil
The m2m framework is not quite symmetrical: decoders can process multiple
output buffers in job_ready until enough buffers have arrived so a frame
can be decoded.
However, encoders do not have an equivalent where multiple capture buffers
can be used to write the compressed fra
From: Hans Verkuil
Add functions to add properties to entities, pads and other
properties. This can be extended to include interfaces and links
in the future when needed.
Signed-off-by: Hans Verkuil
---
drivers/media/media-entity.c | 64 +
include/media/media-entity.h | 264 ++
From: Hans Verkuil
The main changes since RFCv4 are:
- Dropped all the indexing code that I added to make it easier to
traverse the topology. I still think that's a good idea, but that
can be done in a future patch.
- Split the second patch into two: the first part adds the core support,
t
From: Hans Verkuil
Add support for properties. In this initial implementation properties
can be added to entities and pads. In addition, properties can be
nested.
Most of the changes are straightforward, but I had to make some changes
to the way entities are initialized, since the struct has to
From: Hans Verkuil
Add properties to entities and pads to be able to test the
properties API.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vimc/vimc-common.c | 50 +++
1 file changed, 50 insertions(+)
diff --git a/drivers/media/platform/vimc/vimc-common.c
b/driv
From: Hans Verkuil
Extend the topology struct with a properties array.
Add a new media_v2_prop structure to store property information.
Signed-off-by: Hans Verkuil
---
include/uapi/linux/media.h | 56 ++
1 file changed, 56 insertions(+)
diff --git a/includ
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data() function in vim2m.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vim2m.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index d0182
From: Hans Verkuil
Use v4l2_timeval_to_ns instead of timeval_to_ns to ensure that
both kernelspace and userspace will use the same conversion
function.
Next add a new vb2_find_timestamp() function to find buffers
with a specific timestamp.
This function will only look at DEQUEUED and DONE buffe
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data() function in vicodec.
Signed-off-by: Hans Verkuil
---
drivers/media/platform/vicodec/vicodec-core.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/platform/vicodec/vicodec-core.c
b/drivers/m
From: Hans Verkuil
We want to be able to uniquely identify buffers for stateless
codecs. The internal timestamp (a u64) as stored internally in the
kernel is a suitable candidate for that, but in struct v4l2_buffer
it is represented as a struct timeval.
Add a v4l2_timeval_to_ns() function that c
From: Hans Verkuil
V4L2_BUF_FLAG_TIMECODE is not video capture specific, so drop that
part.
The 'Timecodes' section was a bit messy, so that's cleaned up.
Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Reviewed-by: Alexandre Courbot
---
Documentation/media/uapi/v4l/buffer.rst |
From: Hans Verkuil
Memory-to-memory devices should copy various parts of
struct v4l2_buffer from the output buffer to the capture buffer.
Add a helper function that does that to simplify the driver code.
Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Reviewed-by: Alexandre Courbot
From: Hans Verkuil
The layout of the compound controls has changed to fix
32/64 bit alignment issues and the use of timestamps instead of
buffer indices to refer to buffers.
Signed-off-by: Hans Verkuil
---
.../media/uapi/v4l/extended-controls.rst | 28 +++
1 file changed,
From: Hans Verkuil
As was discussed here (among other places):
https://lkml.org/lkml/2018/10/19/440
using capture queue buffer indices to refer to reference frames is
not a good idea.
Instead, after a long irc discussion:
https://linuxtv.org/irc/irclogger_log/v4l?date=2018-12-12,Wed
it was
From: Hans Verkuil
Use the new v4l2_m2m_buf_copy_data helper function and use
timestamps to refer to reference frames instead of using
buffer indices.
Signed-off-by: Hans Verkuil
---
drivers/media/v4l2-core/v4l2-ctrls.c | 9
drivers/staging/media/sunxi/cedrus/cedrus.h | 9
1 - 100 of 133 matches
Mail list logo