Lines Matching refs:hevc_dec

30 	struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec;  in hantro_hevc_ref_init()  local
32 hevc_dec->ref_bufs_used = 0; in hantro_hevc_ref_init()
38 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_get_ref_buf() local
43 if (hevc_dec->ref_bufs_poc[i] == poc) { in hantro_hevc_get_ref_buf()
44 hevc_dec->ref_bufs_used |= 1 << i; in hantro_hevc_get_ref_buf()
45 return hevc_dec->ref_bufs[i].dma; in hantro_hevc_get_ref_buf()
54 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_add_ref_buf() local
59 if (!(hevc_dec->ref_bufs_used & 1 << i)) { in hantro_hevc_add_ref_buf()
60 hevc_dec->ref_bufs_used |= 1 << i; in hantro_hevc_add_ref_buf()
61 hevc_dec->ref_bufs_poc[i] = poc; in hantro_hevc_add_ref_buf()
62 hevc_dec->ref_bufs[i].dma = addr; in hantro_hevc_add_ref_buf()
73 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in tile_buffer_reallocate() local
74 const struct hantro_hevc_dec_ctrls *ctrls = &ctx->hevc_dec.ctrls; in tile_buffer_reallocate()
82 num_tile_cols <= hevc_dec->num_tile_cols_allocated) in tile_buffer_reallocate()
86 if (hevc_dec->tile_filter.cpu) { in tile_buffer_reallocate()
87 dma_free_coherent(vpu->dev, hevc_dec->tile_filter.size, in tile_buffer_reallocate()
88 hevc_dec->tile_filter.cpu, in tile_buffer_reallocate()
89 hevc_dec->tile_filter.dma); in tile_buffer_reallocate()
90 hevc_dec->tile_filter.cpu = NULL; in tile_buffer_reallocate()
93 if (hevc_dec->tile_sao.cpu) { in tile_buffer_reallocate()
94 dma_free_coherent(vpu->dev, hevc_dec->tile_sao.size, in tile_buffer_reallocate()
95 hevc_dec->tile_sao.cpu, in tile_buffer_reallocate()
96 hevc_dec->tile_sao.dma); in tile_buffer_reallocate()
97 hevc_dec->tile_sao.cpu = NULL; in tile_buffer_reallocate()
100 if (hevc_dec->tile_bsd.cpu) { in tile_buffer_reallocate()
101 dma_free_coherent(vpu->dev, hevc_dec->tile_bsd.size, in tile_buffer_reallocate()
102 hevc_dec->tile_bsd.cpu, in tile_buffer_reallocate()
103 hevc_dec->tile_bsd.dma); in tile_buffer_reallocate()
104 hevc_dec->tile_bsd.cpu = NULL; in tile_buffer_reallocate()
108 hevc_dec->tile_filter.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
109 &hevc_dec->tile_filter.dma, in tile_buffer_reallocate()
111 if (!hevc_dec->tile_filter.cpu) in tile_buffer_reallocate()
113 hevc_dec->tile_filter.size = size; in tile_buffer_reallocate()
116 hevc_dec->tile_sao.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
117 &hevc_dec->tile_sao.dma, in tile_buffer_reallocate()
119 if (!hevc_dec->tile_sao.cpu) in tile_buffer_reallocate()
121 hevc_dec->tile_sao.size = size; in tile_buffer_reallocate()
124 hevc_dec->tile_bsd.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
125 &hevc_dec->tile_bsd.dma, in tile_buffer_reallocate()
127 if (!hevc_dec->tile_bsd.cpu) in tile_buffer_reallocate()
129 hevc_dec->tile_bsd.size = size; in tile_buffer_reallocate()
131 hevc_dec->num_tile_cols_allocated = num_tile_cols; in tile_buffer_reallocate()
136 if (hevc_dec->tile_filter.cpu) in tile_buffer_reallocate()
137 dma_free_coherent(vpu->dev, hevc_dec->tile_filter.size, in tile_buffer_reallocate()
138 hevc_dec->tile_filter.cpu, in tile_buffer_reallocate()
139 hevc_dec->tile_filter.dma); in tile_buffer_reallocate()
140 hevc_dec->tile_filter.cpu = NULL; in tile_buffer_reallocate()
142 if (hevc_dec->tile_sao.cpu) in tile_buffer_reallocate()
143 dma_free_coherent(vpu->dev, hevc_dec->tile_sao.size, in tile_buffer_reallocate()
144 hevc_dec->tile_sao.cpu, in tile_buffer_reallocate()
145 hevc_dec->tile_sao.dma); in tile_buffer_reallocate()
146 hevc_dec->tile_sao.cpu = NULL; in tile_buffer_reallocate()
148 if (hevc_dec->tile_bsd.cpu) in tile_buffer_reallocate()
149 dma_free_coherent(vpu->dev, hevc_dec->tile_bsd.size, in tile_buffer_reallocate()
150 hevc_dec->tile_bsd.cpu, in tile_buffer_reallocate()
151 hevc_dec->tile_bsd.dma); in tile_buffer_reallocate()
152 hevc_dec->tile_bsd.cpu = NULL; in tile_buffer_reallocate()
178 struct hantro_hevc_dec_hw_ctx *hevc_ctx = &ctx->hevc_dec; in hantro_hevc_dec_prepare_run()
218 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_dec_exit() local
220 if (hevc_dec->tile_sizes.cpu) in hantro_hevc_dec_exit()
221 dma_free_coherent(vpu->dev, hevc_dec->tile_sizes.size, in hantro_hevc_dec_exit()
222 hevc_dec->tile_sizes.cpu, in hantro_hevc_dec_exit()
223 hevc_dec->tile_sizes.dma); in hantro_hevc_dec_exit()
224 hevc_dec->tile_sizes.cpu = NULL; in hantro_hevc_dec_exit()
226 if (hevc_dec->scaling_lists.cpu) in hantro_hevc_dec_exit()
227 dma_free_coherent(vpu->dev, hevc_dec->scaling_lists.size, in hantro_hevc_dec_exit()
228 hevc_dec->scaling_lists.cpu, in hantro_hevc_dec_exit()
229 hevc_dec->scaling_lists.dma); in hantro_hevc_dec_exit()
230 hevc_dec->scaling_lists.cpu = NULL; in hantro_hevc_dec_exit()
232 if (hevc_dec->tile_filter.cpu) in hantro_hevc_dec_exit()
233 dma_free_coherent(vpu->dev, hevc_dec->tile_filter.size, in hantro_hevc_dec_exit()
234 hevc_dec->tile_filter.cpu, in hantro_hevc_dec_exit()
235 hevc_dec->tile_filter.dma); in hantro_hevc_dec_exit()
236 hevc_dec->tile_filter.cpu = NULL; in hantro_hevc_dec_exit()
238 if (hevc_dec->tile_sao.cpu) in hantro_hevc_dec_exit()
239 dma_free_coherent(vpu->dev, hevc_dec->tile_sao.size, in hantro_hevc_dec_exit()
240 hevc_dec->tile_sao.cpu, in hantro_hevc_dec_exit()
241 hevc_dec->tile_sao.dma); in hantro_hevc_dec_exit()
242 hevc_dec->tile_sao.cpu = NULL; in hantro_hevc_dec_exit()
244 if (hevc_dec->tile_bsd.cpu) in hantro_hevc_dec_exit()
245 dma_free_coherent(vpu->dev, hevc_dec->tile_bsd.size, in hantro_hevc_dec_exit()
246 hevc_dec->tile_bsd.cpu, in hantro_hevc_dec_exit()
247 hevc_dec->tile_bsd.dma); in hantro_hevc_dec_exit()
248 hevc_dec->tile_bsd.cpu = NULL; in hantro_hevc_dec_exit()
254 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_dec_init() local
257 memset(hevc_dec, 0, sizeof(*hevc_dec)); in hantro_hevc_dec_init()
265 hevc_dec->tile_sizes.cpu = dma_alloc_coherent(vpu->dev, size, in hantro_hevc_dec_init()
266 &hevc_dec->tile_sizes.dma, in hantro_hevc_dec_init()
268 if (!hevc_dec->tile_sizes.cpu) in hantro_hevc_dec_init()
271 hevc_dec->tile_sizes.size = size; in hantro_hevc_dec_init()
273 hevc_dec->scaling_lists.cpu = dma_alloc_coherent(vpu->dev, SCALING_LIST_SIZE, in hantro_hevc_dec_init()
274 &hevc_dec->scaling_lists.dma, in hantro_hevc_dec_init()
276 if (!hevc_dec->scaling_lists.cpu) in hantro_hevc_dec_init()
279 hevc_dec->scaling_lists.size = SCALING_LIST_SIZE; in hantro_hevc_dec_init()