[{"id":3430,"web_url":"https://patchwork.libcamera.org/comment/3430/","msgid":"<20200112134248.GF25899@pendragon.ideasonboard.com>","date":"2020-01-12T13:42:48","subject":"Re: [libcamera-devel] [PATCH v4 32/32] libcamera: camera: Remove\n\tthe prepared state","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Sun, Jan 12, 2020 at 02:02:12AM +0100, Niklas Söderlund wrote:\n> With the FrameBuffer rework completed there is no reason to keep the\n> camera prepared state around as buffer allocations are now decoupled\n> from the camera state. Remove the camera state simplifying the API.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/camera.h              |   4 -\n>  src/android/camera_device.cpp           |  11 +--\n>  src/cam/capture.cpp                     |   8 --\n>  src/libcamera/camera.cpp                | 100 +++++-------------------\n>  src/libcamera/framebuffer_allocator.cpp |   5 +-\n>  src/libcamera/pipeline_handler.cpp      |   5 ++\n>  src/qcam/main_window.cpp                |   9 ---\n>  src/v4l2/v4l2_camera.cpp                |   5 --\n>  test/camera/buffer_import.cpp           |  10 ---\n>  test/camera/capture.cpp                 |  10 ---\n>  test/camera/statemachine.cpp            |  83 --------------------\n>  11 files changed, 27 insertions(+), 223 deletions(-)\n> \n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index 28655bec9ebc89ce..6597ade83288a170 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -91,9 +91,6 @@ public:\n>  \tstd::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);\n>  \tint configure(CameraConfiguration *config);\n>  \n> -\tint allocateBuffers();\n> -\tint freeBuffers();\n> -\n>  \tRequest *createRequest(uint64_t cookie = 0);\n>  \tint queueRequest(Request *request);\n>  \n> @@ -105,7 +102,6 @@ private:\n>  \t\tCameraAvailable,\n>  \t\tCameraAcquired,\n>  \t\tCameraConfigured,\n> -\t\tCameraPrepared,\n>  \t\tCameraRunning,\n>  \t};\n>  \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 49321db07a2c93d5..a98fd744f5347432 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -77,8 +77,6 @@ int CameraDevice::open()\n>  void CameraDevice::close()\n>  {\n>  \tcamera_->stop();\n> -\n> -\tcamera_->freeBuffers();\n>  \tcamera_->release();\n>  \n>  \trunning_ = false;\n> @@ -690,16 +688,9 @@ void CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reque\n>  \n>  \t/* Start the camera if that's the first request we handle. */\n>  \tif (!running_) {\n> -\t\tint ret = camera_->allocateBuffers();\n> -\t\tif (ret) {\n> -\t\t\tLOG(HAL, Error) << \"Failed to allocate buffers\";\n> -\t\t\treturn;\n> -\t\t}\n> -\n> -\t\tret = camera_->start();\n> +\t\tint ret = camera_->start();\n>  \t\tif (ret) {\n>  \t\t\tLOG(HAL, Error) << \"Failed to start camera\";\n> -\t\t\tcamera_->freeBuffers();\n>  \t\t\treturn;\n>  \t\t}\n>  \n> diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp\n> index 738fa1c267eb6e36..7d970f991d3aaf1a 100644\n> --- a/src/cam/capture.cpp\n> +++ b/src/cam/capture.cpp\n> @@ -42,12 +42,6 @@ int Capture::run(EventLoop *loop, const OptionsParser::Options &options)\n>  \t\treturn ret;\n>  \t}\n>  \n> -\tret = camera_->allocateBuffers();\n> -\tif (ret) {\n> -\t\tstd::cerr << \"Failed to allocate buffers\" << std::endl;\n> -\t\treturn ret;\n> -\t}\n> -\n>  \tcamera_->requestCompleted.connect(this, &Capture::requestComplete);\n>  \n>  \tif (options.isSet(OptFile)) {\n> @@ -67,8 +61,6 @@ int Capture::run(EventLoop *loop, const OptionsParser::Options &options)\n>  \t\twriter_ = nullptr;\n>  \t}\n>  \n> -\tcamera_->freeBuffers();\n> -\n>  \tdelete allocator;\n>  \n>  \treturn ret;\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index f3a7578d0834a9d6..79a5f994f9bbc8c1 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -275,15 +275,13 @@ std::size_t CameraConfiguration::size() const\n>   * \\section camera_operation Operating the Camera\n>   *\n>   * An application needs to perform a sequence of operations on a camera before\n> - * it is ready to process requests. The camera needs to be acquired, configured\n> - * and resources allocated or imported to prepare the camera for capture. Once\n> - * started the camera can process requests until it is stopped. When an\n> - * application is done with a camera all resources allocated need to be freed\n> - * and the camera released.\n> + * it is ready to process requests. The camera needs to be acquired and\n> + * configured to prepare the camera for capture. Once started the camera can\n> + * process requests until it is stopped. When an application is done with a\n> + * camera, the camera needs to be released.\n>   *\n>   * An application may start and stop a camera multiple times as long as it is\n> - * not released. The camera may also be reconfigured provided that all\n> - * resources allocated are freed prior to the reconfiguration.\n> + * not released. The camera may also be reconfigured.\n>   *\n>   * \\subsection Camera States\n>   *\n> @@ -297,7 +295,6 @@ std::size_t CameraConfiguration::size() const\n>   *   node [shape = doublecircle ]; Available;\n>   *   node [shape = circle ]; Acquired;\n>   *   node [shape = circle ]; Configured;\n> - *   node [shape = circle ]; Prepared;\n>   *   node [shape = circle ]; Running;\n>   *\n>   *   Available -> Available [label = \"release()\"];\n> @@ -307,14 +304,10 @@ std::size_t CameraConfiguration::size() const\n>   *   Acquired -> Configured [label = \"configure()\"];\n>   *\n>   *   Configured -> Available [label = \"release()\"];\n> - *   Configured -> Configured [label = \"configure()\"];\n> - *   Configured -> Prepared [label = \"allocateBuffers()\"];\n> + *   Configured -> Configured [label = \"configure(), createRequest()\"];\n> + *   Configured -> Running [label = \"start()\"];\n>   *\n> - *   Prepared -> Configured [label = \"freeBuffers()\"];\n> - *   Prepared -> Prepared [label = \"createRequest()\"];\n> - *   Prepared -> Running [label = \"start()\"];\n> - *\n> - *   Running -> Prepared [label = \"stop()\"];\n> + *   Running -> Configured [label = \"stop()\"];\n>   *   Running -> Running [label = \"createRequest(), queueRequest()\"];\n>   * }\n>   * \\enddot\n> @@ -330,19 +323,14 @@ std::size_t CameraConfiguration::size() const\n>   * Configured state.\n>   *\n>   * \\subsubsection Configured\n> - * The camera is configured and ready for the application to prepare it with\n> - * resources. The camera may be reconfigured multiple times until resources\n> - * are provided and the state progresses to Prepared.\n> - *\n> - * \\subsubsection Prepared\n> - * The camera has been configured and provided with resources and is ready to be\n> - * started. The application may free the camera's resources to get back to the\n> - * Configured state or start() it to progress to the Running state.\n> + * The camera is configured and ready to be started. The application may\n> + * release() the camera and to get back to the Available state or start()\n> + * it to progress to the Running state.\n>   *\n>   * \\subsubsection Running\n>   * The camera is running and ready to process requests queued by the\n>   * application. The camera remains in this state until it is stopped and moved\n> - * to the Prepared state.\n> + * to the Configured state.\n>   */\n>  \n>  /**\n> @@ -420,7 +408,6 @@ static const char *const camera_state_names[] = {\n>  \t\"Available\",\n>  \t\"Acquired\",\n>  \t\"Configured\",\n> -\t\"Prepared\",\n>  \t\"Running\",\n>  };\n>  \n> @@ -465,8 +452,6 @@ bool Camera::stateIs(State state) const\n>   *\n>   * \\todo Deal with pending requests if the camera is disconnected in a\n>   * running state.\n> - * \\todo Update comment about Running state when importing buffers as well as\n> - * allocating them are supported.\n>   */\n>  void Camera::disconnect()\n>  {\n> @@ -474,11 +459,11 @@ void Camera::disconnect()\n>  \n>  \t/*\n>  \t * If the camera was running when the hardware was removed force the\n> -\t * state to Prepared to allow applications to call freeBuffers() and\n> -\t * release() before deleting the camera.\n> +\t * state to Configured state to allow applications to free resources\n> +\t * and call release() before deleting the camera.\n>  \t */\n>  \tif (state_ == CameraRunning)\n> -\t\tstate_ = CameraPrepared;\n> +\t\tstate_ = CameraConfigured;\n>  \n>  \tdisconnected_ = true;\n>  \tdisconnected.emit(this);\n> @@ -702,53 +687,6 @@ int Camera::configure(CameraConfiguration *config)\n>  \treturn 0;\n>  }\n>  \n> -/**\n> - * \\brief Allocate buffers for all configured streams\n> - *\n> - * This function affects the state of the camera, see \\ref camera_operation.\n> - *\n> - * \\return 0 on success or a negative error code otherwise\n> - * \\retval -ENODEV The camera has been disconnected from the system\n> - * \\retval -EACCES The camera is not in a state where buffers can be allocated\n> - * \\retval -EINVAL The configuration is not valid\n> - */\n> -int Camera::allocateBuffers()\n> -{\n> -\tif (disconnected_)\n> -\t\treturn -ENODEV;\n> -\n> -\tif (!stateIs(CameraConfigured))\n> -\t\treturn -EACCES;\n> -\n> -\tif (activeStreams_.empty()) {\n> -\t\tLOG(Camera, Error)\n> -\t\t\t<< \"Can't allocate buffers without streams\";\n> -\t\treturn -EINVAL;\n> -\t}\n> -\n> -\tstate_ = CameraPrepared;\n> -\n> -\treturn 0;\n> -}\n> -\n> -/**\n> - * \\brief Release all buffers from allocated pools in each stream\n> - *\n> - * This function affects the state of the camera, see \\ref camera_operation.\n> - *\n> - * \\return 0 on success or a negative error code otherwise\n> - * \\retval -EACCES The camera is not in a state where buffers can be freed\n> - */\n> -int Camera::freeBuffers()\n> -{\n> -\tif (!stateIs(CameraPrepared))\n> -\t\treturn -EACCES;\n> -\n> -\tstate_ = CameraConfigured;\n> -\n> -\treturn 0;\n> -}\n> -\n>  /**\n>   * \\brief Create a request object for the camera\n>   * \\param[in] cookie Opaque cookie for application use\n> @@ -764,14 +702,14 @@ int Camera::freeBuffers()\n>   * The ownership of the returned request is passed to the caller, which is\n>   * responsible for either queueing the request or deleting it.\n>   *\n> - * This function shall only be called when the camera is in the Prepared\n> + * This function shall only be called when the camera is in the Configured\n>   * or Running state, see \\ref camera_operation.\n>   *\n>   * \\return A pointer to the newly created request, or nullptr on error\n>   */\n>  Request *Camera::createRequest(uint64_t cookie)\n>  {\n> -\tif (disconnected_ || !stateBetween(CameraPrepared, CameraRunning))\n> +\tif (disconnected_ || !stateBetween(CameraConfigured, CameraRunning))\n>  \t\treturn nullptr;\n>  \n>  \treturn new Request(this, cookie);\n> @@ -842,7 +780,7 @@ int Camera::start()\n>  \tif (disconnected_)\n>  \t\treturn -ENODEV;\n>  \n> -\tif (!stateIs(CameraPrepared))\n> +\tif (!stateIs(CameraConfigured))\n>  \t\treturn -EACCES;\n>  \n>  \tLOG(Camera, Debug) << \"Starting capture\";\n> @@ -885,7 +823,7 @@ int Camera::stop()\n>  \n>  \tLOG(Camera, Debug) << \"Stopping capture\";\n>  \n> -\tstate_ = CameraPrepared;\n> +\tstate_ = CameraConfigured;\n>  \n>  \tpipe_->stop(this);\n>  \n> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp\n> index 57789b24e9615fa6..207a13bd841da2b8 100644\n> --- a/src/libcamera/framebuffer_allocator.cpp\n> +++ b/src/libcamera/framebuffer_allocator.cpp\n> @@ -116,8 +116,7 @@ FrameBufferAllocator::~FrameBufferAllocator()\n>   */\n>  int FrameBufferAllocator::allocate(Stream *stream)\n>  {\n> -\tif (camera_->state_ != Camera::CameraConfigured &&\n> -\t    camera_->state_ != Camera::CameraPrepared) {\n> +\tif (camera_->state_ != Camera::CameraConfigured) {\n>  \t\tLOG(Allocator, Error)\n>  \t\t\t<< \"Camera must be in the configured state to allocate buffers\";\n>  \t\treturn -EACCES;\n> @@ -163,7 +162,7 @@ int FrameBufferAllocator::allocate(Stream *stream)\n>   */\n>  int FrameBufferAllocator::free(Stream *stream)\n>  {\n> -\tif (camera_->state_ != Camera::CameraConfigured && camera_->state_ != Camera::CameraPrepared) {\n> +\tif (camera_->state_ != Camera::CameraConfigured) {\n>  \t\tLOG(Allocator, Error)\n>  \t\t\t<< \"Camera must be in the configured state to free buffers\";\n>  \t\treturn -EACCES;\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 2fd65b468b9cd84f..669097f609ab7168 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -301,6 +301,11 @@ const ControlInfoMap &PipelineHandler::controls(Camera *camera)\n>   * suitable to be added to a Request for the stream, and shall be mappable to\n>   * the CPU through their associated dmabufs with mmap().\n>   *\n> + * The method may only be called after the Camera has been configured and before\n> + * it gets started, or after it gets stopped. It shall be called only for\n> + * streams that are part of the active camera configuration, and at most once\n> + * per stream until buffers for the stream are freed with freeFrameBuffers().\n> + *\n\nAh, that's where the documentation went :-) You just need to move it to\nthe right patch. All the rest is fine here.\n\n>   * exportFrameBuffers() shall also allocate all other resources required by\n>   * the pipeline handler for the stream to prepare for starting the Camera. This\n>   * responsibility is shared with importFrameBuffers(), and one and only one of\n> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\n> index 047bf15ea7c188f7..1d9c756f147a59f7 100644\n> --- a/src/qcam/main_window.cpp\n> +++ b/src/qcam/main_window.cpp\n> @@ -172,13 +172,6 @@ int MainWindow::startCapture()\n>  \n>  \tadjustSize();\n>  \n> -\tret = camera_->allocateBuffers();\n> -\tif (ret) {\n> -\t\tstd::cerr << \"Failed to allocate buffers\"\n> -\t\t\t  << std::endl;\n> -\t\treturn ret;\n> -\t}\n> -\n>  \tret = allocator_->allocate(stream);\n>  \tif (ret < 0) {\n>  \t\tstd::cerr << \"Failed to allocate capture buffers\" << std::endl;\n> @@ -244,7 +237,6 @@ error:\n>  \t}\n>  \tmappedBuffers_.clear();\n>  \n> -\tcamera_->freeBuffers();\n>  \treturn ret;\n>  }\n>  \n> @@ -264,7 +256,6 @@ void MainWindow::stopCapture()\n>  \t}\n>  \tmappedBuffers_.clear();\n>  \n> -\tcamera_->freeBuffers();\n>  \tisCapturing_ = false;\n>  \n>  \tconfig_.reset();\n> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\n> index 10db15d6276d9bf3..44cb4e7c551be759 100644\n> --- a/src/v4l2/v4l2_camera.cpp\n> +++ b/src/v4l2/v4l2_camera.cpp\n> @@ -121,10 +121,6 @@ int V4L2Camera::configure(StreamConfiguration *streamConfigOut,\n>  \n>  int V4L2Camera::allocBuffers(unsigned int count)\n>  {\n> -\tint ret = camera_->allocateBuffers();\n> -\tif (ret)\n> -\t\treturn ret == -EACCES ? -EBUSY : ret;\n> -\n>  \tStream *stream = *camera_->streams().begin();\n>  \n>  \treturn bufferAllocator_->allocate(stream);\n> @@ -134,7 +130,6 @@ void V4L2Camera::freeBuffers()\n>  {\n>  \tStream *stream = *camera_->streams().begin();\n>  \tbufferAllocator_->free(stream);\n> -\tcamera_->freeBuffers();\n>  }\n>  \n>  FileDescriptor V4L2Camera::getBufferFd(unsigned int index)\n> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> index f506d1b221e568ad..e7048335e0317703 100644\n> --- a/test/camera/buffer_import.cpp\n> +++ b/test/camera/buffer_import.cpp\n> @@ -174,11 +174,6 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tif (camera_->allocateBuffers()) {\n> -\t\t\tstd::cout << \"Failed to allocate buffers\" << std::endl;\n> -\t\t\treturn TestFail;\n> -\t\t}\n> -\n>  \t\tStream *stream = cfg.stream();\n>  \n>  \t\tBufferSource source;\n> @@ -244,11 +239,6 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tif (camera_->freeBuffers()) {\n> -\t\t\tstd::cout << \"Failed to free buffers\" << std::endl;\n> -\t\t\treturn TestFail;\n> -\t\t}\n> -\n>  \t\treturn TestPass;\n>  \t}\n>  \n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index de879ee4eb1420a6..b304d59c1c2aa9e2 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -87,11 +87,6 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tif (camera_->allocateBuffers()) {\n> -\t\t\tcout << \"Failed to allocate buffers\" << endl;\n> -\t\t\treturn TestFail;\n> -\t\t}\n> -\n>  \t\tStream *stream = cfg.stream();\n>  \n>  \t\tint ret = allocator_->allocate(stream);\n> @@ -158,11 +153,6 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tif (camera_->freeBuffers()) {\n> -\t\t\tcout << \"Failed to free buffers\" << endl;\n> -\t\t\treturn TestFail;\n> -\t\t}\n> -\n>  \t\treturn TestPass;\n>  \t}\n>  \n> diff --git a/test/camera/statemachine.cpp b/test/camera/statemachine.cpp\n> index f3a7ca7c32a5ec97..20541b3e4752dc81 100644\n> --- a/test/camera/statemachine.cpp\n> +++ b/test/camera/statemachine.cpp\n> @@ -29,12 +29,6 @@ protected:\n>  \t\tif (camera_->configure(defconf_.get()) != -EACCES)\n>  \t\t\treturn TestFail;\n>  \n> -\t\tif (camera_->allocateBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->freeBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n>  \t\tif (camera_->createRequest())\n>  \t\t\treturn TestFail;\n>  \n> @@ -65,12 +59,6 @@ protected:\n>  \t\tif (camera_->acquire() != -EBUSY)\n>  \t\t\treturn TestFail;\n>  \n> -\t\tif (camera_->allocateBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->freeBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n>  \t\tif (camera_->createRequest())\n>  \t\t\treturn TestFail;\n>  \n> @@ -103,57 +91,6 @@ protected:\n>  \t\tif (camera_->acquire() != -EBUSY)\n>  \t\t\treturn TestFail;\n>  \n> -\t\tif (camera_->freeBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->createRequest())\n> -\t\t\treturn TestFail;\n> -\n> -\t\tRequest request(camera_.get());\n> -\t\tif (camera_->queueRequest(&request) != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->start() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->stop() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\t/* Test operations which should pass. */\n> -\t\tif (camera_->configure(defconf_.get()))\n> -\t\t\treturn TestFail;\n> -\n> -\t\t/* Test valid state transitions, end in Prepared state. */\n> -\t\tif (camera_->release())\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->acquire())\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->configure(defconf_.get()))\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->allocateBuffers())\n> -\t\t\treturn TestFail;\n> -\n> -\t\treturn TestPass;\n> -\t}\n> -\n> -\tint testPrepared()\n> -\t{\n> -\t\t/* Test operations which should fail. */\n> -\t\tif (camera_->acquire() != -EBUSY)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->release() != -EBUSY)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->configure(defconf_.get()) != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->allocateBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n>  \t\tRequest request1(camera_.get());\n>  \t\tif (camera_->queueRequest(&request1) != -EACCES)\n>  \t\t\treturn TestFail;\n> @@ -170,9 +107,6 @@ protected:\n>  \t\tdelete request2;\n>  \n>  \t\t/* Test valid state transitions, end in Running state. */\n> -\t\tif (camera_->freeBuffers())\n> -\t\t\treturn TestFail;\n> -\n>  \t\tif (camera_->release())\n>  \t\t\treturn TestFail;\n>  \n> @@ -182,9 +116,6 @@ protected:\n>  \t\tif (camera_->configure(defconf_.get()))\n>  \t\t\treturn TestFail;\n>  \n> -\t\tif (camera_->allocateBuffers())\n> -\t\t\treturn TestFail;\n> -\n>  \t\t/* Use internally allocated buffers. */\n>  \t\tallocator_ = FrameBufferAllocator::create(camera_);\n>  \t\tStream *stream = *camera_->streams().begin();\n> @@ -209,12 +140,6 @@ protected:\n>  \t\tif (camera_->configure(defconf_.get()) != -EACCES)\n>  \t\t\treturn TestFail;\n>  \n> -\t\tif (camera_->allocateBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n> -\t\tif (camera_->freeBuffers() != -EACCES)\n> -\t\t\treturn TestFail;\n> -\n>  \t\tif (camera_->start() != -EACCES)\n>  \t\t\treturn TestFail;\n>  \n> @@ -236,9 +161,6 @@ protected:\n>  \n>  \t\tdelete allocator_;\n>  \n> -\t\tif (camera_->freeBuffers())\n> -\t\t\treturn TestFail;\n> -\n>  \t\tif (camera_->release())\n>  \t\t\treturn TestFail;\n>  \n> @@ -276,11 +198,6 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tif (testPrepared() != TestPass) {\n> -\t\t\tcout << \"State machine in Prepared state failed\" << endl;\n> -\t\t\treturn TestFail;\n> -\t\t}\n> -\n>  \t\tif (testRuning() != TestPass) {\n>  \t\t\tcout << \"State machine in Running state failed\" << endl;\n>  \t\t\treturn TestFail;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 716226045E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 12 Jan 2020 14:43:06 +0100 (CET)","from pendragon.ideasonboard.com (85-76-9-232-nat.elisa-mobile.fi\n\t[85.76.9.232])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3382F30F;\n\tSun, 12 Jan 2020 14:43:05 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578836586;\n\tbh=EODIHAHLqUIMISegt04fyX+EVPpAtJGZXw5gJ5TV/34=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eHawofJm3SJtoqsZ9w2Q4cR4arWmFHMeSh3zuOaWKhS/HIEEvCCHXMJB0PIP6OITG\n\tbal6KtE6xSOmpvLISj5kZP0lzHhEcKYKE2+guvAn9Hl1LPRfJ0Vdss1NwahYvx9x4V\n\tcpUnb2SLQnYEmapAV6AIL7GFFv4RLN6V13U8Vvvc=","Date":"Sun, 12 Jan 2020 15:42:48 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200112134248.GF25899@pendragon.ideasonboard.com>","References":"<20200112010212.2609025-1-niklas.soderlund@ragnatech.se>\n\t<20200112010212.2609025-33-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200112010212.2609025-33-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v4 32/32] libcamera: camera: Remove\n\tthe prepared state","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 12 Jan 2020 13:43:06 -0000"}}]