/usr/include/linux
NameSizeModeActions
android/-0755rm
byteorder/-0755rm
caif/-0755rm
can/-0755rm
cifs/-0755rm
dvb/-0755rm
genwqe/-0755rm
hdlc/-0755rm
hsi/-0755rm
iio/-0755rm
isdn/-0755rm
media/-0755rm
misc/-0755rm
mmc/-0755rm
netfilter/-0755rm
netfilter_arp/-0755rm
netfilter_bridge/-0755rm
netfilter_ipv4/-0755rm
netfilter_ipv6/-0755rm
nfsd/-0755rm
raid/-0755rm
sched/-0755rm
spi/-0755rm
sunrpc/-0755rm
surface_aggregator/-0755rm
tc_act/-0755rm
tc_ematch/-0755rm
usb/-0755rm
a.out.h68920644editdlrm
acct.h39130644editdlrm
acrn.h189560644editdlrm
adb.h11400644editdlrm
adfs_fs.h9930644editdlrm
affs_hardblocks.h15780644editdlrm
agpgart.h39550644editdlrm
aio_abi.h33980644editdlrm
am437x-vpfe.h36810644editdlrm
amt.h17470644editdlrm
apm_bios.h36830644editdlrm
arcfb.h2130644editdlrm
arm_sdei.h27510644editdlrm
aspeed-lpc-ctrl.h17800644editdlrm
aspeed-p2a-ctrl.h19060644editdlrm
aspeed-video.h3890644editdlrm
atalk.h10230644editdlrm
atm.h78880644editdlrm
atmapi.h9520644editdlrm
atmarp.h12960644editdlrm
atmbr2684.h32720644editdlrm
atmclip.h5760644editdlrm
atmdev.h74980644editdlrm
atmioc.h16470644editdlrm
atmlec.h23810644editdlrm
atmmpc.h42260644editdlrm
atmppp.h6390644editdlrm
atmsap.h49700644editdlrm
atmsvc.h18530644editdlrm
atm_eni.h6480644editdlrm
atm_he.h4060644editdlrm
atm_idt77105.h9550644editdlrm
atm_nicstar.h12780644editdlrm
atm_tcp.h16220644editdlrm
atm_zatm.h15400644editdlrm
audit.h217440644editdlrm
auto_dev-ioctl.h49850644editdlrm
auto_fs.h64280644editdlrm
auto_fs4.h4510644editdlrm
auxvec.h18190644editdlrm
ax25.h28240644editdlrm
batadv_packet.h216320644editdlrm
batman_adv.h168870644editdlrm
baycom.h8830644editdlrm
bcm933xx_hcs.h4190644editdlrm
bfs_fs.h19050644editdlrm
binfmts.h7760644editdlrm
bits.h5170644editdlrm
blkdev.h3590644editdlrm
blkpg.h9040644editdlrm
blktrace_api.h47010644editdlrm
blkzoned.h64920644editdlrm
bpf.h2803440644editdlrm
bpf_common.h13670644editdlrm
bpf_perf_event.h5290644editdlrm
bpqether.h9810644editdlrm
bsg.h24940644editdlrm
bt-bmc.h5720644editdlrm
btf.h55910644editdlrm
btrfs.h371500644editdlrm
btrfs_tree.h356230644editdlrm
cachefiles.h16500644editdlrm
can.h114960644editdlrm
capability.h135230644editdlrm
capi.h31240644editdlrm
cciss_defs.h32810644editdlrm
cciss_ioctl.h27610644editdlrm
ccs.h7670644editdlrm
cdrom.h295610644editdlrm
cec-funcs.h544190644editdlrm
cec.h422920644editdlrm
cfm_bridge.h14560644editdlrm
cgroupstats.h21050644editdlrm
chio.h52820644editdlrm
close_range.h3770644editdlrm
cn_proc.h41600644editdlrm
coda.h182160644editdlrm
coff.h125490644editdlrm
comedi.h554810644editdlrm
connector.h22520644editdlrm
const.h15870644editdlrm
coresight-stm.h7470644editdlrm
counter.h48890644editdlrm
cramfs_fs.h35550644editdlrm
cryptouser.h58120644editdlrm
cuda.h9050644editdlrm
cxl_mem.h81430644editdlrm
cyclades.h9690644editdlrm
cycx_cfm.h29890644editdlrm
dcbnl.h255710644editdlrm
dccp.h64360644editdlrm
devlink.h228320644editdlrm
dlm.h26640644editdlrm
dlmconstants.h50910644editdlrm
dlm_device.h25410644editdlrm
dlm_plock.h9160644editdlrm
dm-ioctl.h115980644editdlrm
dm-log-userspace.h151900644editdlrm
dma-buf.h73470644editdlrm
dma-heap.h13970644editdlrm
dns_resolver.h39490644editdlrm
dpll.h83560644editdlrm
dqblk_xfs.h93880644editdlrm
dw100.h3570644editdlrm
edd.h56040644editdlrm
efs_fs_sb.h22270644editdlrm
elf-em.h26270644editdlrm
elf-fdpic.h16210644editdlrm
elf.h156770644editdlrm
errno.h230644editdlrm
errqueue.h19830644editdlrm
erspan.h10590644editdlrm
ethtool.h1024890644editdlrm
ethtool_netlink.h305880644editdlrm
eventfd.h2640644editdlrm
eventpoll.h29120644editdlrm
exfat.h5880644editdlrm
ext4.h41220644editdlrm
f2fs.h33630644editdlrm
fadvise.h8420644editdlrm
falloc.h36430644editdlrm
fanotify.h83680644editdlrm
fb.h163350644editdlrm
fcntl.h57660644editdlrm
fd.h121170644editdlrm
fdreg.h53640644editdlrm
fib_rules.h20580644editdlrm
fiemap.h27740644editdlrm
filter.h22160644editdlrm
firewire-cdev.h507200644editdlrm
firewire-constants.h32310644editdlrm
fou.h8190644editdlrm
fpga-dfl.h87280644editdlrm
fs.h217330644editdlrm
fscrypt.h65920644editdlrm
fsi.h30880644editdlrm
fsl_hypervisor.h73010644editdlrm
fsl_mc.h7340644editdlrm
fsmap.h44020644editdlrm
fsverity.h31850644editdlrm
fuse.h295040644editdlrm
futex.h61270644editdlrm
gameport.h8970644editdlrm
genetlink.h22380644editdlrm
gen_stats.h15260644editdlrm
gfs2_ondisk.h147730644editdlrm
gpio.h202970644editdlrm
gsmmux.h45090644editdlrm
gtp.h7820644editdlrm
handshake.h16460644editdlrm
hash_info.h10340644editdlrm
hdlc.h6370644editdlrm
hdlcdrv.h29080644editdlrm
hdreg.h227030644editdlrm
hid.h20860644editdlrm
hiddev.h63450644editdlrm
hidraw.h21140644editdlrm
hpet.h7430644editdlrm
hsr_netlink.h11010644editdlrm
hw_breakpoint.h6050644editdlrm
hyperv.h111760644editdlrm
i2c-dev.h18750644editdlrm
i2c.h68900644editdlrm
i2o-dev.h115550644editdlrm
i8k.h15280644editdlrm
icmp.h47850644editdlrm
icmpv6.h43000644editdlrm
idxd.h93280644editdlrm
if.h109250644editdlrm
ife.h3510644editdlrm
if_addr.h21430644editdlrm
if_addrlabel.h7210644editdlrm
if_alg.h16010644editdlrm
if_arcnet.h37140644editdlrm
if_arp.h65890644editdlrm
if_bonding.h51450644editdlrm
if_bridge.h206660644editdlrm
if_cablemodem.h9860644editdlrm
if_eql.h13490644editdlrm
if_ether.h87660644editdlrm
if_fc.h17380644editdlrm
if_fddi.h43690644editdlrm
if_hippi.h42350644editdlrm
if_infiniband.h12450644editdlrm
if_link.h560050644editdlrm
if_ltalk.h2100644editdlrm
if_macsec.h65030644editdlrm
if_packet.h82730644editdlrm
if_phonet.h4240644editdlrm
if_plip.h6600644editdlrm
if_ppp.h290644editdlrm
if_pppol2tp.h33030644editdlrm
if_pppox.h48770644editdlrm
if_slip.h8720644editdlrm
if_team.h16170644editdlrm
if_tun.h43150644editdlrm
if_tunnel.h56040644editdlrm
if_vlan.h18310644editdlrm
if_x25.h8810644editdlrm
if_xdp.h50100644editdlrm
igmp.h30610644editdlrm
ila.h12460644editdlrm
in.h109560644editdlrm
in6.h75780644editdlrm
inet_diag.h50150644editdlrm
inotify.h32890644editdlrm
input-event-codes.h302580644editdlrm
input.h162170644editdlrm
in_route.h9360644editdlrm
ioam6.h23830644editdlrm
ioam6_genl.h13730644editdlrm
ioam6_iptunnel.h14280644editdlrm
ioctl.h1630644editdlrm
iommufd.h298040644editdlrm
ioprio.h41750644editdlrm
io_uring.h223550644editdlrm
ip.h48460644editdlrm
ip6_tunnel.h19530644editdlrm
ipc.h21010644editdlrm
ipmi.h154420644editdlrm
ipmi_bmc.h4880644editdlrm
ipmi_msgdefs.h34300644editdlrm
ipmi_ssif_bmc.h4410644editdlrm
ipsec.h9470644editdlrm
ipv6.h43250644editdlrm
ipv6_route.h19080644editdlrm
ip_vs.h139620644editdlrm
irqnr.h1040644editdlrm
iso_fs.h64830644editdlrm
isst_if.h152810644editdlrm
ivtv.h30220644editdlrm
ivtvfb.h12070644editdlrm
jffs2.h68110644editdlrm
joystick.h34340644editdlrm
kcm.h8220644editdlrm
kcmp.h5220644editdlrm
kcov.h19620644editdlrm
kd.h64520644editdlrm
kdev_t.h3830644editdlrm
kernel-page-flags.h9170644editdlrm
kernel.h1940644editdlrm
kernelcapi.h10190644editdlrm
kexec.h20970644editdlrm
keyboard.h134590644editdlrm
keyctl.h59960644editdlrm
kfd_ioctl.h581520644editdlrm
kfd_sysfs.h52210644editdlrm
kvm.h491800644editdlrm
kvm_para.h10010644editdlrm
l2tp.h57460644editdlrm
landlock.h118280644editdlrm
libc-compat.h72890644editdlrm
limits.h9370644editdlrm
lirc.h83270644editdlrm
llc.h31640644editdlrm
loadpin.h8340644editdlrm
loop.h33960644editdlrm
lp.h41900644editdlrm
lsm.h26310644editdlrm
lwtunnel.h23670644editdlrm
magic.h39460644editdlrm
major.h46570644editdlrm
map_to_7segment.h66080644editdlrm
map_to_14segment.h95050644editdlrm
matroxfb.h14640644editdlrm
max2175.h10350644editdlrm
mctp.h25380644editdlrm
mdio.h244020644editdlrm
media-bus-format.h76720644editdlrm
media.h127540644editdlrm
mei.h34740644editdlrm
mei_uuid.h7380644editdlrm
membarrier.h95660644editdlrm
memfd.h14670644editdlrm
mempolicy.h25950644editdlrm
mii.h95510644editdlrm
minix_fs.h21200644editdlrm
mman.h18560644editdlrm
mmtimer.h21170644editdlrm
module.h2930644editdlrm
mount.h83140644editdlrm
mpls.h23020644editdlrm
mpls_iptunnel.h7610644editdlrm
mptcp.h39700644editdlrm
mptcp_pm.h45900644editdlrm
mqueue.h22010644editdlrm
mroute.h59220644editdlrm
mroute6.h50050644editdlrm
mrp_bridge.h17080644editdlrm
msdos_fs.h67310644editdlrm
msg.h33860644editdlrm
mtio.h81750644editdlrm
nbd-netlink.h24080644editdlrm
nbd.h38620644editdlrm
ncsi.h48280644editdlrm
ndctl.h68240644editdlrm
neighbour.h61020644editdlrm
net.h20850644editdlrm
netconf.h6140644editdlrm
netdev.h57790644editdlrm
netdevice.h22530644editdlrm
netfilter.h17310644editdlrm
netfilter_arp.h4450644editdlrm
netfilter_bridge.h12380644editdlrm
netfilter_ipv4.h14880644editdlrm
netfilter_ipv6.h13830644editdlrm
netlink.h123920644editdlrm
netlink_diag.h15240644editdlrm
netrom.h8070644editdlrm
net_dropmon.h29200644editdlrm
net_namespace.h7150644editdlrm
net_tstamp.h61630644editdlrm
nexthop.h40660644editdlrm
nfc.h112360644editdlrm
nfs.h44290644editdlrm
nfs2.h14680644editdlrm
nfs3.h24530644editdlrm
nfs4.h66950644editdlrm
nfs4_mount.h19320644editdlrm
nfsacl.h7180644editdlrm
nfsd_netlink.h19950644editdlrm
nfs_fs.h16540644editdlrm
nfs_idmap.h22430644editdlrm
nfs_mount.h21420644editdlrm
nilfs2_api.h75890644editdlrm
nilfs2_ondisk.h180850644editdlrm
nitro_enclaves.h131610644editdlrm
nl80211-vnd-intel.h46020644editdlrm
nl80211.h3477450644editdlrm
npcm-video.h12150644editdlrm
nsfs.h16750644editdlrm
nsm.h7400644editdlrm
ntsync.h4830644editdlrm
nubus.h81910644editdlrm
nvme_ioctl.h24900644editdlrm
nvram.h5320644editdlrm
omap3isp.h209440644editdlrm
omapfb.h59180644editdlrm
oom.h5110644editdlrm
openat2.h14500644editdlrm
openvswitch.h421010644editdlrm
packet_diag.h16720644editdlrm
papr_pdsm.h57410644editdlrm
param.h1410644editdlrm
parport.h38410644editdlrm
patchkey.h8920644editdlrm
pci.h13800644editdlrm
pcitest.h9200644editdlrm
pci_regs.h639370644editdlrm
perf_event.h437080644editdlrm
personality.h20970644editdlrm
pfkeyv2.h106360644editdlrm
pfrut.h80030644editdlrm
pg.h23940644editdlrm
phantom.h16540644editdlrm
phonet.h46770644editdlrm
pidfd.h12320644editdlrm
pktcdvd.h24030644editdlrm
pkt_cls.h194620644editdlrm
pkt_sched.h293460644editdlrm
pmu.h54440644editdlrm
poll.h220644editdlrm
posix_acl.h12540644editdlrm
posix_acl_xattr.h11150644editdlrm
posix_types.h10980644editdlrm
ppdev.h32850644editdlrm
ppp-comp.h25270644editdlrm
ppp-ioctl.h57290644editdlrm
ppp_defs.h55570644editdlrm
pps.h47340644editdlrm
pr.h16300644editdlrm
prctl.h117940644editdlrm
psample.h26340644editdlrm
psci.h51410644editdlrm
psp-dbc.h52790644editdlrm
psp-sev.h77690644editdlrm
ptp_clock.h82940644editdlrm
ptrace.h55010644editdlrm
qemu_fw_cfg.h24690644editdlrm
qnx4_fs.h23280644editdlrm
qnxtypes.h6240644editdlrm
qrtr.h8930644editdlrm
quota.h63120644editdlrm
radeonfb.h3600644editdlrm
random.h18970644editdlrm
rds.h111680644editdlrm
reboot.h13430644editdlrm
reiserfs_fs.h7750644editdlrm
reiserfs_xattr.h5420644editdlrm
remoteproc_cdev.h11020644editdlrm
resource.h25950644editdlrm
rfkill.h66080644editdlrm
rio_cm_cdev.h32480644editdlrm
rio_mport_cdev.h93300644editdlrm
rkisp1-config.h583680644editdlrm
romfs_fs.h12360644editdlrm
rose.h22320644editdlrm
route.h23320644editdlrm
rpl.h8540644editdlrm
rpl_iptunnel.h4240644editdlrm
rpmsg.h13170644editdlrm
rpmsg_types.h2880644editdlrm
rseq.h54480644editdlrm
rtc.h53160644editdlrm
rtnetlink.h213460644editdlrm
rxrpc.h49220644editdlrm
scc.h46240644editdlrm
sched.h62870644editdlrm
scif_ioctl.h63820644editdlrm
screen_info.h24790644editdlrm
sctp.h360170644editdlrm
seccomp.h59900644editdlrm
securebits.h27040644editdlrm
sed-opal.h53430644editdlrm
seg6.h11690644editdlrm
seg6_genl.h5890644editdlrm
seg6_hmac.h4230644editdlrm
seg6_iptunnel.h9830644editdlrm
seg6_local.h38670644editdlrm
selinux_netlink.h11950644editdlrm
sem.h30510644editdlrm
serial.h52450644editdlrm
serial_core.h50460644editdlrm
serial_reg.h160230644editdlrm
serio.h21390644editdlrm
sev-guest.h25260644editdlrm
shm.h37940644editdlrm
signal.h3880644editdlrm
signalfd.h12330644editdlrm
smc.h89010644editdlrm
smc_diag.h29510644editdlrm
smiapp.h10580644editdlrm
snmp.h146530644editdlrm
socket.h10400644editdlrm
sockios.h68460644editdlrm
sock_diag.h13010644editdlrm
sonet.h22900644editdlrm
sonypi.h53090644editdlrm
sound.h12370644editdlrm
soundcard.h460480644editdlrm
stat.h75400644editdlrm
stddef.h21080644editdlrm
stm.h12740644editdlrm
string.h2380644editdlrm
suspend_ioctls.h14310644editdlrm
swab.h69400644editdlrm
switchtec_ioctl.h52620644editdlrm
synclink.h89850644editdlrm
sync_file.h34490644editdlrm
sysctl.h260250644editdlrm
sysinfo.h10490644editdlrm
target_core_user.h46520644editdlrm
taskstats.h83220644editdlrm
tcp.h170720644editdlrm
tcp_metrics.h19850644editdlrm
tdx-guest.h13050644editdlrm
tee.h134330644editdlrm
termios.h1720644editdlrm
thermal.h33100644editdlrm
thp7312.h6590644editdlrm
time.h17520644editdlrm
timerfd.h9360644editdlrm
times.h2780644editdlrm
timex.h78170644editdlrm
time_types.h12670644editdlrm
tiocl.h17290644editdlrm
tipc.h88250644editdlrm
tipc_config.h149150644editdlrm
tipc_netlink.h93950644editdlrm
tipc_sockets_diag.h4680644editdlrm
tls.h72260644editdlrm
toshiba.h19300644editdlrm
tps6594_pfsm.h11600644editdlrm
trace_mmap.h13010644editdlrm
tty.h17850644editdlrm
tty_flags.h45010644editdlrm
types.h18290644editdlrm
ublk_cmd.h120460644editdlrm
udf_fs_i.h6970644editdlrm
udmabuf.h6430644editdlrm
udp.h16960644editdlrm
uhid.h46480644editdlrm
uinput.h92610644editdlrm
uio.h11630644editdlrm
uleds.h7980644editdlrm
ultrasound.h45620644editdlrm
um_timetravel.h100320644editdlrm
un.h3840644editdlrm
unistd.h2200644editdlrm
unix_diag.h13280644editdlrm
usbdevice_fs.h83150644editdlrm
usbip.h15030644editdlrm
userfaultfd.h120170644editdlrm
userio.h15160644editdlrm
user_events.h24940644editdlrm
utime.h2230644editdlrm
utsname.h6690644editdlrm
uuid.h280644editdlrm
uvcvideo.h26270644editdlrm
v4l2-common.h20560644editdlrm
v4l2-controls.h1494070644editdlrm
v4l2-dv-timings.h311230644editdlrm
v4l2-mediabus.h54310644editdlrm
v4l2-subdev.h103450644editdlrm
vboxguest.h93680644editdlrm
vbox_err.h72570644editdlrm
vbox_vmmdev_types.h117960644editdlrm
vdpa.h25500644editdlrm
vduse.h98080644editdlrm
version.h2180644editdlrm
vesa.h5100644editdlrm
veth.h2240644editdlrm
vfio.h718620644editdlrm
vfio_ccw.h13170644editdlrm
vfio_zdev.h25420644editdlrm
vhost.h112730644editdlrm
vhost_types.h52670644editdlrm
videodev2.h1037270644editdlrm
virtio_9p.h20520644editdlrm
virtio_balloon.h60710644editdlrm
virtio_blk.h99790644editdlrm
virtio_bt.h9100644editdlrm
virtio_config.h47630644editdlrm
virtio_console.h31560644editdlrm
virtio_crypto.h164720644editdlrm
virtio_fs.h5730644editdlrm
virtio_gpio.h17140644editdlrm
virtio_gpu.h115540644editdlrm
virtio_i2c.h11860644editdlrm
virtio_ids.h43030644editdlrm
virtio_input.h25150644editdlrm
virtio_iommu.h39310644editdlrm
virtio_mem.h72660644editdlrm
virtio_mmio.h49690644editdlrm
virtio_net.h189420644editdlrm
virtio_pci.h96310644editdlrm
virtio_pcidev.h24470644editdlrm
virtio_pmem.h8820644editdlrm
virtio_ring.h87240644editdlrm
virtio_rng.h2650644editdlrm
virtio_scmi.h6370644editdlrm
virtio_scsi.h60850644editdlrm
virtio_snd.h131700644editdlrm
virtio_types.h21530644editdlrm
virtio_vsock.h33480644editdlrm
vmcore.h4550644editdlrm
vm_sockets.h74280644editdlrm
vm_sockets_diag.h9630644editdlrm
vsockmon.h18850644editdlrm
vt.h30590644editdlrm
vtpm_proxy.h17190644editdlrm
wait.h6820644editdlrm
watchdog.h23350644editdlrm
watch_queue.h34900644editdlrm
wireguard.h77480644editdlrm
wireless.h427040644editdlrm
wmi.h17610644editdlrm
wwan.h2950644editdlrm
x25.h35620644editdlrm
xattr.h30230644editdlrm
xdp_diag.h14680644editdlrm
xfrm.h128790644editdlrm
xilinx-v4l2-controls.h29760644editdlrm
zorro.h32960644editdlrm
zorro_ids.h300650644editdlrm
Edit: /usr/include/linux/rkisp1-config.h (58368B)
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR MIT) */ /* * Rockchip ISP1 userspace API * Copyright (C) 2017 Rockchip Electronics Co., Ltd. */ #ifndef _RKISP1_CONFIG_H #define _RKISP1_CONFIG_H #include /* Defect Pixel Cluster Detection */ #define RKISP1_CIF_ISP_MODULE_DPCC (1U << 0) /* Black Level Subtraction */ #define RKISP1_CIF_ISP_MODULE_BLS (1U << 1) /* Sensor De-gamma */ #define RKISP1_CIF_ISP_MODULE_SDG (1U << 2) /* Histogram statistics configuration */ #define RKISP1_CIF_ISP_MODULE_HST (1U << 3) /* Lens Shade Control */ #define RKISP1_CIF_ISP_MODULE_LSC (1U << 4) /* Auto White Balance Gain */ #define RKISP1_CIF_ISP_MODULE_AWB_GAIN (1U << 5) /* Filter */ #define RKISP1_CIF_ISP_MODULE_FLT (1U << 6) /* Bayer Demosaic */ #define RKISP1_CIF_ISP_MODULE_BDM (1U << 7) /* Cross Talk */ #define RKISP1_CIF_ISP_MODULE_CTK (1U << 8) /* Gamma Out Curve */ #define RKISP1_CIF_ISP_MODULE_GOC (1U << 9) /* Color Processing */ #define RKISP1_CIF_ISP_MODULE_CPROC (1U << 10) /* Auto Focus Control statistics configuration */ #define RKISP1_CIF_ISP_MODULE_AFC (1U << 11) /* Auto White Balancing statistics configuration */ #define RKISP1_CIF_ISP_MODULE_AWB (1U << 12) /* Image Effect */ #define RKISP1_CIF_ISP_MODULE_IE (1U << 13) /* Auto Exposure Control statistics configuration */ #define RKISP1_CIF_ISP_MODULE_AEC (1U << 14) /* Wide Dynamic Range */ #define RKISP1_CIF_ISP_MODULE_WDR (1U << 15) /* Denoise Pre-Filter */ #define RKISP1_CIF_ISP_MODULE_DPF (1U << 16) /* Denoise Pre-Filter Strength */ #define RKISP1_CIF_ISP_MODULE_DPF_STRENGTH (1U << 17) #define RKISP1_CIF_ISP_CTK_COEFF_MAX 0x100 #define RKISP1_CIF_ISP_CTK_OFFSET_MAX 0x800 #define RKISP1_CIF_ISP_AE_MEAN_MAX_V10 25 #define RKISP1_CIF_ISP_AE_MEAN_MAX_V12 81 #define RKISP1_CIF_ISP_AE_MEAN_MAX RKISP1_CIF_ISP_AE_MEAN_MAX_V12 #define RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 16 #define RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 32 #define RKISP1_CIF_ISP_HIST_BIN_N_MAX RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 #define RKISP1_CIF_ISP_AFM_MAX_WINDOWS 3 #define RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE 17 #define RKISP1_CIF_ISP_BDM_MAX_TH 0xff /* * Black level compensation */ /* maximum value for horizontal start address */ #define RKISP1_CIF_ISP_BLS_START_H_MAX 0x00000fff /* maximum value for horizontal stop address */ #define RKISP1_CIF_ISP_BLS_STOP_H_MAX 0x00000fff /* maximum value for vertical start address */ #define RKISP1_CIF_ISP_BLS_START_V_MAX 0x00000fff /* maximum value for vertical stop address */ #define RKISP1_CIF_ISP_BLS_STOP_V_MAX 0x00000fff /* maximum is 2^18 = 262144*/ #define RKISP1_CIF_ISP_BLS_SAMPLES_MAX 0x00000012 /* maximum value for fixed black level */ #define RKISP1_CIF_ISP_BLS_FIX_SUB_MAX 0x00000fff /* minimum value for fixed black level */ #define RKISP1_CIF_ISP_BLS_FIX_SUB_MIN 0xfffff000 /* 13 bit range (signed)*/ #define RKISP1_CIF_ISP_BLS_FIX_MASK 0x00001fff /* * Automatic white balance measurements */ #define RKISP1_CIF_ISP_AWB_MAX_GRID 1 #define RKISP1_CIF_ISP_AWB_MAX_FRAMES 7 /* * Gamma out */ /* Maximum number of color samples supported */ #define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 17 #define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 34 #define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 /* * Lens shade correction */ #define RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE 8 /* * The following matches the tuning process, * not the max capabilities of the chip. */ #define RKISP1_CIF_ISP_LSC_SAMPLES_MAX 17 /* * Histogram calculation */ #define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 25 #define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 81 #define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 /* * Defect Pixel Cluster Correction */ #define RKISP1_CIF_ISP_DPCC_METHODS_MAX 3 #define RKISP1_CIF_ISP_DPCC_MODE_STAGE1_ENABLE (1U << 2) #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_G_CENTER (1U << 0) #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_RB_CENTER (1U << 1) #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_G_3X3 (1U << 2) #define RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_RB_3X3 (1U << 3) /* 0-2 for sets 1-3 */ #define RKISP1_CIF_ISP_DPCC_SET_USE_STAGE1_USE_SET(n) ((n) << 0) #define RKISP1_CIF_ISP_DPCC_SET_USE_STAGE1_USE_FIX_SET (1U << 3) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_PG_GREEN_ENABLE (1U << 0) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_LC_GREEN_ENABLE (1U << 1) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RO_GREEN_ENABLE (1U << 2) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RND_GREEN_ENABLE (1U << 3) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RG_GREEN_ENABLE (1U << 4) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_PG_RED_BLUE_ENABLE (1U << 8) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_LC_RED_BLUE_ENABLE (1U << 9) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RO_RED_BLUE_ENABLE (1U << 10) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RND_RED_BLUE_ENABLE (1U << 11) #define RKISP1_CIF_ISP_DPCC_METHODS_SET_RG_RED_BLUE_ENABLE (1U << 12) #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_G(v) ((v) << 0) #define RKISP1_CIF_ISP_DPCC_LINE_THRESH_RB(v) ((v) << 8) #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_G(v) ((v) << 0) #define RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_RB(v) ((v) << 8) #define RKISP1_CIF_ISP_DPCC_PG_FAC_G(v) ((v) << 0) #define RKISP1_CIF_ISP_DPCC_PG_FAC_RB(v) ((v) << 8) #define RKISP1_CIF_ISP_DPCC_RND_THRESH_G(v) ((v) << 0) #define RKISP1_CIF_ISP_DPCC_RND_THRESH_RB(v) ((v) << 8) #define RKISP1_CIF_ISP_DPCC_RG_FAC_G(v) ((v) << 0) #define RKISP1_CIF_ISP_DPCC_RG_FAC_RB(v) ((v) << 8) #define RKISP1_CIF_ISP_DPCC_RO_LIMITS_n_G(n, v) ((v) << ((n) * 4)) #define RKISP1_CIF_ISP_DPCC_RO_LIMITS_n_RB(n, v) ((v) << ((n) * 4 + 2)) #define RKISP1_CIF_ISP_DPCC_RND_OFFS_n_G(n, v) ((v) << ((n) * 4)) #define RKISP1_CIF_ISP_DPCC_RND_OFFS_n_RB(n, v) ((v) << ((n) * 4 + 2)) /* * Denoising pre filter */ #define RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS 17 #define RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS 6 /* * Compand */ #define RKISP1_CIF_ISP_COMPAND_NUM_POINTS 64 /* * Measurement types */ #define RKISP1_CIF_ISP_STAT_AWB (1U << 0) #define RKISP1_CIF_ISP_STAT_AUTOEXP (1U << 1) #define RKISP1_CIF_ISP_STAT_AFM (1U << 2) #define RKISP1_CIF_ISP_STAT_HIST (1U << 3) /** * enum rkisp1_cif_isp_version - ISP variants * * @RKISP1_V10: Used at least in RK3288 and RK3399. * @RKISP1_V11: Declared in the original vendor code, but not used. Same number * of entries in grids and histogram as v10. * @RKISP1_V12: Used at least in RK3326 and PX30. * @RKISP1_V13: Used at least in RK1808. Same number of entries in grids and * histogram as v12. * @RKISP1_V_IMX8MP: Used in at least i.MX8MP. Same number of entries in grids * and histogram as v10. */ enum rkisp1_cif_isp_version { RKISP1_V10 = 10, RKISP1_V11, RKISP1_V12, RKISP1_V13, RKISP1_V_IMX8MP, }; enum rkisp1_cif_isp_histogram_mode { RKISP1_CIF_ISP_HISTOGRAM_MODE_DISABLE, RKISP1_CIF_ISP_HISTOGRAM_MODE_RGB_COMBINED, RKISP1_CIF_ISP_HISTOGRAM_MODE_R_HISTOGRAM, RKISP1_CIF_ISP_HISTOGRAM_MODE_G_HISTOGRAM, RKISP1_CIF_ISP_HISTOGRAM_MODE_B_HISTOGRAM, RKISP1_CIF_ISP_HISTOGRAM_MODE_Y_HISTOGRAM }; enum rkisp1_cif_isp_awb_mode_type { RKISP1_CIF_ISP_AWB_MODE_MANUAL, RKISP1_CIF_ISP_AWB_MODE_RGB, RKISP1_CIF_ISP_AWB_MODE_YCBCR }; enum rkisp1_cif_isp_flt_mode { RKISP1_CIF_ISP_FLT_STATIC_MODE, RKISP1_CIF_ISP_FLT_DYNAMIC_MODE }; /** * enum rkisp1_cif_isp_exp_ctrl_autostop - stop modes * @RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_0: continuous measurement * @RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_1: stop measuring after a complete frame */ enum rkisp1_cif_isp_exp_ctrl_autostop { RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_0 = 0, RKISP1_CIF_ISP_EXP_CTRL_AUTOSTOP_1 = 1, }; /** * enum rkisp1_cif_isp_exp_meas_mode - Exposure measure mode * @RKISP1_CIF_ISP_EXP_MEASURING_MODE_0: Y = 16 + 0.25R + 0.5G + 0.1094B * @RKISP1_CIF_ISP_EXP_MEASURING_MODE_1: Y = (R + G + B) x (85/256) */ enum rkisp1_cif_isp_exp_meas_mode { RKISP1_CIF_ISP_EXP_MEASURING_MODE_0, RKISP1_CIF_ISP_EXP_MEASURING_MODE_1, }; /*---------- PART1: Input Parameters ------------*/ /** * struct rkisp1_cif_isp_window - measurement window. * * Measurements are calculated per window inside the frame. * This struct represents a window for a measurement. * * @h_offs: the horizontal offset of the window from the left of the frame in pixels. * @v_offs: the vertical offset of the window from the top of the frame in pixels. * @h_size: the horizontal size of the window in pixels * @v_size: the vertical size of the window in pixels. */ struct rkisp1_cif_isp_window { __u16 h_offs; __u16 v_offs; __u16 h_size; __u16 v_size; }; /** * struct rkisp1_cif_isp_bls_fixed_val - BLS fixed subtraction values * * The values will be subtracted from the sensor * values. Therefore a negative value means addition instead of subtraction! * * @r: Fixed (signed!) subtraction value for Bayer pattern R * @gr: Fixed (signed!) subtraction value for Bayer pattern Gr * @gb: Fixed (signed!) subtraction value for Bayer pattern Gb * @b: Fixed (signed!) subtraction value for Bayer pattern B */ struct rkisp1_cif_isp_bls_fixed_val { __s16 r; __s16 gr; __s16 gb; __s16 b; }; /** * struct rkisp1_cif_isp_bls_config - Configuration used by black level subtraction * * @enable_auto: Automatic mode activated means that the measured values * are subtracted. Otherwise the fixed subtraction * values will be subtracted. * @en_windows: enabled window * @bls_window1: Measurement window 1 size * @bls_window2: Measurement window 2 size * @bls_samples: Set amount of measured pixels for each Bayer position * (A, B,C and D) to 2^bls_samples. * @fixed_val: Fixed subtraction values */ struct rkisp1_cif_isp_bls_config { __u8 enable_auto; __u8 en_windows; struct rkisp1_cif_isp_window bls_window1; struct rkisp1_cif_isp_window bls_window2; __u8 bls_samples; struct rkisp1_cif_isp_bls_fixed_val fixed_val; }; /** * struct rkisp1_cif_isp_dpcc_methods_config - DPCC methods set configuration * * This structure stores the configuration of one set of methods for the DPCC * algorithm. Multiple methods can be selected in each set (independently for * the Green and Red/Blue components) through the @method field, the result is * the logical AND of all enabled methods. The remaining fields set thresholds * and factors for each method. * * @method: Method enable bits (RKISP1_CIF_ISP_DPCC_METHODS_SET_*) * @line_thresh: Line threshold (RKISP1_CIF_ISP_DPCC_LINE_THRESH_*) * @line_mad_fac: Line Mean Absolute Difference factor (RKISP1_CIF_ISP_DPCC_LINE_MAD_FAC_*) * @pg_fac: Peak gradient factor (RKISP1_CIF_ISP_DPCC_PG_FAC_*) * @rnd_thresh: Rank Neighbor Difference threshold (RKISP1_CIF_ISP_DPCC_RND_THRESH_*) * @rg_fac: Rank gradient factor (RKISP1_CIF_ISP_DPCC_RG_FAC_*) */ struct rkisp1_cif_isp_dpcc_methods_config { __u32 method; __u32 line_thresh; __u32 line_mad_fac; __u32 pg_fac; __u32 rnd_thresh; __u32 rg_fac; }; /** * struct rkisp1_cif_isp_dpcc_config - Configuration used by DPCC * * Configuration used by Defect Pixel Cluster Correction. Three sets of methods * can be configured and selected through the @set_use field. The result is the * logical OR of all enabled sets. * * @mode: DPCC mode (RKISP1_CIF_ISP_DPCC_MODE_*) * @output_mode: Interpolation output mode (RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_*) * @set_use: Methods sets selection (RKISP1_CIF_ISP_DPCC_SET_USE_*) * @methods: Methods sets configuration * @ro_limits: Rank order limits (RKISP1_CIF_ISP_DPCC_RO_LIMITS_*) * @rnd_offs: Differential rank offsets for rank neighbor difference (RKISP1_CIF_ISP_DPCC_RND_OFFS_*) */ struct rkisp1_cif_isp_dpcc_config { __u32 mode; __u32 output_mode; __u32 set_use; struct rkisp1_cif_isp_dpcc_methods_config methods[RKISP1_CIF_ISP_DPCC_METHODS_MAX]; __u32 ro_limits; __u32 rnd_offs; }; /** * struct rkisp1_cif_isp_gamma_corr_curve - gamma curve point definition y-axis (output). * * The reset values define a linear curve which has the same effect as bypass. Reset values are: * gamma_y[0] = 0x0000, gamma_y[1] = 0x0100, ... gamma_y[15] = 0x0f00, gamma_y[16] = 0xfff * * @gamma_y: the values for the y-axis of gamma curve points. Each value is 12 bit. */ struct rkisp1_cif_isp_gamma_corr_curve { __u16 gamma_y[RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE]; }; /** * struct rkisp1_cif_isp_gamma_curve_x_axis_pnts - De-Gamma Curve definition x increments * (sampling points). gamma_dx0 is for the lower samples (1-8), gamma_dx1 is for the * higher samples (9-16). The reset values for both fields is 0x44444444. This means * that each sample is 4 units away from the previous one on the x-axis. * * @gamma_dx0: gamma curve sample points definitions. Bits 0:2 for sample 1. Bit 3 unused. * Bits 4:6 for sample 2. bit 7 unused ... Bits 28:30 for sample 8. Bit 31 unused * @gamma_dx1: gamma curve sample points definitions. Bits 0:2 for sample 9. Bit 3 unused. * Bits 4:6 for sample 10. bit 7 unused ... Bits 28:30 for sample 16. Bit 31 unused */ struct rkisp1_cif_isp_gamma_curve_x_axis_pnts { __u32 gamma_dx0; __u32 gamma_dx1; }; /** * struct rkisp1_cif_isp_sdg_config - Configuration used by sensor degamma * * @curve_r: gamma curve point definition axis for red * @curve_g: gamma curve point definition axis for green * @curve_b: gamma curve point definition axis for blue * @xa_pnts: x axis increments */ struct rkisp1_cif_isp_sdg_config { struct rkisp1_cif_isp_gamma_corr_curve curve_r; struct rkisp1_cif_isp_gamma_corr_curve curve_g; struct rkisp1_cif_isp_gamma_corr_curve curve_b; struct rkisp1_cif_isp_gamma_curve_x_axis_pnts xa_pnts; }; /** * struct rkisp1_cif_isp_lsc_config - Configuration used by Lens shading correction * * @r_data_tbl: sample table red * @gr_data_tbl: sample table green (red) * @gb_data_tbl: sample table green (blue) * @b_data_tbl: sample table blue * @x_grad_tbl: gradient table x * @y_grad_tbl: gradient table y * @x_size_tbl: size table x * @y_size_tbl: size table y * @config_width: not used at the moment * @config_height: not used at the moment */ struct rkisp1_cif_isp_lsc_config { __u16 r_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; __u16 gr_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; __u16 gb_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; __u16 b_data_tbl[RKISP1_CIF_ISP_LSC_SAMPLES_MAX][RKISP1_CIF_ISP_LSC_SAMPLES_MAX]; __u16 x_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; __u16 y_grad_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; __u16 x_size_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; __u16 y_size_tbl[RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE]; __u16 config_width; __u16 config_height; }; /** * struct rkisp1_cif_isp_ie_config - Configuration used by image effects * * @effect: values from 'enum v4l2_colorfx'. Possible values are: V4L2_COLORFX_SEPIA, * V4L2_COLORFX_SET_CBCR, V4L2_COLORFX_AQUA, V4L2_COLORFX_EMBOSS, * V4L2_COLORFX_SKETCH, V4L2_COLORFX_BW, V4L2_COLORFX_NEGATIVE * @color_sel: bits 0:2 - colors bitmask (001 - blue, 010 - green, 100 - red). * bits 8:15 - Threshold value of the RGB colors for the color selection effect. * @eff_mat_1: 3x3 Matrix Coefficients for Emboss Effect 1 * @eff_mat_2: 3x3 Matrix Coefficients for Emboss Effect 2 * @eff_mat_3: 3x3 Matrix Coefficients for Emboss 3/Sketch 1 * @eff_mat_4: 3x3 Matrix Coefficients for Sketch Effect 2 * @eff_mat_5: 3x3 Matrix Coefficients for Sketch Effect 3 * @eff_tint: Chrominance increment values of tint (used for sepia effect) */ struct rkisp1_cif_isp_ie_config { __u16 effect; __u16 color_sel; __u16 eff_mat_1; __u16 eff_mat_2; __u16 eff_mat_3; __u16 eff_mat_4; __u16 eff_mat_5; __u16 eff_tint; }; /** * struct rkisp1_cif_isp_cproc_config - Configuration used by Color Processing * * @c_out_range: Chrominance pixel clipping range at output. * (0 for limit, 1 for full) * @y_in_range: Luminance pixel clipping range at output. * @y_out_range: Luminance pixel clipping range at output. * @contrast: 00~ff, 0.0~1.992 * @brightness: 80~7F, -128~+127 * @sat: saturation, 00~FF, 0.0~1.992 * @hue: 80~7F, -90~+87.188 */ struct rkisp1_cif_isp_cproc_config { __u8 c_out_range; __u8 y_in_range; __u8 y_out_range; __u8 contrast; __u8 brightness; __u8 sat; __u8 hue; }; /** * struct rkisp1_cif_isp_awb_meas_config - Configuration for the AWB statistics * * @awb_mode: the awb meas mode. From enum rkisp1_cif_isp_awb_mode_type. * @awb_wnd: white balance measurement window (in pixels) * @max_y: only pixels values < max_y contribute to awb measurement, set to 0 * to disable this feature * @min_y: only pixels values > min_y contribute to awb measurement * @max_csum: Chrominance sum maximum value, only consider pixels with Cb+Cr, * smaller than threshold for awb measurements * @min_c: Chrominance minimum value, only consider pixels with Cb/Cr * each greater than threshold value for awb measurements * @frames: number of frames - 1 used for mean value calculation * (ucFrames=0 means 1 Frame) * @awb_ref_cr: reference Cr value for AWB regulation, target for AWB * @awb_ref_cb: reference Cb value for AWB regulation, target for AWB * @enable_ymax_cmp: enable Y_MAX compare (Not valid in RGB measurement mode.) */ struct rkisp1_cif_isp_awb_meas_config { /* * Note: currently the h and v offsets are mapped to grid offsets */ struct rkisp1_cif_isp_window awb_wnd; __u32 awb_mode; __u8 max_y; __u8 min_y; __u8 max_csum; __u8 min_c; __u8 frames; __u8 awb_ref_cr; __u8 awb_ref_cb; __u8 enable_ymax_cmp; }; /** * struct rkisp1_cif_isp_awb_gain_config - Configuration used by auto white balance gain * * All fields in this struct are 10 bit, where: * 0x100h = 1, unsigned integer value, range 0 to 4 with 8 bit fractional part. * * out_data_x = ( AWB_GAIN_X * in_data + 128) >> 8 * * @gain_red: gain value for red component. * @gain_green_r: gain value for green component in red line. * @gain_blue: gain value for blue component. * @gain_green_b: gain value for green component in blue line. */ struct rkisp1_cif_isp_awb_gain_config { __u16 gain_red; __u16 gain_green_r; __u16 gain_blue; __u16 gain_green_b; }; /** * struct rkisp1_cif_isp_flt_config - Configuration used by ISP filtering * * All 4 threshold fields (thresh_*) are 10 bits. * All 6 factor fields (fac_*) are 6 bits. * * @mode: ISP_FILT_MODE register fields (from enum rkisp1_cif_isp_flt_mode) * @grn_stage1: Green filter stage 1 select (range 0x0...0x8) * @chr_h_mode: Chroma filter horizontal mode * @chr_v_mode: Chroma filter vertical mode * @thresh_bl0: If thresh_bl1 < sum_grad < thresh_bl0 then fac_bl0 is selected (blurring th) * @thresh_bl1: If sum_grad < thresh_bl1 then fac_bl1 is selected (blurring th) * @thresh_sh0: If thresh_sh0 < sum_grad < thresh_sh1 then thresh_sh0 is selected (sharpening th) * @thresh_sh1: If thresh_sh1 < sum_grad then thresh_sh1 is selected (sharpening th) * @lum_weight: Parameters for luminance weight function. * @fac_sh1: filter factor for sharp1 level * @fac_sh0: filter factor for sharp0 level * @fac_mid: filter factor for mid level and for static filter mode * @fac_bl0: filter factor for blur 0 level * @fac_bl1: filter factor for blur 1 level (max blur) */ struct rkisp1_cif_isp_flt_config { __u32 mode; __u8 grn_stage1; __u8 chr_h_mode; __u8 chr_v_mode; __u32 thresh_bl0; __u32 thresh_bl1; __u32 thresh_sh0; __u32 thresh_sh1; __u32 lum_weight; __u32 fac_sh1; __u32 fac_sh0; __u32 fac_mid; __u32 fac_bl0; __u32 fac_bl1; }; /** * struct rkisp1_cif_isp_bdm_config - Configuration used by Bayer DeMosaic * * @demosaic_th: threshold for bayer demosaicing texture detection */ struct rkisp1_cif_isp_bdm_config { __u8 demosaic_th; }; /** * struct rkisp1_cif_isp_ctk_config - Configuration used by Cross Talk correction * * @coeff: color correction matrix. Values are 11-bit signed fixed-point numbers with 4 bit integer * and 7 bit fractional part, ranging from -8 (0x400) to +7.992 (0x3FF). 0 is * represented by 0x000 and a coefficient value of 1 as 0x080. * @ct_offset: Red, Green, Blue offsets for the crosstalk correction matrix */ struct rkisp1_cif_isp_ctk_config { __u16 coeff[3][3]; __u16 ct_offset[3]; }; enum rkisp1_cif_isp_goc_mode { RKISP1_CIF_ISP_GOC_MODE_LOGARITHMIC, RKISP1_CIF_ISP_GOC_MODE_EQUIDISTANT }; /** * struct rkisp1_cif_isp_goc_config - Configuration used by Gamma Out correction * * @mode: goc mode (from enum rkisp1_cif_isp_goc_mode) * @gamma_y: gamma out curve y-axis for all color components * * The number of entries of @gamma_y depends on the hardware revision * as is reported by the hw_revision field of the struct media_device_info * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. * * V10 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 entries, V12 has * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 entries. * RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum of the two. */ struct rkisp1_cif_isp_goc_config { __u32 mode; __u16 gamma_y[RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES]; }; /** * struct rkisp1_cif_isp_hst_config - Configuration for Histogram statistics * * @mode: histogram mode (from enum rkisp1_cif_isp_histogram_mode) * @histogram_predivider: process every stepsize pixel, all other pixels are * skipped * @meas_window: coordinates of the measure window * @hist_weight: weighting factor for sub-windows * * The number of entries of @hist_weight depends on the hardware revision * as is reported by the hw_revision field of the struct media_device_info * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. * * V10 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 entries, V12 has * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 entries. * RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum of the * two. */ struct rkisp1_cif_isp_hst_config { __u32 mode; __u8 histogram_predivider; struct rkisp1_cif_isp_window meas_window; __u8 hist_weight[RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE]; }; /** * struct rkisp1_cif_isp_aec_config - Configuration for Auto Exposure statistics * * @mode: Exposure measure mode (from enum rkisp1_cif_isp_exp_meas_mode) * @autostop: stop mode (from enum rkisp1_cif_isp_exp_ctrl_autostop) * @meas_window: coordinates of the measure window */ struct rkisp1_cif_isp_aec_config { __u32 mode; __u32 autostop; struct rkisp1_cif_isp_window meas_window; }; /** * struct rkisp1_cif_isp_afc_config - Configuration for the Auto Focus statistics * * @num_afm_win: max RKISP1_CIF_ISP_AFM_MAX_WINDOWS * @afm_win: coordinates of the meas window * @thres: threshold used for minimizing the influence of noise * @var_shift: the number of bits for the shift operation at the end of the * calculation chain. */ struct rkisp1_cif_isp_afc_config { __u8 num_afm_win; struct rkisp1_cif_isp_window afm_win[RKISP1_CIF_ISP_AFM_MAX_WINDOWS]; __u32 thres; __u32 var_shift; }; /** * enum rkisp1_cif_isp_dpf_gain_usage - dpf gain usage * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED: don't use any gains in preprocessing stage * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_GAINS: use only the noise function gains from * registers DPF_NF_GAIN_R, ... * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINS: use only the gains from LSC module * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_LSC_GAINS: use the noise function gains and the * gains from LSC module * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_GAINS: use only the gains from AWB module * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_LSC_GAINS: use the gains from AWB and LSC module * @RKISP1_CIF_ISP_DPF_GAIN_USAGE_MAX: upper border (only for an internal evaluation) */ enum rkisp1_cif_isp_dpf_gain_usage { RKISP1_CIF_ISP_DPF_GAIN_USAGE_DISABLED, RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_GAINS, RKISP1_CIF_ISP_DPF_GAIN_USAGE_LSC_GAINS, RKISP1_CIF_ISP_DPF_GAIN_USAGE_NF_LSC_GAINS, RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_GAINS, RKISP1_CIF_ISP_DPF_GAIN_USAGE_AWB_LSC_GAINS, RKISP1_CIF_ISP_DPF_GAIN_USAGE_MAX }; /** * enum rkisp1_cif_isp_dpf_rb_filtersize - Red and blue filter sizes * @RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9: red and blue filter kernel size 13x9 * (means 7x5 active pixel) * @RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9: red and blue filter kernel size 9x9 * (means 5x5 active pixel) */ enum rkisp1_cif_isp_dpf_rb_filtersize { RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9, RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9, }; /** * enum rkisp1_cif_isp_dpf_nll_scale_mode - dpf noise level scale mode * @RKISP1_CIF_ISP_NLL_SCALE_LINEAR: use a linear scaling * @RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC: use a logarithmic scaling */ enum rkisp1_cif_isp_dpf_nll_scale_mode { RKISP1_CIF_ISP_NLL_SCALE_LINEAR, RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC, }; /** * struct rkisp1_cif_isp_dpf_nll - Noise level lookup * * @coeff: Noise level Lookup coefficient * @scale_mode: dpf noise level scale mode (from enum rkisp1_cif_isp_dpf_nll_scale_mode) */ struct rkisp1_cif_isp_dpf_nll { __u16 coeff[RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS]; __u32 scale_mode; }; /** * struct rkisp1_cif_isp_dpf_rb_flt - Red blue filter config * * @fltsize: The filter size for the red and blue pixels * (from enum rkisp1_cif_isp_dpf_rb_filtersize) * @spatial_coeff: Spatial weights * @r_enable: enable filter processing for red pixels * @b_enable: enable filter processing for blue pixels */ struct rkisp1_cif_isp_dpf_rb_flt { __u32 fltsize; __u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS]; __u8 r_enable; __u8 b_enable; }; /** * struct rkisp1_cif_isp_dpf_g_flt - Green filter Configuration * * @spatial_coeff: Spatial weights * @gr_enable: enable filter processing for green pixels in green/red lines * @gb_enable: enable filter processing for green pixels in green/blue lines */ struct rkisp1_cif_isp_dpf_g_flt { __u8 spatial_coeff[RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS]; __u8 gr_enable; __u8 gb_enable; }; /** * struct rkisp1_cif_isp_dpf_gain - Noise function Configuration * * @mode: dpf gain usage (from enum rkisp1_cif_isp_dpf_gain_usage) * @nf_r_gain: Noise function Gain that replaces the AWB gain for red pixels * @nf_b_gain: Noise function Gain that replaces the AWB gain for blue pixels * @nf_gr_gain: Noise function Gain that replaces the AWB gain * for green pixels in a red line * @nf_gb_gain: Noise function Gain that replaces the AWB gain * for green pixels in a blue line */ struct rkisp1_cif_isp_dpf_gain { __u32 mode; __u16 nf_r_gain; __u16 nf_b_gain; __u16 nf_gr_gain; __u16 nf_gb_gain; }; /** * struct rkisp1_cif_isp_dpf_config - Configuration used by De-noising pre-filter * * @gain: noise function gain * @g_flt: green filter config * @rb_flt: red blue filter config * @nll: noise level lookup */ struct rkisp1_cif_isp_dpf_config { struct rkisp1_cif_isp_dpf_gain gain; struct rkisp1_cif_isp_dpf_g_flt g_flt; struct rkisp1_cif_isp_dpf_rb_flt rb_flt; struct rkisp1_cif_isp_dpf_nll nll; }; /** * struct rkisp1_cif_isp_dpf_strength_config - strength of the filter * * @r: filter strength of the RED filter * @g: filter strength of the GREEN filter * @b: filter strength of the BLUE filter */ struct rkisp1_cif_isp_dpf_strength_config { __u8 r; __u8 g; __u8 b; }; /** * struct rkisp1_cif_isp_isp_other_cfg - Parameters for some blocks in rockchip isp1 * * @dpcc_config: Defect Pixel Cluster Correction config * @bls_config: Black Level Subtraction config * @sdg_config: sensor degamma config * @lsc_config: Lens Shade config * @awb_gain_config: Auto White balance gain config * @flt_config: filter config * @bdm_config: demosaic config * @ctk_config: cross talk config * @goc_config: gamma out config * @bls_config: black level subtraction config * @dpf_config: De-noising pre-filter config * @dpf_strength_config: dpf strength config * @cproc_config: color process config * @ie_config: image effects config */ struct rkisp1_cif_isp_isp_other_cfg { struct rkisp1_cif_isp_dpcc_config dpcc_config; struct rkisp1_cif_isp_bls_config bls_config; struct rkisp1_cif_isp_sdg_config sdg_config; struct rkisp1_cif_isp_lsc_config lsc_config; struct rkisp1_cif_isp_awb_gain_config awb_gain_config; struct rkisp1_cif_isp_flt_config flt_config; struct rkisp1_cif_isp_bdm_config bdm_config; struct rkisp1_cif_isp_ctk_config ctk_config; struct rkisp1_cif_isp_goc_config goc_config; struct rkisp1_cif_isp_dpf_config dpf_config; struct rkisp1_cif_isp_dpf_strength_config dpf_strength_config; struct rkisp1_cif_isp_cproc_config cproc_config; struct rkisp1_cif_isp_ie_config ie_config; }; /** * struct rkisp1_cif_isp_isp_meas_cfg - Rockchip ISP1 Measure Parameters * * @awb_meas_config: auto white balance config * @hst_config: histogram config * @aec_config: auto exposure config * @afc_config: auto focus config */ struct rkisp1_cif_isp_isp_meas_cfg { struct rkisp1_cif_isp_awb_meas_config awb_meas_config; struct rkisp1_cif_isp_hst_config hst_config; struct rkisp1_cif_isp_aec_config aec_config; struct rkisp1_cif_isp_afc_config afc_config; }; /** * struct rkisp1_params_cfg - Rockchip ISP1 Input Parameters Meta Data * * @module_en_update: mask the enable bits of which module should be updated * @module_ens: mask the enable value of each module, only update the module * which correspond bit was set in module_en_update * @module_cfg_update: mask the config bits of which module should be updated * @meas: measurement config * @others: other config */ struct rkisp1_params_cfg { __u32 module_en_update; __u32 module_ens; __u32 module_cfg_update; struct rkisp1_cif_isp_isp_meas_cfg meas; struct rkisp1_cif_isp_isp_other_cfg others; }; /** * struct rkisp1_cif_isp_compand_bls_config - Rockchip ISP1 Companding parameters (BLS) * @r: Fixed subtraction value for Bayer pattern R * @gr: Fixed subtraction value for Bayer pattern Gr * @gb: Fixed subtraction value for Bayer pattern Gb * @b: Fixed subtraction value for Bayer pattern B * * The values will be subtracted from the sensor values. Note that unlike the * dedicated BLS block, the BLS values in the compander are 20-bit unsigned. */ struct rkisp1_cif_isp_compand_bls_config { __u32 r; __u32 gr; __u32 gb; __u32 b; }; /** * struct rkisp1_cif_isp_compand_curve_config - Rockchip ISP1 Companding * parameters (expand and compression curves) * @px: Compand curve x-values. Each value stores the distance from the * previous x-value, expressed as log2 of the distance on 5 bits. * @x: Compand curve x-values. The functionality of these parameters are * unknown due to do a lack of hardware documentation, but these are left * here for future compatibility purposes. * @y: Compand curve y-values */ struct rkisp1_cif_isp_compand_curve_config { __u8 px[RKISP1_CIF_ISP_COMPAND_NUM_POINTS]; __u32 x[RKISP1_CIF_ISP_COMPAND_NUM_POINTS]; __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS]; }; /*---------- PART2: Measurement Statistics ------------*/ /** * struct rkisp1_cif_isp_awb_meas - AWB measured values * * @cnt: White pixel count, number of "white pixels" found during last * measurement * @mean_y_or_g: Mean value of Y within window and frames, * Green if RGB is selected. * @mean_cb_or_b: Mean value of Cb within window and frames, * Blue if RGB is selected. * @mean_cr_or_r: Mean value of Cr within window and frames, * Red if RGB is selected. */ struct rkisp1_cif_isp_awb_meas { __u32 cnt; __u8 mean_y_or_g; __u8 mean_cb_or_b; __u8 mean_cr_or_r; }; /** * struct rkisp1_cif_isp_awb_stat - statistics automatic white balance data * * @awb_mean: Mean measured data */ struct rkisp1_cif_isp_awb_stat { struct rkisp1_cif_isp_awb_meas awb_mean[RKISP1_CIF_ISP_AWB_MAX_GRID]; }; /** * struct rkisp1_cif_isp_bls_meas_val - BLS measured values * * @meas_r: Mean measured value for Bayer pattern R * @meas_gr: Mean measured value for Bayer pattern Gr * @meas_gb: Mean measured value for Bayer pattern Gb * @meas_b: Mean measured value for Bayer pattern B */ struct rkisp1_cif_isp_bls_meas_val { __u16 meas_r; __u16 meas_gr; __u16 meas_gb; __u16 meas_b; }; /** * struct rkisp1_cif_isp_ae_stat - statistics auto exposure data * * @exp_mean: Mean luminance value of block xx * @bls_val: BLS measured values * * The number of entries of @exp_mean depends on the hardware revision * as is reported by the hw_revision field of the struct media_device_info * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. * * V10 has RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, V12 has * RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. RKISP1_CIF_ISP_AE_MEAN_MAX is equal * to the maximum of the two. * * Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12. */ struct rkisp1_cif_isp_ae_stat { __u8 exp_mean[RKISP1_CIF_ISP_AE_MEAN_MAX]; struct rkisp1_cif_isp_bls_meas_val bls_val; }; /** * struct rkisp1_cif_isp_af_meas_val - AF measured values * * @sum: sharpness value * @lum: luminance value */ struct rkisp1_cif_isp_af_meas_val { __u32 sum; __u32 lum; }; /** * struct rkisp1_cif_isp_af_stat - statistics auto focus data * * @window: AF measured value of window x * * The module measures the sharpness in 3 windows of selectable size via * register settings(ISP_AFM_*_A/B/C) */ struct rkisp1_cif_isp_af_stat { struct rkisp1_cif_isp_af_meas_val window[RKISP1_CIF_ISP_AFM_MAX_WINDOWS]; }; /** * struct rkisp1_cif_isp_hist_stat - statistics histogram data * * @hist_bins: measured bin counters. Each bin is a 20 bits unsigned fixed point * type. Bits 0-4 are the fractional part and bits 5-19 are the * integer part. * * The window of the measurements area is divided to 5x5 sub-windows for * V10 and to 9x9 sub-windows for V12. The histogram is then computed for each * sub-window independently and the final result is a weighted average of the * histogram measurements on all sub-windows. The window of the measurements * area and the weight of each sub-window are configurable using * struct @rkisp1_cif_isp_hst_config. * * The histogram contains 16 bins in V10 and 32 bins in V12. * * The number of entries of @hist_bins depends on the hardware revision * as is reported by the hw_revision field of the struct media_device_info * that is returned by ioctl MEDIA_IOC_DEVICE_INFO. * * V10 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, V12 has * RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. RKISP1_CIF_ISP_HIST_BIN_N_MAX is * equal to the maximum of the two. */ struct rkisp1_cif_isp_hist_stat { __u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX]; }; /** * struct rkisp1_cif_isp_stat - Rockchip ISP1 Statistics Data * * @awb: statistics data for automatic white balance * @ae: statistics data for auto exposure * @af: statistics data for auto focus * @hist: statistics histogram data */ struct rkisp1_cif_isp_stat { struct rkisp1_cif_isp_awb_stat awb; struct rkisp1_cif_isp_ae_stat ae; struct rkisp1_cif_isp_af_stat af; struct rkisp1_cif_isp_hist_stat hist; }; /** * struct rkisp1_stat_buffer - Rockchip ISP1 Statistics Meta Data * * @meas_type: measurement types (RKISP1_CIF_ISP_STAT_* definitions) * @frame_id: frame ID for sync * @params: statistics data */ struct rkisp1_stat_buffer { __u32 meas_type; __u32 frame_id; struct rkisp1_cif_isp_stat params; }; /*---------- PART3: Extensible Configuration Parameters ------------*/ /** * enum rkisp1_ext_params_block_type - RkISP1 extensible params block type * * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS: Black level subtraction * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC: Defect pixel cluster correction * @RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG: Sensor de-gamma * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN: Auto white balance gains * @RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT: ISP filtering * @RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM: Bayer de-mosaic * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK: Cross-talk correction * @RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC: Gamma out correction * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF: De-noise pre-filter * @RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH: De-noise pre-filter strength * @RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC: Color processing * @RKISP1_EXT_PARAMS_BLOCK_TYPE_IE: Image effects * @RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC: Lens shading correction * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS: Auto white balance statistics * @RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS: Histogram statistics * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS: Auto exposure statistics * @RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS: Auto-focus statistics * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve */ enum rkisp1_ext_params_block_type { RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS, RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC, RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG, RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN, RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT, RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM, RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK, RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC, RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF, RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH, RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC, RKISP1_EXT_PARAMS_BLOCK_TYPE_IE, RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC, RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS, RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS, RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS, RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS, RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS, RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND, RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS, }; #define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0) #define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1) /** * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block * header * * This structure represents the common part of all the ISP configuration * blocks. Each parameters block shall embed an instance of this structure type * as its first member, followed by the block-specific configuration data. The * driver inspects this common header to discern the block type and its size and * properly handle the block content by casting it to the correct block-specific * type. * * The @type field is one of the values enumerated by * :c:type:`rkisp1_ext_params_block_type` and specifies how the data should be * interpreted by the driver. The @size field specifies the size of the * parameters block and is used by the driver for validation purposes. * * The @flags field is a bitmask of per-block flags RKISP1_EXT_PARAMS_FL_*. * * When userspace wants to configure and enable an ISP block it shall fully * populate the block configuration and set the * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE bit in the @flags field. * * When userspace simply wants to disable an ISP block the * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bit should be set in @flags field. The * driver ignores the rest of the block configuration structure in this case. * * If a new configuration of an ISP block has to be applied userspace shall * fully populate the ISP block configuration and omit setting the * RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits * in the @flags field. * * Setting both the RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE and * RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE bits in the @flags field is not allowed * and not accepted by the driver. * * Userspace is responsible for correctly populating the parameters block header * fields (@type, @flags and @size) and the block-specific parameters. * * For example: * * .. code-block:: c * * void populate_bls(struct rkisp1_ext_params_block_header *block) { * struct rkisp1_ext_params_bls_config *bls = * (struct rkisp1_ext_params_bls_config *)block; * * bls->header.type = RKISP1_EXT_PARAMS_BLOCK_ID_BLS; * bls->header.flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; * bls->header.size = sizeof(*bls); * * bls->config.enable_auto = 0; * bls->config.fixed_val.r = blackLevelRed_; * bls->config.fixed_val.gr = blackLevelGreenR_; * bls->config.fixed_val.gb = blackLevelGreenB_; * bls->config.fixed_val.b = blackLevelBlue_; * } * * @type: The parameters block type, see * :c:type:`rkisp1_ext_params_block_type` * @flags: A bitmask of block flags * @size: Size (in bytes) of the parameters block, including this header */ struct rkisp1_ext_params_block_header { __u16 type; __u16 flags; __u32 size; }; /** * struct rkisp1_ext_params_bls_config - RkISP1 extensible params BLS config * * RkISP1 extensible parameters Black Level Subtraction configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Black Level Subtraction configuration, see * :c:type:`rkisp1_cif_isp_bls_config` */ struct rkisp1_ext_params_bls_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_bls_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_dpcc_config - RkISP1 extensible params DPCC config * * RkISP1 extensible parameters Defective Pixel Cluster Correction configuration * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Defective Pixel Cluster Correction configuration, see * :c:type:`rkisp1_cif_isp_dpcc_config` */ struct rkisp1_ext_params_dpcc_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_dpcc_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_sdg_config - RkISP1 extensible params SDG config * * RkISP1 extensible parameters Sensor Degamma configuration block. Identified * by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_SDG`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Sensor Degamma configuration, see * :c:type:`rkisp1_cif_isp_sdg_config` */ struct rkisp1_ext_params_sdg_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_sdg_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_lsc_config - RkISP1 extensible params LSC config * * RkISP1 extensible parameters Lens Shading Correction configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_LSC`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Lens Shading Correction configuration, see * :c:type:`rkisp1_cif_isp_lsc_config` */ struct rkisp1_ext_params_lsc_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_lsc_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_awb_gain_config - RkISP1 extensible params AWB * gain config * * RkISP1 extensible parameters Auto-White Balance Gains configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_GAIN`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Auto-White Balance Gains configuration, see * :c:type:`rkisp1_cif_isp_awb_gain_config` */ struct rkisp1_ext_params_awb_gain_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_awb_gain_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_flt_config - RkISP1 extensible params FLT config * * RkISP1 extensible parameters Filter configuration block. Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_FLT`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Filter configuration, see :c:type:`rkisp1_cif_isp_flt_config` */ struct rkisp1_ext_params_flt_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_flt_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_bdm_config - RkISP1 extensible params BDM config * * RkISP1 extensible parameters Demosaicing configuration block. Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_BDM`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Demosaicing configuration, see :c:type:`rkisp1_cif_isp_bdm_config` */ struct rkisp1_ext_params_bdm_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_bdm_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_ctk_config - RkISP1 extensible params CTK config * * RkISP1 extensible parameters Cross-Talk configuration block. Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CTK`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Cross-Talk configuration, see :c:type:`rkisp1_cif_isp_ctk_config` */ struct rkisp1_ext_params_ctk_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_ctk_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_goc_config - RkISP1 extensible params GOC config * * RkISP1 extensible parameters Gamma-Out configuration block. Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_GOC`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Gamma-Out configuration, see :c:type:`rkisp1_cif_isp_goc_config` */ struct rkisp1_ext_params_goc_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_goc_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_dpf_config - RkISP1 extensible params DPF config * * RkISP1 extensible parameters De-noise Pre-Filter configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: De-noise Pre-Filter configuration, see * :c:type:`rkisp1_cif_isp_dpf_config` */ struct rkisp1_ext_params_dpf_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_dpf_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_dpf_strength_config - RkISP1 extensible params DPF * strength config * * RkISP1 extensible parameters De-noise Pre-Filter strength configuration * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_DPF_STRENGTH`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: De-noise Pre-Filter strength configuration, see * :c:type:`rkisp1_cif_isp_dpf_strength_config` */ struct rkisp1_ext_params_dpf_strength_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_dpf_strength_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_cproc_config - RkISP1 extensible params CPROC config * * RkISP1 extensible parameters Color Processing configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_CPROC`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Color processing configuration, see * :c:type:`rkisp1_cif_isp_cproc_config` */ struct rkisp1_ext_params_cproc_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_cproc_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_ie_config - RkISP1 extensible params IE config * * RkISP1 extensible parameters Image Effect configuration block. Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_IE`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Image Effect configuration, see :c:type:`rkisp1_cif_isp_ie_config` */ struct rkisp1_ext_params_ie_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_ie_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_awb_meas_config - RkISP1 extensible params AWB * Meas config * * RkISP1 extensible parameters Auto-White Balance Measurement configuration * block. Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AWB_MEAS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Auto-White Balance measure configuration, see * :c:type:`rkisp1_cif_isp_awb_meas_config` */ struct rkisp1_ext_params_awb_meas_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_awb_meas_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_hst_config - RkISP1 extensible params Histogram config * * RkISP1 extensible parameters Histogram statistics configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_HST_MEAS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Histogram statistics configuration, see * :c:type:`rkisp1_cif_isp_hst_config` */ struct rkisp1_ext_params_hst_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_hst_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_aec_config - RkISP1 extensible params AEC config * * RkISP1 extensible parameters Auto-Exposure statistics configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AEC_MEAS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Auto-Exposure statistics configuration, see * :c:type:`rkisp1_cif_isp_aec_config` */ struct rkisp1_ext_params_aec_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_aec_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_afc_config - RkISP1 extensible params AFC config * * RkISP1 extensible parameters Auto-Focus statistics configuration block. * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_AFC_MEAS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Auto-Focus statistics configuration, see * :c:type:`rkisp1_cif_isp_afc_config` */ struct rkisp1_ext_params_afc_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_afc_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_compand_bls_config - RkISP1 extensible params * Compand BLS config * * RkISP1 extensible parameters Companding configuration block (black level * subtraction). Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Companding BLS configuration, see * :c:type:`rkisp1_cif_isp_compand_bls_config` */ struct rkisp1_ext_params_compand_bls_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_compand_bls_config config; } __attribute__((aligned(8))); /** * struct rkisp1_ext_params_compand_curve_config - RkISP1 extensible params * Compand curve config * * RkISP1 extensible parameters Companding configuration block (expand and * compression curves). Identified by * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND` or * :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS`. * * @header: The RkISP1 extensible parameters header, see * :c:type:`rkisp1_ext_params_block_header` * @config: Companding curve configuration, see * :c:type:`rkisp1_cif_isp_compand_curve_config` */ struct rkisp1_ext_params_compand_curve_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_compand_curve_config config; } __attribute__((aligned(8))); /* * The rkisp1_ext_params_compand_curve_config structure is counted twice as it * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types. */ #define RKISP1_EXT_PARAMS_MAX_SIZE \ (sizeof(struct rkisp1_ext_params_bls_config) +\ sizeof(struct rkisp1_ext_params_dpcc_config) +\ sizeof(struct rkisp1_ext_params_sdg_config) +\ sizeof(struct rkisp1_ext_params_lsc_config) +\ sizeof(struct rkisp1_ext_params_awb_gain_config) +\ sizeof(struct rkisp1_ext_params_flt_config) +\ sizeof(struct rkisp1_ext_params_bdm_config) +\ sizeof(struct rkisp1_ext_params_ctk_config) +\ sizeof(struct rkisp1_ext_params_goc_config) +\ sizeof(struct rkisp1_ext_params_dpf_config) +\ sizeof(struct rkisp1_ext_params_dpf_strength_config) +\ sizeof(struct rkisp1_ext_params_cproc_config) +\ sizeof(struct rkisp1_ext_params_ie_config) +\ sizeof(struct rkisp1_ext_params_awb_meas_config) +\ sizeof(struct rkisp1_ext_params_hst_config) +\ sizeof(struct rkisp1_ext_params_aec_config) +\ sizeof(struct rkisp1_ext_params_afc_config) +\ sizeof(struct rkisp1_ext_params_compand_bls_config) +\ sizeof(struct rkisp1_ext_params_compand_curve_config) +\ sizeof(struct rkisp1_ext_params_compand_curve_config)) /** * enum rkisp1_ext_param_buffer_version - RkISP1 extensible parameters version * * @RKISP1_EXT_PARAM_BUFFER_V1: First version of RkISP1 extensible parameters */ enum rkisp1_ext_param_buffer_version { RKISP1_EXT_PARAM_BUFFER_V1 = 1, }; /** * struct rkisp1_ext_params_cfg - RkISP1 extensible parameters configuration * * This struct contains the configuration parameters of the RkISP1 ISP * algorithms, serialized by userspace into a data buffer. Each configuration * parameter block is represented by a block-specific structure which contains a * :c:type:`rkisp1_ext_params_block_header` entry as first member. Userspace * populates the @data buffer with configuration parameters for the blocks that * it intends to configure. As a consequence, the data buffer effective size * changes according to the number of ISP blocks that userspace intends to * configure and is set by userspace in the @data_size field. * * The parameters buffer is versioned by the @version field to allow modifying * and extending its definition. Userspace shall populate the @version field to * inform the driver about the version it intends to use. The driver will parse * and handle the @data buffer according to the data layout specific to the * indicated version and return an error if the desired version is not * supported. * * Currently the single RKISP1_EXT_PARAM_BUFFER_V1 version is supported. * When a new format version will be added, a mechanism for userspace to query * the supported format versions will be implemented in the form of a read-only * V4L2 control. If such control is not available, userspace should assume only * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver. * * For each ISP block that userspace wants to configure, a block-specific * structure is appended to the @data buffer, one after the other without gaps * in between nor overlaps. Userspace shall populate the @data_size field with * the effective size, in bytes, of the @data buffer. * * The expected memory layout of the parameters buffer is:: * * +-------------------- struct rkisp1_ext_params_cfg -------------------+ * | version = RKISP1_EXT_PARAM_BUFFER_V1; | * | data_size = sizeof(struct rkisp1_ext_params_bls_config) | * | + sizeof(struct rkisp1_ext_params_dpcc_config); | * | +------------------------- data ---------------------------------+ | * | | +------------- struct rkisp1_ext_params_bls_config -----------+ | | * | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | | * | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS; | | | | * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | | * | | | | size = sizeof(struct rkisp1_ext_params_bls_config); | | | | * | | | +---------------------------------------------------------+ | | | * | | | +---------- struct rkisp1_cif_isp_bls_config -------------+ | | | * | | | | enable_auto = 0; | | | | * | | | | fixed_val.r = 256; | | | | * | | | | fixed_val.gr = 256; | | | | * | | | | fixed_val.gb = 256; | | | | * | | | | fixed_val.b = 256; | | | | * | | | +---------------------------------------------------------+ | | | * | | +------------ struct rkisp1_ext_params_dpcc_config -----------+ | | * | | | +-------- struct rkisp1_ext_params_block_header ---------+ | | | * | | | | type = RKISP1_EXT_PARAMS_BLOCK_TYPE_DPCC; | | | | * | | | | flags = RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE; | | | | * | | | | size = sizeof(struct rkisp1_ext_params_dpcc_config); | | | | * | | | +---------------------------------------------------------+ | | | * | | | +---------- struct rkisp1_cif_isp_dpcc_config ------------+ | | | * | | | | mode = RKISP1_CIF_ISP_DPCC_MODE_STAGE1_ENABLE; | | | | * | | | | output_mode = | | | | * | | | | RKISP1_CIF_ISP_DPCC_OUTPUT_MODE_STAGE1_INCL_G_CENTER; | | | | * | | | | set_use = ... ; | | | | * | | | | ... = ... ; | | | | * | | | +---------------------------------------------------------+ | | | * | | +-------------------------------------------------------------+ | | * | +-----------------------------------------------------------------+ | * +---------------------------------------------------------------------+ * * @version: The RkISP1 extensible parameters buffer version, see * :c:type:`rkisp1_ext_param_buffer_version` * @data_size: The RkISP1 configuration data effective size, excluding this * header * @data: The RkISP1 extensible configuration data blocks */ struct rkisp1_ext_params_cfg { __u32 version; __u32 data_size; __u8 data[RKISP1_EXT_PARAMS_MAX_SIZE]; }; #endif /* _RKISP1_CONFIG_H */