summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | [media] media: i2c/adp1653: fix check of devm_gpiod_get() error codeVladimir Zapolskiy2016-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devm_gpiod_get() function returns either a valid pointer to struct gpio_desc or ERR_PTR() error value, check for NULL is bogus. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | [media] dw2102: move USB IDs to dvb-usb-ids.hMauro Carvalho Chehab2016-05-062-57/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, dw2102 assumes that the USB IDs will be either at an external header or defined internally. That doesn't sound right. So, let's move the definitions to just one place. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | [media] media: adv7180: Add of compatible strings for full familyJulian Scheel2016-05-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add entries for all supported chip variants into the of_match list, so that the matching driver_info can be selected when using dt. Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | [media] si2157: detect if firmware is runningAntti Palosaari2016-05-062-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect if firmware is running run-time and download / start it only when needed. Detection is done by reading IF frequency value. Garbage value is returned by firmware when it is not running, otherwise correct value is returned. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | [media] zl10353: use div_u64 instead of do_divArnd Bergmann2016-05-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using div_u64() instead of do_div() makes the code slightly more readable by humans. [mchehab@osg.samsung.org: originally, this patch was proposed as a bug fix for a gcc bug. This was solved already, but it is still better to use div_u64, instead of do_div, so I'm applying it, removing the comments about the gcc bug] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | Merge tag 'v4.6-rc6' into patchworkMauro Carvalho Chehab2016-05-024-21/+28
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 4.6-rc6 * tag 'v4.6-rc6': (762 commits) Linux 4.6-rc6 EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback Documentation/sysctl/vm.txt: update numa_zonelist_order description lib/stackdepot.c: allow the stack trace hash to be zero rapidio: fix potential NULL pointer dereference mm/memory-failure: fix race with compound page split/merge ocfs2/dlm: return zero if deref_done message is successfully handled Ananth has moved kcov: don't profile branches in kcov kcov: don't trace the code coverage code mm: wake kcompactd before kswapd's short sleep .mailmap: add Frank Rowand mm/hwpoison: fix wrong num_poisoned_pages accounting mm: call swap_slot_free_notify() with page lock held mm: vmscan: reclaim highmem zone if buffer_heads is over limit numa: fix /proc/<pid>/numa_maps for THP mm/huge_memory: replace VM_NO_THP VM_BUG_ON with actual VMA check mailmap: fix Krzysztof Kozlowski's misspelled name thp: keep huge zero page pinned until tlb flush mm: exclude HugeTLB pages from THP page_mapped() logic ...
| * | | | [media] media: change pipeline validation return errorHelen Mae Koike Fornazier2016-04-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the V4L2 API, the VIDIOC_STREAMON ioctl should return EPIPE if there is a format mismatch in the pipeline configuration. As the .vidioc_streamon in the v4l2_ioctl_ops usually forwards the error caused by the v4l2_subdev_link_validate_default (if it is in use), it should return -EPIPE when it detect the mismatch. When an entity is connected to a non enabled link, media_entity_pipeline_start should return -ENOLINK, as the link does not exist. Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tw686x: avoid going past arrayMauro Carvalho Chehab2016-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix those two warnings: drivers/media/pci/tw686x/tw686x-video.c:69 tw686x_fields_map() error: buffer overflow 'std_525_60' 31 <= 31 drivers/media/pci/tw686x/tw686x-video.c:73 tw686x_fields_map() error: buffer overflow 'std_625_50' 26 <= 26 I had those changes at the last version of my patch, but I ended by merging the previous version by mistake. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tw686x: Don't go past arrayMauro Carvalho Chehab2016-04-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the compiler version, currently it produces the following warnings: tw686x-video.c: In function 'tw686x_video_init': tw686x-video.c:65:543: warning: array subscript is above array bounds [-Warray-bounds] This is actually bogus with the current code, as it currently hardcodes the framerate to 30 frames/sec, however a potential use after the array size could happen when the driver adds support for setting the framerate. So, fix it. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] media/i2c/adv*: make controls inheritable instead of privateHans Verkuil2016-04-254-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking these controls as private seemed a good idea at one time, but in practice it makes no sense. So drop this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tc358743: drop bogus commentHans Verkuil2016-04-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The control in question is not a private control, so drop that comment. Copy-and-paste left-over. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] sta2x11: remove unused varsMauro Carvalho Chehab2016-04-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changeset 7b9f31f3b3ca ("[media] sta2x11_vip: fix s_std") removed autodetect code, but it kept two vars unused: drivers/media/pci/sta2x11/sta2x11_vip.c: In function 'vidioc_s_std': drivers/media/pci/sta2x11/sta2x11_vip.c:448:6: warning: unused variable 'status' [-Wunused-variable] int status; ^ drivers/media/pci/sta2x11/sta2x11_vip.c:447:14: warning: unused variable 'oldstd' [-Wunused-variable] v4l2_std_id oldstd = vip->std; ^ Remove them. Fixes: 7b9f31f3b3ca ("[media] sta2x11_vip: fix s_std") Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] sta2x11_vip: fix s_stdHans Verkuil2016-04-251-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The s_std ioctl was broken in this driver, partially due to the changes to the adv7180 driver (this affected the handling of V4L2_STD_ALL) and partially because the new standard was never stored in vip->std. The handling of V4L2_STD_ALL has been rewritten to just call querystd and the new standard is now stored correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] adv7180: fix broken standards handlingHans Verkuil2016-04-251-38/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The adv7180 attempts to autodetect the standard. Unfortunately this is seriously broken. This patch removes the autodetect completely. Only the querystd op will detect the standard. Since the design of the adv7180 requires that you switch to a special autodetect mode you cannot call querystd when you are streaming. So the s_stream op has been added so we know whether we are streaming or not, and if we are, then querystd returns EBUSY. After testing this with a signal generator is became obvious that a sleep is needed between changing the standard to autodetect and reading the status. So the autodetect can never have worked well. The s_std call now just sets the new standard without any querying. If the driver supports the interrupt, then when it detects a standard change it will signal that by sending the V4L2_EVENT_SOURCE_CHANGE event. With these changes this driver now behaves like all other video receivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] cx231xx: silence uninitialized variable warningDan Carpenter2016-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We print an uninitialized "actlen" variable on the error path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tw686x-video: test for 60Hz instead of 50HzHans Verkuil2016-04-251-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tpg: Export the tpg code from vivid as a moduleHelen Mae Koike Fornazier2016-04-2011-675/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test pattern generator will be used by other drivers as the virtual media controller (vimc) Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] vivid: use new v4l2-rect.h headerHans Verkuil2016-04-205-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] ivtv/cx18: use the new mask variants of the v4l2_device_call_* definesHans Verkuil2016-04-202-22/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of rolling our own define, just use the new mask defines. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l2-device.h: add v4l2_device_mask_ variantsHans Verkuil2016-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] adv7180: Add g_tvnorms operationNiklas Söderlund2016-04-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ADV7180 supports NTSC, PAL and SECAM. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] adv7180: Add cropcap operationNiklas Söderlund2016-04-201-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 <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] adv7180: Add g_std operationNiklas Söderlund2016-04-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to get the standard to the adv7180 driver. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tc358743: zero the reserved arrayHans Verkuil2016-04-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v4l2-compliance complained about this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] dib0090: fix smatch errorHans Verkuil2016-04-201-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] pvrusb2: fix smatch errorsHans Verkuil2016-04-201-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] vivid: fix smatch errorsHans Verkuil2016-04-201-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tw686x: Specify that the DMA is 32 bitsEzequiel Garcia2016-04-201-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 <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] tw686x: add missing staticsHans Verkuil2016-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] media: Support Intersil/Techwell TW686x-based video capture cardsEzequiel Garcia2016-04-209-0/+2031
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). [mchehab@osg.samsung.com: make checkpatch happy by using "unsigned int" instead of just "unsigned"] Cc: Krzysztof Halasa <khalasa@piap.pl> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] media-device: get rid of the spinlockMauro Carvalho Chehab2016-04-202-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] m88ds3103: fix undefined divisionPeter Rosin2016-04-131-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 <peda@axentia.se> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] media: platform: rcar_jpu, vsp1: Use ARCH_RENESASSimon Horman2016-04-131-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 <geert+renesas@glider.be> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Update WPF and LIF maximum sizes for Gen3Laurent Pinchart2016-04-132-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Fix V4L2_PIX_FMT_XRGB444 format definitionLaurent Pinchart2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The format is erroneously defined with an alpha channel. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Add global alpha support for DRM pipelineLaurent Pinchart2016-04-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Add Z-order support for DRM pipelineLaurent Pinchart2016-04-133-77/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Add support for the RPF alpha multiplier on Gen3Laurent Pinchart2016-04-134-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: lut: Use display list fragments to fill LUTLaurent Pinchart2016-04-132-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: dl: Add support for multi-body display listsLaurent Pinchart2016-04-132-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: dl: Fix race conditionsLaurent Pinchart2016-04-131-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: dl: Make reg_count field unsignedLaurent Pinchart2016-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The field takes positive values only, make it unsigned. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Fix LUT format settingLaurent Pinchart2016-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LUT set format handler overrides the requested format by mistake. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Factorize frame size enumeration codeLaurent Pinchart2016-04-136-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | Revert "[media] v4l2-ioctl: simplify code"Mauro Carvalho Chehab2016-04-131-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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Factorize media bus codes enumeration codeLaurent Pinchart2016-04-137-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Factorize get pad format codeLaurent Pinchart2016-04-139-126/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All entities implement the same get pad format handler, factorize it into a common function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: RPF entities can't be target nodesLaurent Pinchart2016-04-131-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: Allocate pipelines on demandLaurent Pinchart2016-04-138-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * | | | [media] v4l: vsp1: video: Reorder functionsLaurent Pinchart2016-04-131-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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
OpenPOWER on IntegriCloud