aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vimc/vimc-common.c
Commit message (Collapse)AuthorAgeFilesLines
* media: vimc: Add vimc-streamer for stream controlLucas A. M. Magalhães2019-02-071-35/+0
| | | | | | | | | | | | | | | | | 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: fix start stream when link is disabledHelen Fornazier2018-12-071-0/+2
| | | | | | | | | If link is disabled, media_entity_remote_pad returns NULL, causing a NULL pointer deference. Ignore links that are not enabled instead. Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2018-09-111-1/+1
| | | | | | | | | | | 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]>
* media: vimc: fix control event handlingHans Verkuil2018-02-261-1/+3
| | | | | | | | | The sensor subdev didn't handle control events. Add support for this. Found with v4l2-compliance. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: sca: Add scalerHelen Fornazier2017-06-231-0/+27
| | | | | | | | Implement scaler and integrated with the core Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: Subdevices as modulesHelen Fornazier2017-06-231-19/+19
| | | | | | | | | | | | | | | | | | | | | 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: sen: Support several image formatsHelen Fornazier2017-06-231-0/+8
| | | | | | | | | | Allow user space to change the image format as the frame size, the media bus 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-1/+120
| | | | | | | | | 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-0/+32
| | | | | | | | | | 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: common: Add vimc_ent_sd_* helperHelen Fornazier2017-06-231-0/+66
| | | | | | | | | | As all the subdevices in the topology will be initialized in the same way, to avoid code repetition the vimc_ent_sd_{register, unregister} helper functions were created Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
* [media] vimc: Move common code from the coreHelen Fornazier2017-06-231-0/+221
Remove helper functions from vimc-core and add it in vimc-common to clean up the core. Signed-off-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>