18 Dec, 2015
2 commits
-
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
Signed-off-by: Geunyoung Kim
Acked-by: Seung-Woo Kim
Acked-by: Inki Dae
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The queue_setup callback has a void pointer that is just for V4L2
and is the pointer to the v4l2_format struct that was passed to
VIDIOC_CREATE_BUFS. The idea was that drivers would use the information
from that struct to buffers suitable for the requested format.After the vb2 split series this pointer is now a void pointer,
which is ugly, and the reality is that all existing drivers will
effectively just look at the sizeimage field of v4l2_format.To make this more generic the queue_setup callback is changed:
the void pointer is dropped, instead if the *num_planes argument
is 0, then use the current format size, if it is non-zero, then
it contains the number of requested planes and the sizes array
contains the requested sizes. If either is unsupported, then return
-EINVAL, otherwise use the requested size(s).Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
17 Nov, 2015
1 commit
-
Let's not mix headers used by the core with those headers that
are needed by some driver-specific interface header.The headers used on drivers were manually moved using:
mkdir include/media/drv-intf/
git mv include/media/cx2341x.h include/media/cx25840.h \
include/media/exynos-fimc.h include/media/msp3400.h \
include/media/s3c_camif.h include/media/saa7146.h \
include/media/saa7146_vv.h include/media/sh_mobile_ceu.h \
include/media/sh_mobile_csi2.h include/media/sh_vou.h \
include/media/si476x.h include/media/soc_mediabus.h \
include/media/tea575x.h include/media/drv-intf/And the references for those headers were corrected using:
MAIN_DIR="media/"
PREV_DIR="media/"
DIRS="drv-intf/"echo "Checking affected files" >&2
for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
n=`basename $j`
git grep -l $n
done
done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
) >script && . ./scriptSigned-off-by: Mauro Carvalho Chehab
Acked-by: Arnd Bergmann
21 Oct, 2015
1 commit
-
Replace struct v4l2_format * with void * to make queue_setup()
for common use.
And then, modify all device drivers related with this change.Signed-off-by: Junghak Sung
Signed-off-by: Geunyoung Kim
Acked-by: Seung-Woo Kim
Acked-by: Inki Dae
Signed-off-by: Hans Verkuil
[hans.verkuil@cisco.com: fix missing const in fimc-lite.c]Signed-off-by: Mauro Carvalho Chehab
01 Oct, 2015
1 commit
-
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.
Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
};v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};Signed-off-by: Junghak Sung
Signed-off-by: Geunyoung Kim
Acked-by: Seung-Woo Kim
Acked-by: Inki Dae
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
06 Jul, 2015
11 commits
-
drivers/media/platform/sh_vou.c:799:5: warning: no previous prototype for 'sh_vou_g_output' [-Wmissing-prototypes]
int sh_vou_g_output(struct file *file, void *fh, unsigned int *i)
^
drivers/media/platform/sh_vou.c:805:5: warning: no previous prototype for 'sh_vou_s_output' [-Wmissing-prototypes]
int sh_vou_s_output(struct file *file, void *fh, unsigned int i)
^Signed-off-by: Mauro Carvalho Chehab
-
Dump the VOU registers in log_status.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This converts this driver to videobuf2. As usual it is a big and hard to review
patch, but this is always a big-bang change.It has been tested with my Renesas board.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The bytesperline values were wrong for planar formats where bytesperline is
the line length for the first plane.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This ensures that both do the same checks, and simplifies s_fmt_vid_out
a bit.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Implement g/s_selection. The v4l2 core will emulate g/s_crop and
cropcap on top of g/s_selection.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
It was set to a format that wasn't supported.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Video output drivers must support these ioctls. Otherwise applications
cannot deduce that these outputs exist and what capabilities they have.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This allows us to drop the use_count and you get free G/S_PRIORITY support.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Fix v4l2-compliance errors due to empty driver and bus_info fields.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Simplify the sh-vou clean up by using devm_* were possible.
Signed-off-by: Hans Verkuil
Cc: Magnus Damm
Signed-off-by: Mauro Carvalho Chehab
05 Jun, 2015
1 commit
-
Smatch reports two issues:
drivers/media/platform/sh_vou.c:670 vou_adjust_output() error: buffer overflow 'vou_scale_v_num' 3
01 May, 2015
1 commit
-
Replace all calls to s_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.Remove the old try/s_mbus_fmt video ops since they are now no longer used.
Signed-off-by: Hans Verkuil
Cc: Guennadi Liakhovetski
Acked-by: Prabhakar Lad
Acked-by: Scott Jiang
Cc: Jonathan Corbet
Signed-off-by: Mauro Carvalho Chehab
03 Apr, 2015
1 commit
-
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.Signed-off-by: Lad, Prabhakar
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
03 Mar, 2015
1 commit
-
Memory allocated for sh_vou_file is not deallocated
on error paths in sh_vou_open().Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
15 Dec, 2014
1 commit
-
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
02 Dec, 2014
1 commit
-
Querycap shouldn't set the version field (the core does that for you),
but it should set the device_caps field.Signed-off-by: Hans Verkuil
Cc: Scott Jiang
Cc: Gerhard Sittig
Cc: Jonathan Corbet
Cc: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
15 Nov, 2014
1 commit
-
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.Reference new definitions in all platform drivers.
Signed-off-by: Boris Brezillon
Acked-by: Hans Verkuil
Acked-by: Sakari Ailus
Acked-by: Sekhar Nori
Acked-by: Lad, Prabhakar
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
13 Jan, 2014
1 commit
-
Fix two warns below, by commenting the unused code:
drivers/media/platform/sh_vou.c: In function 'sh_vou_configure_geometry':
drivers/media/platform/sh_vou.c:446:49: warning: variable 'height_max' set but not used [-Wunused-but-set-variable]
unsigned int black_left, black_top, width_max, height_max,
^
drivers/media/platform/sh_vou.c: In function 'sh_vou_isr':
drivers/media/platform/sh_vou.c:1056:13: warning: variable 'side' set but not used [-Wunused-but-set-variable]
static int side;
^Cc: Guennadi Liakhovetski
Cc: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
18 Dec, 2013
1 commit
-
Use the %zu and %pad printk specifiers to print size_t and dma_addr_t
variables. This fixes warnings on platforms where dma_addr_t has a
different size than int.Cc: Guennadi Liakhovetski
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
25 Sep, 2013
1 commit
-
The "i < " part of the "i < ARRAY_SIZE()" condition was missing.
Signed-off-by: Dan Carpenter
[g.liakhovetski@gmx.de: remove unrelated superfluous braces]
Signed-off-by: Guennadi LiakhovetskiSigned-off-by: Mauro Carvalho Chehab
17 Jun, 2013
2 commits
-
The current_norm field is deprecated and is replaced by g_std. This driver
already implements g_std, so just remove current_norm.Signed-off-by: Hans Verkuil
Acked-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
VIDIOC_DBG_G_CHIP_IDENT has been replaced by VIDIOC_DBG_G_CHIP_INFO. Remove
g_chip_ident support from bridge drivers since it is no longer needed.
This patch takes care of all the trivial cases.Signed-off-by: Hans Verkuil
Acked-by: Lad, Prabhakar
Acked-by: Scott Jiang
Signed-off-by: Mauro Carvalho Chehab
24 Mar, 2013
2 commits
-
This ioctl is defined as IOW, so pass the argument as const.
Signed-off-by: Hans Verkuil
Acked-by: Guennadi Liakhovetski
Acked-by: Lad, Prabhakar
Signed-off-by: Mauro Carvalho Chehab -
This ioctl is defined as IOW, so pass the argument by value instead of by
reference. I could have chosen to add const instead, but this is 1) easier
to handle in drivers and 2) consistent with the s_std subdev operation.Signed-off-by: Hans Verkuil
Acked-by: Laurent Pinchart
Acked-by: Jonathan Corbet
Acked-by: Guennadi Liakhovetski
Acked-by: Lad, Prabhakar
Signed-off-by: Mauro Carvalho Chehab
22 Mar, 2013
1 commit
-
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.Signed-off-by: Sachin Kamat
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
14 Feb, 2013
2 commits
-
This prepares for the removal of vou_file.
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
Replace video_devdata() followed by video_get_drvdata() calls with
video_drvdata().Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
25 Jan, 2013
1 commit
-
* v4l_for_linus: (464 commits)
[media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
[media] uvcvideo: Cleanup leftovers of partial revert
[media] uvcvideo: Return -EACCES when trying to set a read-only control
Linux 3.8-rc3
mm: reinstante dropped pmd_trans_splitting() check
cred: Remove tgcred pointer from struct cred
drm/ttm: fix fence locking in ttm_buffer_object_transfer
ARM: clps711x: Fix bad merge of clockevents setup
ARM: highbank: save and restore L2 cache and GIC on suspend
ARM: highbank: add a power request clear
ARM: highbank: fix secondary boot and hotplug
ARM: highbank: fix typos with hignbank in power request functions
ARM: dts: fix highbank cpu mpidr values
ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
drm/prime: drop reference on imported dma-buf come from gem
xen/netfront: improve truesize tracking
ARM: mx5: Fix MX53 flexcan2 clock
ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
sctp: fix Kconfig bug in default cookie hmac selection
EDAC: Cleanup device deregistering path
...Conflicts:
drivers/media/pci/dm1105/dm1105.c
drivers/media/platform/soc_camera/mx2_camera.c
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Mauro Carvalho Chehab
Signed-off-by: Greg Kroah-Hartman
21 Dec, 2012
1 commit
-
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).Signed-off-by: Sakari Ailus
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
05 Dec, 2012
1 commit
-
sh-vou causes several "may be used uninitialized" warnings. Even though
they all are purely theoretical, it is better to fix them.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
22 Nov, 2012
1 commit
-
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in sh_vou. Fix them by cleanly separating writable and
read-only variables in cropping operations.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
27 Sep, 2012
1 commit
-
A recent commit
commit f135a8a224294fa0f60ec1b8bc120813b7cfc804
Author: Hans Verkuil
[media] sh_vou: remove V4L2_FL_LOCK_ALL_FOPS
broke compilation of sh_vou.c:
drivers/media/platform/sh_vou.c: In function 'sh_vou_mmap':
drivers/media/platform/sh_vou.c:1227: error: 'vdev' undeclared (first use in this function)
drivers/media/platform/sh_vou.c:1227: error: (Each undeclared identifier is reported only once
drivers/media/platform/sh_vou.c:1227: error: for each function it appears in.)
drivers/media/platform/sh_vou.c: In function 'sh_vou_poll':
drivers/media/platform/sh_vou.c:1242: error: 'vdev' undeclared (first use in this function)
make[2]: *** [drivers/media/platform/sh_vou.o] Error 1
Add missing variable definitions.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab