Re: [PATCH v2 5/5] media: rockchip: Use vb2_get_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/10/19 10:55 PM, Ezequiel Garcia wrote:
> Use the newly introduced vb2_get_buffer API and avoid
> accessing buffers in the queue directly.

Can you rebase this patch? It no longer applies after the hantro rename
was merged.

Thanks!

	Hans

> 
> Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
> ---
>  drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> index b94ff97451db..ad17e04e701a 100644
> --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
> @@ -45,12 +45,15 @@ void *rockchip_vpu_get_ctrl(struct rockchip_vpu_ctx *ctx, u32 id)
>  
>  dma_addr_t rockchip_vpu_get_ref(struct vb2_queue *q, u64 ts)
>  {
> +	struct vb2_buffer *buf;
>  	int index;
>  
>  	index = vb2_find_timestamp(q, ts, 0);
> -	if (index >= 0)
> -		return vb2_dma_contig_plane_dma_addr(q->bufs[index], 0);
> -	return 0;
> +	if (index < 0)
> +		return 0;
> +
> +	buf = vb2_get_buffer(q, index);
> +	return vb2_dma_contig_plane_dma_addr(buf, 0);
>  }
>  
>  static int
> 




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux