camerad: more ISP prep (#33752)
parent
8b5df1e9ee
commit
8cf1b79189
4 changed files with 84 additions and 4 deletions
@ -0,0 +1,66 @@ |
|||||||
|
// from drivers/media/platform/msm/camera/cam_cdm/cam_cdm_util.{c,h}
|
||||||
|
|
||||||
|
enum cam_cdm_command { |
||||||
|
CAM_CDM_CMD_UNUSED = 0x0, |
||||||
|
CAM_CDM_CMD_DMI = 0x1, |
||||||
|
CAM_CDM_CMD_NOT_DEFINED = 0x2, |
||||||
|
CAM_CDM_CMD_REG_CONT = 0x3, |
||||||
|
CAM_CDM_CMD_REG_RANDOM = 0x4, |
||||||
|
CAM_CDM_CMD_BUFF_INDIRECT = 0x5, |
||||||
|
CAM_CDM_CMD_GEN_IRQ = 0x6, |
||||||
|
CAM_CDM_CMD_WAIT_EVENT = 0x7, |
||||||
|
CAM_CDM_CMD_CHANGE_BASE = 0x8, |
||||||
|
CAM_CDM_CMD_PERF_CTRL = 0x9, |
||||||
|
CAM_CDM_CMD_DMI_32 = 0xa, |
||||||
|
CAM_CDM_CMD_DMI_64 = 0xb, |
||||||
|
CAM_CDM_CMD_PRIVATE_BASE = 0xc, |
||||||
|
CAM_CDM_CMD_SWD_DMI_32 = (CAM_CDM_CMD_PRIVATE_BASE + 0x64), |
||||||
|
CAM_CDM_CMD_SWD_DMI_64 = (CAM_CDM_CMD_PRIVATE_BASE + 0x65), |
||||||
|
CAM_CDM_CMD_PRIVATE_BASE_MAX = 0x7F |
||||||
|
}; |
||||||
|
|
||||||
|
/**
|
||||||
|
* struct cdm_regrandom_cmd - Definition for CDM random register command. |
||||||
|
* @count: Number of register writes |
||||||
|
* @reserved: reserved bits |
||||||
|
* @cmd: Command ID (CDMCmd) |
||||||
|
*/ |
||||||
|
struct cdm_regrandom_cmd { |
||||||
|
unsigned int count : 16; |
||||||
|
unsigned int reserved : 8; |
||||||
|
unsigned int cmd : 8; |
||||||
|
} __attribute__((__packed__)); |
||||||
|
|
||||||
|
/**
|
||||||
|
* struct cdm_regcontinuous_cmd - Definition for a CDM register range command. |
||||||
|
* @count: Number of register writes |
||||||
|
* @reserved0: reserved bits |
||||||
|
* @cmd: Command ID (CDMCmd) |
||||||
|
* @offset: Start address of the range of registers |
||||||
|
* @reserved1: reserved bits |
||||||
|
*/ |
||||||
|
struct cdm_regcontinuous_cmd { |
||||||
|
unsigned int count : 16; |
||||||
|
unsigned int reserved0 : 8; |
||||||
|
unsigned int cmd : 8; |
||||||
|
unsigned int offset : 24; |
||||||
|
unsigned int reserved1 : 8; |
||||||
|
} __attribute__((__packed__)); |
||||||
|
|
||||||
|
/**
|
||||||
|
* struct cdm_dmi_cmd - Definition for a CDM DMI command. |
||||||
|
* @length: Number of bytes in LUT - 1 |
||||||
|
* @reserved: reserved bits |
||||||
|
* @cmd: Command ID (CDMCmd) |
||||||
|
* @addr: Address of the LUT in memory |
||||||
|
* @DMIAddr: Address of the target DMI config register |
||||||
|
* @DMISel: DMI identifier |
||||||
|
*/ |
||||||
|
struct cdm_dmi_cmd { |
||||||
|
unsigned int length : 16; |
||||||
|
unsigned int reserved : 8; |
||||||
|
unsigned int cmd : 8; |
||||||
|
unsigned int addr; |
||||||
|
unsigned int DMIAddr : 24; |
||||||
|
unsigned int DMISel : 8; |
||||||
|
} __attribute__((__packed__)); |
@ -0,0 +1,15 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
set -e |
||||||
|
|
||||||
|
#echo 4294967295 | sudo tee /sys/module/cam_debug_util/parameters/debug_mdl |
||||||
|
|
||||||
|
# no CCI and UTIL, very spammy |
||||||
|
echo 0xfffdbfff | sudo tee /sys/module/cam_debug_util/parameters/debug_mdl |
||||||
|
|
||||||
|
sudo dmesg -C |
||||||
|
scons -u -j8 --minimal . |
||||||
|
export DEBUG_FRAMES=1 |
||||||
|
#export DISABLE_ROAD=1 DISABLE_WIDE_ROAD=1 |
||||||
|
export DISABLE_DRIVER=1 |
||||||
|
#export LOGPRINT=debug |
||||||
|
./camerad |
Loading…
Reference in new issue