From patchwork Sun Mar 28 22:45:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11749 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 44588C32EA for ; Sun, 28 Mar 2021 22:45:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 073E268788; Mon, 29 Mar 2021 00:45:44 +0200 (CEST) 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="S0wUsJah"; dkim-atps=neutral Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 668BB6877C for ; Mon, 29 Mar 2021 00:45:40 +0200 (CEST) Received: by mail-pj1-x1033.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so6823520pjb.0 for ; Sun, 28 Mar 2021 15:45:40 -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=3XFw66zLJldvVab3br52TbLvk9ogclQY85vQlEPbt3k=; b=S0wUsJahy2O3TKZENIF0sc2jNLgm394tokG2JLG6aUf73yWoZncONvRO/BqagEfwoS f6Pfq2YuveMWASbgpk/EDdvKEeUBvvXQVZ2VUAgZ//Ca0mpVrvj2mX7mE5YtCTEcwsR7 2w7+PDiSGC0mgXaM7duTwhe9J7Rfisc00Ij2Q= 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=3XFw66zLJldvVab3br52TbLvk9ogclQY85vQlEPbt3k=; b=dNmC8yMtePm4cNTBEmxxTD+ggX4UdNbgHJebNcsJLAMJl4PhVUeFYnTYSPIs4hy7GZ 1JGtxwtRImmqHMxSNgq6B+W2rf/8GLIN23ze5X6ADwj4tZs5x8UR1PdgXDooZLGeEWKs qmnAA3D/UUm9x5P0SjkOpdNRpkn9Ufu+SLTgK28Bk3/LH2ZeiYH6+3PxhJvvjX8MnCni z10PHj75ILIkutpOp0mOIEwqs1js7XoYTLYZQAEHRDnORZso5pXI4mR4hya0uPClLr4A 5Yjtqle9T7sGrqUiFt3mksG51/1Kbmht8ukNyzBjXf/GkII0elMP8dTrYZSzPps8sF5T FO/w== X-Gm-Message-State: AOAM530w1SjGxdEG61HUlXmJE1oj61ahUm7zHeH2FT4TdWwgXBZKACTd x/me/gKkxdfNg7QLzqqd9qW2PcTnSdfpoA== X-Google-Smtp-Source: ABdhPJyL8fzkXFv/ZuZ4KrNYpQlRCeoCKiFNn6SZmSDUiHWyzenP1RmNgQuj9T9b7TyExwPVZ1stIg== X-Received: by 2002:a17:903:188:b029:e6:52f4:1b2d with SMTP id z8-20020a1709030188b02900e652f41b2dmr26407183plg.58.1616971538798; Sun, 28 Mar 2021 15:45:38 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id q25sm14814244pff.104.2021.03.28.15.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 15:45:38 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Mar 2021 07:45:28 +0900 Message-Id: <20210328224528.55468-4-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210328224528.55468-1-hiroh@chromium.org> References: <20210328224528.55468-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- 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 d3368b19..11c0f35a 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1647,6 +1647,13 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) if (!format.isValid()) return -EINVAL; + /* \todo Support rotation. */ + if (stream->rotation != CAMERA3_STREAM_ROTATION_0 || + stream->crop_rotate_scale_degrees != CAMERA3_STREAM_ROTATION_0) { + LOG(HAL, Error) << "Rotation is not supported"; + return -EINVAL; + } + /* Defer handling of MJPEG streams until all others are known. */ if (stream->format == HAL_PIXEL_FORMAT_BLOB) { if (jpegStream) {