Skip to content

Commit

Permalink
Merge pull request #80 from hao-yao/main
Browse files Browse the repository at this point in the history
MTL platform PV release on 2023-09-22
  • Loading branch information
hao-yao committed Sep 25, 2023
2 parents 93642d2 + 661e80b commit 9fa05a9
Show file tree
Hide file tree
Showing 20 changed files with 2,946 additions and 242 deletions.
60 changes: 0 additions & 60 deletions config/linux/ipu6ep/gcss/graph_descriptor.xml

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion config/linux/ipu6ep/psys_policy_profiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ limitations under the License.
</graph>
<graph id="100100">
<!-- op_modes: 0-disabled, 2-coupled. see ia_cipf_css.h in libiacss -->
<pipe_executor name="ipu6_full_video" pgs="isa_lb_video,post_gdc_video"/>
<pipe_executor name="ipu6_lb_video" pgs="isa_lb_video"/>
<pipe_executor name="ipu6_bb_video" pgs="post_gdc_video"/>
<bundle executors="ipu6_lb_video:0,ipu6_bb_video:1"/>
<enableBundleInSdv name="false"/>

<pipe_executor name="ipu6_full_still" pgs="isa_lb_stills,post_gdc_stills"/>
</graph>
<graph id="100111">
Expand Down
Binary file added config/linux/ipu6epmtl/OV02E10_ASG202N3_MTL.aiqb
Binary file not shown.
2,629 changes: 2,629 additions & 0 deletions config/linux/ipu6epmtl/gcss/graph_settings_OV02E10_ASG202N3_MTL.xml

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions config/linux/ipu6epmtl/libcamhal_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
<version value="1.0"/>
<platform value="IPU6"/>
<!-- The value format of availableSensors is "sensor name"-wf/uf-"CSI port ID". -->
<availableSensors value="ov13b10-uf-0,ov13b10-wf-4,ov5675-uf-4,ov01a1s-uf-0,ov01a10-uf-0,ov01a10-uf-4,ov02c10-uf-0,ov02c10-uf-4,
hm2170-uf-0,hm2170-uf-4,hm2172-uf-0,hi556-uf-0,
imx390,ar0234,external_source,ar0234_usb,lt6911uxc,lt6911uxe"/>
<availableSensors value="ov13b10-uf-0,ov13b10-wf-4,ov5675-uf-2,hm2172-uf-0,ov02e10-uf-0,imx390,ar0234,external_source,ar0234_usb,lt6911uxc,lt6911uxe"/>
</Common>
</CameraSettings>
8 changes: 0 additions & 8 deletions config/linux/ipu6epmtl/psys_policy_profiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,4 @@ limitations under the License.

<pipe_executor name="ipu6_full_still" pgs="isa_lb_stills,post_gdc_stills"/>
</graph>
<graph id="100204">
<!-- op_modes: 0-disabled, 2-coupled. see ia_cipf_css.h in libiacss -->
<pipe_executor name="ipu6_full_video" pgs="isa_lb_video_bayer,post_gdc_ir_video"/>
<pipe_executor name="ipu6_full_video1" pgs="isa_lb_rgbir_video_bayer"/>
<pipe_executor name="ipu6_full_video2" pgs="post_gdc_video_bayer"/>

<pipe_executor name="ipu6_full_still" pgs="isa_lb_ir_stills,post_gdc_stills"/>
</graph>
</PsysPolicyConfig>
86 changes: 86 additions & 0 deletions config/linux/ipu6epmtl/sensors/ov02e10-uf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (C) 2023 Intel Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<CameraSettings>
<Sensor name="ov02e10-uf" description="ov02e10 sensor.">
<MediaCtlConfig id="0" ConfigMode="AUTO" outputWidth="1928" outputHeight="1088" format="V4L2_PIX_FMT_SGRBG10"> <!-- RAW10 BE capture -->
<format name="ov02e10 $I2CBUS" pad="0" width="1928" height="1088" format="V4L2_MBUS_FMT_SGRBG10_1X10"/>
<format name="Intel IPU6 CSI-2 $CSI_PORT" pad="0" width="1928" height="1088" format="V4L2_MBUS_FMT_SGRBG10_1X10"/>
<format name="Intel IPU6 CSI2 BE SOC $CSI_PORT" pad="0" width="1928" height="1088" format="V4L2_MBUS_FMT_SGRBG10_1X10"/>

<link srcName="ov02e10 $I2CBUS" srcPad="0" sinkName="Intel IPU6 CSI-2 $CSI_PORT" sinkPad="0" enable="true"/>
<link srcName="Intel IPU6 CSI-2 $CSI_PORT" srcPad="1" sinkName="Intel IPU6 CSI2 BE SOC $CSI_PORT" sinkPad="0" enable="true"/>
<link srcName="Intel IPU6 CSI2 BE SOC $CSI_PORT" srcPad="1" sinkName="Intel IPU6 BE SOC capture $CSI_PORT" sinkPad="0" enable="true"/>

