Message ID | 20221024201515.34129-4-jernej.skrabec@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp682506wru; Mon, 24 Oct 2022 15:32:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5n8OjrZ/gO87fz0fIe04RgmpcJpEq2HahtEtMqlqLGfrV4A7sNwzY3/AbulSLXWx6bSr35 X-Received: by 2002:a17:906:8a61:b0:78d:9d00:c906 with SMTP id hy1-20020a1709068a6100b0078d9d00c906mr29669134ejc.321.1666650721795; Mon, 24 Oct 2022 15:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666650721; cv=none; d=google.com; s=arc-20160816; b=K8A/x5XxO0bPB2jLl/uaDmrH8z0wUSTFnyi81Gsdtrxv3AAcN/zd83qBWIKR0Knkpf LMlR6wRkI6kepB8S1mzqtOQ5/0W6lJGX+2WwdbnvxwiRKs2xdMSptwBiyJCh21d8X0L/ iBFD7SZErw6czlMziF3E2tKFPTYnaV+jFlXSAnkyexYcrICNDADW2NY1DloEGCtX4+Lx qrHwLAmOf5IyLuTyoRLIkUbCmIUEQ3fZwGme9d1P7LmWQdUaL9Dm6jLKWVnO/P53Ny3t o+zxDeyVogzr4o+S5W0/UrkkFkRcK4KzmJg/U7Z0etuNWXeD6JZfJPmWjh3lEtr1oHue fyWg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fz8kU4WpE9TC4fsj366svqLLQU9rq3YiiGANcwE6/pc=; b=o8gwGeQEAKi9Dwzhm3Kzdxo8lJYaY8auBZ0YZyo+OR20OHsEISY9KpWSIXYDUz5he0 k6hc+yTGTYXs67dASdWbzPoqbnkwoxogSmQW8j2rSl/VCb1JrwM6+Y1rfL4r2NQNmBp0 Dupjkzhqiqqkvm/RG/QiY2VGoP99lIsr8m6iN1THmrZLCVTzhcClunbOp0lxlLu3JsJY s0OItZw0ptJ+4TOGeDPHs2Bb8AMH0yhq33jCN+OyTVWk0dp6R+8QwSaWk7yvdIvtP/4G 5x8YvwQbKi0E7lrhWo0hMOQuv4xAt8p0hr1TQWbigWTI+x1qwPq629VFYCOBFAcuwKbg QoEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GD1Vrjxn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf29-20020a1709077f1d00b0078dec48d439si987153ejc.590.2022.10.24.15.31.37; Mon, 24 Oct 2022 15:32:01 -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=@gmail.com header.s=20210112 header.b=GD1Vrjxn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232223AbiJXWP1 (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 18:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiJXWPB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 18:15:01 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AED36309D67; Mon, 24 Oct 2022 13:31:08 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id bs14so14252832ljb.9; Mon, 24 Oct 2022 13:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Fz8kU4WpE9TC4fsj366svqLLQU9rq3YiiGANcwE6/pc=; b=GD1VrjxnsI5PdS5Ql5clVdZZo3LcKOQlsk6Vyf7xKb8cFzGMJBN37iLlAIx/IxjfWG HHCEZ+i07Ndortqa/MXILhU7jraNG5CK57RmJVEKicdQxow7TqU3tQvrI6Z6wwqoXGeh oulyQoHw56xVdN8hDLx+9DhBr9TIHnsEMwzIeSrvKQqzb0QFYjFL+h+fjCWXs7ja4syg x5XTNBoV7oAM1htM7qDnRQnu1LrFFVEjwCQz6/ol6f0FH+oIc4byVyF3R+BgxjThRz/t AQtrTo4XIJVnvwpOpK1vzYKVRPVi48caLA5B6hZTrJxB+rhI9D3Sn2sq5V4x90idMyOD ptNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fz8kU4WpE9TC4fsj366svqLLQU9rq3YiiGANcwE6/pc=; b=HigQVxhAbL15GuPlCjyPuAkVBn3IEgrCX7RzVNZ5OAAenhy468qi/4vehK8fMoSbAl ta56D7D5xKUgiHw+HFbz3qg2YzlTl8tQE6iQPpnXyU2gSNQlFVqcm+vZ9HsxEHCDJ3tD 3xRirdhhepJmHMuzGiHbT0R+yHatxH8Ei4wg0bFfgoqUyZbVEqGVOnpkhTho2MBDZ0WL SdbWi+ndhnNPXIn4ll90jf6kbRArbOXmXd1xHjEEKDdTObDa1xnxsy4IQLuY+OlQmo11 siZinaS8lT2rAobtIFrZ0qiyYksxbrpaSzJ9EKGUpHjjjOLHR/O4arXy7BcuTrN63YDf Wa9A== X-Gm-Message-State: ACrzQf3s3UAWUTQGmRTLM+IN2mQE1doh9Fn5n2al6C8+DGsQSwDX6/3e ybaGZyq1AAYKsqsmof8U8/OT8lDNfmjQBg== X-Received: by 2002:a17:907:b17:b0:78b:b909:e91a with SMTP id h23-20020a1709070b1700b0078bb909e91amr28116924ejl.687.1666642532756; Mon, 24 Oct 2022 13:15:32 -0700 (PDT) Received: from kista.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id op7-20020a170906bce700b0073d638a7a89sm332023ejb.99.2022.10.24.13.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 13:15:32 -0700 (PDT) From: Jernej Skrabec <jernej.skrabec@gmail.com> To: mripard@kernel.org, paul.kocialkowski@bootlin.com Cc: mchehab@kernel.org, gregkh@linuxfoundation.org, wens@csie.org, samuel@sholland.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec <jernej.skrabec@gmail.com> Subject: [PATCH 03/11] media: cedrus: use helper to set default formats Date: Mon, 24 Oct 2022 22:15:07 +0200 Message-Id: <20221024201515.34129-4-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024201515.34129-1-jernej.skrabec@gmail.com> References: <20221024201515.34129-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747609946794684305?= X-GMAIL-MSGID: =?utf-8?q?1747609946794684305?= |
Series |
media: cedrus: Format handling improvements and 10-bit HEVC support
|
|
Commit Message
Jernej Škrabec
Oct. 24, 2022, 8:15 p.m. UTC
Now that set output format helper is available, let's use that for
setting default values. Advantage of this is that values will be always
valid. Current code produced invalid default values for V3s SoC, which
doesn't support MPEG2 decoding.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/staging/media/sunxi/cedrus/cedrus.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index 55c54dfdc585..2f284a58d787 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -361,16 +361,8 @@ static int cedrus_open(struct file *file) ret = PTR_ERR(ctx->fh.m2m_ctx); goto err_ctrls; } - ctx->dst_fmt.pixelformat = V4L2_PIX_FMT_NV12_32L32; - cedrus_prepare_format(&ctx->dst_fmt); - ctx->src_fmt.pixelformat = V4L2_PIX_FMT_MPEG2_SLICE; - /* - * TILED_NV12 has more strict requirements, so copy the width and - * height to src_fmt to ensure that is matches the dst_fmt resolution. - */ - ctx->src_fmt.width = ctx->dst_fmt.width; - ctx->src_fmt.height = ctx->dst_fmt.height; - cedrus_prepare_format(&ctx->src_fmt); + + cedrus_reset_out_format(ctx); v4l2_fh_add(&ctx->fh);