[PATCH v2 11/14] media: mediatek: vcodec: add debug information

Nicolas Dufresne nicolas.dufresne at collabora.com
Fri Nov 28 12:20:31 PST 2025


Le vendredi 15 août 2025 à 16:52 +0800, Yunfei Dong a écrit :
> Print hevc/av1 output format and 10bit capture format
> information to debug.
> 
> Signed-off-by: Yunfei Dong <yunfei.dong at mediatek.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

> ---
>  .../mediatek/vcodec/common/mtk_vcodec_dbgfs.c | 21 +++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
> index 5ad3797836db..79ccbe13735a 100644
> --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
> +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
> @@ -29,6 +29,14 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_dec_ctx *ctx, char
>  		curr_len = snprintf(buf + *used, total - *used,
>  				    "\toutput format: vp9 slice\n");
>  		break;
> +	case V4L2_PIX_FMT_HEVC_SLICE:
> +		curr_len = snprintf(buf + *used, total - *used,
> +				    "\toutput format: hevc slice\n");
> +		break;
> +	case V4L2_PIX_FMT_AV1_FRAME:
> +		curr_len = snprintf(buf + *used, total - *used,
> +				    "\toutput format: av1 slice\n");
> +		break;
>  	default:
>  		curr_len = snprintf(buf + *used, total - *used,
>  				    "\tunsupported output format: 0x%x\n",
> @@ -45,6 +53,14 @@ static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_dec_ctx *ctx, char
>  		curr_len = snprintf(buf + *used, total - *used,
>  				    "\tcapture format: MT21C\n");
>  		break;
> +	case V4L2_PIX_FMT_MT2110T:
> +		curr_len = snprintf(buf + *used, total - *used,
> +				    "\tcapture format: MT2110T (10bit tile mode)\n");
> +		break;
> +	case V4L2_PIX_FMT_MT2110R:
> +		curr_len = snprintf(buf + *used, total - *used,
> +				    "\tcapture format: MT2110T (10bit raster mode)\n");
> +		break;
>  	default:
>  		curr_len = snprintf(buf + *used, total - *used,
>  				    "\tunsupported capture format: 0x%x\n",
> @@ -122,9 +138,10 @@ static ssize_t mtk_vdec_dbgfs_read(struct file *filp, char __user *ubuf,
>  
>  		if (dbgfs_index[MTK_VDEC_DBGFS_PICINFO]) {
>  			curr_len = snprintf(buf + used_len, total_len - used_len,
> -					    "\treal(%dx%d)=>align(%dx%d)\n",
> +					    "\treal(%dx%d)=>align(%dx%d) 10bit(%d)\n",
>  					    ctx->picinfo.pic_w, ctx->picinfo.pic_h,
> -					    ctx->picinfo.buf_w, ctx->picinfo.buf_h);
> +					    ctx->picinfo.buf_w, ctx->picinfo.buf_h,
> +					    ctx->is_10bit_bitstream);
>  			used_len += curr_len;
>  		}
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251128/23a2455f/attachment-0001.sig>


More information about the linux-arm-kernel mailing list