summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vivid/vivid-core.c
AgeCommit message (Collapse)Author
2015-10-03[media] vivid: Add an option to configure the maximum number of devicesEzequiel Garcia
The vivid driver currently has a hard-coded limit of 64 devices, however there's nothing that prevents the creation of even more devices. This commit adds a new driver option (which defaults to 64) to allow this maximum number to be configurable. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-03[media] vivid: Fix iteration in driver removal pathEzequiel Garcia
When the diver is removed and all the resources are deallocated, we should be iterating through the created devices only. Currently, the iteration ends when vivid_devs[i] is NULL. Since the array contains VIVID_MAX_DEVS elements, it will oops if n_devs=VIVID_MAX_DEVS because in that case, no element is NULL. Fixes: c88a96b023d8 ('[media] vivid: add core driver code') Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] vivid: SDR cap add 'CU08' Complex U8 formatAntti Palosaari
Add complex unsigned 8-bit sample format for SDR capture. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-28[media] vivid-tpg: add tpg_log_status()Hans Verkuil
Add a log_status function to the test pattern generator and use that in vivid. This simplifies debugging complex colorspace problems. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] vivid: use v4l2_device.release to clean up the driverHans Verkuil
Use the release callback of the v4l2_device to clean up the memory. This prevents vivid from breaking if someone tries to unbind the driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] vivid: turn this into a platform_deviceHans Verkuil
This turns this driver into a platform device. This ensures that it appears in /sys/bus/platform_device since it now has a proper parent device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25[media] vivid: enable vb2_expbuf supportHans Verkuil
Now that vb2 supports DMABUF export for dma-sg and vmalloc memory modes, we can enable the vb2_expbuf support in vivid. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25[media] media: vivid: use vb2_ops_wait_prepare/finish helperPrabhakar Lad
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] vivid: default to single planar device instancesHans Verkuil
The default used to be that the first vivid device instance was single planar, the second multi planar, the third single planar, etc. However, that turned out to be unexpected and awkward. Change the driver to always default to single planar. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-08[media] vivid: add missing includesHans Verkuil
Fix kbuild test robot warnings about missing vmalloc.h and string.h includes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02[media] vivid: Don't declare .vidioc_overlay twiceMauro Carvalho Chehab
Removes the following warnings: drivers/media/platform/vivid/vivid-core.c:581:2: warning: initialized field overwritten [-Woverride-init] .vidioc_overlay = vidioc_overlay, ^ drivers/media/platform/vivid/vivid-core.c:581:2: warning: (near initialization for 'vivid_ioctl_ops.vidioc_overlay') [-Woverride-init] Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-02[media] vivid: add core driver codeHans Verkuil
This is the core driver code that creates all the driver instances and all the configured devices. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>