summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/zoran
AgeCommit message (Collapse)AuthorFilesLines
2022-06-20media: staging: media: zoran: replace dprintk with new debugging macrosIan Cowan4-181/+170
This replaces all of the dprintk macro calls with the zrdev_dbg, zrdev_info, or zrdev_err calls as appropriate. This allows for the removal of the dprintk macro from each file it is defined in, along with the removal of module params that track the debugging level. In the case that the debugging level was used in a comparison, this has been replaced with checking the console level debugging and making a decision from there. If the console debugging level is at least the KERN_ debugging level equivalent, then the comparison will evaluate as true. There are a few instances where pr_debug must be used over the zrdev_dbg. These occur in the module cleanup functions because there should be no devices defined once we get here, so we don't have a device to pass to zrdev_dbg. Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-20media: staging: media: zoran: replace all pr_err with zrdev_err as appropriateIan Cowan4-25/+51
This replaces all of the pr_err calls to the preferred zrdev_err macro that calls the dev_err macro. There are a few locations where the pr_err is left because a zoran struct cannot be created. This is the result of error handling for another struct's existence that is required to create a zoran struct. Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-20media: staging: media: zoran: setup videocodec header for debugging macrosIan Cowan2-0/+16
This adds inline functions in the videocodec header file to convert the videocodec and videocodec_master structs to their respective contained zoran struct. This will be used to pass the zoran struct to the zrdev_XXX() macros defined in the zoran header. In the zoran header, the new include is added to ensure all variables can be completely defined with the zoran and videocodec includes where they are located. Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-20media: staging: media: zoran: add logging macrosIan Cowan1-0/+13
This adds the zrdev_dbg() (pointing to pci_dbg()), zrdev_err() (pointing to pci_err()), and zrdev_info() (pointing to pci_info()) macros to the zoran drivers. These are the preferred method for debugging and this will allow to extract the device from the zoran struct to make the call. Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18media: Kconfig: cleanup VIDEO_DEV dependenciesMauro Carvalho Chehab1-1/+1
media Kconfig has two entries associated to V4L API: VIDEO_DEV and VIDEO_V4L2. On Kernel 2.6.x, there were two V4L APIs, each one with its own flag. VIDEO_DEV were meant to: 1) enable Video4Linux and make its Kconfig options to appear; 2) it makes the Kernel build the V4L core. while VIDEO_V4L2 where used to distinguish between drivers that implement the newer API and drivers that implemented the former one. With time, such meaning changed, specially after the removal of all V4L version 1 drivers. At the current implementation, VIDEO_DEV only does (1): it enables the media options related to V4L, that now has: menu "Video4Linux options" visible if VIDEO_DEV source "drivers/media/v4l2-core/Kconfig" endmenu but it doesn't affect anymore the V4L core drivers. The rationale is that the V4L2 core has a "soft" dependency at the I2C bus, and now requires to select a number of other Kconfig options: config VIDEO_V4L2 tristate depends on (I2C || I2C=n) && VIDEO_DEV select RATIONAL select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE default (I2C || I2C=n) && VIDEO_DEV In the past, merging them would be tricky, but it seems that it is now possible to merge those symbols, in order to simplify V4L dependencies. Let's keep VIDEO_DEV, as this one is used on some make *defconfig configurations. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2d Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: drop read/write supportHans Verkuil2-13/+1
This makes no sense for MJPEG formats and it is just easier to drop support for this altogether. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: drop kernel log spamHans Verkuil2-15/+15
Do not spam the kernel log with messages that result from incorrect userspace input. Those should be either dropped completely (the error code gives sufficient info) or changed to debug messages. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: fix TRY_FMT handlingHans Verkuil1-1/+2
TRY_FMT must not set actual capture values (zr->buffer_size in this case), since it is a 'try' only. zoran_try_fmt_vid_cap() also didn't fill in fmt->fmt.pix.bytesperline and fmt->fmt.pix.sizeimage correctly. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: fix various V4L2 compliance errorsHans Verkuil2-4/+11
This fixes several issues found with 'v4l2-compliance -s': 1) read()/write() is supported, but not reported in the capabilities 2) S_STD(G_STD()) failed: setting the same standard should just return 0. 3) G_PARM failed to set readbuffers. 4) different field values in the format vs. what v4l2_buffer reported. 5) zero the sequence number when starting streaming. 6) drop VB_USERPTR: makes no sense with dma_contig streaming. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: calculate the right buffer number for ↵Corentin Labbe1-1/+6
zoran_reap_stat_com On the case tmp_dcim=1, the index of buffer is miscalculated. This generate a NULL pointer dereference later. So let's fix the calcul and add a check to prevent this to reappear. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: fix counting buffer in reserveCorentin Labbe1-0/+1
After each capture, zoran driver complains that it remains some unused buffer. This is due to a missing count handling. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: clean unused codeCorentin Labbe4-54/+0
It remains some unused code from old zoran buffer handling. Let's remove them. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: fix usage of vb2_dma_contig_set_max_seg_sizeCorentin Labbe1-2/+4
vb2_dma_contig_set_max_seg_size need to have a size in parameter and not a DMA_BIT_MASK(). While fixing this issue, also fix error handling of all DMA size setting. Reported-by: kernel test robot <lkp@intel.com> Fixes: d4ae3689226e5 ("media: zoran: device support only 32bit DMA address") Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: introduce zoran_i2c_initCorentin Labbe1-19/+54
Reduces the size of the probe function by adding zoran_i2c_init and zoran_i2c_exit functions. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: move config select on primary kconfigCorentin Labbe1-13/+10
Since all kconfigs for card selection are bool, this causes all selected modules to be always built-in. Prevent this by moving selects to the main tristate kconfig. By doing this, remove also all "if MEDIA_SUBDRV_AUTOSELECT" which are wrong, since zoran always need them to work. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: move videodev allocCorentin Labbe3-33/+54
Move some code out of zr36057_init() and create new functions for handling zr->video_dev. This permit to ease code reading and fix a zr->video_dev memory leak. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: remove vidmemCorentin Labbe1-15/+0
The vidmem parameter is no longer necessary since we removed framebuffer support. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: merge all modulesCorentin Labbe11-102/+125
The zoran driver is split in many modules, but this lead to some problems. One of them is that load order is incorrect when everything is built-in. Having more than one module is useless, so merge all zoran modules in one. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: videocode: remove procfsCorentin Labbe2-23/+4
Now we have a debugfs, we can remove all PROCFS stuff. We keep videocodec_debugfs_show(), it will be used later Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: add debugfsCorentin Labbe3-0/+39
Add debugfs for displaying zoran debug and stats information. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: rename debug module parameterCorentin Labbe4-19/+18
All zoran module will be merged, so to prevent conflict, the debug module parameter need to be renamed Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: use module_pci_driverCorentin Labbe1-20/+1
Simplify code by using module_pci_driver() Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-01-23media: staging: media: zoran: move module parameter checks to zoran_probeCorentin Labbe1-31/+33
We need to empty zoran_init() for removing it later. Furthermore, this permit to use pci_xxx instead of pr_xxx for prettier printing. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-06-02media: staging: media: zoran: change asm headerCorentin Labbe1-1/+1
As asked by checkpatch, convert a asm/xxx header to a linux one. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: staging: media: zoran: fix kzalloc styleCorentin Labbe2-2/+2
Prefer kzalloc(sizeof(*prt)...) over kzalloc(sizeof(struct.../ Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: staging: media: zoran: remove blank lineCorentin Labbe1-1/+0
Minor style fix by removing useless blank line. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: staging: media: zoran: multiple assignments should be avoidedCorentin Labbe4-5/+10
Remove all multiple assignments. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: staging: media: zoran: remove detect_guest_activityCorentin Labbe2-67/+0
The detect_guest_activity function is no longer used, so lets removed it. [hverkuil: remove dump_guests() as well as that too is now unused] Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02media: staging: media: zoran: fix some formatting issuesWang Qing1-3/+4
fixing WARNING: Possible repeated word: 'in' as "in in a VIDIOCSFBUF ioctl", limit the number of words per line. Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-10media: staging: media: zoran: add spaces around '<<' operatorMitali Borkar1-7/+7
Added spaces around '<<' operator to improve readability and meet linux kernel coding style. Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'He' to 'he'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'He' to 'he' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'We' to 'we'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'We' to 'we' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VidWinHt' to 'vid_win_ht'Zhansaya Bagdauletkyzy1-5/+5
Rename 'VidWinHt' to 'vid_win_ht' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VidWinWid' to 'vid_win_wid'Zhansaya Bagdauletkyzy1-5/+5
Rename variable 'VidWinWid' to 'vid_win_wid' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'DispMode' to 'disp_mode'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'DispMode' to 'disp_mode' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'VEnd' to 'v_end'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'VEnd' to 'v_end' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-04-09media: staging: media: zoran: Rename 'HEnd' to 'h_end'Zhansaya Bagdauletkyzy1-4/+4
Rename variable 'HEnd' to 'h_end' to eliminate camelcase Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-01-14media: zoran: convert comma to semicolonZheng Yongjun1-1/+1
Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Acked-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-11-16media: zoran: fix spelling mistake and make error message more meaningfulColin Ian King1-1/+1
There is a spelling mistake in a pci_err error message. Fix this and make the error message a little more meaningful. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-04media: zoran.rst: place it at the right place this timeMauro Carvalho Chehab1-1/+1
I was too quick moving zoran.rst... it ends that the original patch didn't do the right thing and forgot to update the files that references it. Fix it. Fixes: 6b90346919d4 ("media: zoran: move documentation file to the right place") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix mixed case on varsMauro Carvalho Chehab10-350/+350
Use this small script to replace CamelCase and wrong case on vars: <script> FILES=$(find "$1" -type f|grep -e '.c$' -e '.h$') CAMEL_VARS=$(cat tags|perl -ne 'print "$1\n" if (m/^(\w*[A-Z]\w*[a-z]\w*)\s/)') for i in $CAMEL_VARS; do new=$(perl -e ' my $s = $ARGV[0]; $s =~ s{([^a-zA-Z]?)([A-Z]*)([A-Z])([a-z]?)}{ my $fc = pos($s)==0; my ($p0,$p1,$p2,$p3) = ($1,lc$2,lc$3,$4); my $t = $p0 || $fc ? $p0 : '_'; $t .= $p3 ? $p1 ? "${p1}_$p2$p3" : "$p2$p3" : "$p1$p2"; $t; }ge; print $s;' "$i") for j in $FILES; do sed -E "s,\b$i\b,$new,g" -i $j done done for i in $(git grep "#define zr" drivers/staging/media/zoran/*.[ch]|perl -ne 'print "$1\n" if (m/#define\s+(zr\S+)/)'); do j=$(echo $i|tr [a-z] [A-Z]); sed "s,\b$i\b,$j,g" -i drivers/staging/media/zoran/*.[ch]; done </script> This should solve almost all warnings reported by checkpatch.pl in strict mode. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: get rid of an unused varMauro Carvalho Chehab1-1/+0
The jpeg_error in lowercase is not used anywhere. Drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: use upper case for card typesMauro Carvalho Chehab2-14/+14
Don't mix case there: let's just use uppercase, as this is the common pattern for such define-like enums. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix sparse warningsHans Verkuil1-8/+7
The output is not fully supported yet, so some ops are commented out. Also comment out the corresponding callbacks to prevent these sparse warnings: drivers/staging/media/zoran/zoran_driver.c:656:12: warning: 'zoran_s_output' defined but not used [-Wunused-function] 656 | static int zoran_s_output(struct file *file, void *__fh, unsigned int output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:649:12: warning: 'zoran_g_output' defined but not used [-Wunused-function] 649 | static int zoran_g_output(struct file *file, void *__fh, unsigned int *output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:635:12: warning: 'zoran_enum_output' defined but not used [-Wunused-function] 635 | static int zoran_enum_output(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:302:12: warning: 'zoran_enum_fmt_vid_overlay' defined but not used [-Wunused-function] 302 | static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:294:12: warning: 'zoran_enum_fmt_vid_out' defined but not used [-Wunused-function] 294 | static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix smatch warningHans Verkuil1-4/+4
drivers/staging/media/zoran/zoran_device.c:941 zoran_irq() warn: inconsistent indenting Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: update TODOCorentin Labbe1-4/+19
Update the TODO of the zoran driver Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: convert to vb2Corentin Labbe5-1934/+137
This is it! the ultimate last step, the vb2 conversion. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: remove deprecated .vidioc_g_jpegcompCorentin Labbe2-49/+22
Remove the deprecated .vidioc_g_jpegcomp and replace it with corresponding v4l2_ctrl_ops code. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix some compliance testCorentin Labbe1-1/+11
Add TODO for "TRY_FMT cannot handle an invalid pixelformat" We need to set pixelformat in some case. We should also handle some minimum requirement. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix use of buffer_size and sizeimageCorentin Labbe2-3/+8
buffer_size was not set when it should be. Furthermore, use it instead of recalculate it. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>