From patchwork Fri Mar 5 18:39:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A65FC43381 for ; Fri, 5 Mar 2021 18:39:51 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57EDB650B5 for ; Fri, 5 Mar 2021 18:39:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57EDB650B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PB9WhPfBhYaqD64JqsbYNRTjniQlpaCb9Dgk+gT4MS0=; b=GsQ4ZS5nXp6H7IaGK7ZD+0kKu //6gQYVTTxnc5nwWNNXUONfuDQfv0RuJixLOBuSvlY0QH4+6Yx69VPpJk9/cAhkXfvDfuPMmiqGxd 5skgzJlfE0ea/m/7Egzw+044c1/AANEIXloCrtQzchkTNsUIZLcfm+iekBn5F+Qb7b3Qm34EbhFrD zn5TCiocBK8sQG0cgRm05WHqX5y30qwhvigqrPhUtYq983oOJEtE4PRt8oWcEoO2tRw5o7ySWBO9n G4qIrtBN15RPVWAhK+408+meAh69K914xd9AYTHcVC6C6cQgOOkDL++76NScopkIPrqcjrEyh796y Tlwh9E7Xg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMT-00G0Ch-6L; Fri, 05 Mar 2021 18:39:41 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMP-00G0Ar-OJ for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:39:39 +0000 Received: by mail-ej1-x62d.google.com with SMTP id w17so5396118ejc.6 for ; Fri, 05 Mar 2021 10:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bIJdIGKj6HKNSz+mFrNMaUm/bPZqpcnizzIMsRqYuoY=; b=RiVWhR/OvXOcja8xhoQiGT5PENPEhs6J6857L37rppeYpLlOTH6et5xlvA4+/l13oB IgaRlZNmLThTUY36AbheXvHSUyptu/w4y/kNgRcH8BW+s6CZe7PZdF95iLM6XL4YUwLu bJ5qmvSmOLTEitH66jN4etv4LydMPbJeyRZJOiSrnoNQ87xaKYAOrt4ceqRRnsKCTuZn PCbHjZbHpdMRs7LdBdfWzQ9cW2YM7fRq/AMFje8ieYX7bQmjk4zRyp8l84iR6+uMTHvU X4J3apTH6S5zqMHdBsLR8zyjSlsmmzFgUGJmcjUv5/89r+kPcSIBo8ohwOm8mnurXhst yoUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bIJdIGKj6HKNSz+mFrNMaUm/bPZqpcnizzIMsRqYuoY=; b=ISxnfLyr7x9l44INJMzxoqgqPcu6+XcFKeliFkXmy5VgOLApVWF8DwUqg2vzR2euXb 28OHyk7O0ASSw+TUqxkUufURr1+XlTSRZCg3cCJnUXStc97cm2fspMgZk8PsLgvSA/fb 5wrbqV+w/iu49z6F16c/YMtoi41tpftj47qnSD2Te6iJf8ELsE2WLcY95P18rANvCrb9 lVfJE7nm8JkU1MOCLf8PobMRyv1/ncZZMlQTIUBlcMb93g/iKTMsJGEKEmqA7s6SnulN NLdh7a7tuPjuOpMkr2z1yukzCp9gd+C7r+irByd5UBcJG7jVvP4oKPZbZ9t/SLAwlOsP S3rw== X-Gm-Message-State: AOAM530a6s6uK3HEVHlevDWREu8Esb+TVfVORKP299gOub2kkkUx6FN3 XxbjCcEwAIjJSHSGqGCXa+Q= X-Google-Smtp-Source: ABdhPJyYrwPZqYJTonz4hUccXLXjyd7w2XNt8KWKQ+V7zyILnAlCiP4HpU6o6QjjEkD32oC9F2oRPg== X-Received: by 2002:a17:906:c210:: with SMTP id d16mr3539327ejz.187.1614969576258; Fri, 05 Mar 2021 10:39:36 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:35 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 1/7] media: hantro: use G1_REG_INTERRUPT directly for the mpeg2 Date: Fri, 5 Mar 2021 18:39:18 +0000 Message-Id: <20210305183924.1754026-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183937_978899_B7111F35 X-CRM114-Status: GOOD ( 11.73 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov Use the register directly over the existing SWREG(). Ideally we'll port the driver away from the local registers, but for now this is enough. For context - I was reading through the IRQ register handling across the variants. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov --- drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c index 6386a3989bfe..0fd306806f16 100644 --- a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c +++ b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c @@ -10,6 +10,7 @@ #include #include "hantro.h" #include "hantro_hw.h" +#include "hantro_g1_regs.h" #define G1_SWREG(nr) ((nr) * 4) @@ -20,7 +21,6 @@ #define G1_REG_REFER2_BASE G1_SWREG(16) #define G1_REG_REFER3_BASE G1_SWREG(17) #define G1_REG_QTABLE_BASE G1_SWREG(40) -#define G1_REG_DEC_E(v) ((v) ? BIT(0) : 0) #define G1_REG_DEC_AXI_RD_ID(v) (((v) << 24) & GENMASK(31, 24)) #define G1_REG_DEC_TIMEOUT_E(v) ((v) ? BIT(23) : 0) @@ -246,6 +246,5 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx) hantro_end_prepare_run(ctx); - reg = G1_REG_DEC_E(1); - vdpu_write(vpu, reg, G1_SWREG(1)); + vdpu_write(vpu, G1_REG_INTERRUPT_DEC_E, G1_REG_INTERRUPT); } From patchwork Fri Mar 5 18:39:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD367C433E0 for ; Fri, 5 Mar 2021 18:40:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EB3B64EEE for ; Fri, 5 Mar 2021 18:40:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EB3B64EEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kxKdi3SpVaYnYO4pCYCEJgyUHebGbW1Pttf92RC8zss=; b=cHHZ3u9RVYik7EruatBgkHF34 Eaddn6c5FJeLx7FhVlomEjSS/ejbOc58UFCZJ0XIF24dv24yNzCnbc9JU4vvytC2hdrpkP8w8ceud kPHcxMb8tNGZCQ/weAmNHD7I6xKhXNzNvzhvKHGX5mZR3W7izFtwZLlJEZJ6HwKBMoRdYcsO2Ez/X wd4xgVFHsmg7LrRcWJh5MK6CoJ/LhTqly6clkoJcYf4u0cmAp7g+ZZqGkpDxOqaWlMiV2PsOFm5pY E8v1iyhkvFmjRdnBw6guBNnb55D2+9v50NwajmlGMFvqauJckHAJRPGsasURDW4AAnwgU3LtKfnJZ LIXjAEdag==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMv-00G0Sq-2V; Fri, 05 Mar 2021 18:40:09 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMQ-00G0B7-8k for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:40:03 +0000 Received: by mail-ej1-x62c.google.com with SMTP id r17so5339257ejy.13 for ; Fri, 05 Mar 2021 10:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aHERaCb1u1sNTTmIBcxgTpCWC+DW/pRIiKz9xPLnHbA=; b=FTYBdkvIe0gUlyOUXdCKjyz0cfOOEzyotpGqU4K/vnTzQXLbKkwZUrm8a+0yBpotKV MwcBNU6M+09RdiGjGOj3DVHefrM6ZWjxkCvwJy4ONCp5ZDeKZL6s6iBS9xiGP0qMjgPt OIb84AAumaTSau//1ZwWkO7/5K9eF7qPCnhXpuLuGSN6xJIEPahEMXWI/iUCV+bvF53B 2q25CVaRXVwfBOr7pBBtnYGuODJYojX6X5xoyBRBljuqwbpRAqV1/WytVntn04sFH9LY 7QaclC+h6xbJgCbSXd0Uxc05KGYCo++IHsy7W/SXcIxtynav2gwySEop7rnhKtvK919p mmCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aHERaCb1u1sNTTmIBcxgTpCWC+DW/pRIiKz9xPLnHbA=; b=ohGkUL1ZBX4mzcKhAg3fqUxG1MJxuv++0WVuFbcV0umazgC6SVA2M9lNR9BCFKwlwe 32iGrI/zozCindI+RQJ+sGCyfJEXzjcEW37Bx6mRTQnhK+tfW/epdcyv03UZJClKi9Je sIjDyaBWr4cJwtxRb3GRsaf2Beyy99X3vQWpKfGDO8gCGEYG9CQG2nb2b3h9xciZYb4H d9VyT/IdKNidfUUbGn58S12jJ0e6O3kGEMLnV77TiGDFxct5IjNzTstwl9eqmqrJ2TyN Ayk3x/ryhl+85VhLciOjPIjFf2ultapTBeNdtCgnrwBO+rEWiTKPNOd0O+u9SHlTiAaE ro3Q== X-Gm-Message-State: AOAM531j0K3iuszH3bScaH3AVwseCi4oDhmXDMck8aBboJJLIeOmq+y5 Fp4qZG6AoNqNQSO9nWj4mMA= X-Google-Smtp-Source: ABdhPJwFcoYQW+23vhO3nVr0t4cUdcT+S+48ptXSA7tC1DlvVT2VavzFhF92Lg4XXmGSijqw0a5Qfg== X-Received: by 2002:a17:906:1754:: with SMTP id d20mr3541915eje.221.1614969577562; Fri, 05 Mar 2021 10:39:37 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:36 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 2/7] media: hantro: imx: reuse MB_DIM define Date: Fri, 5 Mar 2021 18:39:19 +0000 Message-Id: <20210305183924.1754026-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183938_513964_3A7E9983 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov Swap the hardcoded 16 with MB_DIM define. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov --- drivers/staging/media/hantro/imx8m_vpu_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c index c222de075ef4..1f48c1956cd2 100644 --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c @@ -109,10 +109,10 @@ static const struct hantro_fmt imx8m_vpu_dec_fmts[] = { .frmsize = { .min_width = 48, .max_width = 3840, - .step_width = 16, + .step_width = MB_DIM, .min_height = 48, .max_height = 2160, - .step_height = 16, + .step_height = MB_DIM, }, }, { From patchwork Fri Mar 5 18:39:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D99A1C43332 for ; Fri, 5 Mar 2021 18:39:49 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 607ED650A4 for ; Fri, 5 Mar 2021 18:39:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 607ED650A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HDOIsFDNJl0N3dc7vWBBtX2I2BmvStpo9FirTxX+4e0=; b=TN+AmB7Up+RlLaxG7WeOcpXI9 iUUoMXmuD9rwt95qKhiAOkNyCdULXV8C4RaIdqQTz4OG3pb1rUPJyutP0A3AzvY9Dnvc+5I1RV38j U9/R0hYpPrhFNcK+HK21/tiqzUZxT+RUStlhNXD5dKsBFGUn3SIsb6MlT0m5xwnvlx8B4jOQgXrYg IFIWDIIaKMN90AI7gzlaia1h+uFZBw/HxuPp7qI1EaOJNX5yTBTTHqHazjLjRK4/6ZhcAODNsqgKR zUAvy+a2syyX+cFuoq/e6gYj7zyc4bdRi7ACcIdXJRIrdo32c0NKM3Hjf0uu86CNoraoKIGwBIpfw lf4Tcvznw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMW-00G0Ea-6f; Fri, 05 Mar 2021 18:39:44 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMR-00G0Bs-Po for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:39:41 +0000 Received: by mail-ej1-x636.google.com with SMTP id mm21so5335388ejb.12 for ; Fri, 05 Mar 2021 10:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ay/VePmX2E/QdxtPcN6EVcrY1//aOiSoLhu5+Byfit4=; b=a6a3cisX0udcGADfxE4OE2hEwPSsWnQDpdAmXJJc+Vy1RKa3JKLMgmD/eKbNdVfA4A StQZOtXuo3QZh1t/6ubhyM3b2+NpyGJ3lhuLQXKGQ8yEKNp51WNB/Q1YUUn28F7LxAZR wL7GM/MAGl+djORupYY6CXx/DcB4t6yUj5K6wSnP67wVDe5epFqhSh5Rcn0gLufmrOlT NY9Bvw9rZ/oGTblMv60mnLyDaoI9/xks0ECCKT6Xguqzd3cXmirXnFnJ4Lok7+k4G1o/ dyHvOFKQ/O34Kpj9USKsyRxf7VOIB7+r2cAq5uAKsI7SQI/NDnVFokFQJ2UbVxrrweCl PqRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ay/VePmX2E/QdxtPcN6EVcrY1//aOiSoLhu5+Byfit4=; b=ekbER0icwJKvrw/yCcgME3SNP8u0ev/9UQhsGGVhMDJTm1wTztYQhpbvwPEf75ko27 A0UOSEVrmMT7ZK8mSxeW4kEgzn6fM18Z2Ne8z75XjStd/dlSF/gCZnXI9HJDH1FTW6RG xH5dmtBC7jva6wtw0lpGlhg/HY6DVoYmBPnEgdBQebb643l1pof7C7iH51VKawBQ+UjC fe8DoIFUuaH31pDOBIK0N2bj3QtBEZ2GtjJ4pHfqoK3RBBoRqmi1JQIx+iugkc3WKLzW uu3avLVV/ao5Y36breR/4TGnFOyW6xqQTBhu1zjOUVMlybfJ2LJZdrFHDb+gU7JbFTJE Xwlg== X-Gm-Message-State: AOAM533bGRc1tymbVQpbB1EDl94FZDQ/OmvSQQsD2On2Zwd31pnpnHGr FAlKtfzsQH/ylKpFvwofVnQ= X-Google-Smtp-Source: ABdhPJwEwactJjc4D3Bx7DICv+mc4VyjqP52lF84bycTxInNNIhN5/8ERDGvF9ftNFCzrlU/cOdTVg== X-Received: by 2002:a17:906:9243:: with SMTP id c3mr3279149ejx.388.1614969579120; Fri, 05 Mar 2021 10:39:39 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:38 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 3/7] media: hantro: imx: remove duplicate dec_base init Date: Fri, 5 Mar 2021 18:39:20 +0000 Message-Id: <20210305183924.1754026-4-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183939_963662_81B64D26 X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov The vpu->dec_base is already set by the hantro driver itself. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov --- drivers/staging/media/hantro/imx8m_vpu_hw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c index 1f48c1956cd2..cb1ac02c03d2 100644 --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c @@ -150,7 +150,6 @@ static irqreturn_t imx8m_vpu_g1_irq(int irq, void *dev_id) static int imx8mq_vpu_hw_init(struct hantro_dev *vpu) { - vpu->dec_base = vpu->reg_bases[0]; vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1]; return 0; From patchwork Fri Mar 5 18:39:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC1BBC433E6 for ; Fri, 5 Mar 2021 18:40:10 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7983F64EEE for ; Fri, 5 Mar 2021 18:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7983F64EEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Geiu62lHHH0h/lPNaRoM84wPtpPAckxozJoR4jKTEGk=; b=LgMgWNxHO+ySqRk0+usXFl8/C YXH+gEPPiWhTpHusbgJj0SmE6pr00wiWujXSGVUqtdyW2Gs42ybg98yk/+giY4yl+stN72k6Z2uFR /k1JdvX0JNP2Ogw8fupIdIXr9HuVbFyhPg9icaEJj7zAyLqwnEK46CVQEgp1wW+nEd5bAemQkQzMy zvwdPo/bt/Fm+y3b+9/CsAgy+V+k0Se3UUQPKz23pu97D9ciWk0w5uv/871DSI2AnnkqEJna7mEvN SQYCg7HmmTXVG96GM0l3RrJmwY3BHp4EjB1H026+Vg3F/5+9pmvUaCqvoAZ6RZD6duGbsTLHq4WfB +Mx/sFoSQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMs-00G0R4-8T; Fri, 05 Mar 2021 18:40:06 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMT-00G0CM-0m for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:40:03 +0000 Received: by mail-ej1-x62b.google.com with SMTP id mm21so5335475ejb.12 for ; Fri, 05 Mar 2021 10:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cnQkxEWf1/jtkQDwhzC/RNRYSHdN3zniN7xfiNIEH/g=; b=LMLFVrOEGn51sRs8V4YMad2+cDt8RA5s41ALA7xZSTNor06qKOThJTA6rFiLoRwATp XWD7BJajOkvb4kY5oOTptSr7TaVnRX+PAlwFdEHD5g61idaFed63kHbZvQg+SQDhoV1p C/Oo3OBDLNvRunWjxGXCcht8xhEEgEnqa2M1825Jy8MKmXr16MB2UMp+huaFlyJ2SLS2 YdLgXfCFnvkdeslqO3IpOK5LxddG9BLMWmeJpiOhLn/K/gTUp35x1ov3LaBeapdjATe+ TK3HzPDRHGDT7tdW6er0Y2+U5n66XXhteyyhZR9B68tcak74v3SvC6Npoj5oGzzyXYx0 XF7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cnQkxEWf1/jtkQDwhzC/RNRYSHdN3zniN7xfiNIEH/g=; b=BwIHouGyMgyUu2a9bcgN9GaXqhzPgGw2eBG6b/qlkaTFzoIpHtiElrGqxs38S+YlFC WZL73984CgxK5xFgknpuabrgz3TshnR6YIqgdCJaG/pJ6BLT7hO/LRJQWAwFTMgsti8f Av8i5yW7P2l6mZMjYZd3HriInCqddNKRp7HA6+be8MicGfNz7OLS3aCtx+KP6g0mjvEW 8PwJND4kmKUBEGoNmzbKWqG+SZHq5iC71d9kY4XFPkWbZrSCf9DbCjDexjAebGkyT+Gd Iqa183/LF51mGYFjfSQ6mqVS1/JMbD5rMgFP78JH1EID/ji6vg1pgjAIRHfUbcXIfAQq BupA== X-Gm-Message-State: AOAM533y+fzuYKy55gQzt5UfuKgMsCi0F6gF0pB9oksyKTHB8fl2ZNDL CGovryyyvv3p2hheAtZId5jvB2YzPWRthA== X-Google-Smtp-Source: ABdhPJzBaLPRZpXtKABYaswg2O212z146iHBthxlDQutr5KFQDi3h3XyDO9t51biut3VAu6DCsFcig== X-Received: by 2002:a17:907:9e6:: with SMTP id ce6mr3468949ejc.207.1614969580342; Fri, 05 Mar 2021 10:39:40 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:39 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 4/7] media: hantro: imx: remove unused include Date: Fri, 5 Mar 2021 18:39:21 +0000 Message-Id: <20210305183924.1754026-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183941_686708_ECE8C6AC X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov The current imx8 code does not use the jpeg encoder. Remove the unnecessary include. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov Reviewed-by: Philipp Zabel --- drivers/staging/media/hantro/imx8m_vpu_hw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c index cb1ac02c03d2..f36c1bd681ba 100644 --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c @@ -9,7 +9,6 @@ #include #include "hantro.h" -#include "hantro_jpeg.h" #include "hantro_g1_regs.h" #define CTRL_SOFT_RESET 0x00 From patchwork Fri Mar 5 18:39:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7812C433E6 for ; Fri, 5 Mar 2021 18:39:56 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6095F64EEE for ; Fri, 5 Mar 2021 18:39:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6095F64EEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wZabZheq29G/6o4eIrO8ceQ4ZHtwSPvVN7haG4zTmj4=; b=Kf6+R51Pvqn9R7gN8jt7NOq7M wFjsYGD6aFZJCYZPBIn4h+ww22Zxk0LJNVAzkN3cXnymbOj3wI32QM54rOeeTy7yuJejvH+7TFtN1 fmt3pqFrTrjXYUHDNu4/9m+f1TDkMZqpUUfJXWEuCBqdDp97SxRs8Y6zl3vHoWa8Py2ke0rLA8a0a oTaiJW1JvquTjO2zb+M0sL0LWpVhfRWz6pI9x45JZT9EUKDBOwabfjz8i7+1EdHUkeFIzdmDA5LBT yaoJnH+OMx5PVLCfqegU6HP9eB+QdPeg9uuFXwXUZyGj+yUjVsK72gF9jyjtrrXnCQ35FecTuao7/ mRPL2E5Mw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMc-00G0JC-2G; Fri, 05 Mar 2021 18:39:50 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMT-00G0D5-QR for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:39:47 +0000 Received: by mail-ej1-x62b.google.com with SMTP id bm21so5399748ejb.4 for ; Fri, 05 Mar 2021 10:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A1F9ubxjj5JQ7XOnbTnhDg4oJuf5YvuizJOCT/vcunY=; b=XLYKR5RUOC1kSxFpfjtgZbggqByY+f5KB4ppJdxH1oWHM8vSLpbqfmH5kLq5dYeW2H yXCtg85OY57rEsr/qRasikzHpH/3fEL4AMhNwf1RsS7UcYYlHvkEq8IM6zGOHcuQs0IT XVAFMap9kyXsTyavF9A9TC59TF2UlnBYN8YFjDRjKGZJNUD44IoZHfTS8D0wysmXNDtv WHB25vdwj27MDbdX4vvzwYRs9beLydMejxiA06W7bIGND3TJWy+ervPXIJOXHmR6w8+W F9NGX5A3SmSEwV3czeMnhkU+geTKEIbPr07zz277GgjQq2GCAAMCcuIHpG/nGrhFmRe1 wMEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A1F9ubxjj5JQ7XOnbTnhDg4oJuf5YvuizJOCT/vcunY=; b=S5FSscNxTwyVI8kSnOLxgLmoGRphyGCbQ4uaQeO9shGXNs6KEcih5j6xG6X18AjEFd ageZCZZkkwbx47oTuh5f6J3gLZkcMuJhzv/MiPJWl8j1kv1syJSIDRP4QKtpt3E3DXoP 0IZu+1K16uv4DNZGoSQ7tpZDHLgESubIPWHH3MbZQX2yFN22gnn6zHza3AUKd6WvbQ3P ACHoW7N8n1edm8Le14c/woTD76l6Jrgc4xq4df4qg7aUIm9eb7dimWvWAi+98qyU6FFz 0EkYRnRFF8OujJS56nmSafWr3cW6q8PrpHs8v2dlinOAEBezRLEG7zvPrcD520pRbtYa j+gA== X-Gm-Message-State: AOAM531iBtKaRddKX7kvGBdrQhzl1WXXWT380VzIXJCmi7TjF13wB4SO marRqhyrtIssemtKQS15Ygg= X-Google-Smtp-Source: ABdhPJwpKsptfl270UR7t8sBcTq0osd0vrvg5ITEvcVBxvxSAceLeOTszUkLpANHXoKSXGXjDzlq9A== X-Received: by 2002:a17:906:aac5:: with SMTP id kt5mr3665232ejb.548.1614969581543; Fri, 05 Mar 2021 10:39:41 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:40 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 5/7] media: hantro: introduce hantro_g1.c for common API Date: Fri, 5 Mar 2021 18:39:22 +0000 Message-Id: <20210305183924.1754026-6-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183942_813914_A8D825D6 X-CRM114-Status: GOOD ( 18.77 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov The Hantro G1 IRQ and reset handling it pretty standard. I was this close to duplicating it, yet again, before reconsidering and refactoring it to a separate file. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov Reviewed-by: Philipp Zabel --- drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro_g1.c | 39 ++++++++++++++++++++ drivers/staging/media/hantro/hantro_hw.h | 3 ++ drivers/staging/media/hantro/imx8m_vpu_hw.c | 21 +---------- drivers/staging/media/hantro/rk3288_vpu_hw.c | 36 ++---------------- 5 files changed, 48 insertions(+), 52 deletions(-) create mode 100644 drivers/staging/media/hantro/hantro_g1.c diff --git a/drivers/staging/media/hantro/Makefile b/drivers/staging/media/hantro/Makefile index 743ce08eb184..3747a32799b2 100644 --- a/drivers/staging/media/hantro/Makefile +++ b/drivers/staging/media/hantro/Makefile @@ -7,6 +7,7 @@ hantro-vpu-y += \ hantro_v4l2.o \ hantro_postproc.o \ hantro_h1_jpeg_enc.o \ + hantro_g1.o \ hantro_g1_h264_dec.o \ hantro_g1_mpeg2_dec.o \ hantro_g1_vp8_dec.o \ diff --git a/drivers/staging/media/hantro/hantro_g1.c b/drivers/staging/media/hantro/hantro_g1.c new file mode 100644 index 000000000000..0ab1cee62218 --- /dev/null +++ b/drivers/staging/media/hantro/hantro_g1.c @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Hantro VPU codec driver + * + * Copyright (C) 2018 Rockchip Electronics Co., Ltd. + * Jeffy Chen + * Copyright (C) 2019 Pengutronix, Philipp Zabel + * Copyright (C) 2021 Collabora Ltd, Emil Velikov + */ + +#include "hantro.h" +#include "hantro_g1_regs.h" + +irqreturn_t hantro_g1_irq(int irq, void *dev_id) +{ + struct hantro_dev *vpu = dev_id; + enum vb2_buffer_state state; + u32 status; + + status = vdpu_read(vpu, G1_REG_INTERRUPT); + state = (status & G1_REG_INTERRUPT_DEC_RDY_INT) ? + VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR; + + vdpu_write(vpu, 0, G1_REG_INTERRUPT); + vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); + + hantro_irq_done(vpu, state); + + return IRQ_HANDLED; +} + +void hantro_g1_reset(struct hantro_ctx *ctx) +{ + struct hantro_dev *vpu = ctx->dev; + + vdpu_write(vpu, G1_REG_INTERRUPT_DEC_IRQ_DIS, G1_REG_INTERRUPT); + vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); + vdpu_write(vpu, 1, G1_REG_SOFT_RESET); +} diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index 34c9e4649a25..73c71bb2320c 100644 --- a/drivers/staging/media/hantro/hantro_hw.h +++ b/drivers/staging/media/hantro/hantro_hw.h @@ -164,6 +164,9 @@ void hantro_irq_done(struct hantro_dev *vpu, void hantro_start_prepare_run(struct hantro_ctx *ctx); void hantro_end_prepare_run(struct hantro_ctx *ctx); +irqreturn_t hantro_g1_irq(int irq, void *dev_id); +void hantro_g1_reset(struct hantro_ctx *ctx); + void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx); void rk3399_vpu_jpeg_enc_run(struct hantro_ctx *ctx); int hantro_jpeg_enc_init(struct hantro_ctx *ctx); diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c index f36c1bd681ba..9eb556460e52 100644 --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c @@ -9,7 +9,6 @@ #include #include "hantro.h" -#include "hantro_g1_regs.h" #define CTRL_SOFT_RESET 0x00 #define RESET_G1 BIT(1) @@ -129,24 +128,6 @@ static const struct hantro_fmt imx8m_vpu_dec_fmts[] = { }, }; -static irqreturn_t imx8m_vpu_g1_irq(int irq, void *dev_id) -{ - struct hantro_dev *vpu = dev_id; - enum vb2_buffer_state state; - u32 status; - - status = vdpu_read(vpu, G1_REG_INTERRUPT); - state = (status & G1_REG_INTERRUPT_DEC_RDY_INT) ? - VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR; - - vdpu_write(vpu, 0, G1_REG_INTERRUPT); - vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); - - hantro_irq_done(vpu, state); - - return IRQ_HANDLED; -} - static int imx8mq_vpu_hw_init(struct hantro_dev *vpu) { vpu->ctrl_base = vpu->reg_bases[vpu->variant->num_regs - 1]; @@ -191,7 +172,7 @@ static const struct hantro_codec_ops imx8mq_vpu_codec_ops[] = { */ static const struct hantro_irq imx8mq_irqs[] = { - { "g1", imx8m_vpu_g1_irq }, + { "g1", hantro_g1_irq }, { "g2", NULL /* TODO: imx8m_vpu_g2_irq */ }, }; diff --git a/drivers/staging/media/hantro/rk3288_vpu_hw.c b/drivers/staging/media/hantro/rk3288_vpu_hw.c index 7b299ee3e93d..fefd45269e52 100644 --- a/drivers/staging/media/hantro/rk3288_vpu_hw.c +++ b/drivers/staging/media/hantro/rk3288_vpu_hw.c @@ -10,7 +10,6 @@ #include "hantro.h" #include "hantro_jpeg.h" -#include "hantro_g1_regs.h" #include "hantro_h1_regs.h" #define RK3288_ACLK_MAX_FREQ (400 * 1000 * 1000) @@ -127,24 +126,6 @@ static irqreturn_t rk3288_vepu_irq(int irq, void *dev_id) return IRQ_HANDLED; } -static irqreturn_t rk3288_vdpu_irq(int irq, void *dev_id) -{ - struct hantro_dev *vpu = dev_id; - enum vb2_buffer_state state; - u32 status; - - status = vdpu_read(vpu, G1_REG_INTERRUPT); - state = (status & G1_REG_INTERRUPT_DEC_RDY_INT) ? - VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR; - - vdpu_write(vpu, 0, G1_REG_INTERRUPT); - vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); - - hantro_irq_done(vpu, state); - - return IRQ_HANDLED; -} - static int rk3288_vpu_hw_init(struct hantro_dev *vpu) { /* Bump ACLK to max. possible freq. to improve performance. */ @@ -161,15 +142,6 @@ static void rk3288_vpu_enc_reset(struct hantro_ctx *ctx) vepu_write(vpu, 0, H1_REG_AXI_CTRL); } -static void rk3288_vpu_dec_reset(struct hantro_ctx *ctx) -{ - struct hantro_dev *vpu = ctx->dev; - - vdpu_write(vpu, G1_REG_INTERRUPT_DEC_IRQ_DIS, G1_REG_INTERRUPT); - vdpu_write(vpu, G1_REG_CONFIG_DEC_CLK_GATE_E, G1_REG_CONFIG); - vdpu_write(vpu, 1, G1_REG_SOFT_RESET); -} - /* * Supported codec ops. */ @@ -184,19 +156,19 @@ static const struct hantro_codec_ops rk3288_vpu_codec_ops[] = { }, [HANTRO_MODE_H264_DEC] = { .run = hantro_g1_h264_dec_run, - .reset = rk3288_vpu_dec_reset, + .reset = hantro_g1_reset, .init = hantro_h264_dec_init, .exit = hantro_h264_dec_exit, }, [HANTRO_MODE_MPEG2_DEC] = { .run = hantro_g1_mpeg2_dec_run, - .reset = rk3288_vpu_dec_reset, + .reset = hantro_g1_reset, .init = hantro_mpeg2_dec_init, .exit = hantro_mpeg2_dec_exit, }, [HANTRO_MODE_VP8_DEC] = { .run = hantro_g1_vp8_dec_run, - .reset = rk3288_vpu_dec_reset, + .reset = hantro_g1_reset, .init = hantro_vp8_dec_init, .exit = hantro_vp8_dec_exit, }, @@ -208,7 +180,7 @@ static const struct hantro_codec_ops rk3288_vpu_codec_ops[] = { static const struct hantro_irq rk3288_irqs[] = { { "vepu", rk3288_vepu_irq }, - { "vdpu", rk3288_vdpu_irq }, + { "vdpu", hantro_g1_irq }, }; static const char * const rk3288_clk_names[] = { From patchwork Fri Mar 5 18:39:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UPPERCASE_50_75, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BC3CC433DB for ; Fri, 5 Mar 2021 18:40:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2A8764EEE for ; Fri, 5 Mar 2021 18:40:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2A8764EEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Lv0RWGWh+y1UKkWBfiv4eN9vqYiowDriYQbotfid09A=; b=XVI5eUinHB9b53ftiPkXn5mVK zAqLE+s6dYGmNJj8JMA77ccWl7sJHR3+b4kc4otbwy0O/vSKFNE/re+CvVN7TcXOgGTLEFqekd12x l+xtBFv6zZihjmsWMA4uHQTYfDvZzlbCvcqSC+hUhg4A3OQBJ/nELTUgIAbEvuC1WLO2l9MDz3cyF 9uLxmT/p1rbavhKv9FzU7btXs2mThysyhibxDiUMyWkXSSRzSOgc/qXaNi+R7InjJbEXzKObxS2VL ZZd+Bqib0hmQq2unhtzjIuaB/ht7pf+5IEL/DcPw+alxwOLG5kW7ma3PQeKg+pKIJQebc3j8UDsrN FOQ65oRFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMd-00G0KB-Qq; Fri, 05 Mar 2021 18:39:51 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMV-00G0EG-Kz for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:39:48 +0000 Received: by mail-ed1-x535.google.com with SMTP id dm26so3931717edb.12 for ; Fri, 05 Mar 2021 10:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vj0fR0Hv68keiBerGEZYm4j5yOSf6bjnsnQtt9w94hk=; b=I5pYnbMlKeDeCDB02kLVpDRlSoszuEhN46XklEhNp0i5VoztFotrZFPataFwQ9/G1h xxM+sVa9t134rnWSwJzg380KeaJSYcWDzJtNmMHycZ/z/lPiuqBeBjYVcuyxLZbzaPev IiiVtgBUl/a/5uTbR0JbfU+p44Cd0MOT4ajcoTNsHPvPBaNkLKETIe6JHb0KE1Cv6CNe VosCzuvOce/XE82mppCqA5GbIU1aaHPYWe7HmyZH/mMkmmfr3zWtInHCSaWXBWFFllfQ m/1Gv6G8MMlwKHx+3a4xCbfshZ9vXeA7cMHGNyccW6oWoS/uQTD0o5VDx+GqzYDfYZYP 3RMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vj0fR0Hv68keiBerGEZYm4j5yOSf6bjnsnQtt9w94hk=; b=rbQ7nVlYaYGAZQ7XFccxfCmElPFPgbF5WeO2WjkXh8d4gVwFHkaxqrKE+GwJhJ162Q uVzw6sAUjVMENDA5/qqGJj1vnotzP5kYoMrg0ZzXpAhL1yXwjSuqdoxEt/HeWocxhvqR 3NVd3+I8WcTtCYcvBjiDXhsUoflYMaaA6pPtKN72LSTz42Rz5YnAuMXAIwjMW32bNfHt fFB6eslNn4IzKZcZPJ4UWoYZn/PQs5YGtb743dvTs6GtYR4NX5hNLQsYNkxMN9iiCjgL 8nilQuLotM4ikEe+ZfKIyJzuk5ysqdeFvLbpT8GZEoT6ow0vvBCY1OFCSW245qQssv0U ghFg== X-Gm-Message-State: AOAM533t3sHyNbuj6dNJlJJ4MTn3ylxWVf5FvZZOyMkRE9fpY4kdu+c/ H02QBFbsn2c2xJbZA1w2/Bo= X-Google-Smtp-Source: ABdhPJwGAzsAAqA4EE0xVB7Wy2nLESquIY3Pc0XL21zHXY/3rsG7/17j+Pe8EUPUWNYxgGUsP8OcyA== X-Received: by 2002:a05:6402:215:: with SMTP id t21mr10491472edv.363.1614969583148; Fri, 05 Mar 2021 10:39:43 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:42 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 6/7] ARM: configs: at91: sama5: update with savedefconfig Date: Fri, 5 Mar 2021 18:39:23 +0000 Message-Id: <20210305183924.1754026-7-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183944_183649_5CE685AD X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov While enabling an extra config, I've noticed that savedefconfig produced a notable delta. Split out the no-op changes for clarity sake. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov --- arch/arm/configs/sama5_defconfig | 48 ++++++++++++-------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 5f6297e6c549..0dca50c64503 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -1,7 +1,6 @@ # CONFIG_LOCALVERSION_AUTO is not set # CONFIG_SWAP is not set CONFIG_SYSVIPC=y -CONFIG_FHANDLE=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y CONFIG_LOG_BUF_SHIFT=14 @@ -9,29 +8,26 @@ CONFIG_CGROUPS=y CONFIG_BLK_DEV_INITRD=y CONFIG_EMBEDDED=y CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set CONFIG_ARCH_AT91=y CONFIG_SOC_SAMA5D2=y CONFIG_SOC_SAMA5D3=y CONFIG_SOC_SAMA5D4=y # CONFIG_ATMEL_CLOCKSOURCE_PIT is not set -CONFIG_AEABI=y CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" CONFIG_KEXEC=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y @@ -41,13 +37,7 @@ CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_DIAG is not set -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set CONFIG_IPV6_SIT_6RD=y CONFIG_BRIDGE=m CONFIG_BRIDGE_VLAN_FILTERING=y @@ -68,7 +58,6 @@ CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y CONFIG_MTD_CFI=y -CONFIG_MTD_M25P80=y CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_ATMEL=y CONFIG_MTD_SPI_NOR=y @@ -87,8 +76,8 @@ CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y CONFIG_NET_DSA_MICROCHIP_KSZ9477=m CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI=m -CONFIG_MACB=y # CONFIG_NET_VENDOR_BROADCOM is not set +CONFIG_MACB=y # CONFIG_NET_VENDOR_CIRRUS is not set # CONFIG_NET_VENDOR_FARADAY is not set # CONFIG_NET_VENDOR_INTEL is not set @@ -103,7 +92,9 @@ CONFIG_MACB=y CONFIG_MICREL_PHY=y CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m -CONFIG_RTL8187=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MWIFIEX_USB=m CONFIG_RT2X00=m CONFIG_RT2500USB=m CONFIG_RT73USB=m @@ -111,10 +102,7 @@ CONFIG_RT2800USB=m CONFIG_RT2800USB_RT53XX=y CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y -CONFIG_MWIFIEX=m -CONFIG_MWIFIEX_SDIO=m -CONFIG_MWIFIEX_USB=m -# CONFIG_INPUT_MOUSEDEV is not set +CONFIG_RTL8187=m CONFIG_INPUT_EVDEV=y # CONFIG_KEYBOARD_ATKBD is not set CONFIG_KEYBOARD_QT1070=y @@ -136,9 +124,9 @@ CONFIG_SPI_ATMEL=y CONFIG_SPI_GPIO=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_SAMA5D2_PIOBU=m +CONFIG_POWER_RESET=y CONFIG_POWER_SUPPLY=y CONFIG_BATTERY_ACT8945A=y -CONFIG_POWER_RESET=y CONFIG_SENSORS_JC42=m CONFIG_WATCHDOG=y CONFIG_AT91SAM9X_WATCHDOG=y @@ -177,11 +165,11 @@ CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_ATMEL_SOC=y CONFIG_SND_ATMEL_SOC_WM8904=y -# CONFIG_HID_GENERIC is not set CONFIG_SND_ATMEL_SOC_CLASSD=y CONFIG_SND_ATMEL_SOC_PDMIC=y CONFIG_SND_ATMEL_SOC_TSE850_PCM5142=m CONFIG_SND_ATMEL_SOC_I2S=y +# CONFIG_HID_GENERIC is not set CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_EHCI_HCD=y @@ -235,14 +223,14 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_DEV_ATMEL_AES=y +CONFIG_CRYPTO_DEV_ATMEL_TDES=y +CONFIG_CRYPTO_DEV_ATMEL_SHA=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_MEMORY_INIT=y # CONFIG_SCHED_DEBUG is not set # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -CONFIG_CRYPTO_DEV_ATMEL_AES=y -CONFIG_CRYPTO_DEV_ATMEL_TDES=y -CONFIG_CRYPTO_DEV_ATMEL_SHA=y From patchwork Fri Mar 5 18:39:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12119205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F797C433DB for ; Fri, 5 Mar 2021 18:40:09 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACD446508B for ; Fri, 5 Mar 2021 18:40:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACD446508B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OPo4tP0BVIG5Hv51frTiORKggMVc1acl/U2XOQdXv54=; b=n5zVVno5P2dW2iJrKokziz7T5 3xqyHnkTWUfqNoBbZIpdo7O8+YF5UhTd1fYzLy4mF4ozqVrLM5aQsJm9BXa66yLujw3/ijYwcNogb I0PiGcD8xQNtU7dn8TxPCYAUs4z5cPJbaEHMF+bURBZC7tEV5umngYaoCjsoGKnE0VGQPH1jPGRlt 9n5cr2WOXMmQt9rvgbqvN1PQVSN2VKilhLjSaPEkIpXp4OsjRr7pokrEQo5esnfbOJ4h24uO6d0o5 jnQ6/UyLi4Og9ca5QHFDCxLciiNpxwgvDwfY90++iKNkJ4ORuhpim5SIS+r4rqtmwifUF+kZ+g+Pv hVtrfh5Yg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMq-00G0PY-8k; Fri, 05 Mar 2021 18:40:04 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIFMW-00G0FH-Rk for linux-rockchip@lists.infradead.org; Fri, 05 Mar 2021 18:39:58 +0000 Received: by mail-ed1-x532.google.com with SMTP id x9so3994478edd.0 for ; Fri, 05 Mar 2021 10:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tf33K71twIkxM4hJLRQD7HM9YN0mvsbuZX3c9Y/Nb9I=; b=u+RQmqprzdy1MsB9sKjqgF24R2C9QV0O0WKwjebxR2m9olvz/IuHLOB8f7XTwUUEm1 T3cavT85BvevU66boYJpX7L9BxVXrTBlGOO78vm0u8ZfARGtgp80vloUbmvO+fbVofU+ /gFe6a0ls/VO68TRl2HIckJpW9enTQe1HaODNwQLtA66ooso7WVrsrh4F4IqedMjpANn P2CR0ryw0lepLKDI1mpFQJjLy+CT0pwBu1l2+6IVEFojYNp5CCq89o5BfYX5NJ6X8S60 Pfn8lffoT0Xzsz34iOwfew4rs3RlP32OSIUkOtQoBtXb9jQ7M1XISF4b7DFf1dZivutY 7gIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tf33K71twIkxM4hJLRQD7HM9YN0mvsbuZX3c9Y/Nb9I=; b=L3kQ4lQCMZeN4E5bycTv/RZOC2ZTvkEQ+/L53zUUnDHeGExrxlgCeJrIr4suNkNV0E 0fOvQRNiKk7bffcdhEPXsM5D9BHsDTpNz41CoMvF/zeZtuebpPhB/DxluJkTRbh/R2wF 5xLCOUcai8o4oRe9svRwHtSB7iyny0/0XzFLiepvExf3jzD28SDTSFyBEKlKIgtd1+5P +HcMYxzdTrnIOeVxb0+v5EGYJiqvLb8slpvvV7nbXU7vktz33HLeQxE3wARuAohKPPhL ihVTwaNDZflHs+qdX58hWYsd73khW+AOr2dSGp+ppxrvL8ruzd+CmD/Iq2jlRrDnJOiJ ATKg== X-Gm-Message-State: AOAM531rgcjOZfGVxvcDgHcAo6MdCORO/7fqnZ5laF9rHmTF2bbXU0uF ZrXcgLZEAuraI2xxa+Nnw5k= X-Google-Smtp-Source: ABdhPJxq1XvPuZG+i3nd4X6EJSujEotsK7sBnnc87kaoOOWNne65bWKi2tQr2yAU6w/Ac+93oV1M8Q== X-Received: by 2002:aa7:dd49:: with SMTP id o9mr10358033edw.14.1614969584316; Fri, 05 Mar 2021 10:39:44 -0800 (PST) Received: from arch-x1c3.. (cpc92308-cmbg19-2-0-cust99.5-4.cable.virginm.net. [82.24.248.100]) by smtp.gmail.com with ESMTPSA id o1sm2121808eds.26.2021.03.05.10.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:39:43 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Cc: Nicolas Ferre , kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH 7/7] ARM: dts: at91: sama5d4: add vdec0 component Date: Fri, 5 Mar 2021 18:39:24 +0000 Message-Id: <20210305183924.1754026-8-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210305183924.1754026-1-emil.l.velikov@gmail.com> References: <20210305183924.1754026-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_183946_120389_FF247854 X-CRM114-Status: GOOD ( 19.40 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Emil Velikov The SoC features a Hantro G1 compatible video decoder. Cc: Ezequiel Garcia Cc: Philipp Zabel Cc: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Emil Velikov --- arch/arm/boot/dts/sama5d4.dtsi | 9 ++ arch/arm/configs/sama5_defconfig | 3 + drivers/staging/media/hantro/Kconfig | 10 +- drivers/staging/media/hantro/Makefile | 3 + drivers/staging/media/hantro/hantro_drv.c | 3 + drivers/staging/media/hantro/hantro_hw.h | 1 + .../staging/media/hantro/sama5d4_vdec_hw.c | 118 ++++++++++++++++++ 7 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 drivers/staging/media/hantro/sama5d4_vdec_hw.c diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index 05c55875835d..deaf1f6cc784 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -101,6 +101,15 @@ nfc_sram: sram@100000 { ranges = <0 0x100000 0x2400>; }; + vdec0: vdec@00300000 { + compatible = "atmel,sama5d4-vdec"; + reg = <0x00300000 0x100000>; + interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>; + interrupt-names = "vdec"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 19>; + clock-names = "vdec_clk"; + }; + usb0: gadget@400000 { compatible = "atmel,sama5d3-udc"; reg = <0x00400000 0x100000 diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 0dca50c64503..10806f38abfb 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -200,6 +200,9 @@ CONFIG_RTC_DRV_AT91RM9200=y CONFIG_DMADEVICES=y CONFIG_AT_HDMAC=y CONFIG_AT_XDMAC=y +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_HANTRO=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_IIO=y CONFIG_AT91_ADC=y diff --git a/drivers/staging/media/hantro/Kconfig b/drivers/staging/media/hantro/Kconfig index 5b6cf9f62b1a..43762c8164e0 100644 --- a/drivers/staging/media/hantro/Kconfig +++ b/drivers/staging/media/hantro/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config VIDEO_HANTRO tristate "Hantro VPU driver" - depends on ARCH_MXC || ARCH_ROCKCHIP || COMPILE_TEST + depends on ARCH_MXC || ARCH_ROCKCHIP || ARCH_AT91 || COMPILE_TEST depends on VIDEO_DEV && VIDEO_V4L2 select MEDIA_CONTROLLER select MEDIA_CONTROLLER_REQUEST_API @@ -24,6 +24,14 @@ config VIDEO_HANTRO_IMX8M help Enable support for i.MX8M SoCs. +config VIDEO_HANTRO_SAMA5D4 + bool "Hantro VDEC SAMA5D4 support" + depends on VIDEO_HANTRO + depends on ARCH_AT91 || COMPILE_TEST + default y + help + Enable support for Atmel SAMA5D4 SoCs. + config VIDEO_HANTRO_ROCKCHIP bool "Hantro VPU Rockchip support" depends on VIDEO_HANTRO diff --git a/drivers/staging/media/hantro/Makefile b/drivers/staging/media/hantro/Makefile index 3747a32799b2..f4b99901eeee 100644 --- a/drivers/staging/media/hantro/Makefile +++ b/drivers/staging/media/hantro/Makefile @@ -22,6 +22,9 @@ hantro-vpu-y += \ hantro-vpu-$(CONFIG_VIDEO_HANTRO_IMX8M) += \ imx8m_vpu_hw.o +hantro-vpu-$(CONFIG_VIDEO_HANTRO_SAMA5D4) += \ + sama5d4_vdec_hw.o + hantro-vpu-$(CONFIG_VIDEO_HANTRO_ROCKCHIP) += \ rk3288_vpu_hw.o \ rk3399_vpu_hw.o diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index e5f200e64993..19f1202574a2 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -478,6 +478,9 @@ static const struct of_device_id of_hantro_match[] = { #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M { .compatible = "nxp,imx8mq-vpu", .data = &imx8mq_vpu_variant, }, +#endif +#ifdef CONFIG_VIDEO_HANTRO_SAMA5D4 + { .compatible = "atmel,sama5d4-vdec", .data = &sama5d4_vdec_variant, }, #endif { /* sentinel */ } }; diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index 73c71bb2320c..4d39da1d1581 100644 --- a/drivers/staging/media/hantro/hantro_hw.h +++ b/drivers/staging/media/hantro/hantro_hw.h @@ -152,6 +152,7 @@ extern const struct hantro_variant rk3399_vpu_variant; extern const struct hantro_variant rk3328_vpu_variant; extern const struct hantro_variant rk3288_vpu_variant; extern const struct hantro_variant imx8mq_vpu_variant; +extern const struct hantro_variant sama5d4_vdec_variant; extern const struct hantro_postproc_regs hantro_g1_postproc_regs; diff --git a/drivers/staging/media/hantro/sama5d4_vdec_hw.c b/drivers/staging/media/hantro/sama5d4_vdec_hw.c new file mode 100644 index 000000000000..9cf1068d986b --- /dev/null +++ b/drivers/staging/media/hantro/sama5d4_vdec_hw.c @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Hantro VDEC driver + * + * Copyright (C) 2021 Collabora Ltd, Emil Velikov + */ + +#include "hantro.h" + + +/* + * Supported formats. + */ + +static const struct hantro_fmt sama5d4_vdec_postproc_fmts[] = { + { + .fourcc = V4L2_PIX_FMT_YUYV, + .codec_mode = HANTRO_MODE_NONE, + }, +}; + +static const struct hantro_fmt sama5d4_vdec_fmts[] = { + { + .fourcc = V4L2_PIX_FMT_NV12, + .codec_mode = HANTRO_MODE_NONE, + }, + { + .fourcc = V4L2_PIX_FMT_MPEG2_SLICE, + .codec_mode = HANTRO_MODE_MPEG2_DEC, + .max_depth = 2, + .frmsize = { + .min_width = 48, + .max_width = 1280, + .step_width = MB_DIM, + .min_height = 48, + .max_height = 720, + .step_height = MB_DIM, + }, + }, + { + .fourcc = V4L2_PIX_FMT_VP8_FRAME, + .codec_mode = HANTRO_MODE_VP8_DEC, + .max_depth = 2, + .frmsize = { + .min_width = 48, + .max_width = 1280, + .step_width = MB_DIM, + .min_height = 48, + .max_height = 720, + .step_height = MB_DIM, + }, + }, + { + .fourcc = V4L2_PIX_FMT_H264_SLICE, + .codec_mode = HANTRO_MODE_H264_DEC, + .max_depth = 2, + .frmsize = { + .min_width = 48, + .max_width = 1280, + .step_width = MB_DIM, + .min_height = 48, + .max_height = 720, + .step_height = MB_DIM, + }, + }, +}; + +static int sama5d4_hw_init(struct hantro_dev *vpu) +{ + return 0; +} + +/* + * Supported codec ops. + */ + +static const struct hantro_codec_ops sama5d4_vdec_codec_ops[] = { + [HANTRO_MODE_MPEG2_DEC] = { + .run = hantro_g1_mpeg2_dec_run, + .reset = hantro_g1_reset, + .init = hantro_mpeg2_dec_init, + .exit = hantro_mpeg2_dec_exit, + }, + [HANTRO_MODE_VP8_DEC] = { + .run = hantro_g1_vp8_dec_run, + .reset = hantro_g1_reset, + .init = hantro_vp8_dec_init, + .exit = hantro_vp8_dec_exit, + }, + [HANTRO_MODE_H264_DEC] = { + .run = hantro_g1_h264_dec_run, + .reset = hantro_g1_reset, + .init = hantro_h264_dec_init, + .exit = hantro_h264_dec_exit, + }, +}; + +static const struct hantro_irq sama5d4_irqs[] = { + { "vdec", hantro_g1_irq }, +}; + +static const char * const sama5d4_clk_names[] = { "vdec_clk" }; + +const struct hantro_variant sama5d4_vdec_variant = { + .dec_fmts = sama5d4_vdec_fmts, + .num_dec_fmts = ARRAY_SIZE(sama5d4_vdec_fmts), + .postproc_fmts = sama5d4_vdec_postproc_fmts, + .num_postproc_fmts = ARRAY_SIZE(sama5d4_vdec_postproc_fmts), + .postproc_regs = &hantro_g1_postproc_regs, + .codec = HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER | + HANTRO_H264_DECODER, + .codec_ops = sama5d4_vdec_codec_ops, + .init = sama5d4_hw_init, + .irqs = sama5d4_irqs, + .num_irqs = ARRAY_SIZE(sama5d4_irqs), + .clk_names = sama5d4_clk_names, + .num_clocks = ARRAY_SIZE(sama5d4_clk_names), +};