Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f22926e0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] omap3isp: preview: Optimize parameters setup for the common case



If no parameter needs to be modified, make preview_config() and
preview_setup_hw() return immediately. This speeds up interrupt handling
in the common case.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 213cf90b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -889,6 +889,9 @@ static int preview_config(struct isp_prev_device *prev,
	struct preview_update *attr;
	int i, bit, rval = 0;

	if (cfg->update == 0)
		return 0;

	params = &prev->params;

	if (prev->state != ISP_PIPELINE_STREAM_STOPPED) {
@@ -944,6 +947,9 @@ static void preview_setup_hw(struct isp_prev_device *prev)
	int i, bit;
	void *param_ptr;

	if (prev->update == 0)
		return;

	for (i = 0; i < ARRAY_SIZE(update_attrs); i++) {
		attr = &update_attrs[i];