···11+For both Cherrytrail (CHT) and Baytrail (BHT) the driver22+requires the "candrpv_0415_20150521_0458" firmware version.33+It should be noticed that the firmware file is different,44+depending on the ISP model, so they're stored with different55+names:66+77+- for BHT: /lib/firmware/shisp_2400b0_v21.bin88+99+ Warning: The driver was not tested yet for BHT.1010+1111+- for CHT: /lib/firmware/shisp_2401a0_v21.bin1212+1313+ https://github.com/intel-aero/meta-intel-aero-base/blob/master/recipes-kernel/linux/linux-yocto/shisp_2401a0_v21.bin1414+115NOTE:216=====31744-While the driver probes the hardware and reports itself as a55-V4L2 driver, there are still some issues preventing it to66-stream (at least it doesn't with the standard V4L2 applications.77-Didn't test yet with some custom-made app for this driver).88-Solving the related bugs and issues preventing it to work is99-needed (items 6 and 7 from the list below).1818+This driver currently doesn't work with most V4L2 applications,1919+as there are still some issues with regards to implementing2020+certain APIs at the standard way.2121+2222+Also, currently only USERPTR streaming mode is working.2323+2424+In order to test, it is needed to know what's the sensor's2525+resolution. This can be checked with:2626+2727+$ v4l2-ctl --get-fmt-video2828+ Format Video Capture:2929+ Width/Height : 1600/12003030+ ...3131+3232+It is known to work with:3333+3434+- v4l2grab at contrib/test directory at https://git.linuxtv.org/v4l-utils.git/3535+3636+ The resolution should not be bigger than the max resolution3737+ supported by the sensor, or it will fail. So, if the sensor3838+ reports:3939+4040+ The driver can be tested with:4141+4242+ v4l2grab -f YUYV -x 1600 -y 1200 -d /dev/video2 -u4343+4444+- NVT at https://github.com/intel/nvt4545+4646+ $ ./v4l2n -o testimage_@.raw \4747+ --device /dev/video2 \4848+ --input 0 \4949+ --exposure=30000,30000,30000,30000 \5050+ --parm type=1,capturemode=CI_MODE_PREVIEW \5151+ --fmt type=1,width=1600,height=1200,pixelformat=YUYV \5252+ --reqbufs count=2,memory=USERPTR \5353+ --parameters=wb_config.r=32768,wb_config.gr=21043,wb_config.gb=21043,wb_config.b=30863 \5454+ --capture=205555+5656+ As the output is in raw format, images need to be converted with:5757+5858+ $ for i in $(seq 0 19); do5959+ name="testimage_$(printf "%03i" $i)"6060+ ./raw2pnm -x$WIDTH -y$HEIGHT -f$FORMAT $name.raw $name.pnm6161+ rm $name.raw6262+ done10631164TODO1265====13661414-1. The atomisp doesn't rely at the usual i2c stuff to discover the1515- sensors. Instead, it calls a function from atomisp_gmin_platform.c.1616- There are some hacks added there for it to wait for sensors to be1717- probed (with a timeout of 2 seconds or so).1818- This should be converted to the usual way, using V4L2 async subdev1919- framework to wait for cameras to be probed;6767+1. Fix support for MMAP streaming mode. This is required for most6868+ V4L2 applications;20692121-2. Use ACPI _DSM table - DONE!7070+2. Implement and/or fix V4L2 ioctls in order to allow a normal app to7171+ use it;22722323-3. Switch the driver to use pm_runtime stuff. Right now, it probes the2424- existing PMIC code and sensors call it directly.7373+3. Ensure that the driver will pass v4l2-compliance tests;25742626-4. There's a problem at the sensor drivers: when trying to set a video2727- format, the atomisp main driver calls the sensor drivers with the2828- sensor turned off. This causes them to fail.7575+4. Get manufacturer's authorization to redistribute the binaries for7676+ the firmware files;29773030- The only exception is the atomisp-ov2880, which has a hack inside it3131- to turn it on when VIDIOC_S_FMT is called.7878+5. remove VIDEO_ATOMISP_ISP2401, making the driver to auto-detect the7979+ register address differences between ISP2400 and ISP2401;32803333- The right fix seems to power on the sensor when a video device is3434- opened (or at the first VIDIOC_ ioctl - except for VIDIOC_QUERYCAP),3535- powering it down at close() syscall.8181+6. Cleanup the driver code, removing the abstraction layers inside it;36823737- Such kind of control would need to be done inside the atomisp driver,3838- not at the sensors code.8383+7. The atomisp doesn't rely at the usual i2c stuff to discover the8484+ sensors. Instead, it calls a function from atomisp_gmin_platform.c.8585+ There are some hacks added there for it to wait for sensors to be8686+ probed (with a timeout of 2 seconds or so). This should be converted8787+ to the usual way, using V4L2 async subdev framework to wait for8888+ cameras to be probed;39894040-5. There are several issues related to memory management, causing4141- crashes. The atomisp splits the memory management on three separate4242- regions:9090+8. Switch to standard V4L2 sub-device API for sensor and lens. In9191+ particular, the user space API needs to support V4L2 controls as9292+ defined in the V4L2 spec and references to atomisp must be removed from9393+ these drivers.9494+9595+9. Use LED flash API for flash LED drivers such as LM3554 (which already9696+ has a LED class driver).9797+9898+10. Migrate the sensor drivers out of staging or re-using existing9999+ drivers;100100+101101+11. Switch the driver to use pm_runtime stuff. Right now, it probes the102102+ existing PMIC code and sensors call it directly.103103+104104+12. There's a problem on sensor drivers: when trying to set a video105105+ format, the atomisp main driver calls the sensor drivers with the106106+ sensor turned off. This causes them to fail.107107+108108+ This was fixed at atomisp-ov2880, which has a hack inside it109109+ to turn it on when VIDIOC_S_FMT is called, but this has to be110110+ cheked on other drivers as well.111111+112112+ The right fix seems to power on the sensor when a video device is113113+ opened (or at the first VIDIOC_ ioctl - except for VIDIOC_QUERYCAP),114114+ powering it down at close() syscall.115115+116116+ Such kind of control would need to be done inside the atomisp driver,117117+ not at the sensors code.118118+119119+13. There are several issues related to memory management, that can120120+ cause crashes and/or memory leaks. The atomisp splits the memory121121+ management on three separate regions:4312244123 - dynamic pool;45124 - reserved pool;46125 - generic pool471264848- The code implementing it is at:127127+ The code implementing it is at:4912850129 drivers/staging/media/atomisp/pci/hmm/511305252- It also has a separate code for managing DMA buffers at:131131+ It also has a separate code for managing DMA buffers at:5313254133 drivers/staging/media/atomisp/pci/mmu/551345656- The code there is really dirty, ugly and probably wrong. I fixed5757- one bug there already, but the best would be to just trash it and use5858- something else. Maybe the code from the newer intel driver could5959- serve as a model:135135+ The code there is really dirty, ugly and probably wrong. I fixed136136+ one bug there already, but the best would be to just trash it and use137137+ something else. Maybe the code from the newer intel driver could138138+ serve as a model:6013961140 drivers/staging/media/ipu3/ipu3-mmu.c621416363- But converting it to use something like that is painful and may6464- cause some breakages.142142+ But converting it to use something like that is painful and may143143+ cause some breakages.651446666-6. There is some issues at the frame receive logic, causing the6767- DQBUF ioctls to fail.145145+14. The file structure needs to get tidied up to resemble a normal Linux146146+ driver.681476969-7. A single AtomISP driver needs to be implemented to support both7070- Baytrail (BYT) and Cherrytail (CHT) platforms at the same time.7171- The current driver is a mechanical and hand combined merge of the7272- two using several runtime macros, plus some ifdef ISP2401 to select the7373- CHT version. Yet, there are some ISP-specific headers that change the7474- driver's behavior during compile time.148148+15. Lots of the midlayer glue. Unused code and abstraction needs removing.751497676-8. The file structure needs to get tidied up to resemble a normal Linux7777- driver.7878-7979-9. Lots of the midlayer glue. unused code and abstraction needs removing.8080-8181-10. The AtomISP driver includes some special IOCTLS (ATOMISP_IOC_XXXX_XXXX)150150+16. The AtomISP driver includes some special IOCTLS (ATOMISP_IOC_XXXX_XXXX)82151 and controls that require some cleanup. Some of those code may have83152 been removed during the cleanups. They could be needed in order to8484- properly support 3A algorithms153153+ properly support 3A algorithms.8515486155 Such IOCTL interface needs more documentation. The better would87156 be to use something close to the interface used by the IPU3 IMGU driver.881578989-11. The ISP code has some dependencies of the exact FW version.158158+17. The ISP code has some dependencies of the exact FW version.90159 The version defined in pci/sh_css_firmware.c:9116092161 BYT (isp2400): "irci_stable_candrpv_0415_20150521_0458"···175106 there are any specific things that can be done to fold in support for176107 multiple firmware versions.177108178178-12. Switch to standard V4L2 sub-device API for sensor and lens. In179179- particular, the user space API needs to support V4L2 controls as180180- defined in the V4L2 spec and references to atomisp must be removed from181181- these drivers.182109183183-13. Use LED flash API for flash LED drivers such as LM3554 (which already184184- has a LED class driver).110110+18. Switch from videobuf1 to videobuf2. Videobuf1 is being removed!185111186186-14. Switch from videobuf1 to videobuf2. Videobuf1 is being removed!187187-188188-15. Correct Coding Style. Please refrain sending coding style patches112112+19. Correct Coding Style. Please refrain sending coding style patches189113 for this driver until the other work is done, as there will be a lot190114 of code churn until this driver becomes functional again.191115192192-16. Fix private ioctls to not need a compat_ioctl handler for running193193- 32-bit tasks. The compat code has been removed because of bugs,194194- and should not be needed for modern drivers. Fixing this properly195195- unfortunately means an incompatible ABI change.116116+20. Remove the logic which sets up pipelines inside it, moving it to117117+ libcamera and implement MC support.118118+196119197120Limitations198121===========