Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087234rwb; Mon, 15 Aug 2022 17:49:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR6zyv3GIsISaRVQtPjey2nx5GVLiH2xWNfWKIciHg2c+JZgZLfQLZI4zop68HBPK8HAjWq5 X-Received: by 2002:a05:6402:f0e:b0:43d:61d6:bff9 with SMTP id i14-20020a0564020f0e00b0043d61d6bff9mr16224310eda.78.1660610948258; Mon, 15 Aug 2022 17:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610948; cv=none; d=google.com; s=arc-20160816; b=iPx9qxozo/xcNm+gl9hZejeAf7S61U91RjVfbspPWLp6e+EhXuvUExYwqBjhGz3V1z hwff1P/2sbz3TVzgNtFmEZFryGF8embvE4JGHkiqEPj7Qrf/K9VoHvTReYn8Z3Xntpa3 KOvtVYGGU6nB4ez3vRQpX6z+YkT6utkuEolFCOaKliAfJHjBHp0i5xCoF5rBNlSagSCf MXLEY1XOIn9fuoB5mMC9N1iOCKgDq9hxExuLJFEX6fn2CCDD3ZFcA4pNbKEubQqaiDGj r48yuqYyV808dKdOfqnFeAM1E8SXjT2pkWmJZrh5wBCresoe0Z2jB3leRgtsSlrxigtj Mjbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KRcCuF11b6tgOIKNjjoZJSOQHFWyb6k6i9hNKjUz9Wo=; b=R9Ni7eQfHzfeEOQoRB2T9Zh5Y54B748oITAH4wQo2FHvAzDAD3E9u6NwBKQKYTg2jl aEQlwLlXxFiK3Fj3ZXKvIGEuArXSO7WbgyF6GbCfaTOAlqC1iliOW6MMMfUn4DXDjarr Gsf0APA6b/ZnUfLfI/AMfhTS7hE3m30qVRAgX2OXnq28+kruiMvZjqH2mXtMosgXRaYQ A77ZvPpBeD5yov87eswtBYYr/wt2dO2rl6gpfTQEKfuMa00DMb6WRS87zVhDYKwByjVE 0+jnHYz0ehkkxjeYwhv8bCWEw5iHNyPvXlkSzgxz5ZxjEfZV5Gg75930TnJ/z+yPWrW/ YcKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="e/c0aNDq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020aa7d794000000b0043bc832d514si7798037edq.318.2022.08.15.17.48.42; Mon, 15 Aug 2022 17:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="e/c0aNDq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354800AbiHOXui (ORCPT + 99 others); Mon, 15 Aug 2022 19:50:38 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/drivers/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_vcodec_ctx *ctx) q_data->coded_height = DFT_CFG_HEIGHT; q_data->fmt = ctx->dev->vdec_pdata->default_cap_fmt; q_data->field = V4L2_FIELD_NONE; - ctx->max_width = MTK_VDEC_MAX_W; - ctx->max_height = MTK_VDEC_MAX_H; q_data->sizeimage[0] = q_data->coded_width * q_data->coded_height; q_data->bytesperline[0] = q_data->coded_width; @@ -455,13 +453,6 @@ static int vidioc_vdec_s_fmt(struct file *file, void *priv, if (fmt == NULL) return -EINVAL; - if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED) && - fmt->fourcc != V4L2_PIX_FMT_VP8_FRAME) { - mtk_v4l2_debug(3, "4K is enabled"); - ctx->max_width = VCODEC_DEC_4K_CODED_WIDTH; - ctx->max_height = VCODEC_DEC_4K_CODED_HEIGHT; - } - q_data->fmt = fmt; vidioc_try_fmt(ctx, f, q_data->fmt); if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h b/drivers/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; - unsigned int max_width; - unsigned int max_height; struct vdec_msg_queue msg_queue; }; -- 2.35.1