|
50 | 50 | #define GMSL_CSI_DT_RAW_8 0x2A |
51 | 51 | #define GMSL_CSI_DT_EMBED 0x12 |
52 | 52 | #endif |
53 | | -/* Custom formats (known only to the FW) */ |
54 | | -#define GMSL_CSI_DT_CUSTOM_Y8I_16 0x32 |
55 | | -#define GMSL_CSI_DT_CUSTOM_IR_RGB_16 0x2F |
56 | 53 |
|
57 | 54 | //#define DS5_DRIVER_NAME "DS5 RealSense camera driver" |
58 | 55 | #define DS5_DRIVER_NAME "d4xx" |
@@ -1333,12 +1330,7 @@ static const struct ds5_format ds5_y_formats_40x[] = { |
1333 | 1330 | .mbus_code = MEDIA_BUS_FMT_RGB888_1X24, |
1334 | 1331 | .n_resolutions = ARRAY_SIZE(d40x_calibration_sizes), |
1335 | 1332 | .resolutions = d40x_calibration_sizes, |
1336 | | - }, { |
1337 | | - .data_type = GMSL_CSI_DT_YUV422_8, /* YUYV */ |
1338 | | - .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, |
1339 | | - .n_resolutions = ARRAY_SIZE(y8_40x_sizes), |
1340 | | - .resolutions = y8_40x_sizes, |
1341 | | - } |
| 1333 | + }, |
1342 | 1334 | }; |
1343 | 1335 |
|
1344 | 1336 | static const struct ds5_format ds5_y_formats_41x[] = { |
@@ -2023,19 +2015,12 @@ static int ds5_configure(struct ds5 *state) |
2023 | 2015 | if (state->is_depth && fmt != 0) |
2024 | 2016 | dt_value = 0x31; |
2025 | 2017 | else if (state->is_y8 && fmt != 0 && |
2026 | | - sensor->config.format->data_type == GMSL_CSI_DT_YUV422_8) { |
2027 | | - if (sensor->config.format->mbus_code == MEDIA_BUS_FMT_VYUY8_1X16) { |
2028 | | - dt_value = GMSL_CSI_DT_CUSTOM_Y8I_16; |
2029 | | - } else if (sensor->config.format->mbus_code == MEDIA_BUS_FMT_YUYV8_1X16) { |
2030 | | - dt_value = GMSL_CSI_DT_CUSTOM_IR_RGB_16; |
2031 | | - } else { |
2032 | | - dev_err(sensor->sd.dev, "%s(): Illegal mbus_code %u for IR sensor\n", |
2033 | | - __func__, sensor->config.format->mbus_code); |
2034 | | - return -EINVAL; |
2035 | | - } |
2036 | | - } else { |
2037 | | - dt_value = fmt; |
2038 | | - } |
| 2018 | + sensor->config.format->data_type == GMSL_CSI_DT_YUV422_8) |
| 2019 | + ret = ds5_write(state, dt_addr, 0x32); |
| 2020 | + else |
| 2021 | + ret = ds5_write(state, dt_addr, fmt); |
| 2022 | + if (ret < 0) |
| 2023 | + return ret; |
2039 | 2024 |
|
2040 | 2025 | if (sensor->cached_dt_value != dt_value) { |
2041 | 2026 | ret = ds5_write(state, dt_addr, dt_value); |
@@ -6596,4 +6581,4 @@ MODULE_AUTHOR("Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>,\n\ |
6596 | 6581 | Shikun Ding <shikun.ding@intel.com>,\n\ |
6597 | 6582 | Dmitry Perchanov <dmitry.perchanov@intel.com>"); |
6598 | 6583 | MODULE_LICENSE("GPL v2"); |
6599 | | -MODULE_VERSION("1.0.2.7"); |
| 6584 | +MODULE_VERSION("1.0.2.8"); |
0 commit comments