Lines Matching refs:ctx
20 int s5p_mfc_init_shm(struct s5p_mfc_ctx *ctx)
22 struct s5p_mfc_dev *dev = ctx->dev;
25 ctx->shm_alloc = vb2_dma_contig_memops.alloc(shm_alloc_ctx,
27 if (IS_ERR(ctx->shm_alloc)) {
29 return PTR_ERR(ctx->shm_alloc);
32 ctx->shm_ofs = s5p_mfc_mem_cookie(shm_alloc_ctx, ctx->shm_alloc)
34 BUG_ON(ctx->shm_ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1));
35 ctx->shm = vb2_dma_contig_memops.vaddr(ctx->shm_alloc);
36 if (!ctx->shm) {
37 vb2_dma_contig_memops.put(ctx->shm_alloc);
38 ctx->shm_ofs = 0;
39 ctx->shm_alloc = NULL;
43 memset((void *)ctx->shm, 0, SHARED_BUF_SIZE);