<videonode name="ov02e10 $I2CBUS" videoNodeType="VIDEO_PIXEL_ARRAY"/>
<videonode name="Intel IPU6 CSI-2 $CSI_PORT" videoNodeType="VIDEO_ISYS_RECEIVER"/>
<videonode name="Intel IPU6 BE SOC capture $CSI_PORT" videoNodeType="VIDEO_GENERIC"/>
</MediaCtlConfig>

<StaticMetadata>
<!-- format,widthxheight,field(none:0,alternate:7),mcId -->
<supportedStreamConfig value="V4L2_PIX_FMT_NV12,1280x720,0,0,
V4L2_PIX_FMT_NV12,1280x960,0,0,
V4L2_PIX_FMT_NV12,640x480,0,0,
V4L2_PIX_FMT_NV12,640x360,0,0,
V4L2_PIX_FMT_NV12,320x240,0,0,
V4L2_PIX_FMT_SGRBG10,1920x1080,0,0,
V4L2_PIX_FMT_NV12,1920x1080,0,0"/>

<supportedFeatures value="MANUAL_EXPOSURE,
MANUAL_WHITE_BALANCE,
IMAGE_ENHANCEMENT,
NOISE_REDUCTION,
PER_FRAME_CONTROL,
SCENE_MODE"/>
<fpsRange value="15,15,24,24,15,30,30,30"/>
<evRange value="-6,6"/>
<evStep value="1,3"/>
<supportedAeMode value="AUTO,MANUAL"/>
<supportedVideoStabilizationModes value="OFF"/>
<supportedSceneMode value="NORMAL"/>
<supportedAntibandingMode value="AUTO,50Hz,60Hz,OFF"/>
<supportedAwbMode value="AUTO,INCANDESCENT,FLUORESCENT,DAYLIGHT,FULL_OVERCAST,PARTLY_OVERCAST,SUNSET,VIDEO_CONFERENCE,MANUAL_CCT_RANGE,MANUAL_WHITE_POINT,MANUAL_GAIN,MANUAL_COLOR_TRANSFORM"/>
<supportedAfMode value="OFF"/>
</StaticMetadata>

<supportedTuningConfig value="NORMAL,VIDEO,OV02E10_ASG202N3_MTL,
STILL_CAPTURE,VIDEO,OV02E10_ASG202N3_MTL"/>

<!-- The lard tags configuration. Every tag should be 4-characters. -->
<!-- <TuningMode, cmc tag, aiq tag, isp tag, others tag> -->
<lardTags value="VIDEO,DFLT,DFLT,DFLT,DFLT"/>

<supportedISysSizes value="1928x1088"/> <!-- ascending order request -->
<supportedISysFormat value="V4L2_PIX_FMT_SGRBG10"/>
<enableAIQ value="true"/>
<iSysRawFormat value="V4L2_PIX_FMT_SGRBG10"/>
<pSysFormat value="V4L2_PIX_FMT_NV12"/>
<initialSkipFrame value="0"/>
<exposureLag value="2"/>
<gainLag value="2"/>
<digitalGainLag value="0"/>
<ltmGainLag value="1"/>
<yuvColorRangeMode value="full"/> <!-- there are 2 yuv color range mode, like full, reduced. -->
<graphSettingsFile value="graph_settings_OV02E10_ASG202N3_MTL.xml"/>
<graphSettingsType value="dispersed"/>
<enablePSysProcessor value="true"/>
<dvsType value="IMG_TRANS"/>
<enableAiqd value = "true"/>
<useCrlModule value = "false"/>
<maxRequestsInflight value="6"/>
</Sensor>
</CameraSettings>
1 change: 0 additions & 1 deletion include/linux/ipu-isys.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#define V4L2_CID_IPU_BASE (V4L2_CID_USER_BASE + 0x1080)
#define V4L2_CID_IPU_ISA_EN (V4L2_CID_IPU_BASE + 1)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define V4L2_CID_IPU_STORE_CSI2_HEADER (V4L2_CID_IPU_BASE + 2)
#define V4L2_CID_IPU_ISYS_COMPRESSION (V4L2_CID_IPU_BASE + 3)
#define V4L2_CID_IPU_QUERY_SUB_STREAM (V4L2_CID_IPU_BASE + 4)
#define V4L2_IPU_ISA_EN_BLC (1 << 0)
Expand Down
10 changes: 10 additions & 0 deletions src/3a/intel3a/Intel3AParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,16 @@ void Intel3AParameter::setManualIso(const aiq_parameter_t& param) {
return;
}

SensitivityRange range;
if (PlatformData::getSensitivityRangeByTuningMode(mCameraId, param.tuningMode, range) == OK) {
float ratio =
(manualIso - mSensitivityRange.min) / (mSensitivityRange.max - mSensitivityRange.min);
manualIso = range.min + ratio * (range.max - range.min);
manualIso = CLIP(manualIso, range.max, range.min);

LOG2("%s, param.manualIso %d, manualIso %d", __func__, param.manualIso, manualIso);
}

// Will overwrite manual_analog_gain
for (unsigned int i = 0; i < mAeParams.num_exposures; i++) {
mAeParams.manual_iso[i] = manualIso;
Expand Down
27 changes: 0 additions & 27 deletions src/core/DeviceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,6 @@ int MainDevice::createBufferPool(const stream_t& config) {
csiBEDeviceNodeName.c_str(), ret);
}

