Skip to content
Commit df7f3162 authored by Samuel Holland's avatar Samuel Holland Committed by Paul Gortmaker
Browse files

media: cedrus: Program output format during each run



commit a8876c22 upstream.

Previously, the output format was programmed as part of the ioctl()
handler. However, this has two problems:

  1) If there are multiple active streams with different output
     formats, the hardware will use whichever format was set last
     for both streams. Similarly, an ioctl() done in an inactive
     context will wrongly affect other active contexts.
  2) The registers are written while the device is not actively
     streaming. To enable runtime PM tied to the streaming state,
     all hardware access needs to be moved inside cedrus_device_run().

The call to cedrus_dst_format_set() is now placed just before the
codec-specific callback that programs the hardware.

Cc: <stable@vger.kernel.org>
Fixes: 50e76151 ("media: platform: Add Cedrus VPU decoder driver")
Suggested-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Suggested-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Tested-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 64292a46
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment