Commit ba82d595 authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

hi846: fix checks for available mipi lane configs

parent e6728ab7
Pipeline #68834 passed with stage
in 63 minutes and 46 seconds
...@@ -1146,6 +1146,9 @@ static const struct hi846_mode supported_modes[] = { ...@@ -1146,6 +1146,9 @@ static const struct hi846_mode supported_modes[] = {
.num_of_regs = ARRAY_SIZE(mode_640x480_mipi_2lane), .num_of_regs = ARRAY_SIZE(mode_640x480_mipi_2lane),
.regs = mode_640x480_mipi_2lane, .regs = mode_640x480_mipi_2lane,
}, },
.reg_list_4lane = {
.num_of_regs = 0,
},
.crop = { .crop = {
.left = 0x58, .left = 0x58,
.top = 0x148, .top = 0x148,
...@@ -1640,13 +1643,13 @@ static int hi846_start_streaming(struct hi846 *hi846) ...@@ -1640,13 +1643,13 @@ static int hi846_start_streaming(struct hi846 *hi846)
} }
if (hi846->nr_lanes == 2) { if (hi846->nr_lanes == 2) {
if (!&hi846->cur_mode->reg_list_2lane) { if (!hi846->cur_mode->reg_list_2lane.num_of_regs) {
dev_err(&client->dev, "2 lanes unsupported for this mode\n"); dev_err(&client->dev, "2 lanes unsupported for this mode\n");
return -EINVAL; return -EINVAL;
} }
ret = hi846_write_reg_list(hi846, &hi846->cur_mode->reg_list_2lane); ret = hi846_write_reg_list(hi846, &hi846->cur_mode->reg_list_2lane);
} else { } else {
if (!&hi846->cur_mode->reg_list_4lane) { if (!hi846->cur_mode->reg_list_4lane.num_of_regs) {
dev_err(&client->dev, "4 lanes unsupported for this mode\n"); dev_err(&client->dev, "4 lanes unsupported for this mode\n");
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment