1. 18 7月, 2014 2 次提交
    • A
      [media] v4l: omap4iss: tighten omap4iss dependencies · 3ed1a002
      Arnd Bergmann 提交于
      The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
      of which can be loadable modules. This causes build failures
      if we want the camera driver to be built-in.
      
      This can be solved by turning the option into "tristate",
      which unfortunately causes another problem, because the
      driver incorrectly calls a platform-internal interface
      for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.
      
      Instead, this patch just forbids the invalid configurations
      and ensures that the driver can only be built if all its
      dependencies are built-in.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      3ed1a002
    • L
      [media] v4l: vb2: Add fatal error condition flag · 4bb7267d
      Laurent Pinchart 提交于
      When a fatal error occurs that render the device unusable, the only
      options for a driver to signal the error condition to userspace is to
      set the V4L2_BUF_FLAG_ERROR flag when dequeuing buffers and to return an
      error from the buffer prepare handler when queuing buffers.
      
      The buffer error flag indicates a transient error and can't be used by
      applications to detect fatal errors. Returning an error from vb2_qbuf()
      is thus the only real indication that a fatal error occurred. However,
      this is difficult to handle for multithreaded applications that requeue
      buffers from a thread other than the control thread. In particular the
      poll() call in the control thread will not notify userspace of the
      error.
      
      This patch adds an explicit mechanism to report fatal errors to
      userspace. Drivers can call the vb2_queue_error() function to signal a
      fatal error. From this moment on, buffer preparation will return -EIO to
      userspace, and vb2_poll() will set the POLLERR flag and return
      immediately. The error flag is cleared when cancelling the queue, either
      at stream off time (through vb2_streamoff) or when releasing the queue
      with vb2_queue_release().
      Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      4bb7267d
  2. 17 7月, 2014 38 次提交