Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3347182rwr; Sat, 22 Apr 2023 03:45:39 -0700 (PDT) X-Google-Smtp-Source: AKy350YiD3a9J+Clo8PDy6CVb62JMZjz6flAQtQHEsC6/e/Ppa5jUNgaBOHPfhJc+qHG5xZhmz7n X-Received: by 2002:a05:6a20:440d:b0:dd:dfe4:f06a with SMTP id ce13-20020a056a20440d00b000dddfe4f06amr9225787pzb.3.1682160338834; Sat, 22 Apr 2023 03:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682160338; cv=none; d=google.com; s=arc-20160816; b=iin39N0apA+fUjIlmuYFRwQRee/OIwbRGj1nwJ6BN+MxAfHx6kxFf7cGbxSbEr3YMk neAh8vg+z1icDXg0Dsp2V3tKkv91GAZH11CzncmhoHpkYSbpXJ8q8ajTVsTQ2QRqYYVO jJ+l18TzaE73gUmmHOED6HraHd8YkgGvMdAjcGHKfgvVj9l6NnQesxLBcSajlFNHbUj1 7tn/xAzU2wAHXLpkqqyhKzhZbjUll8K6k1lnml9DKPeI0VlXmagLi7UKKT7QfAr1yTu8 7OvW+/5cUoCLo9Aci420VfqiX5wFMgz9W4AH0Z6njg/8jfJmbq9yV2pf44QxboCJH9u3 uHGA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=VwFMHD30sqUe/T7ly/CJPme7mMd8qDj0hDd4kicbgfQ=; b=jRMDG62bzNd+OP8D7sJTKlKlvoVZECRZoNkX1QEjwW0Ir2N5vz/Uz9nxdGOJfyCB9x Dl0x8nZPB5SO5DKC7ngRDHYwLxHRdL2d2R5SJCSfefQQO4o1rnl5f4BnHswxrPFX4sXK nPWfyMM6Wlt3DUSZ8fQDz3w8xdkw9kA90G5UstVf+ezGMiFPATWpuL1aps2uCwmloqnJ wFrB1dJ4mVaL4CYjsTzBm0KIxdCPPS3MRbzBXaVWQYzwp9TXDYXdioFOtRkqwEzIkylD SN8jDR72quZNKeWX0A6tl+VK3KRFfFInT67eTyv7cj+tyMl2JRygO6TB8Z3QygoV61eU oH6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ewG2D7wd; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020aa78ecd000000b0063d27f81f05si6680268pfr.247.2023.04.22.03.45.23; Sat, 22 Apr 2023 03:45:38 -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=@chromium.org header.s=google header.b=ewG2D7wd; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjDVKjS (ORCPT + 99 others); Sat, 22 Apr 2023 06:39:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjDVKjQ (ORCPT ); Sat, 22 Apr 2023 06:39:16 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC34A198A for ; Sat, 22 Apr 2023 03:39:15 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1a516fb6523so33318285ad.3 for ; Sat, 22 Apr 2023 03:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682159955; x=1684751955; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VwFMHD30sqUe/T7ly/CJPme7mMd8qDj0hDd4kicbgfQ=; b=ewG2D7wdS60JREzAvKokBNWOZ7UcwGBzs908jvdjHMrHYP29OwKPg+EVXSR4yNUfnn fty/BawtqqosvAmOT6sFTxbv+1W46qp3nSFjYCvQZ0ncwAEKiNg0fAPlqyWNYkw3jwJ8 T8p/cJyO/phS3fq38f4z75mTQD16C2swRQ10s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682159955; x=1684751955; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VwFMHD30sqUe/T7ly/CJPme7mMd8qDj0hDd4kicbgfQ=; b=VAaf3t0A/do1Sroh/fUvSBXEd998a6yi2M8LCFpyqOAnXfHy+ztYbVZ1KZD/Fu7+5r lG/5ZCWWUOFLwyE49EMAn0SAynKAmTMhOQ4qkAq6C0ztS7df8mPCh7TjDj1sdBVB5M81 r/CRy2bszDex9yeGpGhIDU/9gOjtiJbVrc/CM/oyWtr21nrP1jvVUzvBn/Zw5GoDR490 hwhLfFrOdjTh7ZF+jX+g2H1JDOh4yL6td0n03YfKx8piCeww9opQ8f3begV0xS8O8EgW h1L8clRl3qjNT6BUPuPgyvXsviEAJoSLQIsKOKk+prQaxQn7j7VwmTXjN5+Q1BXC4Xf/ EIdg== X-Gm-Message-State: AAQBX9fSYgnxy1K5Td/UiCtFtqMf5VxjO5h6xz0AW00k/AHPSp8qtnZ/ 7EYav71ko7D30zaUZHevHT/SQA== X-Received: by 2002:a17:902:c94c:b0:1a5:2fbd:d094 with SMTP id i12-20020a170902c94c00b001a52fbdd094mr10186859pla.9.1682159955385; Sat, 22 Apr 2023 03:39:15 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:c5d6:106b:dcb1:8d57]) by smtp.gmail.com with ESMTPSA id ls17-20020a17090b351100b0023a9564763bsm5627694pjb.29.2023.04.22.03.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Apr 2023 03:39:14 -0700 (PDT) From: Pin-yen Lin To: Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-kernel@vger.kernel.org (open list:ARM/Mediatek SoC support), linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), Pin-yen Lin , Hans Verkuil Subject: [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats Date: Sat, 22 Apr 2023 18:39:05 +0800 Message-ID: <20230422103905.1995271-1-treapking@chromium.org> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip formats that are not MTK_FMT_DEC so only decoder formats is updated in mtk_init_vdec_params. Fixes: e25528e1dbe5 ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder") Signed-off-by: Pin-yen Lin --- .../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c index 29991551cf61..0fbd030026c7 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c @@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx) if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) { for (i = 0; i < num_supported_formats; i++) { + if (mtk_video_formats[i].type != MTK_FMT_DEC) + continue; + mtk_video_formats[i].frmsize.max_width = VCODEC_DEC_4K_CODED_WIDTH; mtk_video_formats[i].frmsize.max_height = -- 2.40.0.634.g4ca3ef3211-goog