Files
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

87 lines
2.5 KiB
C

/*
* Copyright (C) 2017 MediaTek Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See http://www.gnu.org/licenses/gpl-2.0.html for more details.
*/
#ifndef _KD_SENINF_N3D_H_
#define _KD_SENINF_N3D_H_
struct sensor_info {
unsigned int sensor_id;
unsigned int sensor_idx;
unsigned int cammux_id;
unsigned int fl_active_delay;
unsigned int def_fl_lc; // default framelength_lc
unsigned int max_fl_lc; // for framelength boundary check
unsigned int def_shutter_lc; // default shutter_lc
};
struct n3d_perframe {
unsigned int sensor_id;
unsigned int sensor_idx;
/* bellow items can be query from "subdrv_ctx" */
unsigned int min_fl_lc; // also means max frame rate
unsigned int shutter_lc;
unsigned int margin_lc;
unsigned int flicker_en;
unsigned int out_fl_lc;
/* for on-the-fly mode change */
unsigned int pclk; // write_shutter(), set_max_framerate()
unsigned int linelength; // write_shutter(), set_max_framerate()
/* lineTimeInNs ~= 10^9 * (linelength/pclk) */
unsigned int lineTimeInNs;
};
struct KD_REGISTER_SENSOR {
struct sensor_info sensor;
};
struct KD_N3D_AE_INFO {
struct n3d_perframe ae_info;
};
struct KD_N3D_PERFRAME {
struct n3d_perframe per1;
struct n3d_perframe per2;
};
#define SENINF_N3D_MAGIC 'i'
/* IOCTRL(inode * ,file * ,cmd ,arg ) */
/* S means "set through a ptr" */
/* T means "tell by a arg value" */
/* G means "get by a ptr" */
/* Q means "get by return a value" */
/* X means "switch G and S atomically" */
/* H means "switch T and Q atomically" */
#define KDSENINFN3DIOC_X_REGISTER_SENSOR \
_IOWR(SENINF_N3D_MAGIC, 0, struct KD_REGISTER_SENSOR)
#define KDSENINFN3DIOC_X_UNREGISTER_SENSOR \
_IOWR(SENINF_N3D_MAGIC, 5, struct KD_REGISTER_SENSOR)
#define KDSENINFN3DIOC_X_START_SYNC \
_IO(SENINF_N3D_MAGIC, 10)
#define KDSENINFN3DIOC_X_STOP_SYNC \
_IO(SENINF_N3D_MAGIC, 15)
#define KDSENINFN3DIOC_X_UPDATE_AE_INFO \
_IOWR(SENINF_N3D_MAGIC, 20, struct KD_N3D_AE_INFO)
#define KDSENINFN3DIOC_X_PERFRAME_CTRL \
_IOWR(SENINF_N3D_MAGIC, 25, struct KD_N3D_PERFRAME)
#endif