Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3357214pxb; Mon, 24 Jan 2022 08:00:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJydpWyNAocm4a8uAUf5UftlhLACda+W/NhW6r8UjB/A//sJc+0HkkzhyVXkuv9rnkRkYPhu X-Received: by 2002:a05:6a00:883:b0:4bc:39c1:9644 with SMTP id q3-20020a056a00088300b004bc39c19644mr14465107pfj.14.1643040008536; Mon, 24 Jan 2022 08:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643040008; cv=none; d=google.com; s=arc-20160816; b=fpnfcCukssensPO6Jos39c+aHsT+MlPno1DWAqxznOu3qU0HyVdU7EtYxmWS7hqUNV FiWdNa/i/bBl+hlJvBl2tfUQZski03uuGxtWw9/JNylCNJE83PJeMhyNpbwEL3soCct+ rPqDq6zknYr8tdmQjb/I5oRse4zr9cl/7D2F0JxkFw7iRTZIWK4nUN27Dv0S7UzsFohM 3G+d1aL6XFEBQs/AtphrGJPLbA82T1mcxcbg07eN9W24On2FARM6A7+NJryqZn0IhSlV oadx6ZsTXInRgk6Yoi6p8DvCDrUnwDWwWWw4eRooaxLQAlVjHP8UFQhVC+iHreG2RN4m v5mw== 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=py21+nfXCxvH9ed7Sw22S2QRAUR7jaIm1Q/EYwP+WYo=; b=mSbreYfy/Yp486Tx4R0jW8SWP9sgtpQA4cypCyqWhlsu3eOsB7CBiY00c9GZ9Qeh4m xF9nis/QtFz2cvDANSZW0wCh/bUqf6yPYhbIR1+QG6WVs2ZXT+o4vxPSffQWh7e4KA1N Bov9fRw4juGweYDP2y8LJ/tRJcfo29T69ziacbJ0BiquARgSA58tkLFKVUF+eWV5jgzT caLxR+ZK4dVP8Xos2SNPuiqSkhUJb7EgMdYjyHFsnl9jDfyzt34caxB8vuhrnMt4JBd3 NZGO0HAK5iGHx9yMYTslpS6z5qFGSwNo8jqhVYWlAJM78ggZTVBtRrb6QJobOz35QZwJ YgQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=da5jAzAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si3599133pjg.167.2022.01.24.07.59.55; Mon, 24 Jan 2022 08:00:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=da5jAzAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240933AbiAXCcJ (ORCPT + 99 others); Sun, 23 Jan 2022 21:32:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240938AbiAXCby (ORCPT ); Sun, 23 Jan 2022 21:31:54 -0500 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01CD8C061401; Sun, 23 Jan 2022 18:31:54 -0800 (PST) Received: by mail-io1-xd2d.google.com with SMTP id n17so1908489iod.4; Sun, 23 Jan 2022 18:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=py21+nfXCxvH9ed7Sw22S2QRAUR7jaIm1Q/EYwP+WYo=; b=da5jAzAfPPfk7mp4wncKvvJCkduKpIsOZSGZ4OC4dqDZ/6Md4hsvMmGsFAXJBLgQLJ P5mPJjhdeaaoS7l/uzxg0e/NbeInrpL4Ikdy7c19AhUAZBVGHP2oKNz5K5MzKyuxsJxl 2ivf5v7yHpBAw75VUsuSnqcH16Djq+vyvLo9jmPMpgoXYoLfkBZFv2iO7tuyvD19k3b1 s7qmOLY1siN8qT/ycFjkm65zbIq0f2/IQm1sZP8w1pAI9WHUvk/bwae694GpdWMZObv8 psFvVslJeDiGo9C30C+SE+i/cLLG6mFsrIw++B1UVOLdnA9Yhv5hoX1sv2yZDMzbRGn7 W/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=py21+nfXCxvH9ed7Sw22S2QRAUR7jaIm1Q/EYwP+WYo=; b=couxggUQBESYh359pmuJmwoNRPDpw86IbNQ8iiDMXqhoaoXJYkjTyapwOlWGHhGnqp jnwVdKvd/1Q+nsFEPSiKsA+FdLd9nmZ7Pe71H0Quw4O5OFNKHUrwD60skxNMqib6jQpD 5T6kDbvMMo0IvK32V9thaMf6DJ3JJ1zdIw7Wg+JXGUyZ7bzO4SMymud8E5qOjAywVNM2 kYReW2nwSQNJDUZp05wl8h0iSK2hb/uM+czBBELoIV3SkFPocbDHmerGjQJNwOfhd6eU /bsar+qfXBTjagqJTzeGyQaub8nLmUScZWBw3dnEGbnuPQeEr6RtS3pSNOcVDR4O8BfP XmTQ== X-Gm-Message-State: AOAM530YphnWJ/FVsCgIT/mTVqKBo4pOcZaWHXWgdIPL4dC/PfdhUS1A QJLRcChvzQNa769ouFJcC8ZMAyCy9Jg= X-Received: by 2002:a02:29cc:: with SMTP id p195mr5841271jap.134.1642991513028; Sun, 23 Jan 2022 18:31:53 -0800 (PST) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:582d:ad0e:e5a6:94b6]) by smtp.gmail.com with ESMTPSA id w4sm6625633ilq.56.2022.01.23.18.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 18:31:52 -0800 (PST) From: Adam Ford To: linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, shawnguo@kernel.org, aford@beaconembedded.com, Adam Ford , Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Greg Kroah-Hartman , Lucas Stach , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH V3 09/10] media: hantro: Add support for i.MX8MM Hantro-G1 Date: Sun, 23 Jan 2022 20:31:23 -0600 Message-Id: <20220124023125.414794-10-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124023125.414794-1-aford173@gmail.com> References: <20220124023125.414794-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The i.MX8MM has a Hantro G1 video decoder similar to the imx8mq but lacks the post-processor present in the imx8mq. Add support in the driver for it with the post-processing removed. Signed-off-by: Adam Ford diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index a670ddd29c4c..b281ac4fb79c 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -615,6 +615,7 @@ static const struct of_device_id of_hantro_match[] = { { .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, }, #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M + { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, }, { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, }, { .compatible = "nxp,imx8mq-vpu-g1", .data = &imx8mq_vpu_g1_variant }, { .compatible = "nxp,imx8mq-vpu-g2", .data = &imx8mq_vpu_g2_variant }, diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index f0bd2ffe290b..c00b46e06055 100644 --- a/drivers/staging/media/hantro/hantro_hw.h +++ b/drivers/staging/media/hantro/hantro_hw.h @@ -299,6 +299,7 @@ enum hantro_enc_fmt { ROCKCHIP_VPU_ENC_FMT_UYVY422 = 3, }; +extern const struct hantro_variant imx8mm_vpu_g1_variant; extern const struct hantro_variant imx8mq_vpu_g1_variant; extern const struct hantro_variant imx8mq_vpu_g2_variant; extern const struct hantro_variant imx8mq_vpu_variant; diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c index 849ea7122d47..9802508bade2 100644 --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c @@ -327,3 +327,15 @@ const struct hantro_variant imx8mq_vpu_g2_variant = { .clk_names = imx8mq_g2_clk_names, .num_clocks = ARRAY_SIZE(imx8mq_g2_clk_names), }; + +const struct hantro_variant imx8mm_vpu_g1_variant = { + .dec_fmts = imx8m_vpu_dec_fmts, + .num_dec_fmts = ARRAY_SIZE(imx8m_vpu_dec_fmts), + .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER | + HANTRO_H264_DECODER, + .codec_ops = imx8mq_vpu_g1_codec_ops, + .irqs = imx8mq_irqs, + .num_irqs = ARRAY_SIZE(imx8mq_irqs), + .clk_names = imx8mq_g1_clk_names, + .num_clocks = ARRAY_SIZE(imx8mq_g1_clk_names), +}; -- 2.32.0