cedrus: add action item to the TODO

Message ID 99a00f6e-3cd7-b063-107f-ec27c5c9833d@xs4all.nl (mailing list archive)
State Accepted, archived
Delegated to: Hans Verkuil
Headers

Commit Message

Hans Verkuil Nov. 15, 2018, 7:49 a.m. UTC
Mention that the request validation should increment the memory refcount
of reference buffers so we don't forget to do this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
  

Comments

Paul Kocialkowski Nov. 15, 2018, 8:49 a.m. UTC | #1
Hi,

On Thu, 2018-11-15 at 08:49 +0100, Hans Verkuil wrote:
> Mention that the request validation should increment the memory refcount
> of reference buffers so we don't forget to do this.

Thanks for adding this item, we should definitely take care of it before
unstaging.

Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> diff --git a/drivers/staging/media/sunxi/cedrus/TODO b/drivers/staging/media/sunxi/cedrus/TODO
> index ec277ece47af..a951b3fd1ea1 100644
> --- a/drivers/staging/media/sunxi/cedrus/TODO
> +++ b/drivers/staging/media/sunxi/cedrus/TODO
> @@ -5,3 +5,8 @@ Before this stateless decoder driver can leave the staging area:
>  * Userspace support for the Request API needs to be reviewed;
>  * Another stateless decoder driver should be submitted;
>  * At least one stateless encoder driver should be submitted.
> +* When queueing a request containing references to I frames, the
> +  refcount of the memory for those I frames needs to be incremented
> +  and decremented when the request is completed. This will likely
> +  require some help from vb2. The driver should fail the request
> +  if the memory/buffer is gone.
  

Patch

diff --git a/drivers/staging/media/sunxi/cedrus/TODO b/drivers/staging/media/sunxi/cedrus/TODO
index ec277ece47af..a951b3fd1ea1 100644
--- a/drivers/staging/media/sunxi/cedrus/TODO
+++ b/drivers/staging/media/sunxi/cedrus/TODO
@@ -5,3 +5,8 @@  Before this stateless decoder driver can leave the staging area:
 * Userspace support for the Request API needs to be reviewed;
 * Another stateless decoder driver should be submitted;
 * At least one stateless encoder driver should be submitted.
+* When queueing a request containing references to I frames, the
+  refcount of the memory for those I frames needs to be incremented
+  and decremented when the request is completed. This will likely
+  require some help from vb2. The driver should fail the request
+  if the memory/buffer is gone.