Currently V4L2_MSM_BUF_FLAG_MBAFF is defined using the same
value as V4L2_BUF_FLAG_LAST, this will cause H264 MBAFF clips
can't playback successfully.
Modify to use another bit for V4L2_MSM_BUF_FLAG_MBAFF.
CRs-Fixed: 2213243
Change-Id: I31cbc79dad55f391d7a0509f9e918b94d22f32ea
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
1) Clients send input_tag and output_tag through buffer
reserved fields. Driver needs to pass them to FW and
when FW returns them back, send them to client.
2) Convey sub-frame information to client from FW.
Change-Id: Ia92bca933d18a7795ba17eea9178a4c5de49157b
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Umesh Pandey <umeshp@codeaurora.org>
This snapshot is taken from msm-4.4 branch as of:
'commit ee294a60356a ("msm: jpegdma: Fix for ASAN issues in jpegdma module")'
Change-Id: I3aba3098a986a5dec84b4bb4144dda19d1db5790
Signed-off-by: Pratap Nirujogi <pratapn@codeaurora.org>
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
This is snapshot of the video driver as of msm-3.18
commit 9b4e2a850801 ("defconfig: msm8937: optimize perf defconfig").
Change-Id: I06e43bd92393c36ff79732690ec2991e2b3e8793
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
For video frames with hint of perf mode
enabling turbo to encode quickly.
Change-Id: I9ec1e34539c11e25770f97666b13f4b086fef83a
Signed-off-by: Uma Mehta <umamehta@codeaurora.org>
Add new V4L2 color format definition of linear 10bit
Venus P010 for better communication with display side.
Change-Id: I8eb6fe6342afb9ff3cd80129a99df50c24a9133f
Signed-off-by: Zhongbo Shi <zhongbos@codeaurora.org>
Expose TME functionality as an additional
codec type for encoder output.
Change-Id: I06947fb1a7d064bf93d7bcf83d103c594a7f6d99
Signed-off-by: Surajit Podder <spodder@codeaurora.org>
Currently all sufficient events from the hardware is insufficient
in driver resulting in output port reconfiguration. Changing all
sufficient buffer events from the hardware to sufficient in driver
for all cases.This helps in passing the sufficient event to the
userspace and decision to convert a sufficient event to
insufficient is handled from the userspace. The userspace uses
V4L2 command for session continue for decoding to progress in
case the event is sufficient.
CRs-Fixed: 2016190
Change-Id: I8b750b406d2ff99bc23aac61d8588e6d052f8618
Signed-off-by: Umesh Pandey <umeshp@codeaurora.org>
Add plane size calculation and support for p010 ubwc format.
CRs-Fixed: 2009714
Change-Id: I2fdefad511819cf4e6f9bff330363b3462d83bed
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
For usecases like High Speed Recording(HSR), High Frame
Recording(HFR), Video and Camera sub-systems need to exchange
more than 32 buffers. This is needed meet strict timing
requirements and to make sure that no sub-system is starving
for buffers due to latencies in both the SW stacks.
Currently, V4L2 framework supports buffer exchange for only 32
buffers. Hence increase the Max supported buffer counts from 32
to 64.
CRs-Fixed: 2023295
Change-Id: If6173addc94aa18e839884a7b5a534466b1e046e
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
* 4.9/tmp-0455ac9:
Linux 4.9.12
videodev2.h: go back to limited range Y'CbCr for SRGB and, ADOBERGB
bcache: Make gc wakeup sane, remove set_task_state()
ntb_transport: Pick an unused queue
ntb: ntb_perf missing dmaengine_unmap_put
NTB: ntb_transport: fix debugfs_remove_recursive
timekeeping: Use deferred printk() in debug code
printk: use rcuidle console tracepoint
PCI/PME: Restore pcie_pme_driver.remove
Revert "i2c: designware: detect when dynamic tar update is possible"
ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user()
futex: Move futex_init() to core_initcall
drm/dp/mst: fix kernel oops when turning off secondary monitor
drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor
Input: elan_i2c - add ELAN0605 to the ACPI table
Fix missing sanity check in /dev/sg
scsi: don't BUG_ON() empty DMA transfers
powerpc/64: Disable use of radix under a hypervisor
mmc: core: fix multi-bit bus width without high-speed mode
fuse: fix uninitialized flags in pipe_buffer
fuse: fix use after free issue in fuse_dev_do_read()
siano: make it work again with CONFIG_VMAP_STACK
vfs: fix uninitialized flags in splice_to_pipe()
Linux 4.9.11
x86/fpu/xstate: Fix xcomp_bv in XSAVES header
tcp: don't annotate mark on control socket from tcp_v6_send_response()
net/mlx5: Don't unlock fte while still using it
tcp: fix mark propagation with fwmark_reflect enabled
igmp, mld: Fix memory leak in igmpv3/mld_del_delrec()
mld: do not remove mld souce list info when set link down
l2tp: do not use udp_ioctl()
net: dsa: Do not destroy invalid network devices
ping: fix a null pointer dereference
packet: round up linear to header len
net: introduce device min_header_len
sit: fix a double free on error path
lwtunnel: valid encap attr check should return 0 when lwtunnel is disabled
sctp: avoid BUG_ON on sctp_wait_for_sndbuf
mlx4: Invoke softirqs after napi_reschedule
catc: Use heap buffer for memory size test
catc: Combine failure cleanup code in catc_probe()
rtl8150: Use heap buffers for all register access
pegasus: Use heap buffers for all register access
macvtap: read vnet_hdr_size once
tun: read vnet_hdr_sz once
tcp: avoid infinite loop in tcp_splice_read()
ipv6: tcp: add a missing tcp_v6_restore_cb()
ip6_gre: fix ip6gre_err() invalid reads
netlabel: out of bound access in cipso_v4_validate()
ipv4: keep skb->dst around in presence of IP options
net: use a work queue to defer net_disable_timestamp() work
stmmac: Discard masked flags in interrupt status register
tcp: fix 0 divide in __tcp_select_window()
ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim()
ipv6: fix ip6_tnl_parse_tlv_enc_lim()
net/sched: matchall: Fix configuration race
net/mlx5e: Fix update of hash function/key via ethtool
can: Fix kernel panic at security_sock_rcv_skb
UPSTREAM: arm64: Disable PAN on uaccess_enable()
UPSTREAM: arm64: Enable CONFIG_ARM64_SW_TTBR0_PAN
UPSTREAM: arm64: xen: Enable user access before a privcmd hvc call
UPSTREAM: arm64: Handle faults caused by inadvertent user access with PAN enabled
BACKPORT: arm64: Disable TTBR0_EL1 during normal kernel execution
BACKPORT: arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1
UPSTREAM: arm64: Factor out TTBR0_EL1 post-update workaround into a specific asm macro
UPSTREAM: arm64: Factor out PAN enabling/disabling into separate uaccess_* macros
UPSTREAM: cpufreq: schedutil: Add iowait boosting
UPSTREAM: cpufreq / sched: ignore SMT when determining max cpu capacity
BACKPORT: cpufreq / sched: Pass flags to cpufreq_update_util()
UPSTREAM: cpufreq: schedutil: map raw required frequency to driver frequency
UPSTREAM: cpufreq: governor: Create cpufreq_policy_apply_limits()
BACKPORT: cpufreq: governor: Get rid of governor events
UPSTREAM: cpufreq: schedutil: Improve prints messages with pr_fmt
BACKPORT: cpufreq: Call cpufreq_disable_fast_switch() in sugov_exit()
UPSTREAM: cpufreq: schedutil: Make default depend on CONFIG_SMP
UPSTREAM: cpufreq: schedutil: Make it depend on CONFIG_SMP
BACKPORT: cpufreq: schedutil: New governor based on scheduler utilization data
Linux 4.9.10
perf/core: Fix crash in perf_event_read()
perf diff: Fix segfault on 'perf diff -o N' option
perf diff: Fix -o/--order option behavior (again)
stacktrace, lockdep: Fix address, newline ugliness
IB/rxe: Fix mem_check_range integer overflow
IB/rxe: Fix resid update
x86/CPU/AMD: Fix Zen SMT topology
x86/CPU/AMD: Bring back Compute Unit ID
x86/mm/ptdump: Fix soft lockup in page table walker
Revert "ALSA: line6: Only determine control port properties if needed"
ALSA: seq: Don't handle loop timeout at snd_seq_pool_done()
ALSA: seq: Fix race at creating a queue
ALSA: hda - adding a new NV HDMI/DP codec ID in the driver
xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend()
powerpc/powernv: Fix CPU hotplug to handle waking on HVI
powerpc/mm/radix: Update ERAT flushes when invalidating TLB
btrfs: fix btrfs_compat_ioctl failures on non-compat ioctls
scsi: qla2xxx: Avoid that issuing a LIP triggers a kernel crash
scsi: mpt3sas: disable ASPM for MPI2 controllers
scsi: aacraid: Fix INTx/MSI-x issue with older controllers
scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send
Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host
Drivers: hv: vmbus: On write cleanup the logic to interrupt the host
Drivers: hv: vmbus: Base host signaling strictly on the ring state
net/mlx5e: Modify TIRs hash only when it's needed
mac80211: Fix adding of mesh vendor IEs
nl80211: Fix mesh HT operation check
drm/i915: Always convert incoming exec offsets to non-canonical
ARM: 8642/1: LPAE: catch pending imprecise abort on unmask
ARM: dts: imx6dl: fix GPIO4 range
target: Fix COMPARE_AND_WRITE ref leak for non GOOD status
target: Fix multi-session dynamic se_node_acl double free OOPs
target: Fix early transport_generic_handle_tmr abort scenario
target: Use correct SCSI status during EXTENDED_COPY exception
target: Don't BUG_ON during NodeACL dynamic -> explicit conversion
drm/atomic: Fix double free in drm_atomic_state_default_clear
drm/i915/bxt: Add MST support when do DPLL calculation
drm/i915: fix use-after-free in page_flip_completed()
ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write
hns: avoid stack overflow with CONFIG_KASAN
ibmvscsis: Add SGL limit
mm/slub.c: fix random_seq offset destruction
cpumask: use nr_cpumask_bits for parsing functions
rtlwifi: rtl8192ce: Fix loading of incorrect firmware
Revert "x86/ioapic: Restore IO-APIC irq_chip retrigger callback"
selinux: fix off-by-one in setprocattr
Input: uinput - fix crash when mixing old and new init style
ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup
crypto: ccp - Fix double add when creating new DMA command
crypto: ccp - Fix DMA operations when IOMMU is enabled
crypto: qat - zero esram only for DH85x devices
crypto: qat - fix bar discovery for c62x
crypto: chcr - Check device is allocated before use
crypto: algif_aead - Fix kernel panic on list_del
dm rq: cope with DM device destruction while in dm_old_request_fn()
libnvdimm, pfn: fix memmap reservation size versus 4K alignment
libnvdimm, namespace: do not delete namespace-id 0
acpi, nfit: fix acpi_nfit_flush_probe() crash
cpufreq: intel_pstate: Disable energy efficiency optimization
ANDROID: ext4 crypto: Disables zeroing on truncation when there's no key
ANDROID: Refactor fs readpage/write tracepoints.
Conflicts:
arch/arm64/Kconfig
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/mmu_context.h
arch/arm64/include/asm/uaccess.h
arch/arm64/kernel/entry.S
arch/arm64/lib/clear_user.S
arch/arm64/lib/copy_from_user.S
arch/arm64/lib/copy_in_user.S
arch/arm64/lib/copy_to_user.S
arch/arm64/xen/hypercall.S
drivers/cpufreq/Kconfig
Change-Id: Ibd6d488060e080e2abaa34b0f038b4a3a3cfa44d
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
commit 35879ee4769099905fa3bda0b21e73d434e2df6a upstream.
This reverts 'commit 7e0739cd9c ("[media] videodev2.h: fix
sYCC/AdobeYCC default quantization range").
The problem is that many drivers can convert R'G'B' content (often
from sensors) to Y'CbCr, but they all produce limited range Y'CbCr.
To stay backwards compatible the default quantization range for
sRGB and AdobeRGB Y'CbCr encoding should be limited range, not full
range, even though the corresponding standards specify full range.
Update the V4L2_MAP_QUANTIZATION_DEFAULT define accordingly and
also update the documentation.
Fixes: 7e0739cd9c ("[media] videodev2.h: fix sYCC/AdobeYCC default quantization range")
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Import rotator pixel formats into v4l2 enum ioctl so rotator pixel
formats will not generate kernel warning during format enumeration.
CRs-Fixed: 1054825
Change-Id: Ie739fffa2d1faed64c2bf03eac92f38fa2ab6e55
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This define is a duplicate of V4L2_YCBCR_ENC_601. So mark it as
'should not be used' and put it under #ifndef __KERNEL__ to
prevent drivers from referring to it.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The default quantization range of the Y'CbCr encodings of sRGB
and AdobeRGB are full range instead of limited range according to
the corresponding standards.
Fix this in the V4L2_MAP_QUANTIZATION_DEFAULT macro.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Some touch controllers send out touch data in a similar way to a
greyscale frame grabber.
Add new device type VFL_TYPE_TOUCH:
- This uses a new device prefix v4l-touch for these devices, to stop
generic capture software from treating them as webcams. Otherwise,
touch is treated similarly to video capture.
- Add V4L2_INPUT_TYPE_TOUCH
- Add MEDIA_INTF_T_V4L_TOUCH
- Add V4L2_CAP_TOUCH to indicate device is a touch device
Add formats:
- V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas
- V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas
- V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data
- V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data
This support will be used by:
- Atmel maXTouch (atmel_mxt_ts)
- Synaptics RMI4.
- sur40
Signed-off-by: Nick Dyer <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
The formats are interleaved with the YUV packed and miscellaneous
formats, making the result confusing especially with the YUV444 format
being packed and not planar like YUV410 or YUV420. Move them to their
own group as the 2 planes or 3 non-contiguous planes formats to clarify
the header.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Most of what is marked as 'experimental' has been around for years. Time
to drop that annotation.
The only remaining 'experimental' bits of the API are the debug ioctls
and structs: these should remain experimental since the only application
that should use this is v4l2-dbg.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Add support for Intel R200 depth camera in uvc driver.
This includes adding new uvc GUIDs for the new pixel formats,
adding new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.
Tested-by: Greenberg, Aviv D <aviv.d.greenberg@intel.com>
Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This reverts commit 120c41d347.
The patch doesn't add the corresponding documentation bits to the
media infrastructure uAPI DocBook. Also, they're for 3D formats,
with requre further discussions.
Requested-by: Hans Verkuil <hverkuil@xs4all.nl>
Requested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
While https was always supported on linuxtv.org, only in
Dec 3 2015 the website is using valid certificates.
As we're planning to drop pure http support on some
future, change all references at the media subsystem
to point to the https URL instead.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Add support for Intel DS4 depth camera in uvc driver.
This includes adding new uvc GUIDs for the new pixel formats,
adding new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.
Change-Id: If240d95a7d4edc8dcc3e02d58cd8267a6bbf6fcb
Tested-by: Greenberg, Aviv D <aviv.d.greenberg@intel.com>
Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Replace the obsolete field ctrl_class with "which".
Make sure it not used in future modules by commenting out the field with
ifndef __KERNEL_ .
The field cannot be simply removed because that would be change on the
kenel API to the userspace (and we don't like that).
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
So it can be used to get the default value of a control.
Without this change it is not possible to get the
default value of array controls.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Add type field to that struct like it counterpart v4l2_tuner
already has. We need type field to distinguish different tuner
types from each others for transmitter too.
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>
SDR receiver has ADC (Analog-to-Digital Converter) and SDR transmitter
has DAC (Digital-to-Analog Converter). Originally I though it could
be good idea to have own type for receiver and transmitter, but now I
feel one common type for SDR is enough. So lets rename it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: this was added in 4.4, so update 4.2 to 4.4]
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
CEA-861.3 adds support for the SMPTE 2084 Electro-Optical Transfer Function
as can be used in HDR displays. Add a define for this in videodev2.h.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This colorspace is used for cinema projectors and is supported by
the DisplayPort standard.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
The colorspace argument was compared against a V4L2_XFER_FUNC define instead
of against a V4L2_COLORSPACE define, returning the wrong answer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
In the past the transfer function was implied by the colorspace. However,
it is an independent entity in its own right. Add support for explicitly
choosing the transfer function.
This change will allow us to represent linear RGB (as is used by openGL), and
it will make it easier to work with decoded video material since most codecs
store the transfer function as a separate property as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
The mapping of COLORSPACE_DEFAULT, YCBCR_ENC_DEFAULT or QUANTIZATION_DEFAULT
to proper non-default values is fairly complex, and it is something that
needs to be done both in the kernel and in userspace.
So add macros that can do this conversion, making this available to both
kernel and userspace.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
V4L2_COLORSPACE_RAW is added for raw image formats where the picture
is minimally processed and is in the internal colorspace of the sensor.
This is typically used in digital cameras where the image processing is
done later.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
V4L2_COLORSPACE_DEFAULT is added so we have a specific define for
the default case where applications do not set it but leave it to 0.
In that case the driver will set the colorspace based on what it
captures.
This is already used, but we never had a define for the value 0.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
16 bit greyscale format, structured in Big Endian. Such a format can be
converted into a PMN image just by adding a header.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This v4l2_buffer flag can be used by drivers to mark a capture buffer
as the last generated buffer, for example after a V4L2_DEC_CMD_STOP
command was issued.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
In the past the V4L2_DV_BT_STD_CEA861 standard bit was used to
determine whether the format is a CE (Consumer Electronics) format
or not. However, the 640x480p59.94 format is part of the CEA-861
standard, but it is *not* a CE video format.
Add a new flag to make this explicit. This information is needed
in order to determine the default R'G'B' encoding for the format:
for CE video this is limited range (16-235) instead of full range
(0-255).
The header with all the timings has been updated with this new
flag.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Create a new flag that represent controls which its value needs to be
passed to the driver even if it has not changed.
They typically represent actions, like triggering a flash or clearing an
error flag. So writing to such a control means some action is executed.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
While running v4l2-compliance tests on vivid I suddenly got errors due to
a call to vmalloc_user with size 0 from vb2.
Digging deeper into the cause I discovered that this was due to the fact that
struct v4l2_plane_pix_format defines bytesperline as a __u16 instead of a __u32.
The test I was running selected a format of 4 * 4096 by 4 * 2048 with a 32
bit pixelformat.
So bytesperline was 4 * 4 * 4096 = 65536, which becomes 0 in a __u16. And
bytesperline * height is suddenly 0 as well. While the vivid driver may be
a virtual driver, it is to be expected that this limit will be hit for real
hardware as well in the near future: 8k deep-color video will already reach
it.
The solution is to change the type to __u32. The only drivers besides vivid
that use the multiplanar API are little-endian ARM and SH platforms (exynos,
ti-vpe, vsp1), so this is safe.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
The quantization comment in the header was incorrect w.r.t. BT.2020.
Fix this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
These formats are just like 10-bit raw bayer formats that exist already, but
the pixels are not padded to byte boundaries. Instead, the eight high order
bits of four consecutive pixels are stored in four bytes, followed by a byte
of two low order bits of each of the four pixels.
Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Rearrange 12-bit raw bayer format definitions after 10-bit ones. Also remove
the comment related to 16-bit bayer formats, it was simply wrong.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Add input and output capability flags for setting native size of the device,
and document them.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Add support for the new AdobeRGB and BT.2020 colorspaces as needed for
HDMI 2.0.
Add support to specify the Y'CbCr encoding and quantization range explicitly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
The existing RGB555X pixel format is ill-defined in respect to its alpha
bit and its meaning is driver dependent. Create new standard ARGB555X
and XRGB555X variants with clearly defined meanings and make the
existing variant deprecated.
The new pixel formats 4CC values have been selected to match the DRM
4CCs for the same in-memory formats.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>