Lines Matching refs:hevc_dec

35 	struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec;  in hantro_hevc_ref_init()  local
37 hevc_dec->ref_bufs_used = 0; in hantro_hevc_ref_init()
43 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_get_ref_buf() local
48 if (hevc_dec->ref_bufs_poc[i] == poc) { in hantro_hevc_get_ref_buf()
49 hevc_dec->ref_bufs_used |= 1 << i; in hantro_hevc_get_ref_buf()
50 return hevc_dec->ref_bufs[i].dma; in hantro_hevc_get_ref_buf()
59 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in hantro_hevc_add_ref_buf() local
64 if (!(hevc_dec->ref_bufs_used & 1 << i)) { in hantro_hevc_add_ref_buf()
65 hevc_dec->ref_bufs_used |= 1 << i; in hantro_hevc_add_ref_buf()
66 hevc_dec->ref_bufs_poc[i] = poc; in hantro_hevc_add_ref_buf()
67 hevc_dec->ref_bufs[i].dma = addr; in hantro_hevc_add_ref_buf()
78 struct hantro_hevc_dec_hw_ctx *hevc_dec = &ctx->hevc_dec; in tile_buffer_reallocate() local
79 const struct hantro_hevc_dec_ctrls *ctrls = &ctx->hevc_dec.ctrls; in tile_buffer_reallocate()
87 num_tile_cols <= hevc_dec->num_tile_cols_allocated) in tile_buffer_reallocate()
91 if (hevc_dec->tile_filter.cpu) { in tile_buffer_reallocate()
92 dma_free_coherent(vpu->dev, hevc_dec->tile_filter.size, in tile_buffer_reallocate()
93 hevc_dec->tile_filter.cpu, in tile_buffer_reallocate()
94 hevc_dec->tile_filter.dma); in tile_buffer_reallocate()
95 hevc_dec->tile_filter.cpu = NULL; in tile_buffer_reallocate()
98 if (hevc_dec->tile_sao.cpu) { in tile_buffer_reallocate()
99 dma_free_coherent(vpu->dev, hevc_dec->tile_sao.size, in tile_buffer_reallocate()
100 hevc_dec->tile_sao.cpu, in tile_buffer_reallocate()
101 hevc_dec->tile_sao.dma); in tile_buffer_reallocate()
102 hevc_dec->tile_sao.cpu = NULL; in tile_buffer_reallocate()
105 if (hevc_dec->tile_bsd.cpu) { in tile_buffer_reallocate()
106 dma_free_coherent(vpu->dev, hevc_dec->tile_bsd.size, in tile_buffer_reallocate()
107 hevc_dec->tile_bsd.cpu, in tile_buffer_reallocate()
108 hevc_dec->tile_bsd.dma); in tile_buffer_reallocate()
109 hevc_dec->tile_bsd.cpu = NULL; in tile_buffer_reallocate()
113 hevc_dec->tile_filter.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
114 &hevc_dec->tile_filter.dma, in tile_buffer_reallocate()
116 if (!hevc_dec->tile_filter.cpu) in tile_buffer_reallocate()
118 hevc_dec->tile_filter.size = size; in tile_buffer_reallocate()
121 hevc_dec->tile_sao.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
122 &hevc_dec->tile_sao.dma, in tile_buffer_reallocate()
124 if (!hevc_dec->tile_sao.cpu) in tile_buffer_reallocate()
126 hevc_dec->tile_sao.size = size; in tile_buffer_reallocate()
129 hevc_dec->tile_bsd.cpu = dma_alloc_coherent(vpu->dev, size, in tile_buffer_reallocate()
130 &hevc_dec->tile_bsd.dma, in tile_buffer_reallocate()
132 if (!hevc_dec->tile_bsd.cpu) in tile_buffer_reallocate()
134 hevc_dec->tile_bsd.size = size; in tile_buffer_reallocate()
136 hevc_dec->num_tile_cols_allocated = num_tile_cols; in tile_buffer_reallocate()
141 if (hevc_dec->tile_sao.cpu) in tile_buffer_reallocate()
142 dma_free_coherent(vpu->dev, hevc_dec->tile_sao.size, in tile_buffer_reallocate()
143 hevc_dec->tile_sao.cpu, in tile_buffer_reallocate()
144 hevc_dec->tile_sao.dma); in tile_buffer_reallocate()
145 hevc_dec->tile_sao.cpu = NULL; in tile_buffer_reallocate()
148 if (hevc_dec->tile_filter.cpu) in tile_buffer_reallocate()
149 dma_free_coherent(vpu->dev, hevc_dec->tile_filter.size, in tile_buffer_reallocate()
150 hevc_dec->tile_filter.cpu, in tile_buffer_reallocate()
151 hevc_dec->tile_filter.dma); in tile_buffer_reallocate()
152 hevc_dec->tile_filter.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()
283 hevc_dec->use_compression = in hantro_hevc_dec_init()