From patchwork Sat May 1 08:19:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 74019 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1lckrW-00G7I7-FF; Sat, 01 May 2021 08:20:30 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231681AbhEAIVB (ORCPT + 1 other); Sat, 1 May 2021 04:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbhEAIVA (ORCPT ); Sat, 1 May 2021 04:21:00 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBAE4C06138B for ; Sat, 1 May 2021 01:20:10 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id lp8so316317pjb.1 for ; Sat, 01 May 2021 01:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ylnHk+JNuqq5ZmDFacYDEfwOgLykql+ZShEQSvQwkpU=; b=YXhoS2pU2hvfW019BAiAszVK4eSDsIqFZ+yEKWjufqpG5zfOG7SIkphyor3r0BuXlP wy2iqwRKgdHi55Ku+vCNmgiMUBhFebPk8X0KYaWiS/Ty7R9i+yHaRjzaB5FTrF8c23O0 WoLVWPAoTEnMMf8evhZBQGUKngWTYDIAp17lM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ylnHk+JNuqq5ZmDFacYDEfwOgLykql+ZShEQSvQwkpU=; b=sF/56Exnk9RTty5YDipHvsdgzOQtjn4l/Kw3nMgMOuNwGJxeIfCBh8YZas/V1I0cr4 LJ5+S+qPZefLuI7vgXlgWZ7COB2WuAEk3pQvohLjhoYlV9/5gZzd6IUdLhRQB3Qzw19f o+npItO66ilrURnLuH6s0E3CZEVoRn8nc2mWHT2c2NSqVRII4b4YLwFHxeerKj25oKbM ln1M5pqy3gOarfeb8+DH5h0S1bHK4y4p7wHRYylzKj+kxJaUQ0FstrljDYt8b07Egstb hwuIQ2P0bryFQiPUEMQEFf8q03dRAJgIXuf5M+YvGzNAPYQIl+xMKJdraat9foLgwE4Y 2ZnA== X-Gm-Message-State: AOAM5331GN3nPbpHOex0JLukbOGaF6L32hLJQVTwn2tD9A0wtm54Ar++ /izYH31/39913nux4oRREuvMTg== X-Google-Smtp-Source: ABdhPJx2mp2dZu1A0XSG18f8CEsROVW/j3BS/eOmMLtj0jWiktr1sOZCdImZ0JpqCeUCapoTrxSiUQ== X-Received: by 2002:a17:90a:a589:: with SMTP id b9mr9487803pjq.80.1619857210492; Sat, 01 May 2021 01:20:10 -0700 (PDT) Received: from senozhatsky.flets-east.jp ([2409:10:2e40:5100:8be7:e987:d00a:1442]) by smtp.gmail.com with ESMTPSA id b7sm3763003pjq.36.2021.05.01.01.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 01:20:10 -0700 (PDT) From: Sergey Senozhatsky To: Laurent Pinchart , Ricardo Ribalda Cc: Tomasz Figa , Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: [PATCHv5 1/5] media: v4l UAPI: add ROI selection targets Date: Sat, 1 May 2021 17:19:57 +0900 Message-Id: <20210501082001.100533-2-senozhatsky@chromium.org> X-Mailer: git-send-email 2.31.1.527.g47e6f16901-goog In-Reply-To: <20210501082001.100533-1-senozhatsky@chromium.org> References: <20210501082001.100533-1-senozhatsky@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -7.5 (-------) X-LSpam-Report: No, score=-7.5 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_HI=-5 autolearn=ham autolearn_force=no UVC 1.5 requires Region Of Interest control to implement GET_CUR, GET_DEF, GET_MIN and GET_MAX requests. This patch adds new V4L2 selection API targets that will implement those ROI requests. Signed-off-by: Sergey Senozhatsky --- include/uapi/linux/v4l2-common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 7d21c1634b4d..3651ebb8cb23 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h @@ -78,6 +78,14 @@ #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 /* Current composing area plus all padding pixels */ #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 +/* Current Region of Interest area */ +#define V4L2_SEL_TGT_ROI 0x0200 +/* Default Region of Interest area */ +#define V4L2_SEL_TGT_ROI_DEFAULT 0x0201 +/* Region of Interest minimum values */ +#define V4L2_SEL_TGT_ROI_BOUNDS_MIN 0x0202 +/* Region of Interest maximum values */ +#define V4L2_SEL_TGT_ROI_BOUNDS_MAX 0x0203 /* Selection flags */ #define V4L2_SEL_FLAG_GE (1 << 0)