summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-11media: atomisp: use different dfs failed messagesMauro Carvalho Chehab1-3/+3
There are several parts of the driver that could produce a "dfs failed!" message. Change the texts, in order to help identifying from where they're coming. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: change the detection of ISP2401 at runtimeMauro Carvalho Chehab1-14/+14
Instead of having a static var to detect it, let's use the already-existing arch-specific bytes, as this is how other parts of the code also checks when it needs to do something different, depending on an specific chipset version. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: add SPDX headersMauro Carvalho Chehab1-0/+1
This driver is licensed under GPL 2.0, as stated inside their headers. Add the proper tag there. We should probably latter cleanup the reduntant licensing text, but this could be done later, after we get rid of other abstraction layers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: get rid of a bunch of other wrappersMauro Carvalho Chehab1-8/+7
There are too many wrapper functions at atomisp_compat_css20.c. Get rid of another set of such wrappers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: do another round of coding style cleanupMauro Carvalho Chehab1-3/+2
Run checkpatch --fix-inline again, in order to get rid of some additional issues that got introduced (or that checkpatch can now detect). This should help preventing receiving random cleanups, while keeping the code on a better shape. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: remove some trivial wrappers from compat css20Mauro Carvalho Chehab1-2/+2
There are tons of code inside atomisp_compat_css20.c, but several of them are just trivial wrappers to other functions. Getting rid of all of them will take some time, but let's start getting rid of some of the trivial ones. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: add more comments about frame allocationMauro Carvalho Chehab1-1/+5
The frame allocation logic happens differently for userptr or normal mmap. On a quick look, this sounded to be unbalanced, but the logic should actually work for both cases. Add an extra comment to reflect it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction layerMauro Carvalho Chehab1-6/+1
Simplify the code by removing this extra memory management abstraction layer. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: simplify hive_isp_css_mm_hrt wrapperMauro Carvalho Chehab1-35/+0
The code there is a wrapper for hmm/ wrapper. Simplify it, and get rid of ION-specific code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: partially get rid of one abstraction layerMauro Carvalho Chehab1-47/+47
The very same macros are defined as CSS_foo and IA_CSS_foo. Remove this abstraction, as it just make things confusing, for no good reason. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-06-11media: atomisp: don't flood dmesg with -EAGAIN return codesMauro Carvalho Chehab1-1/+2
Using DQBUF on non-blocking mode will return -EAGAIN if nothing arrives. Printing it has no value, even for debug purposes. So, only display real return codes. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: fix querycap initialization logicMauro Carvalho Chehab1-15/+6
Some recent changes at V4L2 core changed the way querycap is handled. Due to that, this warning is generated: WARNING: CPU: 1 PID: 503 at drivers/media/v4l2-core/v4l2-dev.c:885 __video_register_device+0x93e/0x1120 [videodev] as introduced by this commit: commit 3c1350501c21db8e3b1a38d9e97db29694305c3b Author: Hans Verkuil <hverkuil-cisco@xs4all.nl> Date: Tue Jul 23 04:21:25 2019 -0400 media: v4l2-dev/ioctl: require non-zero device_caps, verify sane querycap results Now that all V4L2 drivers set device_caps in struct video_device, we can add a check for this to ensure all future drivers fill this in. The fix is simple: we just need to initialize dev_caps before registering the V4L2 dev. While here, solve other problems at VIDIOC_QUERYCAP ioctl. Reported-by: Patrik Gfeller <patrik.gfeller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-20media: atomisp: cleanup directory hierarchyMauro Carvalho Chehab1-0/+3103
This driver has very long directories without a good reason (IMHO). Let's drop two directories from such hierarchy, in order to simplify things a little bit and make the dir output a bit more readable. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>