Age | Commit message (Collapse) | Author | Files | Lines |
|
MEDIA_BUS_FMT_VYUY8_2X8
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Enabling vflip currently causes wrong colors.
It seems that (at least with the current sensor setup) REG04_VFLIP_IMG only
changes the vertical readout direction.
Because pixels are arranged RGRG... in odd lines and GBGB... in even lines,
either a one line shift or even/odd line swap is required, too, but
apparently this doesn't happen.
I finally figured out that this can be done manually by setting
REG04_VREF_EN.
Looking at hflip, it turns out that bit REG04_HREF_EN is set there
permanetly, but according to my tests has no effect on the pixel readout
order.
So my conclusion is that the current documentation of sensor register 0x04
is wrong (has changed after preliminary datasheet version 2.2).
I'm pretty sure that automatic vertical line shift/switch can be enabled,
too, but until anyone finds ot how this works, we have to stick with manual
switching.
Signed-off-by: Frank Schäfer <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
ov2640_select_win() returns height and width values as part of struct
ov2640_win_size, so there is no point in modifying the passed height and
width parameters, too.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
HSIZE and VSIZE bits 0 to 2 and HSIZE bit 11 are encoded in DSP register
SIZEL.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
According to ov2640 software application notes, there are two Automatic
White Balance (AWB) modes, which are selected by DSP register 0xc7:
1) Simple AWB: assumes the average color is gray
+ independent from lens
- doesn't work well if captured area contains unbalanced colors
(e.g. large blue background)
2) Advanced AWB: uses color temperature information
+ more accurate, works with all image contents
- lens specific, requires calibration
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
- add missing initialisation of sensor register COM25 (2 MSBs of banding
filter AEC values)
- add macros for setting the banding filter AEC values
- add definitions for sensor register 0x5a, which is documented in
Omnivisions software application notes
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
While we are at it, remove a misleading comment (copy/paste mistake)
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
As warned by kbuild test robot:
warning: (VIDEO_EM28XX_V4L2) selects VIDEO_OV2640 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_V4L2 && I2C && GPIOLIB && MEDIA_CAMERA_SUPPORT)
The em28xx driver can use ov2640, but it doesn't depend
(or use) the GPIOLIB in order to power off/on the sensor.
So, as we want to allow both usages with and without
GPIOLIB, make its dependency optional.
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Trivial fix to spelling mistake on calibration, make Self lowercase
and re-join multiple lined printk since checkpatch allows this
coding style.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The documentation incorrectly mentions MENU and INTEGER_MENU
at struct v4l2_querymenu table as if they were flags. They're
not: they're types.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Reviewed-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Fix kernel Oops NULL pointer deference
Call dev_dbg_obj only after checking if gobj->mdev is not NULL
Signed-off-by: Helen Koike <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remove spurious '-' in the VSP1 hgo table.
This resulted in a weird dot character that also caused
the row to be double-height.
We used to have it on other tables, but we got rid of them
on changeset 8ed29e302dd1 ("[media] subdev-formats.rst: remove
spurious '-'").
Fixes: 14d665387165 ("[media] v4l: Define a pixel format for the R-Car VSP1 1-D histogram engine")
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remove those gcc warnings:
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c: In function 'mtk_vcodec_dec_pw_on':
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:114:51: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
mtk_v4l2_err("pm_runtime_get_sync fail %d", ret);
^
By adding braces.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The h.264 standard allows up to 16 reference frame for the high profile
and we need one additional internal framebuffer when the VDOA is in use.
Lift the current maximum of 8 internal framebuffers to allow playback
of those video streams.
Signed-off-by: Lucas Stach <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Driver is stable. Remove DEBUG definition from driver.
There are debug message in /var/log/messages if DEBUG is defined,
such as:
[MTK_V4L2] level=0 fops_vcodec_open(),170: decoder capability 0
[MTK_V4L2] level=0 fops_vcodec_open(),177: 16000000.vcodec decoder [0]
[MTK_V4L2] level=0 fops_vcodec_release(),200: [0] decoder
Signed-off-by: Minghsiu Tsai <[email protected]>
Acked-by: Tiffany Lin <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remove spurious duplicate '-' in the Bayer Formats description. This resulted in a
weird dot character that also caused the row to be double-height.
The - character was probably used originally as indicator of an unused bit, but as the
number of columns was increased it was never used for the new columns.
Other tables do not use '-' either, so just remove it.
Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Otherwise the i2c transfer functions can read or write beyond the end of
stack or heap buffers.
Signed-off-by: Alyssa Milburn <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and
heap buffers.
Signed-off-by: Alyssa Milburn <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add an explicit config option to select whether the CEC remote control
messages are to be passed on to the RC subsystem or not.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Drop the separate cec-edid.h header and merge it into cec.h.
There was really no need to have a separate header for this.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The Kconfig options for the CEC subsystem were a bit messy. In
addition there were two cec sources (cec-edid.c and cec-notifier.c)
that were outside of the media/cec directory, which was weird.
Move those sources to media/cec as well.
The cec-edid and cec-notifier functionality is now part of the cec
module and these are no longer separate modules.
Also remove the MEDIA_CEC_EDID config option and include it with the
main CEC config option (which defined CEC_EDID anyway).
Added static inlines to cec-edid.h for dummy functions when CEC_CORE
isn't defined.
CEC drivers should now depend on CEC_CORE.
CEC drivers that need the cec-notifier functionality must explicitly
select CEC_NOTIFIER.
The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
CEC_CORE, fix that as well.
Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Benjamin Gaignard <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
This code copies actual_length-128 bytes from the header, which will
underflow if the received buffer is too small.
Signed-off-by: Alyssa Milburn <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Return an error rather than memcpy()ing beyond the end of the buffer.
Internal callers use appropriate sizes, but digitv_i2c_xfer may not.
Signed-off-by: Alyssa Milburn <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The Kconfig currently makes no reference to the snd-usb-audio
driver, which supports audio capture for this type of devices.
Just in case, let's make sure the requirement is mentioned
in the description.
Signed-off-by: Ezequiel Garcia <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@
-1 << c
+BIT(c)
Signed-off-by: Arushi Singhal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Fixes "w_scan -f c" complaining with
This dvb driver is *buggy*: the symbol rate limits are undefined - please
report to linuxtv.org)
Signed-off-by: Daniel Scheller <[email protected]>
Acked-by: Abylay Ospan <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Adding support for SRGGB8 is as simple as adding a new entry at
struct em28xx_fmt.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
CbYCrY has been identified by looking into the tvp5150 driver and the
saa7115 datasheet.
YUV formats have been verified with em2765 + ov2640 (VAD Laplace webcam).
RGB8 formats have been verified with em2710/em2820 + mt9v011 (Silvercrest
webcam 1.3mpix).
I also did some cross-checking with these two camera devices and 0x08-0x0b
are at least 16 bits per pixel formats on em2710/em2820, too, and
0x0c-0x0f are at least 8 bits per pixel formats on em2765, too.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
With an unknown sensor, norm_maxw() and norm_maxh() return 0 as max.
height and width values, which causes a devide by zero in size_to_scale().
Of course we could use speculative default values for unknown sensors,
but the chance that the device works at this resolution without any
driver/setup is very low and therefore not worth the efforts.
Instead, just don't treat the device as camera.
A message will then be printed to the log that the device isn't supported.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
With MEDIA_SUBDRV_AUTOSELECT enabled in the kernel config, the em28xx
driver currently does't select some used subdrivers.
Fix this by adding the missing auto-selections to the Kconfig file.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The v4l2 dummy clock has been added with commit fc5d0f8a8878
("V4L2: em28xx: register a V4L2 clock source") to be able to use the ov2640
soc_camera driver.
Since commit 46796cfcd346 ("ov2640: use standard clk and enable it") it is
no longer required.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Use i2c_smbus_read_word_data() instead of i2c_master_send() and
i2c_master_recv() for reading the ID of Micorn sensors.
i2c_smbus_read_word_data() assumes that byes are in little-endian,
so, it uses:
data->word = msgbuf1[0] | (msgbuf1[1] << 8);
However, Micron datasheet describes the ID as if they were read
in big-endian. So, we need to change the byte order in order to
match the ID number as described on their datasheets.
Signed-off-by: Frank Schäfer <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
It started with a sporadic message in syslog: "CAM tried to send a
buffer larger than the ecount size" This message is not the fault
itself, but a consecutive fault, after a read error from the CAM. This
happens only on several CAMs, several hardware, and of course sporadic.
It is a consecutive fault, if the last read from the CAM did fail. I
guess this will not happen on all CAMs, but at least it did on mine.
There was a write error to the CAM and during the re-initialization
procedure, the CAM finished the last read, although it got a RS.
The write error to the CAM happened because a race condition between HC
write, checking DA and FR.
This patch added an additional check for DA(RE), just after checking FR.
It is important to read the CAMs status register again, to give the CAM
the necessary time for a proper reaction to HC. Please note the
description within the source code (patch below).
[[email protected]: make checkpatch happy]
Signed-off-by: Jasmin jessich <[email protected]>
Tested-by: Ralph Metzler <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
When fe_ops.read_status is called and no channel is tuned (yet), the
subsequent calls to get_lock_status() causes the kernel log to be filled
with
drxk: Error -22 on get_lock_status
which either means a NULL pointer was passed for the p_lock_status var,
or neither QAM nor OFDM/DVBT operation mode are active. Instead of
filling the kernel log in the latter case, print out a message to the debug
level and return 0 (this isn't used in the calling drxk_get_stats() anyway).
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Submitters of device tree binding documentation may forget to CC
the subsystem maintainer if this is missing.
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The refcount field was added to the struct but it was not
properly documented.
Document it.
[[email protected]: fix a merge conflict]
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Update the CSI-2 bus documentation to tell that the LP-11 mode is not
mandatory as there are transmitters that cannot be explicitly set to LP-11
mode. Instead, say that this what the transmitter drivers shall do if
possible.
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add new usbid eb1a:5051 for the Ion Video 2 PC MKII, Startech svid2usb23
and Raygo R12-41373.
Signed-off-by: Alexandre-Xavier Labonté-Lamoureux <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
'usb_free_urb(urb)' is a no-op, because urb is known to be NULL.
It is likelly that releasing resources allocated by
'tm6000_alloc_urb_buffers()' just a few lines above is expected here.
This has been spotted by the following coccinelle script:
@@
expression ret, x, e;
identifier f;
@@
* if (x == NULL)
{
... when != x = e;
(
* f(<+...x...+>);
|
* ret = f(<+...x...+>);
)
...
}
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.
But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.
Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remove dead code. The following line of code is never reached:
return SAA_OK;
Addresses-Coverity-ID: 114283
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Remove unnecessary variable 'loop'.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, this means that exporting the OF device ID
table device aliases in the module is not needed. But in order to change
how the core reports modaliases to user-space, it's better to export it.
Before this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
After this patch:
$ modinfo drivers/media/i2c/et8ek8/et8ek8.ko | grep alias
alias: i2c:et8ek8
alias: of:N*T*Ctoshiba,et8ek8C*
alias: of:N*T*Ctoshiba,et8ek8
Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Declare stv0299_config structures as const as they are only passed as
an argument to the function dvb_attach. dvb_attach
calls its first argument on the rest of its arguments. The first
argument of dvb_attach in the changed cases is stv0299_attach and
the parameter of this function to which the object references are passed
is of type const. So, stv0299_config structures having this property
can be made const.
First line shows the file size before patching and second one shows size
after patching.
text data bss dec hex filename
9572 926 40 10538 292a media/pci/dm1105/dm1105.o
9636 862 40 10538 292a media/pci/dm1105/dm1105.o
15133 5408 0 20541 503d media/pci/ttpci/budget-av.o
15389 5152 0 20541 503d media/pci/ttpci/budget-av.o
15703 2326 36 18065 4691 media/pci/ttpci/budget-ci.o
15767 2262 36 18065 4691 media/pci/ttpci/budget-ci.o
10555 1918 4 12477 30bd drivers/media/pci/ttpci/budget.o
10683 1822 4 12509 30dd drivers/media/pci/ttpci/budget.o
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Declare mb86a16_config structure as const as it is either passed as
an argument to the function dvb_attach or is dereferenced. dvb_attach
calls its first argument on the rest of its arguments. The first argument
of dvb_attach in the changed case is mb86a16_attach and the parameter of
this function to which the object reference is passed is of type
const. So, mb86a16_config structures having this property can be made
const.
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Declare mb86a16_config structure as const as it is only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed case is mb86a16_attach and the parameter of
this function to which the object reference is passed is of type
const. So, mb86a16_config structures having this property can be made
const.
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Declare nxt200x_config structures as const as they are only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed cases is nxt200x_attach and the parameter of
this function to which the object references are passed is of type
const. So, nxt200x_config structures having this property can be made
const.
File size before:
text data bss dec hex filename
21320 3776 16 25112 6218 saa7134/saa7134-dvb.o
File size after:
text data bss dec hex filename
21384 3744 16 25144 6238 saa7134/saa7134-dvb.o
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Declare nxt200x_config structure as const as it is only passed as
an argument to the function dvb_attach. dvb_attach calls its first
argument on the rest of its arguments. The first argument of
dvb_attach in the changed case is nxt200x_attach and the parameter of
this function to which the object reference is passed is of type
const. So, nxt200x_config structures having this property can be made
const.
File size before:
text data bss dec hex filename
7566 568 0 8134 1fc6 common/b2c2/flexcop-fe-tuner.o
File size after:
text data bss dec hex filename
7582 536 0 8118 1fb6 common/b2c2/flexcop-fe-tuner.o
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
dvb-usb-dibusb-mc-common is licensed under GPLv2, and if we don't say
so then it won't even load since it needs a GPL-only symbol.
Fixes: e91455a1495a ("[media] dvb-usb: split out common parts of dibusb")
Reported-by: Dominique Dumont <[email protected]>
Cc: [email protected] # 4.9+
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|