Lines Matching +full:codec +full:- +full:irq
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Hantro VPU codec driver
8 * Based on s5p-mfc driver by Samsung Electronics Co., Ltd.
21 #include <media/v4l2-ctrls.h>
22 #include <media/v4l2-device.h>
23 #include <media/v4l2-ioctl.h>
24 #include <media/v4l2-mem2mem.h>
25 #include <media/videobuf2-core.h>
26 #include <media/videobuf2-dma-contig.h>
45 * struct hantro_irq - irq handler and name
47 * @name: irq name for device tree lookup
52 irqreturn_t (*handler)(int irq, void *priv);
56 * struct hantro_variant - information about VPU hardware variant
64 * @postproc_fmts: Post-processor formats.
65 * @num_postproc_fmts: Number of post-processor formats.
66 * @postproc_ops: Post-processor ops.
67 * @codec: Supported codecs
68 * @codec_ops: Codec ops.
71 * @irqs: array of irq names and interrupt handlers
91 unsigned int codec; member
107 * enum hantro_codec_mode - codec operating mode.
111 * @HANTRO_MODE_MPEG2_DEC: MPEG-2 decoder.
118 HANTRO_MODE_NONE = -1,
129 * struct hantro_ctrl - helper type to declare supported controls
130 * @codec: codec id this control belong to (HANTRO_JPEG_ENCODER, etc.)
134 unsigned int codec; member
139 * struct hantro_func - Hantro VPU functionality
174 * struct hantro_dev - driver data
192 * @variant: Hardware variant-specific parameters.
217 * struct hantro_ctx - Context (instance) private data.
232 * @jpeg_quality: User-specified JPEG compression quality.
235 * use the post-processor.
237 * @codec_ops: Set of operations related to codec mode.
238 * @postproc: Post-processing context.
239 * @h264_dec: H.264-decoding context.
240 * @mpeg2_dec: MPEG-2-decoding context.
241 * @vp8_dec: VP8-decoding context.
242 * @hevc_dec: HEVC-decoding context.
243 * @vp9_dec: VP9-decoding context.
244 * @av1_dec: AV1-decoding context.
267 /* Specific for particular codec modes. */
279 * struct hantro_fmt - information about supported video formats.
282 * @codec_mode: Codec mode related to this format. See
288 * @postprocessed: Indicates if this format needs the post-processor.
353 * bit 0 - global information: mode, size, init, release
354 * bit 1 - each run start/result information
355 * bit 2 - contents of small controls from userspace
356 * bit 3 - contents of big controls from userspace
357 * bit 4 - detail fmt, ctrl, buffer q/dq information
358 * bit 5 - detail function enter/leave trace information
359 * bit 6 - register write/read information
384 writel_relaxed(val, vpu->enc_base + reg); in vepu_write_relaxed()
390 writel(val, vpu->enc_base + reg); in vepu_write()
395 u32 val = readl(vpu->enc_base + reg); in vepu_read()
405 writel_relaxed(val, vpu->dec_base + reg); in vdpu_write_relaxed()
411 writel(val, vpu->dec_base + reg); in vdpu_write()
423 u32 val = readl(vpu->dec_base + reg); in vdpu_read()
435 v = vdpu_read(vpu, reg->base); in vdpu_read_mask()
436 v &= ~(reg->mask << reg->shift); in vdpu_read_mask()
437 v |= ((val & reg->mask) << reg->shift); in vdpu_read_mask()
445 vdpu_write(vpu, vdpu_read_mask(vpu, reg, val), reg->base); in hantro_reg_write()
452 vdpu_write_relaxed(vpu, vdpu_read_mask(vpu, reg, val), reg->base); in hantro_reg_write_relaxed()
461 return v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); in hantro_get_src_buf()
467 return v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); in hantro_get_dst_buf()
479 if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) in hantro_get_dec_buf_addr()
480 return hantro_postproc_get_dec_buf_addr(ctx, vb->index); in hantro_get_dec_buf_addr()