Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ds/d400/d400-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ namespace librealsense

std::unique_ptr< frame_timestamp_reader > timestamp_reader_backup( new ds_timestamp_reader() );
frame_timestamp_reader* timestamp_reader_from_metadata;
if (!val_in_range(all_device_infos.front().pid, { RS457_PID, RS430_GMSL_PID, RS415_GMSL_PID }))
if (!(ds::d400_mipi_device_pid.count(all_device_infos.front().pid) > 0))
timestamp_reader_from_metadata = new ds_timestamp_reader_from_metadata(std::move(timestamp_reader_backup));
else
timestamp_reader_from_metadata = new ds_timestamp_reader_from_metadata_mipi(std::move(timestamp_reader_backup));
Expand Down Expand Up @@ -552,7 +552,7 @@ namespace librealsense
auto raw_sensor = get_raw_depth_sensor();
_pid = group.uvc_devices.front().pid;

_is_mipi_device = val_in_range(_pid, { RS457_PID, RS430_GMSL_PID, RS415_GMSL_PID });
_is_mipi_device = (ds::d400_mipi_device_pid.count(_pid) > 0);

_color_calib_table_raw = [this]()
{
Expand Down
36 changes: 36 additions & 0 deletions src/ds/d400/d400-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,34 @@ namespace librealsense
};
};

class rs401_gmsl_device : //public d400_color,
public d400_nonmonochrome,
public d400_mipi_device,
public firmware_logger_device
{
public:
rs401_gmsl_device( std::shared_ptr< const d400_info > const & dev_info, bool register_device_notifications )
: device( dev_info, register_device_notifications )
, backend_device( dev_info, register_device_notifications )
, d400_device( dev_info )
//, d400_color( dev_info )
, d400_nonmonochrome( dev_info )
, d400_mipi_device()
, firmware_logger_device( dev_info, d400_device::_hw_monitor, get_firmware_logs_command(), get_flash_logs_command() )
{
}

std::shared_ptr<matcher> create_matcher(const frame_holder& frame) const override;

std::vector<tagged_profile> get_profiles_tags() const override
{
std::vector<tagged_profile> tags;

tags.push_back({ RS2_STREAM_DEPTH, -1, 640, 480, RS2_FORMAT_Z16, 30, profile_tag::PROFILE_TAG_SUPERSET | profile_tag::PROFILE_TAG_DEFAULT });
return tags;
};
};

// Not used, should be removed with EOL devices clean up
class rs405u_device : public ds5u_device,
public ds_advanced_mode_base,
Expand Down Expand Up @@ -1096,6 +1124,8 @@ namespace librealsense
return std::make_shared< rs430_gmsl_device >( dev_info, register_device_notifications );
case RS415_GMSL_PID:
return std::make_shared< rs415_gmsl_device >(dev_info, register_device_notifications);
case RS401_GMSL_PID:
return std::make_shared< rs401_gmsl_device >( dev_info, register_device_notifications );
default:
throw std::runtime_error( rsutils::string::from() << "Unsupported RS400 model! 0x" << std::hex
<< std::setw( 4 ) << std::setfill( '0' ) << (int)pid );
Expand Down Expand Up @@ -1168,6 +1198,12 @@ namespace librealsense
return matcher_factory::create(RS2_MATCHER_DEFAULT, streams);
}

std::shared_ptr<matcher> rs401_gmsl_device::create_matcher(const frame_holder& frame) const
{
std::vector<stream_interface*> streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get() };
return matcher_factory::create(RS2_MATCHER_DEFAULT, streams);
}

