Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3083455rwb; Mon, 15 Aug 2022 17:43:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR5YbSTnMAPULQ43En6N1TWTpBknv+eissZtPqbu70HaZ0bLMdEjV1VphZW8OWwSGl6lM/UL X-Received: by 2002:a05:6402:42d4:b0:443:4b8:8cba with SMTP id i20-20020a05640242d400b0044304b88cbamr16384082edc.3.1660610608179; Mon, 15 Aug 2022 17:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610608; cv=none; d=google.com; s=arc-20160816; b=MMfyLGA1ShdlwdlXGVX7uICKK3q+dzfSBSdgK802aCXiBtXk0FjP3b5b1aF+f63cOb Ohw/HXpbYkI4m2vYfc7nphX3RZ3lL/ADjJOUR9uGrOHUvPO3k4QUDn566+rmkETkVs1V L7bVz8vkJ4AqX+hEJ67Mxuvr0GJpfZQnkqNBbadf9lgqWgSrQdznOhKmsuAmekgwH/zV 55SSshALR9W62ybhjBPUE328w9lkI9GqzJ7y0mt/vBCmeTGi1TLDpQrHOFbJSoX3W6TU DkO/ZK8fSo3qkb+wC4UuUoZ8r7oZE98VQWt5svD1ceQ7NePG4N521mxpYiEys86uuOMU zDCw== 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=LZ/0p9xagyH33lkU0zLJ93zXaD5Uc/VKAV+tXrHBDP0=; b=qu84VEHde9MV6eloLB9xjlEK3/17PUbwGfkCU/wBUd4z2QejLpfYN55mrV9xNmju6R U/XKiCea9/PKS8C5NbvbokU5VWcmn2Hd609o08wGhlf/phoj3t7uknlt89kjvGkJ8O6s 5016bEkfwLAZ/q8/KQyREYvVv6UdHodi9LhC+NdA9yupoxb/ZlBsbI7obOov0ELa5k7J FVLnqzajJib22M2zdSaWGHhf3Rol2AnnBofLa0I5kCU5SYei0C648y4MbjdvL8b3hXOT RJuP2qa7NMHp8CFLyKdKxdONMIhf6V7lSU/tN1qbkP5noIwjuDl8a8ruNz5sBHvQRK+i FVOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z5v+oEL0; 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 x17-20020a05640226d100b0043d373fd120si9704136edd.47.2022.08.15.17.43.02; Mon, 15 Aug 2022 17:43:28 -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=z5v+oEL0; 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 S1354815AbiHOXuo (ORCPT + 99 others); Mon, 15 Aug 2022 19:50:44 -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-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 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/drivers/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_vcodec_ctx *ctx) ctx->max_width = MTK_VDEC_MAX_W; ctx->max_height = MTK_VDEC_MAX_H; - 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] = q_data->coded_width * q_data->coded_height; q_data->bytesperline[0] = q_data->coded_width; q_data->sizeimage[1] = q_data->sizeimage[0] / 2; -- 2.35.1