bool setWithHeaderCtl = true;
std::string subDeviceNodeName;

if (PlatformData::getDevNameByType(mCameraId, VIDEO_ISYS_RECEIVER, subDeviceNodeName) == OK) {
LOG1("%s: found ISYS receiver subdevice %s", __func__, subDeviceNodeName.c_str());
if (PlatformData::isTPGReceiver(mCameraId)) {
LOG1("%s: no need to set csi header ctrl for tpg", __func__);
setWithHeaderCtl = false;
}
} else {
setWithHeaderCtl = false;
}

int withHeader = 1;
struct v4l2_format v4l2fmt;
v4l2fmt.fmt.pix_mp.field = config.field;

Expand All @@ -330,13 +316,6 @@ int MainDevice::createBufferPool(const stream_t& config) {
v4l2fmt.fmt.pix_mp.plane_fmt[i].bytesperline = config.width;
v4l2fmt.fmt.pix_mp.plane_fmt[i].sizeimage = 0;
}
// The frame data is without header(MIPI STORE MODE) when
// format is YUV/RGB and frame output from CSI-Front-End entity.
if (!CameraUtils::isRaw(config.format)) {
LOG2("@%s, set frame without header for format: %s", __func__,
CameraUtils::pixelCode2String(config.format));
withHeader = 0;
}
} else {
v4l2fmt.fmt.pix.width = config.width;
v4l2fmt.fmt.pix.height = config.height;
Expand All @@ -345,12 +324,6 @@ int MainDevice::createBufferPool(const stream_t& config) {
v4l2fmt.fmt.pix.sizeimage = 0;
}

if (setWithHeaderCtl) {
V4L2Subdevice* receiverSubDev = V4l2DeviceFactory::getSubDev(mCameraId, subDeviceNodeName);
int ret = receiverSubDev->SetControl(V4L2_CID_IPU_STORE_CSI2_HEADER, withHeader);
CheckAndLogError(ret != OK, ret, "set v4l2 store csi2 header failed, ret=%d", ret);
}

v4l2fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
V4L2Format tmpbuf{v4l2fmt};
int ret = mDevice->SetFormat(tmpbuf);
Expand Down
16 changes: 10 additions & 6 deletions src/core/RequestThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ int RequestThread::processRequest(int bufferNum, camera_buffer_t** ubuffer,
mActive = true;
}

mRequestTriggerEvent |= NEW_REQUEST;
mRequestSignal.signal();
if (mRequestsInProcessing == 0) {
mRequestTriggerEvent |= NEW_REQUEST;
mRequestSignal.signal();
}
return OK;
}

Expand Down Expand Up @@ -244,7 +246,7 @@ void RequestThread::handleEvent(EventData eventData) {
mRequestsInProcessing--;
}
// Just in case too many requests are pending in mPendingRequests.
if (!mPendingRequests.empty()) {
if (!mPendingRequests.empty() && (mRequestsInProcessing == 0)) {
mRequestTriggerEvent |= NEW_FRAME;
mRequestSignal.signal();
}
Expand All @@ -261,8 +263,10 @@ void RequestThread::handleEvent(EventData eventData) {
case EVENT_ISYS_SOF: {
AutoMutex l(mPendingReqLock);
mLastSofSeq = eventData.data.sync.sequence;
mRequestTriggerEvent |= NEW_SOF;
mRequestSignal.signal();
if (mLastSofSeq > mLastAppliedSeq) {
mRequestTriggerEvent |= NEW_SOF;
mRequestSignal.signal();
}
} break;
case EVENT_FRAME_AVAILABLE: {
if (eventData.buffer->getUserBuffer() != &mFakeReqBuf) {
Expand All @@ -282,7 +286,7 @@ void RequestThread::handleEvent(EventData eventData) {
AutoMutex l(mPendingReqLock);
// Insert fake request if no any request in the HAL to keep 3A running
if (mGet3AStatWithFakeRequest && eventData.buffer->getSequence() >= mLastEffectSeq &&
mPendingRequests.empty()) {
mPendingRequests.empty() && (mRequestsInProcessing == 0)) {
LOGW("No request, insert fake req after req %ld to keep 3A stats update",
mLastRequestId);
CameraRequest fakeRequest;
Expand Down
4 changes: 4 additions & 0 deletions src/icbm/ICBMTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ struct ICBMInitInfo {
uint32_t sessionType;
uint32_t height;
uint32_t width;
// DLC_FEATURE_S
int32_t dlcPathHandle;
char* dlcPath;
// DLC_FEATURE_E
};

struct ICBMReqInfo {
Expand Down
1 change: 1 addition & 0 deletions src/iutils/ModuleTags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const char* tagNames[] = {
"Customized3A",
"CustomizedAic",
"CvfPrivacyChecker",
"DLCClient",
"DeviceBase",
"Dvs",
"EXIFMaker",
Expand Down

0 comments on commit 9fa05a9

Please sign in to comment.