std::shared_ptr<matcher> rs405u_device::create_matcher(const frame_holder& frame) const
{
std::vector<stream_interface*> streams = { _depth_stream.get() , _left_ir_stream.get() , _right_ir_stream.get()};
Expand Down
2 changes: 1 addition & 1 deletion src/ds/d400/d400-nonmonochrome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace librealsense

if ((_fw_version >= firmware_version("5.5.8.0")) && (!val_in_range(pid, { RS_USB2_PID })))
{
if (!val_in_range(pid, { RS405_PID, RS455_PID }))
if (!val_in_range(pid, { RS405_PID, RS455_PID, RS401_GMSL_PID }))
{
depth_ep.register_option(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE,
std::make_shared<uvc_xu_option<uint8_t>>(get_raw_depth_sensor(),
Expand Down
14 changes: 10 additions & 4 deletions src/ds/d400/d400-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace librealsense
const uint16_t RS400_MIPI_RECOVERY_PID = 0xbbcd; // D4XX MIPI DFU Recovery
const uint16_t RS430_GMSL_PID = 0xabce; // D430 GMSL
const uint16_t RS415_GMSL_PID = 0xabcf; // D415 GMSL
const uint16_t RS401_GMSL_PID = 0xabcc; // D401 GMSL

// d400 Devices supported by the current version
static const std::set<std::uint16_t> rs400_sku_pid = {
Expand Down Expand Up @@ -70,7 +71,8 @@ namespace librealsense
ds::RS455_PID,
ds::RS457_PID,
ds::RS430_GMSL_PID,
ds::RS415_GMSL_PID
ds::RS415_GMSL_PID,
ds::RS401_GMSL_PID
};

static const std::set<std::uint16_t> d400_multi_sensors_pid = {
Expand All @@ -86,13 +88,15 @@ namespace librealsense
ds::RS455_PID,
ds::RS457_PID,
ds::RS430_GMSL_PID,
ds::RS415_GMSL_PID
ds::RS415_GMSL_PID,
ds::RS401_GMSL_PID
};

static const std::set<std::uint16_t> d400_mipi_device_pid = {
ds::RS457_PID,
ds::RS430_GMSL_PID,
ds::RS415_GMSL_PID
ds::RS415_GMSL_PID,
ds::RS401_GMSL_PID
};

static const std::set<std::uint16_t> d400_hid_sensors_pid = {
Expand Down Expand Up @@ -149,6 +153,7 @@ namespace librealsense
{ RS400_MIPI_RECOVERY_PID, "Intel RealSense D4XX MIPI Recovery"},
{ RS430_GMSL_PID, "Intel RealSense D430" },
{ RS415_GMSL_PID, "Intel RealSense D415" },
{ RS401_GMSL_PID, "Intel RealSense D401" },
};

static std::map<uint16_t, std::string> d400_device_to_fw_min_version = {
Expand Down Expand Up @@ -180,7 +185,8 @@ namespace librealsense
{RS457_PID, "5.16.8.0" },
{RS400_MIPI_RECOVERY_PID, "5.16.0.1" },
{RS430_GMSL_PID, "5.16.8.0" },
{RS415_GMSL_PID, "5.17.1.1" }
{RS415_GMSL_PID, "5.17.1.1" },
{RS401_GMSL_PID, "5.17.2.100" } // TO BE UPDATED!!!
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment 'TO BE UPDATED!!!' indicates that the firmware version for RS401_GMSL_PID is a placeholder. This should be updated with the correct minimum firmware version before merging, or a tracking issue should be created.

Suggested change
{RS401_GMSL_PID, "5.17.2.100" } // TO BE UPDATED!!!
{RS401_GMSL_PID, "5.17.3.0" }

Copilot uses AI. Check for mistakes.
};

std::vector<platform::uvc_device_info> filter_d400_device_by_capability(
Expand Down
10 changes: 7 additions & 3 deletions src/linux/backend-v4l2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ namespace librealsense
const uint8_t GVD_PID_OFFSET = 4;

const uint8_t GVD_PID_D457 = 0x12;
const uint8_t GVD_PID_D401_GMSL = 0x13;
const uint8_t GVD_PID_D430_GMSL = 0x0F;
const uint8_t GVD_PID_D415_GMSL = 0x06;

Expand Down Expand Up @@ -1001,6 +1002,10 @@ namespace librealsense
device_pid = D415_GMSL_PID;
break;

case(GVD_PID_D401_GMSL):
device_pid = D401_GMSL_PID;
break;

default:
LOG_WARNING("Unidentified MIPI device product id: 0x" << std::hex << (int) product_pid << "remaining retries = " << retries);
device_pid = 0x0000;
Expand Down Expand Up @@ -3114,9 +3119,8 @@ namespace librealsense

std::shared_ptr<uvc_device> v4l_backend::create_uvc_device(uvc_device_info info) const
{
bool mipi_device = (D457_PID == info.pid ||
D430_GMSL_PID == info.pid ||
D415_GMSL_PID == info.pid);
bool mipi_device = (mipi_devices_pid.count(info.pid) > 0);

auto v4l_uvc_dev = mipi_device ? std::make_shared<v4l_mipi_device>(info) :
((!info.has_metadata_node) ? std::make_shared<v4l_uvc_device>(info) :
std::make_shared<v4l_uvc_meta_device>(info));
Expand Down
8 changes: 8 additions & 0 deletions src/linux/backend-v4l2.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ namespace librealsense
const uint16_t D457_PID = 0xABCD;
const uint16_t D430_GMSL_PID = 0xABCE;
const uint16_t D415_GMSL_PID = 0xABCF;
const uint16_t D401_GMSL_PID = 0xABCC;

static const std::set<std::uint16_t> mipi_devices_pid = {
D457_PID,
D430_GMSL_PID,
D415_GMSL_PID,
D401_GMSL_PID
};

// D457 Development. To be merged into underlying class
class v4l_mipi_device : public v4l_uvc_meta_device
Expand Down
Loading