17 May, 2019
1 commit
-
Pull media fixes from Mauro Carvalho Chehab:
"Some fixes for some platform drivers (rockchip, atmel, omap, daVinci,
tegra-cec, coda and rcar).Also includes a fix on one of the V4L2 uAPI doc, explaining a border
case"* tag 'media/v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: rockchip/vpu: Fix/re-order probe-error/remove path
media: rockchip/vpu: Initialize mdev->bus_info
media: rockchip/vpu: Get vdev from the file arg in vidioc_querycap()
media: rockchip/vpu: Add missing dont_use_autosuspend() calls
media: rockchip/vpu: Do not request id 0 for our video device
media: tegra-cec: fix cec_notifier_parse_hdmi_phandle return check
media: davinci/vpbe: array underflow in vpbe_enum_outputs()
media: field-order.rst: clarify FIELD_ANY and FIELD_NONE
media: staging/imx: add media device to capture register
media: rcar-csi2: Propagate the FLD signal for NTSC and PAL
media: rcar-csi2: restart CSI-2 link if error is detected
media: omap_vout: potential buffer overflow in vidioc_dqbuf()
media: coda: fix unset field and fail on invalid field in buf_prepare
media: atmel: atmel-isc: fix asd memory allocation
media: atmel: atmel-isc: fix INIT_WORK misplacement
media: atmel: atmel-isc: limit incoming pixels per frame
09 May, 2019
2 commits
-
Pull drm updates from Dave Airlie:
"This has two exciting community drivers for ARM Mali accelerators.
Since ARM has never been open source friendly on the GPU side of the
house, the community has had to create open source drivers for the
Mali GPUs. Lima covers the older t4xx and panfrost the newer 6xx/7xx
series. Well done to all involved and hopefully this will help ARM
head in the right direction.There is also now the ability if you don't have any of the legacy
drivers enabled (pre-KMS) to remove all the pre-KMS support code from
the core drm, this saves 10% or so in codesize on my machine.i915 also enable Icelake/Elkhart Lake Gen11 GPUs by default, vboxvideo
moves out of staging.There are also some rcar-du patches which crossover with media tree
but all should be acked by Mauro.Summary:
uapi changes:
- Colorspace connector property
- fourcc - new YUV formts
- timeline sync objects initially merged
- expose FB_DAMAGE_CLIPS to atomic userspacenew drivers:
- vboxvideo: moved out of staging
- aspeed: ASPEED SoC BMC chip display support
- lima: ARM Mali4xx GPU acceleration driver support
- panfrost: ARM Mali6xx/7xx Midgard/Bitfrost acceleration driver supportcore:
- component helper docs
- unplugging fixes
- devm device init
- MIPI/DSI rate control
- shmem backed gem objects
- connector, display_info, edid_quirks cleanups
- dma_buf fence chain support
- 64-bit dma-fence seqno comparison fixes
- move initial fb config code to core
- gem fence array helpers for Lima
- ability to remove legacy support code if no drivers requires it (removes 10% of drm.ko size)
- lease fixesttm:
- unified DRM_FILE_PAGE_OFFSET handling
- Account for kernel allocations in kernel zone onlypanel:
- OSD070T1718-19TS panel support
- panel-tpo-td028ttec1 backlight support
- Ronbo RB070D30 MIPI/DSI
- Feiyang FY07024DI26A30-D MIPI-DSI panel
- Rocktech jh057n00900 MIPI-DSI paneli915:
- Comet Lake (Gen9) PCI IDs
- Updated Icelake PCI IDs
- Elkhartlake (Gen11) support
- DP MST property addtions
- plane and watermark fixes
- Icelake port sync and VEBOX disable fixes
- struct_mutex usage reduction
- Icelake gamma fix
- GuC reset fixes
- make mmap more asynchronous
- sound display power well race fixes
- DDI/MIPI-DSI clocks for Icelake
- Icelake RPS frequency changing support
- Icelake workaroundsamdgpu:
- Use HMM for userptr
- vega20 experimental smu11 support
- RAS support for vega20
- BACO support for vega12 + fixes for vega20
- reworked IH interrupt handling
- amdkfd RAS support
- Freesync improvements
- initial timeline sync object support
- DC Z ordering fixes
- NV12 planes support
- colorspace properties for planes=
- eDP opts if eDP already initializednouveau:
- misc fixesetnaviv:
- misc fixesmsm:
- GPU zap shader support expansion
- robustness ABI additionexynos:
- Logging cleanupstegra:
- Shared reset fix
- CPU cache maintenance fixcirrus:
- driver rewritten using simple helpersmeson:
- G12A supportvmwgfx:
- Resource dirtying management improvements
- Userspace logging improvementsvirtio:
- PRIME fixesrockchip:
- rk3066 hdmi supportsun4i:
- DSI burst mode supportvc4:
- load tracker to detect underflowv3d:
- v3d v4.2 supportmalidp:
- initial Mali D71 support in komeda drivertfp410:
- omap related improvementomapdrm:
- drm bridge/panel support
- drop some omap specific panelsrcar-du:
- Display writeback support"* tag 'drm-next-2019-05-09' of git://anongit.freedesktop.org/drm/drm: (1507 commits)
drm/msm/a6xx: No zap shader is not an error
drm/cma-helper: Fix drm_gem_cma_free_object()
drm: Fix timestamp docs for variable refresh properties.
drm/komeda: Mark the local functions as static
drm/komeda: Fixed warning: Function parameter or member not described
drm/komeda: Expose bus_width to Komeda-CORE
drm/komeda: Add sysfs attribute: core_id and config_id
drm: add non-desktop quirk for Valve HMDs
drm/panfrost: Show stored feature registers
drm/panfrost: Don't scream about deferred probe
drm/panfrost: Disable PM on probe failure
drm/panfrost: Set DMA masks earlier
drm/panfrost: Add sanity checks to submit IOCTL
drm/etnaviv: initialize idle mask before querying the HW db
drm: introduce a capability flag for syncobj timeline support
drm: report consistent errors when checking syncobj capibility
drm/nouveau/nouveau: forward error generated while resuming objects tree
drm/nouveau/fb/ramgk104: fix spelling mistake "sucessfully" -> "successfully"
drm/nouveau/i2c: Disable i2c bus access after ->fini()
drm/nouveau: Remove duplicate ACPI_VIDEO_NOTIFY_PROBE definition
... -
In vpbe_enum_outputs() we check if (temp_index >= cfg->num_outputs) but
the problem is that "temp_index" can be negative. This patch changes
the types to unsigned to address this array underflow bug.Fixes: 66715cdc3224 ("[media] davinci vpbe: VPBE display driver")
Signed-off-by: Dan Carpenter
Acked-by: "Lad, Prabhakar"
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
23 Apr, 2019
2 commits
-
Add helper function to parse the DT for the hdmi-phandle property
and return the corresponding struct device pointer.It takes care to avoid increasing the device refcount since all
we need is the device pointer. This pointer is used in the
notifier list as a key, but it is never accessed by the CEC driver.Signed-off-by: Hans Verkuil
Reported-by: Wen Yang
Acked-by: Wen Yang
Signed-off-by: Mauro Carvalho Chehab -
The timestamps in ir-keytable -t output showed that the Xbox DVD
IR dongle decodes scancodes every 64ms. The last scancode of a
longer button press is decodes 64ms after the last-but-one which
indicates the decoder doesn't use a timeout but decodes on the last
edge of the signal.267.042629: lirc protocol(unknown): scancode = 0xace
267.042665: event type EV_MSC(0x04): scancode = 0xace
267.042665: event type EV_KEY(0x01) key_down: KEY_1(0x0002)
267.042665: event type EV_SYN(0x00).
267.106625: lirc protocol(unknown): scancode = 0xace
267.106643: event type EV_MSC(0x04): scancode = 0xace
267.106643: event type EV_SYN(0x00).
267.170623: lirc protocol(unknown): scancode = 0xace
267.170638: event type EV_MSC(0x04): scancode = 0xace
267.170638: event type EV_SYN(0x00).
267.234621: lirc protocol(unknown): scancode = 0xace
267.234636: event type EV_MSC(0x04): scancode = 0xace
267.234636: event type EV_SYN(0x00).
267.298623: lirc protocol(unknown): scancode = 0xace
267.298638: event type EV_MSC(0x04): scancode = 0xace
267.298638: event type EV_SYN(0x00).
267.543345: event type EV_KEY(0x01) key_down: KEY_1(0x0002)
267.543345: event type EV_SYN(0x00).
267.570015: event type EV_KEY(0x01) key_up: KEY_1(0x0002)
267.570015: event type EV_SYN(0x00).Add a protocol with the repeat value and set the timeout in the
driver to 10ms (to have a bit of headroom for delays) so the Xbox
DVD remote performs more responsive.Signed-off-by: Matthias Reichl
Acked-by: Benjamin Valentin
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab
22 Apr, 2019
4 commits
-
Calling VIDIOC_DQBUF can release the core serialization lock pointed to
by vb2_queue->lock if it has to wait for a new buffer to arrive.However, if userspace dup()ped the video device filehandle, then it is
possible to read or call DQBUF from two filehandles at the same time.It is also possible to call REQBUFS from one filehandle while the other
is waiting for a buffer. This will remove all the buffers and reallocate
new ones. Removing all the buffers isn't the problem here (that's already
handled correctly by DQBUF), but the reallocating part is: DQBUF isn't
aware that the buffers have changed.This is fixed by setting a flag whenever the lock is released while waiting
for a buffer to arrive. And checking the flag where needed so we can return
-EBUSY.Signed-off-by: Hans Verkuil
Reported-by: Syzbot
Reviewed-by: Tomasz Figa
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Media Device Allocator API to allows multiple drivers share a media device.
This API solves a very common use-case for media devices where one physical
device (an USB stick) provides both audio and video. When such media device
exposes a standard USB Audio class, a proprietary Video class, two or more
independent drivers will share a single physical USB bridge. In such cases,
it is necessary to coordinate access to the shared resource.Using this API, drivers can allocate a media device with the shared struct
device as the key. Once the media device is allocated by a driver, other
drivers can get a reference to it. The media device is released when all
the references are released.Signed-off-by: Shuah Khan
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp,
to be used by drivers to calculate plane sizes and bytes per lines.Note that driver-specific padding and alignment are not
taken into account, and must be done by drivers using this API.Signed-off-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Somehow the string "Controls name" got pasted in two places
where it doesn't belong. Remove that text.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
26 Mar, 2019
4 commits
-
Add structs and definitions needed to implement stateless
decoder for fwht and add I/P-frames QP controls to the
public api.Signed-off-by: Dafna Hirschfeld
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
If one of the controls fails to set,
then 'v4l2_ctrl_request_setup'
immediately returns with the error code.Signed-off-by: Dafna Hirschfeld
Reviewed-by: Paul Kocialkowski
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
If requests are used when they shouldn't, or not used when they should,
then return EBADR (Invalid request descriptor) instead of EACCES.The reason for this change is that EACCES has more to do with permissions
(not being the owner of the resource), but in this case the request file
descriptor is just wrong for the current mode of the device.Update the documentation accordingly.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
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 check in the vb2 core simplifies drivers, since they
don't have to check for this, they can just set this flag.Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Signed-off-by: Mauro Carvalho Chehab
20 Mar, 2019
4 commits
-
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 -
The last user of this state has been converted, so we can now drop
this. Requeueing causes the queue to become unordered, which causes
problems with requests and (in the future) fences.Since it is no longer needed, just get rid of this.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
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 called and the module refcount was left one too high, making
it impossible to unload it.Since v4l2-subdev.c was the only place where media_entity_get/put was
called, just move the functionality to v4l2-subdev.c and drop those
confusing entity functions.Store the module in subdev_fh so module_put no longer depends on
the media_entity struct.Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
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 can postpone freeing memory until the that callback is called.If no video device node was created then the release callback can
be called immediately when the subdev is unregistered.Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
18 Mar, 2019
2 commits
-
Extend the vsp1_du_atomic_flush() API with writeback support by adding
format, pitch and memory addresses of the writeback framebuffer.
Writeback completion is reported through the existing frame completion
callback with a new VSP1_DU_STATUS_WRITEBACK status flag.Signed-off-by: Laurent Pinchart
Reviewed-by: Kieran Bingham
Reviewed-by: Mauro Carvalho Chehab -
The VSP1 driver will need to pass extra flags to the DU through the
frame completion API. Replace the completed bool flag by a bitmask to
support this.Signed-off-by: Laurent Pinchart
Reviewed-by: Kieran Bingham
Reviewed-by: Mauro Carvalho Chehab
01 Mar, 2019
1 commit
-
Use codespell to fix lots of typos over frontends.
Manually verified to avoid false-positives.
Signed-off-by: Mauro Carvalho Chehab
Reviewed-by: Lad, Prabhakar
Signed-off-by: Mauro Carvalho Chehab
19 Feb, 2019
4 commits
-
media: add support for RCMM infrared remote controls.
Signed-off-by: Patrick Lerda
Signed-off-by: Sean Young
Signed-off-by: Mauro Carvalho Chehab -
This commit changes the return type of mem2mem buffer handling API.
Namely, these functions:v4l2_m2m_next_buf
v4l2_m2m_last_buf
v4l2_m2m_buf_remove
v4l2_m2m_next_src_buf
v4l2_m2m_next_dst_buf
v4l2_m2m_last_src_buf
v4l2_m2m_last_dst_buf
v4l2_m2m_src_buf_remove
v4l2_m2m_dst_buf_removewhich currently return void pointer.
In every case, the actual return type is a struct vb2_v4l2_buffer
pointer. Change the return type of the listed functions,
so type checking can be properly used.Signed-off-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
[hverkuil-cisco@xs4all.nl: clean up line-too-long checkpatch warnings]
Signed-off-by: Mauro Carvalho Chehab -
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 when the
timestamp is copied from an output to a capture buffer, and is
cleared when it is no longer valid.Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Signed-off-by: Mauro Carvalho Chehab -
The bool type is not recommended for use in structs, so replace these
by bitfields.Signed-off-by: Hans Verkuil
Reviewed-by: Paul Kocialkowski
Signed-off-by: Mauro Carvalho Chehab
18 Feb, 2019
1 commit
-
The sd argument of this macro can be a more complex expression. Since it
is used 5 times in the macro it can be evaluated that many times as well.So assign it to a temp variable in the beginning and use that instead.
This also avoids any potential side-effects of evaluating sd.
Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
08 Feb, 2019
5 commits
-
The v4l2_m2m_buf_copy_data helper is used to copy the buffer
metadata, such as its timestamp and its flags.Therefore, the v4l2_m2m_buf_copy_metadata name is more clear
and avoids confusion with a payload data copy.Signed-off-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
[hverkuil-cisco@xs4all.nl: also fix cedrus_dec.c]
Signed-off-by: Mauro Carvalho Chehab -
The .buf_out_validate callback is mandatory for OUTPUT
queues. Mark it as such in the callback's doc.Fixes: 28d77c21cb ("media: vb2: add buf_out_validate callback")
Signed-off-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This function is no longer used, so drop it.
Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
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
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
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
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
31 Jan, 2019
2 commits
-
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 possible. Also, the spec requires that
the 'field' value is validated at QBUF time.This patch adds a new buf_out_validate callback to validate the
output buffer at buf_prepare time or when QBUF queues an unprepared
buffer to a request. This callback is mandatory for output queues
that support requests.This issue was found by v4l2-compliance since it failed to replace
V4L2_FIELD_ANY by a proper field value when testing the vivid video
output in combination with requests.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
There really is no reason why vb2_find_timestamp can't just find
buffers in any state. Drop that part of the test.This also means that vb->timestamp should only be set to 0 when
the driver doesn't copy timestamps.This change allows for more efficient pipelining (i.e. you can use
a buffer for a reference frame even when it is queued).Signed-off-by: Hans Verkuil
Reviewed-by: Tomasz Figa
Reviewed-by: Alexandre Courbot
Reviewed-by: Paul Kocialkowski
Signed-off-by: Mauro Carvalho Chehab
22 Jan, 2019
2 commits
-
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
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab -
This include isn't use anymore, so drop it.
Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
17 Jan, 2019
1 commit
-
My @samsung.com address is going to cease existing soon, so change it to
an address which can actually be used to contact me.Signed-off-by: Andrzej Pietrasiewicz
Signed-off-by: Mauro Carvalho Chehab
08 Jan, 2019
3 commits
-
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 Verkuil
Tested-by: Paul Kocialkowski
Signed-off-by: Mauro Carvalho Chehab -
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 buffers, i.e.
buffers that are already processed.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
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
Signed-off-by: Mauro Carvalho Chehab
26 Dec, 2018
1 commit
-
Pull more media updates from Mauro Carvalho Chehab:
"The Intel IPU3 camera driver"* tag 'media/v4.20-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (23 commits)
media: staging/ipu3-imgu: Add MAINTAINERS entry
media: staging/ipu3-imgu: Address documentation comments
media: v4l: Add Intel IPU3 meta buffer formats
media: doc-rst: Add Intel IPU3 documentation
media: ipu3-imgu: Fix firmware binary location
media: ipu3-imgu: Fix compiler warnings
media: staging/intel-ipu3: Add dual pipe support
media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI
media: staging/intel-ipu3: Add imgu top level pci device driver
media: staging/intel-ipu3: Add v4l2 driver based on media framework
media: staging/intel-ipu3: Add css pipeline programming
media: staging/intel-ipu3: css: Initialize css hardware
media: staging/intel-ipu3: css: Compute and program ccs
media: staging/intel-ipu3: css: Add static settings for image pipeline
media: staging/intel-ipu3: css: Add support for firmware management
media: staging/intel-ipu3: css: Add dma buff pool utility functions
media: staging/intel-ipu3: Implement DMA mapping functions
media: staging/intel-ipu3: mmu: Implement driver
media: staging/intel-ipu3: abi: Add structs
media: staging/intel-ipu3: abi: Add register definitions and enum
...
17 Dec, 2018
1 commit
-
Linux 4.20-rc7
* tag 'v4.20-rc7': (403 commits)
Linux 4.20-rc7
scripts/spdxcheck.py: always open files in binary mode
checkstack.pl: fix for aarch64
userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered
fs/iomap.c: get/put the page in iomap_page_create/release()
hugetlbfs: call VM_BUG_ON_PAGE earlier in free_huge_page()
memblock: annotate memblock_is_reserved() with __init_memblock
psi: fix reference to kernel commandline enable
arch/sh/include/asm/io.h: provide prototypes for PCI I/O mapping in asm/io.h
mm/sparse: add common helper to mark all memblocks present
mm: introduce common STRUCT_PAGE_MAX_SHIFT define
alpha: fix hang caused by the bootmem removal
XArray: Fix xa_alloc when id exceeds max
drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3
MAINTAINERS: Daniel for drm co-maintainer
drm/amdgpu: drop fclk/gfxclk ratio setting
IB/core: Fix oops in netdev_next_upper_dev_rcu()
dm thin: bump target version
drm/vmwgfx: remove redundant return ret statement
drm/i915: Flush GPU relocs harder for gen3
...