Skip to content

Commit baf768c

Browse files
committed
media: atomisp: set DFS to MAX if sensor doesn't report fps
If the sensor doesn't implement support for g_frame_interval, it won't return the expected fps rate. Instead of keeping DFS on its minimal value (which will likely not work), set it to the max. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 92b2bc4 commit baf768c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/staging/media/atomisp/pci/atomisp_cmd.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,12 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
243243
}
244244

245245
fps = atomisp_get_sensor_fps(asd);
246-
if (fps == 0)
247-
return -EINVAL;
246+
if (fps == 0) {
247+
dev_info(isp->dev,
248+
"Sensor didn't report FPS. Using DFS max mode.\n");
249+
new_freq = dfs->highest_freq;
250+
goto done;
251+
}
248252

249253
curr_rules.width = asd->fmt[asd->capture_pad].fmt.width;
250254
curr_rules.height = asd->fmt[asd->capture_pad].fmt.height;

0 commit comments

Comments
 (0)