Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp835818rwl; Wed, 12 Apr 2023 04:58:35 -0700 (PDT) X-Google-Smtp-Source: AKy350YrXyDkmwHys3G9Gb8o94gRHpiK5GtZLGpoPZv0bnNMx3k5k5ENzs8vQA0R3oM8G9xU3yW6 X-Received: by 2002:a17:906:4341:b0:94a:a2fe:d8f with SMTP id z1-20020a170906434100b0094aa2fe0d8fmr8256461ejm.19.1681300715636; Wed, 12 Apr 2023 04:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681300715; cv=none; d=google.com; s=arc-20160816; b=INLWJ4Yba5wRmiCDgjjyT3VMVp8xlnHR4O2uL/hQNlKKz7jLeOs6unJbSat46bGYG/ /vy1HxHBw9uMKdKDE80mje+yeuFqK//a1v94PHFDWFDpI/UhKQ45BJqe5TgJuK9PkDtw 3J7jcMMg4s2VTnpuNcYM3/bT/Urf1HqCjR24V/r6G9/ESGn3CPOber3bKVJyg334274/ 0IXRhrPmSzMNq0RhwnyFtMS2RNvucEjt73CS5iKRCph3vKihHgVHfQ78tp3wPUlbflav 3jfYBmKxLBesZ6M5qNgKuVsg1GA/qx13Ge/gPhiM1I/t29v8gXxWtRGeV0+QkZsYXKF0 Mk0g== 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=QHeZyhq5jK0RF7QwFwukiRf7BxTc+khdYjOdWmETLdA=; b=Lm8uYOqY/br8DJlMNf2aSM8c6YPIpFkgjK18vNf7oxz8cE4Weuiu4gav8B2MvxUcgc mz3eK6RVpLcr4H2J1N+Nr69UShgtKpkK5HN5BYXIke46zs2cFSWLSywUAk9WZMs6Y7rL 8wFSR5xgc86M3TRUgGssVHisuGjRZdY3Qfp88qJZFFD8WLU17bJK9Erh7mK8fs2nOTbv hvfWN2Ou53l5jSRIrwoUYDinqKw0hbnaPSelNrxCQidNbgtujs4BgJgRGH2JONoIJaZ3 kR9VJAIbkY/BheUTgbdqctHF3/UjE4kYsLKEvRem5HzQqID5scDeXx9vUnlsoJhzPw56 9Xsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZeGpAFM6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd16-20020a170907629000b0094a79cd4a98si1543425ejc.595.2023.04.12.04.58.10; Wed, 12 Apr 2023 04:58:35 -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=@collabora.com header.s=mail header.b=ZeGpAFM6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231593AbjDLL5W (ORCPT + 99 others); Wed, 12 Apr 2023 07:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjDLL5J (ORCPT ); Wed, 12 Apr 2023 07:57:09 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E08534C1F; Wed, 12 Apr 2023 04:57:07 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:c2e:89bd:4b8e:9e98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6938C6603287; Wed, 12 Apr 2023 12:57:06 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1681300626; bh=efIIMyuWo/5TTgMlaw7lz63p4NVD+adWtS/yB46zFOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZeGpAFM6pcw3J7zRYQBJDalcxfVvQoVL5rdvgJkoQcgHuZnGYeZVC93baNNM0nsZm 8MchA+pQYm0SMz8KUtaAbvgE/ypBAJIal8PV7l1w3qH9/mz8Q4pIs5tXB0l6U7BQBM 7Svb2GHm0svvw1XIJCgnnUMYJNTNBOEMUxrjVI1XoqvAdn/zsjVpXYSLXUR6GoGab2 3pBGJH2uXuLB7rJ7U9ULJNcBOM/iLBeHIHNjyx52iK118zEubOQRszKtGp9bIZMJCg zEDWG3oiPXugnKmeoKN37yrzbGnClCDfUKqRXM9s+6FimEwtYSDhQrp5Ojqyo5uV2H zIeRAQahsDCsw== From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v6 06/13] media: verisilicon: Add AV1 decoder mode and controls Date: Wed, 12 Apr 2023 13:56:45 +0200 Message-Id: <20230412115652.403949-7-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230412115652.403949-1-benjamin.gaignard@collabora.com> References: <20230412115652.403949-1-benjamin.gaignard@collabora.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,SPF_HELO_NONE,SPF_PASS, 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 Add AV1 decoder as new decoder mode to Hantro driver. Register needed AV1 controls for the decoder. Signed-off-by: Benjamin Gaignard Reviewed-by: Nicolas Dufresne --- drivers/media/platform/verisilicon/hantro.h | 3 +++ .../media/platform/verisilicon/hantro_drv.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h index 2989ebc631cc..61480825b856 100644 --- a/drivers/media/platform/verisilicon/hantro.h +++ b/drivers/media/platform/verisilicon/hantro.h @@ -38,6 +38,7 @@ struct hantro_postproc_ops; #define HANTRO_H264_DECODER BIT(18) #define HANTRO_HEVC_DECODER BIT(19) #define HANTRO_VP9_DECODER BIT(20) +#define HANTRO_AV1_DECODER BIT(21) #define HANTRO_DECODERS 0xffff0000 /** @@ -111,6 +112,7 @@ struct hantro_variant { * @HANTRO_MODE_VP8_DEC: VP8 decoder. * @HANTRO_MODE_HEVC_DEC: HEVC decoder. * @HANTRO_MODE_VP9_DEC: VP9 decoder. + * @HANTRO_MODE_AV1_DEC: AV1 decoder */ enum hantro_codec_mode { HANTRO_MODE_NONE = -1, @@ -120,6 +122,7 @@ enum hantro_codec_mode { HANTRO_MODE_VP8_DEC, HANTRO_MODE_HEVC_DEC, HANTRO_MODE_VP9_DEC, + HANTRO_MODE_AV1_DEC, }; /* diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c index d20e62c025ae..74641c972f1e 100644 --- a/drivers/media/platform/verisilicon/hantro_drv.c +++ b/drivers/media/platform/verisilicon/hantro_drv.c @@ -525,6 +525,27 @@ static const struct hantro_ctrl controls[] = { .cfg = { .id = V4L2_CID_STATELESS_VP9_COMPRESSED_HDR, }, + }, { + .codec = HANTRO_AV1_DECODER, + .cfg = { + .id = V4L2_CID_STATELESS_AV1_FRAME, + }, + }, { + .codec = HANTRO_AV1_DECODER, + .cfg = { + .id = V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY, + .dims = { V4L2_AV1_MAX_TILE_COUNT }, + }, + }, { + .codec = HANTRO_AV1_DECODER, + .cfg = { + .id = V4L2_CID_STATELESS_AV1_SEQUENCE, + }, + }, { + .codec = HANTRO_AV1_DECODER, + .cfg = { + .id = V4L2_CID_STATELESS_AV1_FILM_GRAIN, + }, }, }; -- 2.34.1