summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/atmel/atmel-isc.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] atmel-isc: Fix the static checker warningSongjun Wu2017-04-191-0/+1
| | | | | | | | | Initialize the pointer 'fmt' before the start of the loop. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: fix off-by-one comparison and out of bounds read issueColin Ian King2017-04-051-1/+1
| | | | | | | | | | | | | The are only HIST_ENTRIES worth of entries in hist_entry however the for-loop is iterating one too many times leasing to a read access off the end off the array ctrls->hist_entry. Fix this by iterating by the correct number of times. Detected by CoverityScan, CID#1415279 ("Out-of-bounds read") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: add the isc pipeline functionSongjun Wu2017-03-031-106/+521
| | | | | | | | | | | | | Image Sensor Controller has an internal image processor. It can convert raw format to the other formats, like RGB565, YUV420P. A module parameter 'sensor_preferred' is used to enable or disable the pipeline function. Some v4l2 controls are added to tuning the image when the pipeline function is enabled. Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: fix error return code in atmel_isc_probe()Wei Yongjun2016-11-221-0/+1
| | | | | | | | | Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: start dma in some scenarioSongjun Wu2016-10-241-1/+7
| | | | | | | | If a new vb buf is added to vb queue, the queue is empty and steaming, dma should be started. Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: mark PM functions as __maybe_unusedArnd Bergmann2016-09-191-2/+2
| | | | | | | | | | | | | | | | The newly added atmel-isc driver uses SET_RUNTIME_PM_OPS() to refer to its suspend/resume functions, causing a warning when CONFIG_PM is not set: media/platform/atmel/atmel-isc.c:1477:12: error: 'isc_runtime_resume' defined but not used [-Werror=unused-function] media/platform/atmel/atmel-isc.c:1467:12: error: 'isc_runtime_suspend' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to avoid the warning without adding an error-prone #ifdef around it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: set the format on the first openSongjun Wu2016-09-191-12/+18
| | | | | | | | Set the current format on the first open. Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: remove the warningSongjun Wu2016-09-061-1/+1
| | | | | | | | | | Replace the 'IS_ERR_VALUE(irq)' with 'ret < 0' in function 'atmel_isc_probe'. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] atmel-isc: add the Image Sensor Controller codeSongjun Wu2016-08-221-0/+1514
Add driver for the Image Sensor Controller. It manages incoming data from a parallel based CMOS/CCD sensor. It has an internal image processor, also integrates a triple channel direct memory access controller master interface. Signed-off-by: Songjun Wu <songjun.wu@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>