aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vimc/vimc-capture.c
Commit message (Collapse)AuthorAgeFilesLines
* media: vimc: add USERPTR supportHans Verkuil2019-02-181-1/+1
| | | | | | | | Add VB2_USERPTR to the vimc capture device. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Helen Koike <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* media: vimc: fill in bus_info in media_device_infoHans Verkuil2019-02-071-3/+1
| | | | | | | | | | | It is good practice to fill in bus_info. Also just use 'platform:vimc' when filling in the bus_info in querycap: the bus_info has nothing to do with the video device name. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Helen Koike <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* media: vimc: Add vimc-streamer for stream controlLucas A. M. Magalhães2019-02-071-9/+9
| | | | | | | | | | | | | | | | | Add a linear pipeline logic for the stream control. It's created by walking backwards on the entity graph. When the stream starts it will simply loop through the pipeline calling the respective process_frame function of each entity. Fixes: f2fe89061d797 ("vimc: Virtual Media Controller core, capture and sensor") Cc: [email protected] # for v4.20 Signed-off-by: Lucas A. M. Magalhães <[email protected]> Acked-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: fixed small space-after-tab issue in the patch] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* media: vimc: fill in correct driver name in querycapHans Verkuil2019-01-211-1/+1
| | | | | | | | | The driver name as returned in v4l2_capabilities must be vimc, not vimc_capture. Fix this. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2018-09-111-3/+3
| | | | | | | | | | | The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* headers: separate linux/mod_devicetable.h from linux/platform_device.hRandy Dunlap2018-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | At over 4000 #includes, <linux/platform_device.h> is the 9th most #included header file in the Linux kernel. It does not need <linux/mod_devicetable.h>, so drop that header and explicitly add <linux/mod_devicetable.h> to source files that need it. 4146 #include <linux/platform_device.h> After this patch, there are 225 files that use <linux/mod_devicetable.h>, for a reduction of around 3900 times that <linux/mod_devicetable.h> does not have to be read & parsed. 225 #include <linux/mod_devicetable.h> This patch was build-tested on 20 different arch-es. It also makes these drivers SubmitChecklist#1 compliant. Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kbuild test robot <[email protected]> # drivers/media/platform/vimc/ Reported-by: kbuild test robot <[email protected]> # drivers/pinctrl/pinctrl-u300.c Signed-off-by: Greg Kroah-Hartman <[email protected]>
* media: vimc: set id_table for platform driversJavier Martinez Canillas2017-07-261-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vimc platform drivers define a platform device ID table but these are not set to the .id_table field in the platform driver structure. So the platform device ID table is only used to fill the aliases in the module but are not used for matching (works because the platform subsystem fallbacks to the driver's name if no .id_table is set). But this also means that the platform device ID table isn't used if the driver is built-in, which leads to the following build warning: This causes the following build warnings when the driver is built-in: drivers/media/platform/vimc//vimc-capture.c:528:40: warning: ‘vimc_cap_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_cap_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-debayer.c:588:40: warning: ‘vimc_deb_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_deb_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-scaler.c:442:40: warning: ‘vimc_sca_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_sca_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc//vimc-sensor.c:376:40: warning: ‘vimc_sen_driver_ids’ defined but not used [-Wunused-const-variable=] static const struct platform_device_id vimc_sen_driver_ids[] = { ^~~~~~~~~~~~~~~~~~~ Reported-by: Mauro Carvalho Chehab <[email protected]> Suggested-by: Sakari Ailus <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Helen Koike <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: Subdevices as modulesHelen Fornazier2017-06-231-30/+69
| | | | | | | | | | | | | | | | | | | | | Change the core structure for adding subdevices in the topology. Instead of calling the specific create function for each subdevice, inject a child platform_device with the driver's name. Each type of node in the topology (sensor, capture, debayer, scaler) will register a platform_driver with the corresponding name through the component subsystem. Implementing a new subdevice type doesn't require vimc-core to be altered. This facilitates future implementation of dynamic entities, where hotpluging an entity in the topology is just a matter of registering/unregistering a platform_device in the system. It also facilitates other implementations of different nodes without touching the core code and remove the need of a header file for each type of node. Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: cap: Support several image formatsHelen Fornazier2017-06-231-16/+101
| | | | | | | | | | Allow user space to change the image format as the frame size, the pixel format, colorspace, quantization, field YCbCr encoding and the transfer function Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: common: Add vimc_link_validateHelen Fornazier2017-06-231-67/+11
| | | | | | | | | All links will be checked in the same way. Adding a helper function for that Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: common: Add vimc_pipeline_s_stream helperHelen Fornazier2017-06-231-27/+2
| | | | | | | | | | Move the vimc_cap_pipeline_s_stream from the vimc-cap.c to vimc-common.c as this core will be reused by other subdevices to activate the stream in their directly connected nodes Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: Virtual Media Controller core, capture and sensorHelen Koike2017-04-151-0/+498
First version of the Virtual Media Controller. Add a simple version of the core of the driver, the capture and sensor nodes in the topology, generating a grey image in a hardcoded format. Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [[email protected]: fix small typo in Kconfig] Signed-off-by: Mauro Carvalho Chehab <[email protected]>