Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] media: ov5670: Fix not streaming issue after resume

Previously, the sensor was not streaming after resume from suspend,
i.e. on S0->S3->S0 transition. Due to this, camera app preview appeared
as stuck.

Now, handle streaming state correctly in case of suspend-resume.

Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Chiranjeevi Rapolu and committed by
Mauro Carvalho Chehab
3eefbc69 1a58fbf5

+1 -4
+1 -4
drivers/media/i2c/ov5670.c
··· 2341 2341 return ret; 2342 2342 } 2343 2343 2344 - ov5670->streaming = true; 2345 - 2346 2344 return 0; 2347 2345 } 2348 2346 ··· 2353 2355 OV5670_REG_VALUE_08BIT, OV5670_MODE_STANDBY); 2354 2356 if (ret) 2355 2357 dev_err(&client->dev, "%s failed to set stream\n", __func__); 2356 - 2357 - ov5670->streaming = false; 2358 2358 2359 2359 /* Return success even if it was an error, as there is nothing the 2360 2360 * caller can do about it. ··· 2384 2388 ret = ov5670_stop_streaming(ov5670); 2385 2389 pm_runtime_put(&client->dev); 2386 2390 } 2391 + ov5670->streaming = enable; 2387 2392 goto unlock_and_return; 2388 2393 2389 2394 error: