aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-10[media] rc: gpio-ir-recv: don't sleep in irq handlerHeiko Stübner1-1/+1
Don't allow sleep when getting the gpio value in the irq-handler. On my rk3288 board this results in might_sleep warnings when receiving data like: BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1531 in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0 CPU: 0 PID: 0 Comm: swapper/0 Tainted: P 4.1.0-rc5+ #2011 Hardware name: Rockchip (Device Tree) [<c00189a0>] (unwind_backtrace) from [<c0013b04>] (show_stack+0x20/0x24) [<c0013b04>] (show_stack) from [<c0757970>] (dump_stack+0x8c/0xbc) [<c0757970>] (dump_stack) from [<c0053188>] (___might_sleep+0x238/0x284) [<c0053188>] (___might_sleep) from [<c0053264>] (__might_sleep+0x90/0xa4) [<c0053264>] (__might_sleep) from [<c02ff4ac>] (gpiod_get_raw_value_cansleep+0x28/0x44) [<c02ff4ac>] (gpiod_get_raw_value_cansleep) from [<bf0363c4>] (gpio_ir_recv_irq+0x24/0x6c [gpio_ir_recv]) [<bf0363c4>] (gpio_ir_recv_irq [gpio_ir_recv]) from [<c008a78c>] (handle_irq_event_percpu+0x164/0x550) [<c008a78c>] (handle_irq_event_percpu) from [<c008abc4>] (handle_irq_event+0x4c/0x6c) [<c008abc4>] (handle_irq_event) from [<c008df88>] (handle_edge_irq+0x128/0x150) [<c008df88>] (handle_edge_irq) from [<c0089edc>] (generic_handle_irq+0x30/0x40) [<c0089edc>] (generic_handle_irq) from [<c02fc4cc>] (rockchip_irq_demux+0x158/0x210) [<c02fc4cc>] (rockchip_irq_demux) from [<c0089edc>] (generic_handle_irq+0x30/0x40) [<c0089edc>] (generic_handle_irq) from [<c008a058>] (__handle_domain_irq+0x98/0xc0) [<c008a058>] (__handle_domain_irq) from [<c00094a4>] (gic_handle_irq+0x4c/0x70) [<c00094a4>] (gic_handle_irq) from [<c0014684>] (__irq_svc+0x44/0x5c) Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] dvb-frontend: Replace timeval with ktime_tTina Ruchandani3-37/+19
struct timeval uses a 32-bit seconds representation which will overflow in the year 2038 and beyond. This patch replaces the usage of struct timeval with ktime_t which is a 64-bit timestamp and is year 2038 safe. This patch is part of a larger attempt to remove all instances of 32-bit timekeeping variables (timeval, timespec, time_t) which are not year 2038 safe, from the kernel. [[email protected]: add a missing parenthesis, breaking compilation] Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Tina Ruchandani <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] b2c2: Add option to skip the first 6 pid filtersJemma Denson3-2/+18
The flexcop bridge chip has two banks of hardware pid filters - an initial 6, and on some chip revisions an additional bank of 32. A bug is present on the initial 6 - when changing transponders one of two PAT packets from the old transponder would be included in the initial packets from the new transponder. This usually transpired with userspace programs complaining about services missing, because they are seeing a PAT that they would not be expecting. Running in full TS mode does not exhibit this problem, neither does using just the additional 32. This patch adds in an option to not use the inital 6 and solely use just the additional 32, and enables this option for the SkystarS2 card. Other cards can be added as required if they also have this bug. Signed-off-by: Jemma Denson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] ddbridge: Do not free_irq() if request_irq() failedTakeshi Yoshimura1-1/+2
My static checker detected that free_irq() is called even after request_irq() failed in ddb_probe(). In this case, the kernel may try to free dev->pdev->irq although the IRQ is not assigned. This event rarely occurs, but always introduces a warning if it happens. "goto fail1" always results in disabling enabled MSI and releasing a requested IRQ. It seems like the former handling is necessary. So I added a conditional branch before the free_irq() (stat == 0 means request_irq() succeeds). Signed-off-by: Takeshi Yoshimura <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] staging: media: omap4iss: Reformat overly long linesPiotr S. Staszewski4-24/+42
This reformats lines that were previously above 80 characters long, improving readability and making checkpatch.pl happier. Signed-off-by: Piotr S. Staszewski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] Staging: media: lirc: Replace timeval with ktime_tKsenija Stanojevic1-45/+30
'struct timeval last_tv' is used to get the time of last signal change and 'struct timeval last_intr_tv' is used to get the time of last UART interrupt. 32-bit systems using 'struct timeval' will break in the year 2038, so we have to replace that code with more appropriate types. Here struct timeval is replaced with ktime_t. Signed-off-by: Ksenija Stanojevic <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] Documentation: update cardlistsMauro Carvalho Chehab3-1/+13
The card lists at Documentation/video4linux are missing some boards. Add them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] saa7134: add AverMedia AverTV/505 card supportDmitry Eremin-Solenikov4-1/+45
Add AverMedia AverTV/505 card to saa7134 driver. It is a card bearing SAA7130HL chip and FQ1216ME/IH-3 tuner. Working: Composite, TV and IR remote control. Untested: S-Video. [[email protected]: fix CodingStyle] Signed-off-by: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] b2c2: Mismatch in config ifdefs for SkystarS2Jemma Denson1-1/+1
Compilation warning issued by kbuild test robot: >> drivers/media/common/b2c2/flexcop-fe-tuner.c:31:12: warning: 'flexcop_fe_request_firmware' defined but not used [-Wunused-function] static int flexcop_fe_request_firmware(struct dvb_frontend *fe, This patch fixes a mismatch in Kconfig define checks. One had a check for just CX24120, the other is checking for both CX24120 and ISL6421. Signed-off-by: Jemma Denson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] cx231xx: Add support for Terratec GrabbyTommi Rantala2-0/+29
Add support for the Terratec Grabby with USB ID 0ccd:00a6. Signed-off-by: Tommi Rantala <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] coda: remove extraneous TRACE_SYSTEM_STRINGArnd Bergmann1-2/+0
The coda tracing code causes lots of warnings like In file included from /git/arm-soc/include/trace/define_trace.h:90:0, from /git/arm-soc/drivers/media/platform/coda/trace.h:203, from /git/arm-soc/drivers/media/platform/coda/coda-bit.c:34: /git/arm-soc/include/trace/ftrace.h:28:0: warning: "TRACE_SYSTEM_STRING" redefined #define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name) ^ In file included from /git/arm-soc/include/trace/define_trace.h:83:0, from /git/arm-soc/drivers/media/platform/coda/trace.h:203, from /git/arm-soc/drivers/media/platform/coda/coda-bit.c:34: /git/arm-soc/drivers/media/platform/coda/./trace.h:12:0: note: this is the location of the previous definition #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM) >From what I can tell, this is just the result of a bogus TRACE_SYSTEM_STRING definition, and removing that one makes the warnings go away. Fixes: 9a1a8f9953f ("[media] coda: Add tracing support") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Philipp Zabel <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] usb drivers: use BUG_ON() instead of if () BUGMauro Carvalho Chehab5-10/+5
Some USB drivers have a logic at the VB buffer handling like: if (in_interrupt()) BUG(); Use, instead: BUG_ON(in_interrupt()); Btw, this logic looks weird on my eyes. We should convert them to use VB2, in order to avoid those crappy things. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Lad, Prabhakar <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] ov2659: Don't depend on subdev APIMauro Carvalho Chehab1-1/+16
The subdev API is optional. No driver should depend on it. Avoid compilation breakages if subdev API is not selected: drivers/media/i2c/ov2659.c: In function ‘ov2659_get_fmt’: drivers/media/i2c/ov2659.c:1054:3: error: implicit declaration of function ‘v4l2_subdev_get_try_format’ [-Werror=implicit-function-declaration] mf = v4l2_subdev_get_try_format(sd, cfg, 0); ^ drivers/media/i2c/ov2659.c:1054:6: warning: assignment makes pointer from integer without a cast mf = v4l2_subdev_get_try_format(sd, cfg, 0); ^ drivers/media/i2c/ov2659.c: In function ‘ov2659_set_fmt’: drivers/media/i2c/ov2659.c:1129:6: warning: assignment makes pointer from integer without a cast mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad); ^ drivers/media/i2c/ov2659.c: In function ‘ov2659_open’: drivers/media/i2c/ov2659.c:1264:38: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’ v4l2_subdev_get_try_format(sd, fh->pad, 0); ^ Signed-off-by: Mauro Carvalho Chehab <[email protected]> Tested-by: Lad, Prabhakar <[email protected]>
2015-06-09[media] bdisp: update MAINTAINERSHans Verkuil1-0/+8
Add entry for the bdisp driver to the MAINTAINERS file. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Fabien Dessenne <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] bdisp: add debug file systemFabien Dessenne5-2/+755
Creates 5 debugfs entries to dump the last HW request, the last HW node (=command), the HW registers and the recent HW performance (time & fps) Signed-off-by: Fabien Dessenne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] bdisp: 2D blitter driver using v4l2 mem2mem frameworkFabien Dessenne9-0/+2979
This v4l2 mem2mem driver is a 2D blitter for STMicroelectronics SoC. It uses the v4l2 mem2mem framework. The following features are supported and tested: - Color format conversion (RGB32, RGB24, RGB16, NV12, YUV420P) - Copy - Scale - Flip - Deinterlace - Wide (4K) picture support - Crop Signed-off-by: Fabien Dessenne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: added missing slab.h include to bdisp-v4l2.c] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] bdisp: add DT bindings documentationFabien Dessenne1-0/+32
This adds DT binding documentation for STMicroelectronics bdisp driver. Signed-off-by: Fabien Dessenne <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Change format for enum dmx_output documentationMauro Carvalho Chehab3-29/+47
Use a table for the Demux output. No new information added here. They were all merged inside the table. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] dvb: dmx.h: don't use anonymous enumsMauro Carvalho Chehab1-3/+3
There are several anonymous enums here, used via a typedef. Well, we don't like typedefs on Kernel, so let's de-anonimize those enums. Then, latter, we may be able to get rid of the typedefs, at least from Kernelspace. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] dvb: frontend.h: add a note for the deprecated enums/structsMauro Carvalho Chehab1-0/+6
Let be clear, at the header, about what got deprecated. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] dvb: frontend.h: improve dvb_frontent_parameters commentMauro Carvalho Chehab1-6/+6
The comment for struct dvb_frontend_parameters is weird, as it mixes delivery system name (ATSC) with modulation names (QPSK, QAM, OFDM). Use delivery system names there on the frequency comment, as this is clearer, specially after 2GEN delivery systems. While here, add comments at the union, to make live easier for ones that may try to understand the convention used by the legacy API. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] frontend: Fix a typo at the commentsMauro Carvalho Chehab1-3/+3
The description of struct dtv_stats has a spmall typo: FE_SCALE_DECIBELS instead of FE_SCALE_DECIBEL Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Remove comments before parsing enum valuesMauro Carvalho Chehab1-1/+1
The comments may affect enum value parsing. Use cpp to remove them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] frontend: move legacy typedefs to the endMauro Carvalho Chehab1-43/+16
Just userspace need those typedefs. So, put it in the compat part of the header. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] frontend: Move legacy API enums/structs to the endMauro Carvalho Chehab1-58/+58
In order to better organize the header file, move the legacy API (DVBv3) support to the end, just before the ioctl definitions. This way, we can use just one #if for all of them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab150-492/+630
The DVB API was originally defined using typedefs. This is against Kernel CodingStyle, and there's no good usage here. While we can't remove its usage on userspace, we can avoid its usage in Kernelspace. So, let's do it. This patch was generated by this shell script: for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done While here, make CodingStyle fixes on the affected lines. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Stefan Richter <[email protected]> # for drivers/media/firewire/*
2015-06-09[media] DocBook: add xrefs for enum fe_typeMauro Carvalho Chehab2-6/+8
The only enum that was missing xrefs at frontend.h is fe_type. Add xrefs for them. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: properly document the delivery systemsMauro Carvalho Chehab2-26/+79
Use a table for the delivery systems. The table is organized by the type (cable, satellite, terrestrial) and shows what standards are not fully implemented. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: better document the DVB-S2 rolloff factorMauro Carvalho Chehab2-10/+31
Instead of using a program listing, use a table and make clearer what each define means. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Remove duplicated documentation for SEC_VOLTAGE_*Mauro Carvalho Chehab2-35/+26
The table were documented at the legacy ioctl call. Move it to the DVBv5 ioctl, and add a cross ref link on the legacy section. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: document DVB-S2 pilot in a tableMauro Carvalho Chehab2-9/+28
Putting it into a table allows to comment each possible values, with makes more clear what field means. Also, it allows to do cross-references with the frontend.h. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Add documentation for ATSC M/H propertiesMauro Carvalho Chehab1-17/+22
Those data were retrieved by looking at A/153: ATSC Mobile DTV Standard and guessing what makes more sense to each field. Cc: Michael Ira Krufky <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: add placeholders for ATSC M/H propertiesMauro Carvalho Chehab1-71/+129
The ATSC M/H specific properties are not properly documented. This became crearer when converting the existing data into tables and adding cross references. For now, just add placeholders, as a further investigation about the meaning of each parameter is required. Cc: Michael Ira Krufky <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: remove a wrong cut-and-paste dataMauro Carvalho Chehab1-5/+0
By cut-and-paste mistake, TRANSMISSION_MODE_AUTO were documented twice, one at the wrong place. Remove the wrong one. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: add IDs for enum fe_bandwidthMauro Carvalho Chehab1-7/+7
enum fe_bandwidth is documented at the frontend legacy xml file. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Better document DTMB time interleavingMauro Carvalho Chehab1-9/+31
The DTMB time interleaving was not properly documented. Add a documentation for it. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Add entry IDs for the enums defined at dvbproperty.xmlMauro Carvalho Chehab1-60/+60
There are lots of enums that are defined at dvbproperty. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] Docbook: add entry IDs for enum fe_sec_voltageMauro Carvalho Chehab1-3/+3
enum fe_sec_voltage is documented together with FE_SET_VOLTAGE. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: add entry IDs for enum fe_sec_tone_modeMauro Carvalho Chehab1-2/+2
enum fe_sec_tone_mode is documented together with FE_SET_TONE. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: add entry IDs for enum fe_statusMauro Carvalho Chehab1-7/+7
enum fe_status is documented together with FE_READ_STATUS. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: add entry IDs for enum fe_sec_mini_cmdMauro Carvalho Chehab1-2/+2
enum fe_sec_mini_cmd is documented together with FE_DISEQC_SEND_BURST. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: Add entry IDs for enum fe_capsMauro Carvalho Chehab1-31/+31
enum fe_caps is documented at FE_GET_INFO ioctl. Add xrefs for each entry there. This makes the hyperlinks at frontend.h to go directly to the right documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] DocBook: handle enums on frontend.hMauro Carvalho Chehab1-11/+35
In order to be sure that all enum definitions will be documented, let's parse the enum values and add xref links to them. Lots of missing references will be risen as we miss adding id's to those symbols at the documentation. Next patches will fix this. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] cx231xx: fix compiler warningHans Verkuil1-10/+18
Fix this compiler warning by allocating a structure to read the eeprom instead of doing it on the stack and worse: the eeprom array is static, so that can cause problems if there are multiple cx231xx instances. cx231xx-cards.c: In function 'cx231xx_card_setup': cx231xx-cards.c:1110:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ I did consider removing the code altogether since the result is actually not used at the moment, but I decided against it since it is used in other drivers and someone might want to start using it in this driver as well. And then it is useful that the code is already there. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] vivid: Use interlaced info for cvt/gtf timing detectionPrashant Laddha1-2/+2
The detect_cvt/gtf() now supports timing calculations for interlaced format. Signed-off-by: Prashant Laddha <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] v4l2-dv-timings: add interlace support in detect cvt/gtfPrashant Laddha5-14/+58
Extend detect_cvt/gtf API to indicate the format type (interlaced or progressive). In case of interlaced, the vertical front and back porch and vsync values for both (odd,even) fields are considered to derive image height. Populated vsync, vertical front, back porch values in bt timing structure for even and odd fields and updated the flags appropriately. Also modified the functions calling the detect_cvt/gtf(). As of now these functions are calling detect_cvt/gtf() with interlaced flag set to false. Cc: Martin Bugge <[email protected]> Cc: Mats Randgaard <[email protected]> Cc: Laurent Pinchart <[email protected]> Signed-off-by: Prashant Laddha <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] v4l2-dv-timings: support interlaced in v4l2_print_dv_timingsHans Verkuil1-0/+7
The v4l2_print_dv_timings() didn't log the interlaced format correctly. The timings for the bottom field weren't logged and the fields per second value was half of what it should have been. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] v4l2-dv-timing: avoid rounding twice in gtf hblank calcPrashant Laddha1-4/+6
Currently, in gtf hblank calculations, the rounding is used twice, one at intermediate division and one at final state where hblank is rounded to nearest multiple of twice cell granularity. This error got introduced in 'commit d7ed5a3ddaec ("[media] v4l2-dv-timings: fix rounding in hblank and hsync calculation"), where it missed combining the rounding step. Correcting the same in this patch. Signed-off-by: Prashant Laddha <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] adv7604: log alt-gamma and HDMI colorspaceHans Verkuil1-2/+12
Log the alternate gamma state and the HDMI colorspace that the adv device detected. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2015-06-09[media] adv7604: fix broken saturator checkHans Verkuil1-1/+1
The logging of the saturator status was wrong due to an incorrect condition. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>