Re: [PATCH v3 2/9] omap3isp: preview: Optimize parameters setup for the common case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

Thanks for the patch. Just one more comment.

Laurent Pinchart wrote:
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: Laurent Pinchart<laurent.pinchart@xxxxxxxxxxxxxxxx>
Acked-by: Sakari Ailus<sakari.ailus@xxxxxx>
---
  drivers/media/video/omap3isp/isppreview.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index cf5014f..4e803a3 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -890,6 +890,8 @@ static int preview_config(struct isp_prev_device *prev,
  	int i, bit, rval = 0;

  	params =&prev->params;
+	if (cfg->update == 0)
+		return 0;

You could do the check right at the beginning of the function, i.e. before settings params. Tiny issue, but it'd look better that way. :-)

  	if (prev->state != ISP_PIPELINE_STREAM_STOPPED) {
  		unsigned long flags;
@@ -944,6 +946,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];



--
Sakari Ailus
sakari.ailus@xxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux