From nobody Mon Sep 29 20:17:12 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 468FAC2BB9D for ; Mon, 15 Aug 2022 23:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354825AbiHOXur (ORCPT ); Mon, 15 Aug 2022 19:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354756AbiHOXqW (ORCPT ); Mon, 15 Aug 2022 19:46:22 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D29AC0B46; Mon, 15 Aug 2022 13:14:42 -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 sin.source.kernel.org (Postfix) with ESMTPS id 55F34CE12EB; Mon, 15 Aug 2022 20:14:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32E01C433C1; Mon, 15 Aug 2022 20:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594478; bh=3CZ5wl9UdJY2sGEAbYMMmbROfNcOiZEAYA1vCGjrkck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z5v+oEL0g/tmT/zZNSggAf1/yCbCa2+tD5Z2tCx39gs7iMTCK/9WHyc8O0w1I6xiG JhmwW/IZhZll0jESZn7Rre59ilzx5JuxqkODGcyVptUWPddRpH0Ze+SF4gcXpLzHk1 9tf/KiT8GRQGhMs2WrytlT61WxeagkJFpw5Chspk= 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 0460/1157] media: mediatek: vcodec: decoder: Skip alignment for default resolution Date: Mon, 15 Aug 2022 19:56:56 +0200 Message-Id: <20220815180458.010400113@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 3b6a81a31370539f1fd0e9bdd315503aa154285e ] The default resolution of 64x64 is already aligned, according to the call to v4l_bound_align_image() in mtk_vcodec_dec_set_default_params(). Drop the redundant v4l_bound_align_image() call. This also removes one usage of ctx->max_{width,height}. 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 | 7 ------- 1 file changed, 7 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 42b29f0a7436..7d654efabdfe 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c @@ -142,13 +142,6 @@ void mtk_vcodec_dec_set_default_params(struct mtk_vcod= ec_ctx *ctx) ctx->max_width =3D MTK_VDEC_MAX_W; ctx->max_height =3D MTK_VDEC_MAX_H; =20 - v4l_bound_align_image(&q_data->coded_width, - MTK_VDEC_MIN_W, - ctx->max_width, 4, - &q_data->coded_height, - MTK_VDEC_MIN_H, - ctx->max_height, 5, 6); - q_data->sizeimage[0] =3D q_data->coded_width * q_data->coded_height; q_data->bytesperline[0] =3D q_data->coded_width; q_data->sizeimage[1] =3D q_data->sizeimage[0] / 2; --=20 2.35.1