From patchwork Thu Mar 19 15:21:25 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: 6050611 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 2A9EA9F2A9 for ; Thu, 19 Mar 2015 15:22:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53C3E203C0 for ; Thu, 19 Mar 2015 15:22:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56B2020528 for ; Thu, 19 Mar 2015 15:22:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbbCSPVs (ORCPT ); Thu, 19 Mar 2015 11:21:48 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:32935 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbbCSPVh (ORCPT ); Thu, 19 Mar 2015 11:21:37 -0400 Received: by ladw1 with SMTP id w1so64896798lad.0; Thu, 19 Mar 2015 08:21:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IPC2wP2CuPGSvCJDQmg4Fz7BhWxOfi5U8UvC4j4ATco=; b=o94eyTFIVr+RYaTK0AL5KA6BTIss7imKUQPcvxJYpFCf/2SbUU2EY0jiDzCktN/way rZ7frSpVN0gb/scTzOVc2EueucezpCpKunh4wHf+B8x0uXB0NllAOGL+Hchfngx25Z/E 6WB0f89uN0kDNnSi0P2G4zQE54pHzpR9TuGR3h3t20MqRbuVIZSsZlv8r4xLoiU2B9Xx FWOZSXm9Tq1kgENBtots0j/LgPwZVHzB0kRoImdtEgbDrVDiV4rDikSdA5eGwC8GedY9 JPSuGdhHU7pZb4aYGrZIw112NVs5yC2fSmMbi9Od0ULzOiTIU7yMscMNAFPaQplmUbjh fEew== X-Received: by 10.112.62.135 with SMTP id y7mr68840959lbr.50.1426778496146; Thu, 19 Mar 2015 08:21:36 -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 p7sm350623lap.18.2015.03.19.08.21.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 08:21:35 -0700 (PDT) From: Ricardo Ribalda Delgado To: 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 Cc: Ricardo Ribalda Delgado Subject: [PATCH 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls Date: Thu, 19 Mar 2015 16:21:25 +0100 Message-Id: <1426778486-21807-5-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426778486-21807-1-git-send-email-ricardo.ribalda@gmail.com> References: <1426778486-21807-1-git-send-email-ricardo.ribalda@gmail.com> 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 --- 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 da0ffd3..8f96478 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 = true; + /* * Set has_changed to false to avoid generating * the event V4L2_EVENT_CTRL_CH_VALUE