q_data w/h must be set when encoding.
Fixes: 1c84e7f9d5 (media: s5p-jpeg: Add support for resolution change event)
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Originally the "size" member was modified in a local variable passed to
s5p_jpeg_parse_hdr() but the member was not used by the caller, so it did
not matter. After applying patch
"media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue"
the unnecessary assignment started overwriting already assigned "size"
member of the passed structure with an incorrect value.
Fixes: 14a2de14dc ("media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue")
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'ddb_port_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:2261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ret < 0)
^
drivers/media/pci/ddbridge/ddbridge-core.c:2263:2: note: here
case DDB_PORT_LOOP:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:1492:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (input->port->dev->link[input->port->lnr].info->ts_quirks &
^
drivers/media/pci/ddbridge/ddbridge-core.c:1497:2: note: here
case DDB_TUNER_DVBCT2_SONY_P:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c:1516:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
osc24 = 1;
~~~~~~^~~
drivers/media/pci/ddbridge/ddbridge-core.c:1517:2: note: here
case DDB_TUNER_DVBCT2_SONY:
^~~~
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Since the driver now recognizes and supports more chip variants, reflect
this fact in the module description accordingly.
Signed-off-by: Daniel Scheller <[email protected]>
Acked-by: Abylay Ospan <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
These structures are only copied into other structures, so
they can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
All data is accessed RO, so mark everything const. Some vars in several
functions aswell as function signatures also require the const keyword
now, they're also added by this commit.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Since the DD hardware info and maps aren't needed anymore outside of
ddbridge-hw.c (they're returned via get_ddb_info() now), mark them
static and remove all refs from ddbridge-hw.h.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
adapter_alloc is only used from within ddbridge-core, so move it there,
this removes the need for prototyping/referencing the variable. While at
it, msi isn't needed outside of ddbridge-main, so don't extref that one
aswell.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This further cleans up ddbridge-main from hardware-related data and moves
the exact card type determination into ddbridge-hw.c:get_ddb_info(), right
to the hardware maps/structs. Also, const'ify more structs and pointers.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Force gap setting if given by attribute and enable gap for older regmaps.
Also, setting a gap value of 128 via sysfs will now disable gap.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
It should first read the status and then check if FE has lock.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Add MAINTAINER's entry for this new driver.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Picked up code parts introduced one smatch error:
drivers/media/pci/ddbridge/ddbridge-maxs8.c:163 max_set_input_unlocked() error: buffer overflow 'dev->link[port->lnr].lnb.voltage' 4 <= 255
Fix this by clamping the .lnb.voltage array access to 0-3 by "& 3"'ing
dvb->input.
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This enables MaxS4/S8 and Octopus Max card support in ddbridge by adding
glue code into ddbridge-core, having another PCI ID, and have the LNB IC
control code (and all other MaxS4/8 related code) in ddbridge-maxs8.c
(rather than another ~400 LoC in ddbridge-core.c like it's done in the
original vendor driver package).
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This adds the frontend driver for the MaxLinear MxL5xx family of tuner-
demodulators, as used on Digital Devices MaxS4/8 four/eight-tuner cards.
The driver was picked from the dddvb vendor driver package and - judging
solely from the diff - has undergone a 100% rework:
- Silly #define's used to pass multiple values to functions were
expanded. This resulted in macro/register names not being usable
anymore for such occurences, but makes the code WAY more read-,
understand- and maintainable.
- CamelCase was changed to kernel_case
- All typedef were removed
- Overall code style was fixed, besides >80char lines in _defs.h and
_regs.h, checkpatch is happy.
- Also, signal stat acquisition was made to comply with the DVB API
ways to do these things.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <[email protected]>.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Mark lookup tables and fe_ops things const so the compiler can put them
into .rodata.
While at it, improve name and identifier strings (moddesc, fe_ops).
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Fix up all remainders reported by checkpatch-strict.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Fixes up all remainders reported by "checkpatch.pl --strict"
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This implements the diseqc_send_burst frontend op to support sending
mini-DISEQC bursts. Picked up from dddvb's driver package where this
specific block was disabled via #if 0/#endif, but is still working
according to feedback from upstream, so add it.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
According to the documentation, FE_SCALE_DECIBEL values should be assigned
to .svalue and not .uvalue, so let's do this. While at it, remove the
unneeded strength var from read_signal_strength().
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
An entry for ddbridge driver was missing. Add it, now that it
moved to Maintained state.
Signed-off-by: Daniel Scheller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
It is known that MSI interrupts - while working quite well so far - can
still cause issues on some hardware platforms (causing I2C timeouts due
to unhandled interrupts). The msi variable/option is set to 1 by default.
So, add a Kconfig option prefixed with "EXPERIMENTAL" that will control
the default value of that modparam, defaulting to off for a better
user experience and (guaranteed) stable operation "per default".
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Both ts_release() and ts_open() can use "output" before check (smatch):
drivers/media/pci/ddbridge/ddbridge-core.c:816 ts_release() warn: variable dereferenced before check 'output' (see line 809)
drivers/media/pci/ddbridge/ddbridge-core.c:836 ts_open() warn: variable dereferenced before check 'output' (see line 828)
Fix by performing checks on those pointers.
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Smatch and gcc complained:
drivers/media/pci/ddbridge/ddbridge-core.c:3491 bpsnr_show() warn: impossible condition '(snr[0] == 255) => ((-128)-127 == 255)'
drivers/media/pci/ddbridge/ddbridge-core.c: In function ‘bpsnr_show’:
drivers/media/pci/ddbridge/ddbridge-core.c:3491:13: warning: comparison is always false due to limited range of data type [-Wtype-limits]
Fix this by changing the type of snr to unsigned char.
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Smatch reported:
drivers/media/pci/ddbridge/ddbridge-core.c:1602 dvb_input_attach() error: we previously assumed 'dvb->fe' could be null (see line 1595)
dvb->fe2 will ever only be populated when dvb->fe is set. So only handle
registration of dvb->fe2 when dvb->fe got set beforehand by moving the
registration into the "if (dvb->fe)" conditional.
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Fixes two warnings reported by smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'idev' (see line 238)
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'pdev' (see line 238)
Fixed by moving the existing checks up before accessing members.
Cc: Ralph Metzler <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Further cleanup of ddbridge-core and ddbridge-main, and moves all such
hw definitions into one single place, making things easier to maintain.
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
While it seems valid that headers can carry simple oneline static inline
annotated functions, move them into their own header file to have the
overall code more readable. Also, keep them as header (and don't put in
a separate object) and static inline to help the compiler avoid
generating function calls.
(Thanks to Jasmin J. <[email protected]> for valuable input on this!)
Cc: Jasmin J. <[email protected]>
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This huge patch bumps the ddbridge driver to version 0.9.29. Compared to
the vendor driver package, DD OctoNET including GTL link support, and all
DVB-C Modulator card support has been removed since this requires large
changes to the underlying DVB core API, which should eventually be done
separately, and, after that, the functionality/device support can be added
back rather easy.
While the diff is rather large, the bump is mostly a big refactor of all
data structures. Yet, the MSI support (message signaled interrupts) is
greatly improved, also all currently available CI single/duo bridge cards
are fully supported.
More changes compared to the upstream driver:
- the DDB_USE_WORKER flag/define was removed, kernel worker functionality
will be used.
- coding style is properly fixed (zero complaints from checkpatch)
- all (not much though) CamelCase has been fixed to kernel_case
- (private) IOCTLs temporarily removed (which are mainly used to provide
rarely-used FPGA update functionality)
Great care has been taken to keep all previous changes and fixes (e.g.
kernel logging via dev_*(), pointer annotations and such) intact.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <[email protected]>.
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
As of 0.9.9b, the ddbridge code has been split from one single file
(ddbridge-core.c) into multiple files, with the purpose of taking care of
different topics, and to be able to reuse code in different kernel modules
(ddbridge.ko and octonet.ko). This applies the same code split, with a
notable difference:
In the vendor package, the split was done by moving all code parts into
separate files, and in the "main" code files (ddbridge.c and octonet.c),
a simple "#include ddbridge-core.c" was done.
In this patch, the same split (codewise) is done, but all resulting .c/.o
files will be handled by the makefile, with proper prototyping of all
shared functions done in ddbridge.h. To avoid conflicts wrt the global
space, the I2C functions and necessary prototypes for ddbridge-i2c.c are
moved into ddbridge-i2c.h, which is to be included wherever required.
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
The functions in ddbridge-core.c have been moved to different positions in
newer versions of the dddvb vendor driver package (most notably in version
0.9.9b). Perform the same code move to keep the diff of the upcoming
code bump simpler.
Signed-off-by: Daniel Scheller <[email protected]>
Tested-by: Richard Scobie <[email protected]>
Tested-by: Jasmin Jessich <[email protected]>
Tested-by: Dietmar Spingler <[email protected]>
Tested-by: Manfred Knick <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
The structure vs6624_default_fmt is only copied into another
structure field, so it can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Previously, possible digital gains were just 1x, 2x and 4x. These
coarse gains were not sufficient in fine-tuning the image capture.
Now, digital gain range is [0, 16x] with each step 1/1024, default 1x.
This is achieved through OV13858 MWB R/G/B gain controls.
Signed-off-by: Chiranjeevi Rapolu <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Previously both link-frequency and pixel-rate reported by
the sensor was incorrect, resulting in incorrect FPS.
Report link-frequency in Hz rather than link data rate in bps.
Calculate pixel-rate from link-frequency.
Signed-off-by: Chiranjeevi Rapolu <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Previously, initial exposure max was set incorrectly to (0x7fff - 8).
Now, limit exposure max to current resolution (VTS - 8).
Signed-off-by: Chiranjeevi Rapolu <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
On format change, sometimes, sensor was streaming at a much higher
FPS than the default. This was resulting in various problems like
frame drops/corruption.
Upon format change, set default vblank as current vblank. This will
ensure that sensor will start streaming at default fps.
Signed-off-by: Chiranjeevi Rapolu <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
These structures are both stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be
const as well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Add entry to the MAINTAINERS file for the meson ao cec driver.
Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
The Amlogic SoC embeds a standalone CEC controller, this patch adds a driver
for such controller.
The controller does not need HPD to be active, and could support up to max
5 logical addresses, but only 1 is handled since the Suspend firmware can
make use of this unique logical address to wake up the device.
The Suspend firmware configuration will be added in an other patchset.
Signed-off-by: Neil Armstrong <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[[email protected]:s/if (ret)/if (res)/ to fix obvious typo]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>