Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp435319lqh; Fri, 31 May 2024 06:08:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIC6fPRDX+ugndspuJycgM83cCZ8WTN4cBXk3Md+6S2ypeh+frQKYqxoqgv7ooRNXJ9RTbp3HXLxk5EaNQwmFfFhQQmt4tkggEk3c2UQ== X-Google-Smtp-Source: AGHT+IG4blvJD4rscXNp4rx6pvGgBIGFWS68k3Z0hJnhYnDHwZuOX6rFvXWXF5kIC/zqi1kqS7Q2 X-Received: by 2002:a05:6a00:4b11:b0:6ed:d5f5:869 with SMTP id d2e1a72fcca58-702477b6664mr1946728b3a.3.1717160929169; Fri, 31 May 2024 06:08:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717160929; cv=pass; d=google.com; s=arc-20160816; b=VRphmgSPMGYcdsbK0Z2j47lnpbyNkqRnaQ4N1WOE69xMBYQenFLRxzzM8NTbeZqyhw JU3OsPg2tccF6gyQZu/xYC1ihnvkKHXKu/x9bRfm8OifjrcBzqYLs9BYDF6bN1WpBGcz ycWj0rrs3FJR4vrZf1//hCZ2Eqer1l/tCJxPQpMbhgaxNBIc5UeWOusu7vkK3dgCZqGC drYi610t/N4cJWT+XwdzKbgjSOGmkOfajsjz7qEitCcSbQsdbCMdvzCYGZ2ABiYbJu6h 5ZEQNNvCyYi1vosQN0kkX0Wy3IkW1gy+ijLfBWl/7+ycUriUG8Nj2bG2if+7OBT/TxY+ X/WQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=p4e5gWcvA8v+MjMa9vyFasZ9Rw/zXPctm/ztu0Pbmlw=; fh=aKdUUm54Y8bAMSwndYGdoqwRxLBAmmyNViyEm7ouWrQ=; b=S6TTt5NzIIWPDScgsXohLbXGw0Zy2Md+b4IcOGlZTt/1BS0iDW9pN414AeXW7VFtZD Pt3n7LXWc/9hE2TBnZghMoIrCgQc4oih0ggaQ0YOA0a1au9LLg8nrYhd/TVqk5ErMfIq +gKplUI4RVvWb3G0xIs4uipvn+MnMAaGf0lEEx+qdqyzv2r4/01P4C0xRWsIh0BrR9Pp Cb3OCrpn683MhROudNXaG34PSs/lfUWtjQKgmpve4h/kInJd0R5IhYNY8rdfzv1l3F2A sHcJzMyXCeHacy66A2MJvL6kIN6WfWUzUl11vki7sJDDCIJj0TJ1vR5SpVfelZe/cAdx GWrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=34uRkWd2; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-196838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-7024d1bde75si711159b3a.136.2024.05.31.06.08.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 06:08:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=34uRkWd2; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-196838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C945D2833B1 for ; Fri, 31 May 2024 13:08:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F622158A1D; Fri, 31 May 2024 13:08:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="34uRkWd2" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 161DE1F95A; Fri, 31 May 2024 13:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717160917; cv=none; b=ucd539Lq1XLRI2ER2syHA7Lz9XJ6gy4zCki3eHI4yxiUhYfZyeA/qFmLk03n0AuO47K25aOxslF97WXbkWJ5pzu82xgUMnYzofBwa0WwtOSFA+HYphvAQagxBGIw+O3kQDJp9H6CAYvKU+UUI/QB1fmnJ2mvJIarPcZ/1pmgHLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717160917; c=relaxed/simple; bh=kJL81lgtIhtVj03x4PGIQjC8rszVUBsb9lNIZjrnrCA=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=q5m9Jy1RCJ58U6M5rRRAy5px/wdKumI1sfSukb5U9X2MCPc92j5KqQOJ9KIhqUwKaSozm3wELAvG4rCFxx4gkhQOouZntO7+32TWi4LUlvpPcG+2D+QGM9lssMe71aQOmzpWjeQ5W8k777FkbLNE4HQt9n8tV4JRI5s89lriPi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=34uRkWd2; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717160914; bh=kJL81lgtIhtVj03x4PGIQjC8rszVUBsb9lNIZjrnrCA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=34uRkWd227zQ4v3svcLUIKUry1ObSr3ERNtPGpw/1Nt/OPbLed+tyfAKDO7IfvN7o l289JLhqqGmd0VI44jpbZsRHWodBKpV6BosGnqlJXiajPRJ260/gm3U6pNINlYUcUp /Xj11bDsmiTtHSKfs7ihIWT3ypwcOmTeBbmxXmQ075uin3sIjlhZlNxoVhhkHrfLjS kN4ebHOzsSUqAAhd6ds1IPEPqxppHFW8vWXda6AzmfQlpvndevE/j7bKl2H9XNeHkv 4Fx+ubyWdVwiqyvPJcpkmJ6AQzgKPvnoJr5DXTe6uVx3LqhgOeo8xRW7Nz8uhcXCWI f1fnXgcX6YTWQ== Received: from nicolas-tpx395.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: nicolas) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8DA4137821AD; Fri, 31 May 2024 13:08:30 +0000 (UTC) Message-ID: Subject: Re: [PATCH v6,15/24] media: mediatek: vcodec: Add one plane format From: Nicolas Dufresne To: Yunfei Dong , Jeffrey Kardatzke , =?ISO-8859-1?Q?N=EDcolas?= "F . R . A . Prado" , Nathan Hebert , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Sebastian Fricke , Tomasz Figa , Mauro Carvalho Chehab , Marek Szyprowski Cc: Chen-Yu Tsai , Yong Wu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Sumit Semwal , Brian Starkey , John Stultz , "T . J . Mercier" , Christian =?ISO-8859-1?Q?K=F6nig?= , Matthias Brugger , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Date: Fri, 31 May 2024 09:08:24 -0400 In-Reply-To: <20240516122102.16379-16-yunfei.dong@mediatek.com> References: <20240516122102.16379-1-yunfei.dong@mediatek.com> <20240516122102.16379-16-yunfei.dong@mediatek.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (3.52.1-1.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Le jeudi 16 mai 2024 =C3=A0 20:20 +0800, Yunfei Dong a =C3=A9crit=C2=A0: > Adding capture formats to support V4L2_PIX_FMT_MS21. This format has > one plane and only be used for secure video playback at current period. Please, replace "one plane" with "single allocation". This should disambigu= ate the message a little bit, since MS21 remains a semi-planar format with 2 pl= anes. Nicolas >=20 > Signed-off-by: Yunfei Dong > --- > .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c | 4 +++- > .../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 9 ++++++++- > 2 files changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_de= c.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c > index 9107707de6c4..192b01ff3ede 100644 > --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c > +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c > @@ -49,7 +49,9 @@ static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_dec_= ctx *ctx, int format_inde > num_frame_count++; > } > =20 > - if (num_frame_count =3D=3D 1 || (!ctx->is_10bit_bitstream && fmt->fourc= c =3D=3D V4L2_PIX_FMT_MM21)) > + if ((!ctx->is_10bit_bitstream && fmt->fourcc =3D=3D V4L2_PIX_FMT_MM21) = || > + (ctx->is_secure_playback && fmt->fourcc =3D=3D V4L2_PIX_FMT_MS21) |= | > + num_frame_count =3D=3D 1) > return true; > =20 > q_data =3D &ctx->q_data[MTK_Q_DATA_SRC]; > diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_de= c_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_d= ec_stateless.c > index b903e39fee89..fbea00517565 100644 > --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_state= less.c > +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_state= less.c > @@ -229,7 +229,7 @@ static const struct mtk_stateless_control mtk_statele= ss_controls[] =3D { > =20 > #define NUM_CTRLS ARRAY_SIZE(mtk_stateless_controls) > =20 > -static struct mtk_video_fmt mtk_video_formats[9]; > +static struct mtk_video_fmt mtk_video_formats[10]; > =20 > static struct mtk_video_fmt default_out_format; > static struct mtk_video_fmt default_cap_format; > @@ -770,6 +770,11 @@ static void mtk_vcodec_add_formats(unsigned int four= cc, > mtk_video_formats[count_formats].type =3D MTK_FMT_FRAME; > mtk_video_formats[count_formats].num_planes =3D 2; > break; > + case V4L2_PIX_FMT_MS21: > + mtk_video_formats[count_formats].fourcc =3D fourcc; > + mtk_video_formats[count_formats].type =3D MTK_FMT_FRAME; > + mtk_video_formats[count_formats].num_planes =3D 1; > + break; > default: > mtk_v4l2_vdec_err(ctx, "Can not add unsupported format type"); > return; > @@ -798,6 +803,8 @@ static void mtk_vcodec_get_supported_formats(struct m= tk_vcodec_dec_ctx *ctx) > cap_format_count++; > } > if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_MM21) { > + mtk_vcodec_add_formats(V4L2_PIX_FMT_MS21, ctx); > + cap_format_count++; > mtk_vcodec_add_formats(V4L2_PIX_FMT_MM21, ctx); > cap_format_count++; > }