Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp178111pxf; Wed, 24 Mar 2021 02:19:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEhgt+4nVCY1pxETMrcG8L4Cy0nBophJ4tI43uyenRa+BxUpxvPssoNSQeTdQoxJX3r32f X-Received: by 2002:a05:6402:1c1b:: with SMTP id ck27mr2334923edb.223.1616577543064; Wed, 24 Mar 2021 02:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616577543; cv=none; d=google.com; s=arc-20160816; b=JhA3yVpbyhBLvDhyQoN7ZdJ1irOUG8SMkckEvbyzk5BuEMmy0yy9/AfTm1kkcagbXB aVyWP1Fp97lti5dte1GsrlxfoqkvHGs4Mu2DMTS7fpdPYnT8FjuNHvVIjCYH3n6fWAIg K3L3NGIxVqE1NtBp9UqJ9TOn4ekjwnC4vXl3CVPaJUgP25CEXr4ue2+xMhAtKZh43Rwv +R/UEDqHcpRVj8UxbiDY8n4Kovaio2IGD6Wi1ufAF3WQcgrHaSRr4LzgL8mhzS6eYhoL nO1xpgZc+EcN/oYbGMAfpJOlOYo0OHxS+WFf2j0vvtbfyx1d9ECHqL0u93Kx6wxZD2Hj 7SKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=24qmeKyq+RHas/0nWkzkV/yI24iW9xTstvjT8SYVV4E=; b=gDB08PmrWfzBnRhB0etEcM59ajyD0W4m+dAMmxQU/e4WkcQNswvcod92m0SlKpWZc+ WrObw0FWYqzxDzHYtJnRGB2lQMaIIF1NmFkBwXTjCLibI5Fz6Bh72gqUE+LvzI1B8TfT MrbWVqJnISG44enQA2YDQe1pdUU6yNtCfv6PKv1pDUdXBmt5NcSOkr+fXYrglRYDNFrF mWhkup7w1DwjLmAKg90/6cbR3I2vGI0zglE5E+ax/aWAg1Fkoe4JAwX6kgKZux/10c8P xUkwSJH1SyhPLoYlQ7whQ3fxYbVa+qEQEoZGV2eKrxwb9XMh14fD4XCRqKwXhhe4N1/X 4Faw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Z/cYUHiA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si1244239edo.410.2021.03.24.02.18.40; Wed, 24 Mar 2021 02:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Z/cYUHiA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231992AbhCXCWu (ORCPT + 99 others); Tue, 23 Mar 2021 22:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231502AbhCXCWZ (ORCPT ); Tue, 23 Mar 2021 22:22:25 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EBD8C061763 for ; Tue, 23 Mar 2021 19:22:25 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id g15so16250707pfq.3 for ; Tue, 23 Mar 2021 19:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=24qmeKyq+RHas/0nWkzkV/yI24iW9xTstvjT8SYVV4E=; b=Z/cYUHiAg1doJjTTL9i5pzxTGBcMOwSFHfvXzdWI360hIUuuL+l/4Itd0NqBwrVq3m JpNg1TbeLRgZx7/VHCob/VRq2QxVsDTWRa7GlmDMKrGrYSzi+hdtqb10NhgvShPeSiWS HOQyDu00aY3ueYqPJ6vocPlj9PM+p5LpE4gjQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=24qmeKyq+RHas/0nWkzkV/yI24iW9xTstvjT8SYVV4E=; b=Q05U26tbjAxazCKXJi3KvONF94kSqEaPewtIJpmfSZam1yRiR7enTpKszcm+yanpYU x2X2jz/1U3soQvhl2hbo8DB11abPLTpvZSseYs4ZH/U3/j1CPwCUWK85sJozkV7RKHVY D8o4yOtrrhXZU5RWBYYdBazR2G6C99a2dG4AYMqawkM69v8mXc51jU/+pvIibx5C8YSF 0qLq5V+NAXetJ3AjlNTf1I5mgt74G/NGlCKpvOYMgvY/b4aKgrN+0FEa9DE5yV3ZaN8n QPyBGphbHD736beWNNVcYxSDQUxhW5SLPzr4nRFcq5qIDYP7TGNkeaXcIX+7ciah/5zr wVWA== X-Gm-Message-State: AOAM5328TYQ/YHoOA/4GzhqC7qDOuQ7/TDO+3vqPvQyP0+w4ruT1vQKC rHpTU+MN+wqqk/TtkCTxH4Z1Wg== X-Received: by 2002:a63:43c2:: with SMTP id q185mr993479pga.41.1616552544705; Tue, 23 Mar 2021 19:22:24 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:bcf2:e05a:a993:9494]) by smtp.gmail.com with ESMTPSA id j3sm439947pfi.74.2021.03.23.19.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 19:22:23 -0700 (PDT) Date: Wed, 24 Mar 2021 11:22:18 +0900 From: Sergey Senozhatsky To: Ricardo Ribalda Cc: Sergey Senozhatsky , Laurent Pinchart , Tomasz Figa , Mauro Carvalho Chehab , Hans Verkuil , Linux Media Mailing List , Linux Kernel Mailing List Subject: Re: [PATCHv3 3/6] media: v4l UAPI: add ROI auto-controls flags Message-ID: References: <20210319055342.127308-1-senozhatsky@chromium.org> <20210319055342.127308-4-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/03/23 17:04), Ricardo Ribalda wrote: > On Fri, Mar 19, 2021 at 6:53 AM Sergey Senozhatsky > wrote: > > > > UVC 1.5 defines the following Region Of Interest auto controls: > > > > D0: Auto Exposure > > D1: Auto Iris > > D2: Auto White Balance > > D3: Auto Focus > > D4: Auto Face Detect > > D5: Auto Detect and Track > > D6: Image Stabilization > > D7: Higher Quality > > D8 – D15: Reserved, set to zero > > > > Signed-off-by: Sergey Senozhatsky > > --- > > include/uapi/linux/v4l2-common.h | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h > > index 3651ebb8cb23..34f1c262d6aa 100644 > > --- a/include/uapi/linux/v4l2-common.h > > +++ b/include/uapi/linux/v4l2-common.h > > @@ -92,6 +92,16 @@ > > #define V4L2_SEL_FLAG_LE (1 << 1) > > #define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2) > > > > Are you sure that you do not want to start with 1<<3, there might be > some hardware that support LE/SE How the hardware's going to support this? There is simply no way to pass these flags to the firmware, the values already overlap with auto-controls. So I guess these flags are for the driver (C code). uvcvideo driver is not doing any "lesser or equal rectangle" magic for ROI. No such thing is defined by UVC spec. I can move these flags to entirely different value range and do remapping to uvc auto-controls values in uvcvideo.