1. 02 Aug, 2018 9 commits
  2. 30 Jul, 2018 29 commits
  3. 27 Jul, 2018 2 commits
    • Sylwester Nawrocki's avatar
      media: s5p-mfc: Fix buffer look up in s5p_mfc_handle_frame_{new, copy_time} functions · 4faeaf9c
      Sylwester Nawrocki authored
      Look up of buffers in s5p_mfc_handle_frame_new, s5p_mfc_handle_frame_copy_time
      functions is not working properly for DMA addresses above 2 GiB. As a result
      flags and timestamp of returned buffers are not set correctly and it breaks
      operation of GStreamer/OMX plugins which rely on the CAPTURE buffer queue
      flags.
      
      Due to improper return type of the get_dec_y_adr, get_dspl_y_adr callbacks
      and sign bit extension these callbacks return incorrect address values,
      e.g. 0xfffffffffefc0000 instead of 0x00000000fefc0000. Then the statement:
      
      "if (vb2_dma_contig_plane_dma_addr(&dst_buf->b->vb2_buf, 0) == dec_y_addr)"
      
      is always false, which breaks looking up capture queue buffers.
      
      To ensure proper matching by address u32 type is used for the DMA
      addresses. This should work on all related SoCs, since the MFC DMA
      address width is not larger than 32-bit.
      
      Changes done in this patch are minimal as there is a larger patch series
      pending refactoring the whole driver.
      Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      4faeaf9c
    • Ezequiel Garcia's avatar
      media: v4l2-mem2mem: Fix missing v4l2_m2m_try_run call · 9db3bbf5
      Ezequiel Garcia authored
      Commit 34dbb848 ("media: mem2mem: Remove excessive try_run call")
      removed a redundant call to v4l2_m2m_try_run but instead introduced
      a bug. Consider the following case:
      
       1) Context A schedules, queues and runs job A.
       2) While the m2m device is running, context B schedules
          and queues job B. Job B cannot run, because it has to
          wait for job A.
       3) Job A completes, calls v4l2_m2m_job_finish, and tries
          to queue a job for context A, but since the context is
          empty it won't do anything.
      
      In this scenario, queued job B will never run. Fix this by calling
      v4l2_m2m_try_run from v4l2_m2m_try_schedule.
      
      While here, add more documentation to these functions.
      
      Fixes: 34dbb848 ("media: mem2mem: Remove excessive try_run call")
      Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      [hans.verkuil@cisco.com: split >80 cols line]
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      9db3bbf5