From patchwork Fri Mar 20 13:55:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 6056791 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 388769F399 for ; Fri, 20 Mar 2015 13:55:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E8EB2052C for ; Fri, 20 Mar 2015 13:55:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7265520528 for ; Fri, 20 Mar 2015 13:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751064AbbCTNzn (ORCPT ); Fri, 20 Mar 2015 09:55:43 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36685 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbbCTNzl (ORCPT ); Fri, 20 Mar 2015 09:55:41 -0400 Received: by lbblx11 with SMTP id lx11so53724815lbb.3; Fri, 20 Mar 2015 06:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=7Aa5ZaJoPjRztXWWU+amPQ84Awsfm8+Z2NAG8BSUpok=; b=iJIopTBmkCu424ctEd6wXMN1kYATdVoAnE6A3Xw0BSHUaoz/Fq9e/xZOxvwr0OrIWC 9ZNQjR+a3c6fZt3j7fTFsl1LQ0PueUnVwOM7x24tqFXJ5812QI4tw31S95R9icWMcaw2 3J89cvLeBwKP5s9RF2bNPkTL/m18wLx85pdcu2yfnMYeobt1JgwaTqBesrzdTugp1zao RqhkB5hyK22ljULIOtXsi2aTXPstfuY3Z7rdgvTv9Abml5NY+VCUn67yTuSyrAWc10o+ aZeMVDp13AYzY10pxiktIf/LdVeRSMKzAPjGNf+skqc9WtrJTt5YQadNeBIzL5zBCozY 6wrA== X-Received: by 10.112.173.133 with SMTP id bk5mr72784709lbc.94.1426859739948; Fri, 20 Mar 2015 06:55:39 -0700 (PDT) Received: from neopili.fritz.box (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by mx.google.com with ESMTPSA id be13sm947292lab.46.2015.03.20.06.55.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 06:55:39 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , Ricardo Ribalda Delgado , Hans Verkuil , Mauro Carvalho Chehab , Arun Kumar K , Sylwester Nawrocki , Sakari Ailus , Antti Palosaari , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Pinchart Subject: [PATCH v3 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls Date: Fri, 20 Mar 2015 14:55:37 +0100 Message-Id: <1426859737-4582-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return changed == true in cluster_changed. This forces the value to be passed to the driver even if it has not changed. Signed-off-by: Ricardo Ribalda Delgado --- v3: Hans Verkuil Also set ctrl_changed to true when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE is set drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index bacaed6..e3a3468 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1611,6 +1611,10 @@ static int cluster_changed(struct v4l2_ctrl *master) if (ctrl == NULL) continue; + + if (ctrl->flags & V4L2_CTRL_FLAG_EXECUTE_ON_WRITE) + changed = ctrl_changed = true; + /* * Set has_changed to false to avoid generating * the event V4L2_EVENT_CTRL_CH_VALUE