aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-25[media] DocBook media: drop 'experimental' annotationsHans Verkuil21-185/+1
Drop the 'experimental' annotations. The only remaining part of the API that is still marked 'experimental' are the debug ioctls/structs, and that is intentional. Only the v4l2-dbg application should use those. All others have been around for years, so it is time to drop the 'experimental' designation. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-25[media] videodev2.h: remove 'experimental' annotationsHans Verkuil1-28/+10
Most of what is marked as 'experimental' has been around for years. Time to drop that annotation. The only remaining 'experimental' bits of the API are the debug ioctls and structs: these should remain experimental since the only application that should use this is v4l2-dbg. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-25[media] tw686x-video: test for 60Hz instead of 50HzHans Verkuil1-4/+4
When determining if the standard is 50 or 60 Hz it is standard practice to test for 60 Hz instead of 50 Hz. This doesn't matter normally, except if the user specifies both 60 and 50 Hz standards. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tpg: Export the tpg code from vivid as a moduleHelen Mae Koike Fornazier11-17/+43
The test pattern generator will be used by other drivers as the virtual media controller (vimc) Signed-off-by: Helen Mae Koike Fornazier <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] vivid: use new v4l2-rect.h headerHans Verkuil5-213/+110
The v4l2_rect helper functions have been moved to include/media/v4l2-rect.h. Use this new header, dropping the functions from vivid. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] v4l2-rect.h: new header with struct v4l2_rect helper functionsHans Verkuil2-0/+174
This makes it easier to share this code with any driver that needs to manipulate the v4l2_rect datastructure. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] ivtv/cx18: use the new mask variants of the v4l2_device_call_* definesHans Verkuil2-22/+4
Instead of rolling our own define, just use the new mask defines. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] v4l2-device.h: add v4l2_device_mask_ variantsHans Verkuil2-2/+55
The v4l2_device_call_* defines filter subdevs based on the grp_id value. But some drivers use a bitmask, so instead of filtering by grp_id == value, you want to filter by grp_id & value. Make variants of these defines to do this. The 'has_op' define has been extended to have a grp_id argument as well, and a mask variant has been added. This extra argument required a change to go7007. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] adv7180: Add g_tvnorms operationNiklas Söderlund1-1/+7
The ADV7180 supports NTSC, PAL and SECAM. Signed-off-by: Niklas Söderlund <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] adv7180: Add cropcap operationNiklas Söderlund1-0/+16
Add support to get the pixel aspect ratio depending on the current standard (50 vs 60 Hz). Signed-off-by: Niklas Söderlund <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] adv7180: Add g_std operationNiklas Söderlund1-0/+10
Add support to get the standard to the adv7180 driver. Signed-off-by: Niklas Söderlund <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] Staging: media: bcm2048: defined region_configs[] array as const arrayClaudiu Beznea1-1/+1
This patch defines region_configs[] array as const array since it is not changed anywhere in code. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] vidioc-dv-timings-cap.xml: explicitly state that pad and reserved ↵Hans Verkuil1-5/+7
should be zeroed The DV_TIMINGS_CAP documentation didn't state clearly that the pad and reserved fields should be zeroed by the application. For subdev pad can be other values as well. It also mistakenly said that only drivers would have to zero the reserved field, that's not correct. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] vidioc-enum-dv-timings.xml: explicitly state that pad and reserved ↵Hans Verkuil1-2/+3
should be zeroed The ENUM_DV_TIMINGS documentation did not clearly state that the pad and reserved fields should be zeroed (pad only when used with a video device node). Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] vidioc-g-edid.xml: be explicit about zeroing the reserved arrayHans Verkuil1-4/+6
The G/S_EDID documentation did not explicitly state that the reserved array should be zeroed by the application. Also add the missing VIDIOC_SUBDEV_G/S_EDID ioctl names to the header. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tc358743: zero the reserved arrayHans Verkuil1-0/+4
v4l2-compliance complained about this. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] dib0090: fix smatch errorHans Verkuil1-1/+1
Fix this smatch error: dib0090.c:1124 dib0090_pwm_gain_reset() error: we previously assumed 'state->rf_ramp' could be null (see line 1086) Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] pvrusb2: fix smatch errorsHans Verkuil1-5/+4
These are false positives, but still easy to fix. pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648) pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649) Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] vivid: fix smatch errorsHans Verkuil1-8/+11
The smatch utility got really confused about the grp % 22 code. Rewrote it so it now understands that there really isn't a buffer overwrite. vivid-rds-gen.c:82 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 43 vivid-rds-gen.c:83 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 42 vivid-rds-gen.c:89 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 84 vivid-rds-gen.c:90 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 85 vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 86 vivid-rds-gen.c:93 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 87 Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x: Specify that the DMA is 32 bitsEzequiel Garcia1-0/+1
Set vb2_queue.gfp_flags to GFP_DMA32. Otherwise it will start to create bounce buffers which is something you want to avoid since those are in limited supply. Without this patch, DMA scatter-gather may not work because machines can ran out of buffers easily. Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x-kh: rename three functions to prevent clash with tw686x driverHans Verkuil3-12/+12
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x: add missing staticsHans Verkuil1-2/+2
Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x-kh: add audio support to the TODO listHans Verkuil1-1/+4
The mainline tw686x driver also supports audio, that's missing here as well. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x-kh: specify that the DMA is 32 bitsHans Verkuil1-0/+1
Set vb2_queue.gfp_flags to GFP_DMA32. Otherwise it will start to create bounce buffers which is something you want to avoid since those are in limited supply. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] tw686x-kh: use the cached valueMauro Carvalho Chehab1-1/+1
the dma_requests field is cached, but cache is not used: drivers/staging/media/tw686x-kh/tw686x-kh-video.c: In function 'tw686x_video_irq': drivers/staging/media/tw686x-kh/tw686x-kh-video.c:622:6: warning: variable 'requests' set but not used [-Wunused-but-set-variable] u32 requests; ^ Use the cache instead, as it seems reading it needs to be done with spin lock taken. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] media: Support Intersil/Techwell TW686x-based video capture cardsEzequiel Garcia10-0/+2039
This commit introduces the support for the Techwell TW686x video capture IC. This hardware supports a few DMA modes, including scatter-gather and frame (contiguous). This commit makes little use of the DMA engine and instead has a memcpy based implementation. DMA frame and scatter-gather modes support may be added in the future. Currently supported chips: - TW6864 (4 video channels), - TW6865 (4 video channels, not tested, second generation chip), - TW6868 (8 video channels but only 4 first channels using built-in video decoder are supported, not tested), - TW6869 (8 video channels, second generation chip). [[email protected]: make checkpatch happy by using "unsigned int" instead of just "unsigned"] Cc: Krzysztof Halasa <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Tested-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] TW686x frame grabber driverKrzysztof Hałasa9-0/+1207
A driver for Intersil/Techwell TW686x-based PCIe frame grabbers. [[email protected]: renamed staging tw686x to tw686x-kh to prevent naming conflicts] [[email protected]: don't build tw686x-kh if tw686x is already selected to prevent conflicts] [[email protected]: use "unsigned int" instead of just "unsigned" and add some whitespaces to make checkpatch happier] Signed-off-by: Krzysztof Halasa <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Tested-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] media: Improve documentation for link_setup/link_modifyMauro Carvalho Chehab2-1/+5
Those callbacks are called with the media_device.graph_mutex held. Add a note about that, as the code called by those notifiers should not be touching in the mutex. Acked-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-20[media] media-device: get rid of the spinlockMauro Carvalho Chehab3-39/+22
Right now, the lock schema for media_device struct is messy, since sometimes, it is protected via a spin lock, while, for media graph traversal, it is protected by a mutex. Solve this conflict by always using a mutex. As a side effect, this prevents a bug when the media notifiers is called at atomic context, while running the notifier callback: BUG: sleeping function called from invalid context at mm/slub.c:1289 in_atomic(): 1, irqs_disabled(): 0, pid: 3479, name: modprobe 4 locks held by modprobe/3479: #0: (&dev->mutex){......}, at: [<ffffffff81ce8933>] __driver_attach+0xa3/0x160 #1: (&dev->mutex){......}, at: [<ffffffff81ce8941>] __driver_attach+0xb1/0x160 #2: (register_mutex#5){+.+.+.}, at: [<ffffffffa10596c7>] usb_audio_probe+0x257/0x1c90 [snd_usb_audio] #3: (&(&mdev->lock)->rlock){+.+.+.}, at: [<ffffffffa0e6051b>] media_device_register_entity+0x1cb/0x700 [media] CPU: 2 PID: 3479 Comm: modprobe Not tainted 4.5.0-rc3+ #49 Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015 0000000000000000 ffff8803b3f6f288 ffffffff81933901 ffff8803c4bae000 ffff8803c4bae5c8 ffff8803b3f6f2b0 ffffffff811c6af5 ffff8803c4bae000 ffffffff8285d7f6 0000000000000509 ffff8803b3f6f2f0 ffffffff811c6ce5 Call Trace: [<ffffffff81933901>] dump_stack+0x85/0xc4 [<ffffffff811c6af5>] ___might_sleep+0x245/0x3a0 [<ffffffff811c6ce5>] __might_sleep+0x95/0x1a0 [<ffffffff8155aade>] kmem_cache_alloc_trace+0x20e/0x300 [<ffffffffa0e66e3d>] ? media_add_link+0x4d/0x140 [media] [<ffffffffa0e66e3d>] media_add_link+0x4d/0x140 [media] [<ffffffffa0e69931>] media_create_pad_link+0xa1/0x600 [media] [<ffffffffa0fe11b3>] au0828_media_graph_notify+0x173/0x360 [au0828] [<ffffffffa0e68a6a>] ? media_gobj_create+0x1ba/0x480 [media] [<ffffffffa0e606fb>] media_device_register_entity+0x3ab/0x700 [media] Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Sakari Ailus <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] m88ds3103: fix undefined divisionPeter Rosin1-1/+1
s32tmp in the below code may be negative, and dev->mclk_khz is an unsigned type. s32tmp = 0x10000 * (tuner_frequency - c->frequency); s32tmp = DIV_ROUND_CLOSEST(s32tmp, dev->mclk_khz); This is undefined, as DIV_ROUND_CLOSEST is undefined for negative dividends when the divisor is of unsigned type. So, change mclk_khz to be signed (s32). Signed-off-by: Peter Rosin <[email protected]> Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] media: platform: rcar_jpu, vsp1: Use ARCH_RENESASSimon Horman1-2/+2
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Update WPF and LIF maximum sizes for Gen3Laurent Pinchart2-5/+12
The maximum image size supported by the WPF is 2048x2048 on Gen2 and 8190x8190 on Gen3. Update the code accordingly, and fix the maximum LIF size for both Gen2 and Gen3. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Fix V4L2_PIX_FMT_XRGB444 format definitionLaurent Pinchart1-1/+1
The format is erroneously defined with an alpha channel. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Add global alpha support for DRM pipelineLaurent Pinchart2-3/+7
Make the global alpha multiplier of DRM planes configurable. All the necessary infrastructure is there, we just need to store the alpha value passed through the DRM API. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Add Z-order support for DRM pipelineLaurent Pinchart4-81/+130
Make the Z-order of planes configurable by assigning RPFs to BRU inputs dynamically based on the Z-order position. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Add support for the RPF alpha multiplier on Gen3Laurent Pinchart4-3/+73
The Gen3 RPF includes an alpha multiplier that can both multiply the alpha channel by a fixed global alpha value, and multiply the pixel components to convert the input to premultiplied alpha. As alpha premultiplication is available in the BRU for both Gen2 and Gen3 we handle it there and use the Gen3 alpha multiplier for global alpha multiplication only. This prevents conversion to premultiplied alpha if no BRU is present in the pipeline, that use case will be implemented later if needed. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: lut: Use display list fragments to fill LUTLaurent Pinchart2-6/+31
Synchronize the userspace LUT setup with the pipeline operation by using a display list fragment to store LUT data. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: dl: Add support for multi-body display listsLaurent Pinchart2-46/+251
Display lists support up to 8 bodies but we currently use a single one. To support preparing display lists for large look-up tables, add support for multi-body display lists. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: dl: Fix race conditionsLaurent Pinchart1-12/+29
The vsp1_dl_list_put() function expects to be called with the display list manager lock held. This assumption is correct for calls from within the vsp1_dl.c file, but not for the external calls. Fix it by taking the lock inside the function and providing an unlocked version for the internal callers. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: dl: Make reg_count field unsignedLaurent Pinchart1-1/+1
The field takes positive values only, make it unsigned. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Fix LUT format settingLaurent Pinchart1-0/+1
The LUT set format handler overrides the requested format by mistake. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Factorize frame size enumeration codeLaurent Pinchart6-111/+69
Most of the entities can't perform scaling and implement the same frame size enumeration function. Factorize the code into a single implementation. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13Revert "[media] v4l2-ioctl: simplify code"Mauro Carvalho Chehab1-29/+22
There are some issues rised on this patch during patch review. I ended by merging this one by mistake. So, let's revert it. This reverts commit 54ace1cfd4358fd11112f17cc711eea234d5ab9e. Cc: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Factorize media bus codes enumeration codeLaurent Pinchart7-132/+60
Most of the entities can't perform format conversion and implement the same media bus enumeration function. Factorize the code into a single implementation. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Factorize get pad format codeLaurent Pinchart9-126/+36
All entities implement the same get pad format handler, factorize it into a common function. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: RPF entities can't be target nodesLaurent Pinchart1-5/+5
The RPF entities are located at the very beginning of pipelines, they can't be target nodes in the Data Path Router matrix. Remove their input ID from the routing table. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Allocate pipelines on demandLaurent Pinchart8-61/+75
Instead of embedding pipelines in the vsp1_video objects allocate them on demand when they are needed. This fixes the streamon race condition where pipelines objects from different video nodes could be used for the same pipeline. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: video: Reorder functionsLaurent Pinchart1-133/+133
Move the pipeline initialization and cleanup functions to prepare for the next commit. No functional code change is performed here. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Store pipeline pointer in rwpfLaurent Pinchart5-22/+19
This prepares for dynamic pipeline allocation by providing a field that can be used to store the pipeline pointer atomically under driver control. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2016-04-13[media] v4l: vsp1: Pass pipe pointer to entity configure functionsLaurent Pinchart11-14/+29
Pass the pipe explicitly instead of retrieving it through media entities. This decouples device state stored in the pipeline from the active state stored in entities, preparing for dynamic pipeline creation. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>