From nobody Mon Sep 29 21:26:13 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 096C1C00140 for ; Mon, 15 Aug 2022 23:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354804AbiHOXuk (ORCPT ); Mon, 15 Aug 2022 19:50:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354764AbiHOXqX (ORCPT ); Mon, 15 Aug 2022 19:46:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE811C0B58; Mon, 15 Aug 2022 13:14:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 17D10B80EA8; Mon, 15 Aug 2022 20:14:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E25EC433C1; Mon, 15 Aug 2022 20:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594481; bh=nCiKlH4Fbxk6s64eGjkygA7hlHyQsFsuzpMOIZBmidY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/c0aNDqTW0YaRXfFRie0W7OTNspBBPzCG+TDni6y6hnrp6gurf4DosR1nP2TXMJZ BNod85WQOYd9m0O26ZydZDFpYo8N2XIC2wJ0ypqcP4zy1whOKqBBc9rMcYjiiyW/Pa IIjJQ1lULU3MlJ7hNt7TFSVHHt844ec7JD8XX6Jk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen-Yu Tsai , AngeloGioacchino Del Regno , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 0461/1157] media: mediatek: vcodec: decoder: Drop max_{width,height} from mtk_vcodec_ctx Date: Mon, 15 Aug 2022 19:56:57 +0200 Message-Id: <20220815180458.051019128@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chen-Yu Tsai [ Upstream commit e8d266d533b171387945f8a0bad1944a5609f63b ] This partially reverts commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability"). After the previous patches: - media: mediatek: vcodec: decoder: Fix 4K frame size enumeration - media: mediatek: vcodec: decoder: Skip alignment for default resolution - media: mediatek: vcodec: decoder: Fix resolution clamping in TRY_FMT the max_{width,height} fields in |struct mtk_vcodec_ctx| no longer have any real users. Remove them. Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec= _capability") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 9 --------- drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h | 4 ---- 2 files changed, 13 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/driv= ers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c index 7d654efabdfe..af3cd2e36451 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c @@ -139,8 +139,6 @@ void mtk_vcodec_dec_set_default_params(struct mtk_vcode= c_ctx *ctx) q_data->coded_height =3D DFT_CFG_HEIGHT; q_data->fmt =3D ctx->dev->vdec_pdata->default_cap_fmt; q_data->field =3D V4L2_FIELD_NONE; - ctx->max_width =3D MTK_VDEC_MAX_W; - ctx->max_height =3D MTK_VDEC_MAX_H; =20 q_data->sizeimage[0] =3D q_data->coded_width * q_data->coded_height; q_data->bytesperline[0] =3D q_data->coded_width; @@ -455,13 +453,6 @@ static int vidioc_vdec_s_fmt(struct file *file, void *= priv, if (fmt =3D=3D NULL) return -EINVAL; =20 - if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED) && - fmt->fourcc !=3D V4L2_PIX_FMT_VP8_FRAME) { - mtk_v4l2_debug(3, "4K is enabled"); - ctx->max_width =3D VCODEC_DEC_4K_CODED_WIDTH; - ctx->max_height =3D VCODEC_DEC_4K_CODED_HEIGHT; - } - q_data->fmt =3D fmt; vidioc_try_fmt(ctx, f, q_data->fmt); if (f->type =3D=3D V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h b/driv= ers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h index a29041a0b7e0..16e91d9568e9 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h @@ -285,8 +285,6 @@ struct vdec_pic_info { * mtk_video_dec_buf. * @hw_id: hardware index used to identify different hardware. * - * @max_width: hardware supported max width - * @max_height: hardware supported max height * @msg_queue: msg queue used to store lat buffer information. */ struct mtk_vcodec_ctx { @@ -333,8 +331,6 @@ struct mtk_vcodec_ctx { struct mutex lock; int hw_id; =20 - unsigned int max_width; - unsigned int max_height; struct vdec_msg_queue msg_queue; }; =20 --=20 2.35.1