From patchwork Thu Mar 25 05:19:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11705 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BC930C32E9 for ; Thu, 25 Mar 2021 05:19:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5A1A068D68; Thu, 25 Mar 2021 06:19:47 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LCJpynPX"; dkim-atps=neutral Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E16B268D68 for ; Thu, 25 Mar 2021 06:19:45 +0100 (CET) Received: by mail-pf1-x431.google.com with SMTP id h3so808613pfr.12 for ; Wed, 24 Mar 2021 22:19:45 -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=PjpQr3Vz3Da91peYZt+5pvwi3qlCZ3U2n1oIkOsHbBI=; b=LCJpynPX2ka49HcUuHNewW5sjGEvTq5WPZJPJrnIpKQIs2dlDtq+DVdNVO3UoNOhWy xeISIQJ3WKg8o2oWt8gMD9nRd2eV/waeXmpSPdCSJGHrM5mFxZSIpweTyGQ4QPiaU6O+ K4qqnjQgX4MQy8o/a7mG23UbUM8WwuvhFjeTc= 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=PjpQr3Vz3Da91peYZt+5pvwi3qlCZ3U2n1oIkOsHbBI=; b=LVkwB3xNNJdO78KS8fTh3NrrfS7rV11RhmkjUaNwTvHXHqijjPqLLQ322BbiLTPIKW L3E0rU3KutOnbX3T0ddlEkskpNaywba0VGw6Kz+SrnfkErKgPXpjwNlLpb3r9Ta9ux9e eKSp6jkbztJRLgV3SCVoG1nzVgYKz8P2PfCCW5OyrhyR9Bxft27SDzLfid0tJ/CAwILb aGLQMUICX3ldTDwj4h3McuiJ2dE441edBGjOYKBjVniq20UvxLbdtOGB5DN/15xWUsae p1SKgay6gdsPYkwLOE5DOoP7nlLXyNlBOTF5lNrXdcQzUJSS036bPJtWu/D0h+T8vkej 5kcA== X-Gm-Message-State: AOAM531zjGlz+Ts5FN740VRmWrZH7KXaxN0TpzEmMTEg+2omtYKeq9wP vgrtCKKZ/ygv2+ZoZjrDWf7hLjp/m5jqWQ== X-Google-Smtp-Source: ABdhPJwlTh/lFHZTyKrXcQCfz/rPvfI5ZfoGhHp2ZLh0CfhitiOXkAC3N3Q/v2iCTgrQ6NO8O0ainA== X-Received: by 2002:a05:6a00:14cc:b029:200:5f06:2ded with SMTP id w12-20020a056a0014ccb02902005f062dedmr6337028pfu.65.1616649584406; Wed, 24 Mar 2021 22:19:44 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7c07:24cd:c637:7fab]) by smtp.gmail.com with ESMTPSA id fs9sm3999250pjb.40.2021.03.24.22.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 22:19:44 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 25 Mar 2021 14:19:31 +0900 Message-Id: <20210325051931.3748204-4-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210325051931.3748204-1-hiroh@chromium.org> References: <20210325051931.3748204-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] android: CameraDevice: Deny non ROTATION_0 stream configuration X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Libcamera doesn't handle crop_rotate_scale_degrees. Therefore, if it is requested, that is, crop_rotate_scale_degrees is not CAMERA3_STREAM_ROTATION_0, the configuration should fail. Signed-off-by: Hirokazu Honda --- src/android/camera_device.cpp | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.31.0.291.g576ba9dcdaf-goog diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index d24b0b23..3aab643d 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1657,6 +1657,13 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) if (!format.isValid()) return -EINVAL; + /* \todo Support crop_rotate_scale_degrees. */ + if (stream->crop_rotate_scale_degrees != CAMERA3_STREAM_ROTATION_0) { + LOG(HAL, Error) + << "crop_rotate_scale_degrees is not supported"; + return -EINVAL; + } + /* Defer handling of MJPEG streams until all others are known. */ if (stream->format == HAL_PIXEL_FORMAT_BLOB) { if (jpegStream) {