IntelRealSense / realsense_mipi_platform_driver

Intel® RealSense™ camera driver for GMSL* interface
GNU General Public License v2.0
15 stars 14 forks source link

Allow refresh serdes configs during runtime #105

Closed xzhangxa closed 2 years ago

xzhangxa commented 2 years ago

Test steps for using the new attributes:

  1. Boot the board and use D457 as usual;
  2. Power off the max9296 board then power on, to lose all settings of max9295/9296;
  3. Run commands below.
    echo 1 | sudo tee /sys/bus/i2c/drivers/max9295/30-0040/refresh_setting
    echo 1 | sudo tee /sys/bus/i2c/drivers/max9296/30-0048/refresh_setting
  4. Start streams of D457 as usual, still works. IR stream format will still be the last used one, matching the v4l2 node format.

And when switching formats of IR stream, the serdes settings being changed are reduced to only the necessary ones. So now if another stream is streaming, it won't be interrupted (on current master, the streaming could be seen stopped for 1 or 2 seconds then go on again), with the new changes the other stream won't be affected.

dmipx commented 2 years ago

isn't it better to have max9295/6 as modules and not compile it to kernel? current config is CONFIG_I2C_IOEXPANDER_SER_MAX9295=y CONFIG_I2C_IOEXPANDER_DESER_MAX9296=y

xzhangxa commented 2 years ago

isn't it better to have max9295/6 as modules and not compile it to kernel? current config is CONFIG_I2C_IOEXPANDER_SER_MAX9295=y CONFIG_I2C_IOEXPANDER_DESER_MAX9296=y

We didn't modify the default kernel config of Jetson, so it's just the original setting.

xzhangxa commented 2 years ago

This PR is ready to review/merge. Besides the refresh attributes, another fix and cleanup is added. Please see the updated first comment for details.