From patchwork Wed Mar 31 17:35:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175831 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,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 17B73C433B4 for ; Wed, 31 Mar 2021 17:35:44 +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 92A106100A for ; Wed, 31 Mar 2021 17:35:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92A106100A 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=rxK9+gCt0QpzBNs28IepGs3JV8Te1xK97WEzRksqo1M=; b=n4PbDZYwJfN3uoozMvfJ5xB7K drkmBUvZDX5rAbepLIEUI71Hwm8CG47uH1bph6Ohb0LgWRrcNh8Ard3s1TD6TBCAIx1JEqkOGSq2W u+Nnd4ohxiGrWYcER6iC3hnR+tvSk6owTsbAfCsG4WgcuAUnIv6DFBF6T9yogi1VKKxysOsA0gogJ bC+ZlpRfjQUNA7FEH5i7Z7Lcs9GYAnOphMUF035jaXRvBzHizYHssaiuo+20NJOrvm1wG51n5skGd u7skytXSBJ4d25b3f2PL+z8ZNNNacDLF++SdNN/qmYBv/BF61+6eNHmauKTsx/Q3KPdeslUc9J4DM 3XaVY2y9A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lReki-007CXB-FU; Wed, 31 Mar 2021 17:35:36 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekb-007CUe-0D for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:30 +0000 Received: by mail-wr1-x42f.google.com with SMTP id c8so20475397wrq.11 for ; Wed, 31 Mar 2021 10:35:28 -0700 (PDT) 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=J7Mm6/g9DScNG5FEVhWNdLSdW972ryQCD27uTAegArs=; b=LtN7G9r8/jl/2chD7ZXrYNlXLFyE+1lvHPSzInWwN4rBV3jMbLzdoLCcYqGFP7RmQD tr3tNj/8FP3HOc1RRfLu5FJqSuE+8+RfTaVXmDgB6Cn4Bc9HLJicrgfBGSwMvBm6ADvI fkTvDyHvX5Z16HcOtUY1O1BiAeJbK1TWtK4rvVlNnHq4ya9cmq5/c9IIvuLd/5Pj9q+X Ht5q4jgJ7bG3/s5lu9yYdLWMnquXyYP83V/2GPTsQ5LV7sYAbKE6JqBuy0mAhu9yzMwH 2zAhow+XzuZIwjc2KIp9P/H51r6f8c1ZHNKY8QrN/B6wv0gljbt22ABz6yhtpk3nzLZM E/Mw== 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=J7Mm6/g9DScNG5FEVhWNdLSdW972ryQCD27uTAegArs=; b=Bz10ZE3Pt3jd2UpjnK9keWNqRK4yIxEOJibH+MLlR1ih8TF6mKCrV8X76nK2w6Nv+b rifSX+f+Pf2HDYytlYyCoF3ApVYNnM+nNYNKw5vFLsbgux38yyo/w+J+KwCmdulQMKnj 7tO3P6J3hIhXnQ1ncELghB1+5R2jT6N4pU2L+7U8dWWlvVZ9AhDgc5mBSb76wagxCJ83 L5tuYvolyV/SKjc3sQ1FOlbVQsozpZp7yy4nC9RsjbcD8e5+pca1umbxsbhORpcIaoZl 8f2w8vWdpP8sZKpDF9yMCWmarwl2fRAkfvzu4bXtQ4Fwau4K4jHO7IqJhwsfRD+lRoSc V0Ow== X-Gm-Message-State: AOAM5303WoB30ncdi0Fk8SdOsJE8+p+M3G+3LxAmyN+CIaTfujPhTkn7 +Wt2ek89fhRtki1u1df+CzE= X-Google-Smtp-Source: ABdhPJw52RKYcN4+cD5o9NRPGtnnTUTfKGBiYwXL6SNpac2aCdJFLiYtuSyEk+mnan+bhPp2J4+htQ== X-Received: by 2002:a5d:42ca:: with SMTP id t10mr4938431wrr.274.1617212128474; Wed, 31 Mar 2021 10:35:28 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:27 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 1/9] media: hantro: use G1_REG_INTERRUPT directly for the mpeg2 Date: Wed, 31 Mar 2021 18:35:12 +0100 Message-Id: <20210331173520.184191-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183529_110997_5427CC57 X-CRM114-Status: GOOD ( 12.45 ) 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. Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia 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 Wed Mar 31 17:35:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175833 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,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 CB9C8C433ED for ; Wed, 31 Mar 2021 17:35:43 +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 3F6EB60BD3 for ; Wed, 31 Mar 2021 17:35:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F6EB60BD3 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=cnWfCE2gutTY/2PqD9C3aiT9Piln0m1EivTKIAzeE+w=; b=aN23FI6PTH/xkU5h/XgiH5DWU bgxeRG7k/p+B0TIHjkebQRvDhgMsXSb8wdMwPScjg4PX4SPP84wzdOOi8FHkzaaKz2zgbQye3aDvZ 9f/QR1qRSLCAKoyWYmDGWdHvrcgLVIWBlx3RLuxG55GDirid/nXqhYctxfJWu4BctDoTcGUawX7id P6zySCcxQmGU5r8khQUyiiFE/0OIBN0Xym6QTC5WMMwxw0ElPbOz0sG862w/ddtqns+PjoitNAyPP 6PvxeP0aRhr6soZfePqJjgClYzFjO0UKvQ4AkTdXDO10ielnxOPQvmtCw5wWaAnZNN76HUoFlhwef iwcuwxjUg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekk-007CXu-15; Wed, 31 Mar 2021 17:35:38 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekc-007CVE-6G for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:32 +0000 Received: by mail-wr1-x42a.google.com with SMTP id j9so18778651wrx.12 for ; Wed, 31 Mar 2021 10:35:29 -0700 (PDT) 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=6B26f3IlajNfnhYcTkXd3V9kuoJqzsJf9D1voUcVJjo=; b=sHAnutviLbGjmnNVxwDzBbGsYBjFmcvd9GqZeWN4FNVgI+VEMILCalzMLEZp+Y7wlf 5+HcTCwhnhTOeiaeghRWf3EesgVE88bbiKDT50jWNTGhe/ExryCFoZVKQamI52EXDMpI 4TWXBZWPDtZbeUrhiOPrw3t+lst0vSD9wu1bBMKfIa38WxM1yPn7WBQZuuruhGb/+l2U XVYrN2sZ7/0emmM3jv8yvjPyOInuzA5iaY4vD93bL1N0GTIdzrrnWClCs1Faw0tFxHSt HqtIQqIv3LRW1gy4rewAPJD5hTLYunnQsPRBBa+K3y418Unqx2ulXyJOvapPymStP/DP U60Q== 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=6B26f3IlajNfnhYcTkXd3V9kuoJqzsJf9D1voUcVJjo=; b=gSGY7CLJfBtI2KOxU4eHHKDMAAzTnArd9ACH8YYQdMjUGc9tmx5k55Z0zu9yASyQFB uYzY+oDapSZDk55sNqop8fJ0GwIKazxW65/yAxt0SWAcOi6nN8BF+ENCFd/gqa8ocYeW HFgiWQhVjZbWQEqy7g04mPxD/7CBNCiRBM61Xc70MA+X8NHxfUFb8UxLovClvxs9sfHg gAqGBW7qY/WTwJhDaS3DJgvkPAoBSl0w+dkaXO6bGFTH4B2+b7ni5xNNA5n7it9pkQ4T dJfB9O0beQgTzyeiYdXsMYeLKWDcruVKn664Xkiea/t+Q4umCFsVSL4LkKaLoY0miK7i QW7w== X-Gm-Message-State: AOAM532uC09d6Y9a+7Tajauc65/fwf8g9+pqZzhFYEBLNVUW37UV6lDi FfZS9snsYPICU8tj5yoobRlGr5PWlwkS8Q== X-Google-Smtp-Source: ABdhPJz3U7V2V5vDfHEE+DsPC8CByVvjx0vZ4jRLw21MzeDOjtgytEQYSWZepxSoZVaiPECcaXo4iQ== X-Received: by 2002:adf:e5cf:: with SMTP id a15mr4927082wrn.226.1617212129584; Wed, 31 Mar 2021 10:35:29 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:29 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 2/9] media: hantro: imx: reuse MB_DIM define Date: Wed, 31 Mar 2021 18:35:13 +0100 Message-Id: <20210331173520.184191-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183530_693027_518B7D51 X-CRM114-Status: GOOD ( 11.04 ) 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. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel 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 Wed Mar 31 17:35:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175835 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,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 AFC20C43460 for ; Wed, 31 Mar 2021 17:35:44 +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 3C7C06100A for ; Wed, 31 Mar 2021 17:35:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C7C06100A 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=/bD7IJIeBcs+pRekvWEhaoDv/13TMX6dcZXZRLTyCCY=; b=axkIq1LQ2wwuUQZvTj/FXcT9W dtvtxN/5nLfvvtEWyuEiEEc6GdLmk1dg6wmX3/BnPXk8fM/9G3vS/CH9MLm80fe99ZgD0zB76zvM5 dLbxaInCZKIIiLHva4K9kEMZlk2Dl0prv0qvzah2sfei43JxElXA7l+Tq1yZwKnoRxqeiKva/003N Sip8O9bSK14P+5iXvZznBXYDDF1o155hVu0OD14Id0vUjH6HFHKHj7FpK1+nTDjtAKoyFffCbEt6f wuWhISsMbrVe4KUPu1D9W9cqtz/yRNgevuViNJy2QSB+XEuAa+dWbbzcMAMQ7/r9LRy5UHlQBmHGA ikyypMTmQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekk-007CYT-Vv; Wed, 31 Mar 2021 17:35:39 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekd-007CVe-Bs for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:33 +0000 Received: by mail-wm1-x334.google.com with SMTP id 12so10534908wmf.5 for ; Wed, 31 Mar 2021 10:35:31 -0700 (PDT) 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=zVDA2U87siFM4bZ03zT66KCDipDzfZC9XU/CesvHFfk=; b=jw0NR0Pxj8uM0WtAtSN3Bgx8kGIbnevLfdNHMT2ryH6VkqPIJfsiwiWKndehWXuEae 02o5ptYoCY1HqW7JVx5GYTxEQ86ueMoILBmWANfovgpvijLay8SAOpvPO2w5zJikUv7o TRa5wyI+c5W2fjc+Lfp/sIZIsCQ0DdVzy2f1UqkpK5boYa7hgdY69uc3v2K874YumVN2 hTD/eUz/m/uVkUksGmO9Rq4/g/+TVr5lxSLEpNC8nnNRnKEDUIrjYhnWgBMRRbqV7EwK fmn9d5nil9wTLYtqgCjUnIo5xqSrkWf1w9HiS9zRhWKON5VikosTu6cyZH/ts+vHgck4 06Wg== 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=zVDA2U87siFM4bZ03zT66KCDipDzfZC9XU/CesvHFfk=; b=C9gcZTXKMaOXYuX4wGHWXWPmxm38O+G3AVzDymXLBrJp2m8wUsDfFgeEK+tJXkXr2D dXSnMfhceCnEsYTvPTDU+OWlDbt4Tb/y+j6+ogDhVKiVAYOqdo/95jOb0/7joC2WrN+G SilriDEqhpI1U4fkdwrTqp0nLgVVPb7G3KwlG8RtQ2f/AObQ7PqPGi/Pn34yJWUiXDzS kFOQuedpSV5PI4dAHEiW9owtVtJdtbSc9VZoJlb8VoKgH6zcVUpH6CaIpOZxsdLVfRMV unQ3FNQLjQ9/DIFsn6W8mYD8dDAycZNyg2Psnl2epwtGY9WWtGAR9evtYniXGlP0q2WE IHUQ== X-Gm-Message-State: AOAM532BGyS6WwWHEt9tmkYBLQ+k1gnBeFZDN+pfRxgwdqplwiX0lz9a eBMW/FfZ9Sd8otibkuAMcOLjsYVhjCgGrA== X-Google-Smtp-Source: ABdhPJzuSwFwMSEJJ4VXKWTaJL0XmwpILnO7FdeSPO+nnDztjerBrxyZP6h8rTPDslnjtl6Bjffg5A== X-Received: by 2002:a1c:3182:: with SMTP id x124mr4127095wmx.41.1617212130737; Wed, 31 Mar 2021 10:35:30 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:30 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 3/9] media: hantro: imx: remove duplicate dec_base init Date: Wed, 31 Mar 2021 18:35:14 +0100 Message-Id: <20210331173520.184191-4-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183531_495873_D590E3CF X-CRM114-Status: GOOD ( 10.64 ) 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. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel 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 Wed Mar 31 17:35:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175837 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,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 71C8DC43461 for ; Wed, 31 Mar 2021 17:35:44 +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 CBCC261026 for ; Wed, 31 Mar 2021 17:35:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBCC261026 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=uPgXfCYBtQWKGpRkf9mZyAElYuoQ5c+W+UefNUFGi7Y=; b=FAkAwNUzGmq4v5t+7Gxccz9zT vWA+e2WLwPyaBPXgaotiUkjSrmzdZw9IGuSqutSEbKGewLcQByFMDdr/upwCTyLVRhO5aCoBRvvtk hLnOrADZ9fI3PW6piCIvgX2KoxwcsY4WR8WuOHKZ91x3e55T2dGaMFbvC/FmiXy4H0hRyjbFFNhr2 ZRISQ/jxKGOfwbIJjFHCgMJLiBDeB2Eai/q8mOQYx4m1RnxUXCMVhz//OrdWtflmHNj87LUQgoC85 McxMejFrJKngCLCZNzcaBku2oaSkWBspqsRflydr0XSGSq3t937FEv5OHOL6xAvCrHcuVdwV3gI0l g/VOBP/4A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekm-007CYx-89; Wed, 31 Mar 2021 17:35:40 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekf-007CVv-4d for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:37 +0000 Received: by mail-wm1-x333.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so1549920wmj.2 for ; Wed, 31 Mar 2021 10:35:32 -0700 (PDT) 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=RKzjLcplK3Qj6N++ugVsRlEJA8YUUn4W3Fexo0s7VWk=; b=Y2kJKmF/QEmz1+0o48IS5Tb0knr0LPos4GWWgf3flr4f7Vinr2UFj65rRD9zQZ8AxU ES3d1m308XPWizeyaHi0Rd8DpZ7wQ0Tn3QaDTtf0yZRckbCxgAdIcMYD8dxA4tLilcjP spzCJ/XjFkJ08xXrn11ba5WuKKLsfBkvGyeB8wR1kmH7eXHYQBdKaBUdMhYpmLBJkuWv BULfWxBlA69G5kWTqLso3NZMyQvl5A6JBlI1tOcypC5cLxv8tq885Xs/sHFWvEUdFpxX 9cJPGaTmoLTS+KVH3XmvTeR4Ze+KnDSJS6MPobSW77H/ns0B7HeZSavgR9y15B+kwNLG lChQ== 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=RKzjLcplK3Qj6N++ugVsRlEJA8YUUn4W3Fexo0s7VWk=; b=Dh5UpXjHjof70E5bA431yMz9W4XCiFAWAsN3830R0fxKJifbvHs2fd3btz+V1HG8LZ 9HkjmrS1ClMzszUP/455HwHi9qGjDquYJbfziBEpt7SMpLeXjyVYWU0Z/w8gf+DmylUF tZ9rt8HgoBxJnxyvrZKowaPP3hKriDkBCsDIvcOs0f/qhH0zRh8SfHbT59QGWFX0yE3B dZFUJsQzyvVyp6i9bLeVOe1A2I7CkL+EpS8XfbRivHkVYWM59AMmeTB9pcsDtz49DGra X61blH1WPMBWtAtOnVgfZz75MYlZHbJYEA1VHiI47CpPo7b47jYnxwOGlC/LcD2pst/I 2cnQ== X-Gm-Message-State: AOAM531DuAvamzR7e02ATdubJUtJDMz5O/+sh5/8vzmtHlvJxpsgVU53 nOEHfm4MXBlYFekzUUgBrAw= X-Google-Smtp-Source: ABdhPJykb1Gm/yG5gTGpyJoWqqGtDWKZ9GLEauQ0tzwUU0osQDKIEr317Nvq1XzoroUShjfr7aJ+kA== X-Received: by 2002:a05:600c:35cd:: with SMTP id r13mr4251681wmq.186.1617212131818; Wed, 31 Mar 2021 10:35:31 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:31 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 4/9] media: hantro: imx: remove unused include Date: Wed, 31 Mar 2021 18:35:15 +0100 Message-Id: <20210331173520.184191-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183536_083995_6D0ED845 X-CRM114-Status: GOOD ( 10.32 ) 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. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel 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 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 Wed Mar 31 17:35:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175839 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,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 3A4AEC433B4 for ; Wed, 31 Mar 2021 17:35: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 B386460BD3 for ; Wed, 31 Mar 2021 17:35:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B386460BD3 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=xBi0+AHI3eTeRtvEiCICsAWNuNSo/WguKXp3Fu5H4/g=; b=gHlKYvI4sI2McIt7K2yWB9X/A cxJXbbwMwQ47AUDi7LsrmlH1Pnwsi5+QzIru5djqJQThNAGrkdwLMMV/dLAqx/Q8Agr7h008eLl7w 6fEyTlVH8JTnAMWnE/aN+SFfSo8Uo0YnIqJOvioqrrTAONAJUvNCdSoKVtE9H0ksmQ8+yVfVan51j 5nr4fvdBr/Sxk88XWvdx8s+ACmbEINiJN1tbDX7jOnG3SVx/XEGCDQrke/ZVd76Z4AQfQMsDfoDpv hDgwG5ldfeBVvU8FS44PgyjOJAaVxT4dp7or46vacinW3pRZ0BgmJsIxDM0pvn7zuB+IzEsiAye/S t2DkQ7Mrg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekn-007CZP-OG; Wed, 31 Mar 2021 17:35:42 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekf-007CW9-G2 for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:37 +0000 Received: by mail-wm1-x32a.google.com with SMTP id k128so10542892wmk.4 for ; Wed, 31 Mar 2021 10:35:33 -0700 (PDT) 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=//s5GXhvTYBFxepTOFjvgKPgNSSVEMfEdoDacbVrJhc=; b=XBrvV9n9AJs9E1BQhtZDtrXx9UpPAV1l5vJVBJuXc1GAQybpM5RG1ww0MM+Sml9UHZ jmusbG5SOFtjUCYUzWuUMwj5lyhlUGKvo4pboTUn/DLDzg3s2OA0B7MzDYIEmmqFtTDy LaXuOxrWpq3wl8W9V6lUH3h5evqrUSID90vcNfv9AJSSO+p+KFz1y7ufuu/LJECD3XVb DFJ79iC3Q2h/zTYgCn2fEFa7UgvZEG9xYoZwbG3KKZsaO+C6L2t9WwWo+6rDRHn1aYpi wHLbCxkkfZmSEDNVB+9Av6qnTaYjpEkl2SX+G1kCDdxv8T6r9rNCnppPLGfn+g/fL/Ah rKFQ== 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=//s5GXhvTYBFxepTOFjvgKPgNSSVEMfEdoDacbVrJhc=; b=coxJ+cifwwozuB3++xqMkhueJ+2Qk694ktywXH6JEwyRtmGjBNo0p6QneN36qHrkTZ T03EULD9txdI0TxSc4VDo66E7na3KKMHluD5V8MC4vvX9iFe/YTBO/Ne6XLyyJPY97gb yXdbNCRPELczlRQcRrEut8kr4YzGDC/LPtBI3JG06wEV9WQJpgumVUuMHSs010juLfK/ BFECOp0OoZnpno7eRD2KT9O39nYolhH9ZabRygwejQOTPhoxMQxcuMETFq2yo+9OK7r4 ZveogNw9HZcJ/9DNYQxOFOEVaEwrNsY/ClWJhTTGrcJ2PpPtu+F9gdFKKNXXkU/ifkaf PEIg== X-Gm-Message-State: AOAM531/vsIwInZ0rfZUm0oyDCgqJzJKG5Rz1kMRteolrN9YacMj/R1k olhgXfq48XV+dbf45h9gXWs9yjKILj1Jyg== X-Google-Smtp-Source: ABdhPJzpzfKHxYuDZOzO1iYSTGNXPrAYAW6UZYmlK180CUi/eQ+P1EHAiW89z9OPL70TzMXluujRBQ== X-Received: by 2002:a1c:43c5:: with SMTP id q188mr4098708wma.94.1617212132991; Wed, 31 Mar 2021 10:35:32 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:32 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 5/9] media: hantro: introduce hantro_g1.c for common API Date: Wed, 31 Mar 2021 18:35:16 +0100 Message-Id: <20210331173520.184191-6-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183536_092132_A4D509F3 X-CRM114-Status: GOOD ( 19.60 ) 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. Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Emil Velikov --- 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 Wed Mar 31 17:35:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12175841 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,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 6CA3BC43461 for ; Wed, 31 Mar 2021 17:35:50 +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 EF6816100A for ; Wed, 31 Mar 2021 17:35:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF6816100A 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=YKADwqyrhkuHKgULwL/4GeyHDB8zia2ExvsbT5di3O0=; b=oeutOgrQQrGHhNUrZnsAlV0FS UgnlRcYCsRBefwTSu+rXWbvsneGomrJlpI4Y1A4gvx8OsRwHfRmDftePv1tEbfZdYG5Hg6J/oO010 KudynOd5YG2YTrjGcr9FaMFinlWOq77V9DHJuYD2877UQnYACRvjBO9XAaC8ThUc8kThWjo8UEBHe luItFZdJavzgpILSbaYhcXE0JLVCXB3muY0p1iBcQFR4DmUsO0ruEv0WFLJ/JUJKT7mGfi4gH9neO kg16i2CzVrzwbIRN/mVGB/8xmDKpVJjOTfR+Jo8nCFFSPI5U1oVAOJSpbpx+zl7DglX69Rpc1VtxT rZrWd5pkA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lReks-007Cau-FL; Wed, 31 Mar 2021 17:35:46 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekg-007CWE-O1 for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:39 +0000 Received: by mail-wm1-x32e.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so1543004wml.2 for ; Wed, 31 Mar 2021 10:35:34 -0700 (PDT) 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=J9QCFckIBAkkMW1HuLQ0Z2D0zukJHxh0rMMA4ARv74o=; b=f7R36IW85JWA3JM042Skzgg63r58U6OiRJmQQL27JFIs4cRGODXhJfXNzD4sR8i1uI I7YT2w1oS7c5gYWglNWdHY43r2LiMDwS4xe7bJottqtAmbwNSlassjVBYxHwjwstxi+j C560wdT4Ksq7xUP6FIKD6W5ktb9QWn4kiJC4PS6Jn0gVunUphGGI2iyZVniPbVBlI8ki cpJTDRN+HwRAocWtNeCCEP+vBbgn0t+RcaAvfdx2r5m+DO/7lV9+OMc9UWdC+gepF+7t wZeTtLFi6CZ2b1ungtOpxJQSfHppxZoefa8rIV7uw1QKJPb+LqalLvYx0w0LVHHDbUAh QTsw== 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=J9QCFckIBAkkMW1HuLQ0Z2D0zukJHxh0rMMA4ARv74o=; b=jnSAW7wEdkLv3hSvw/giAK3gr/FVwK8rEu2ylgIKnUtIB49Cw7MDKd0usDBQ43Pm7S XPVi0s3FvIOxKl5IyhMSdl8RLnRgGvWNWGLr9ZCM63f3Un2n0DVui0uPzi8DGar9ypF8 LeCLHSvHLbVSRyjLHY0CIyuAOduDInS8Y8MxmA1thdSyHDEEIq8Z3ap5oALgkhX4ffBv WGYFqhyV5eOZTqh6eNw+tbp9abTQh+zWJTn3aj/aZbWmeiNBry9+AaZlcKWn+oaBSXyf qgSERDm7SfzTD1Q+tMuX7wREDmI6ar6agco6IFkh0E6iSgxuJTU5oDVzHtm2F+NrDMxB hbng== X-Gm-Message-State: AOAM530r/8hdQYVHraTEOY/9LxWJ1UyQuMVI7JYOGI5CucuGq+w8tc+3 zD4oxIMvNYZnWnI6qFtMedA= X-Google-Smtp-Source: ABdhPJwLSOnWotXARo97qgnF3BxfFU0WQJclwokJkmXaXHWELQ/+b91woIYyzgHcow8388aMYut9kg== X-Received: by 2002:a05:600c:3515:: with SMTP id h21mr4194328wmq.9.1617212134195; Wed, 31 Mar 2021 10:35:34 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:33 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com Subject: [PATCH v3 6/9] media: hantro: add fallback handling for single irq/clk Date: Wed, 31 Mar 2021 18:35:17 +0100 Message-Id: <20210331173520.184191-7-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183536_259820_C299D638 X-CRM114-Status: GOOD ( 17.95 ) 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 Currently the driver expects that each irq/clk will have a name specified. A valid point was raised by the DT maintainers - when there is a single interrupt line or clock - the names are not needed. This is handled: - clk - implicitly - ultimately we'll call of_clk_get_hw(..., 0, NULL which will get the first clock from the pmc - irq - explicitly - platform_get_irq(..., 0) To gracefully handle potential bugs, add respective WARN_ON() if we're having more than one irq/clk, yet lacking the respective names. Acked-by: Nicolas Ferre Suggested-by: Ezequiel Garcia Signed-off-by: Emil Velikov --- v3 - New patch --- drivers/staging/media/hantro/hantro_drv.c | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index e5f200e64993..d1294eb9cd07 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -752,8 +752,16 @@ static int hantro_probe(struct platform_device *pdev) if (!vpu->clocks) return -ENOMEM; - for (i = 0; i < vpu->variant->num_clocks; i++) + for (i = 0; i < vpu->variant->num_clocks; i++) { vpu->clocks[i].id = vpu->variant->clk_names[i]; + + /* + * Warn and refuse to load if the driver has multiple clocks, + * yet they are lacking the respective names. + */ + if (WARN_ON(!vpu->variant->clk_names[i] && i)) + return -ENXIO; + } ret = devm_clk_bulk_get(&pdev->dev, vpu->variant->num_clocks, vpu->clocks); if (ret) @@ -791,7 +799,19 @@ static int hantro_probe(struct platform_device *pdev) if (!vpu->variant->irqs[i].handler) continue; - irq = platform_get_irq_byname(vpu->pdev, irq_name); + /* + * If the driver has a single IRQ, chances are there will be no + * actual name in the DT bindings. + */ + if (!irq_name) { + if (WARN_ON(i)) + return -ENXIO; + + irq_name = "default"; + irq = platform_get_irq(vpu->pdev, 0); + } else { + irq = platform_get_irq_byname(vpu->pdev, irq_name); + } if (irq <= 0) return -ENXIO; From patchwork Wed Mar 31 17:35: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: 12175847 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,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 4EC05C433ED for ; Wed, 31 Mar 2021 17:35:55 +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 CFDD96100A for ; Wed, 31 Mar 2021 17:35:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFDD96100A 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=gzRo3TcyBTJnoHs1MEsc0/zzBhGnsWhl26Gx8aNxkbs=; b=P+SQffXWu1Ja+zAeK020bleHZ JviKDNKz1Iihy7a8PU1SYOaV5gNuyHmEThgUTCh8Cs/12u0Yyq4lEiPl5Qvjx8oKqA5yKPI85+WEN Yh74daUbwMsq4uXL8pq4BHUw0sAIgubCi6qtdm54WKKq8fEarpUE1ufNMOD41lLpo5cg8XcunNUKf SBKXmXYDgcSQpF4/DQkggdFdr1eow/p9HLtyRxZS5MJvS3d+Qu0XV77P49ylaq7eWNsEXcBCJBW2j 8AiEvyo6DDHDiGukJfe1365i1iKsHHs2o5yykUcEJTdumOOiyN5aeGrBc9JP1Jj4ppAbiQ8zomBG7 siqM1PhXw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekv-007Ccl-I3; Wed, 31 Mar 2021 17:35:49 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lReki-007CWK-9n for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:39 +0000 Received: by mail-wm1-x329.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so1552774wmj.1 for ; Wed, 31 Mar 2021 10:35:36 -0700 (PDT) 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=c4cZd+M5f+AeDALoemgsfPAehWaYVnvxwh4uGy+wkOo=; b=JIWKVXAkmAJBnseSZM1anFOSAccWbD3fSw/O9Ev/2uz4uizLMQA/T9QkRU2EpG+9VX VXCRPZ5IPV+veUsbuCFKFCu1Uqblcr3OazXphTbg+DsI3iMQHBHefjsAEVKMXMQnI6+2 2XI50ZSXqajmM66UU4xIScEzJE4zuszwko7Or+vzHcawTSEP6S9wt8vi6Q2lskD9hiHL +Xo+aaZpO9BFXJIkdHUj8zp3w23NpLBBDfpMLCCnfKfBPMG6LWKxgxtmRZ8VG8exC1oV 7om1yCf15jeCBBY3l7htmS+dnEY3haan6BQkybkeCKNwdN6GyeK2qHooS60X84/G6kF3 IsEg== 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=c4cZd+M5f+AeDALoemgsfPAehWaYVnvxwh4uGy+wkOo=; b=msUTJ2P2O4n0+6S5k5DEmRiZAnsXIW3BorGXymHNggDbVf7zdlB9GQ0tZ84oL8LjTB KLTVOLe63YJ5Xx9FU3s7Amo5s0JABuHb1fxsdCsrvJjdS/geFfSv40eBLeNAYZBHznmH rOJ4Gqr5/uD6anaCeFDDa+s3bl9PFs8m9E46lNBQb+v5n11n4/F0h1vmLdFzHEEGUpE+ 1+engxknB636J7nHwGAMsjsfKdIIRmLB/k8vyg4kLF7itg0KG4cA6K2J86g5VlLRSMop a0yym2kZDtI4NOvaO1qZ7n9uA7JNF4vmfyjhK9nyl6x4cWUqCcTOz25vxE7K/RRwN8O3 g0/A== X-Gm-Message-State: AOAM532wup+Pum3IUSdlngDn/RqN3BSqIeK7l112vOcgvTihynguS5x6 TAC9veP9ljImJQs643mmZU8= X-Google-Smtp-Source: ABdhPJxYoWD58r/igYEN0Jrd0MhzMiw4wIwiTk3CAQbIobPAkZQlgG/9klpTSWowgkhdlnIrgaIjJg== X-Received: by 2002:a05:600c:2945:: with SMTP id n5mr4179454wmd.78.1617212135727; Wed, 31 Mar 2021 10:35:35 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:35 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com, Frank Rowand Subject: [PATCH v3 7/9] media: dt-bindings: Document SAMA5D4 VDEC bindings Date: Wed, 31 Mar 2021 18:35:18 +0100 Message-Id: <20210331173520.184191-8-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183536_441023_9D0CFB09 X-CRM114-Status: GOOD ( 12.15 ) 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 Add devicetree binding documentation for the Hantro G1/G2 VDEC on the Microchip SAMAS5D4 SoC. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org> Acked-by: Nicolas Ferre Signed-off-by: Emil Velikov --- v2 - Newly introduced - s/Atmel/Microchip/ (Nicolas) - Drop leading 0 in node name/address --- .../media/microchip,sama5d4-vdec.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/microchip,sama5d4-vdec.yaml diff --git a/Documentation/devicetree/bindings/media/microchip,sama5d4-vdec.yaml b/Documentation/devicetree/bindings/media/microchip,sama5d4-vdec.yaml new file mode 100644 index 000000000000..9cb2c0295d54 --- /dev/null +++ b/Documentation/devicetree/bindings/media/microchip,sama5d4-vdec.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/microchip,sama5d4-vdec.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Hantro G1 VPU codec implemented on Microchip SAMA5D4 SoCs + +maintainers: + - Emil Velikov + +description: + Hantro G1 video decode accelerator present on Microchip SAMA5D4 SoCs. + +properties: + compatible: + const: microchip,sama5d4-vdec + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: vdec + + clocks: + maxItems: 1 + + clock-names: + items: + - const: vdec_clk + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + + vdec0: vdec@300000 { + compatible = "microchip,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"; + }; From patchwork Wed Mar 31 17:35: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: 12175845 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,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 2CAA8C43460 for ; Wed, 31 Mar 2021 17:35:53 +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 C29E161026 for ; Wed, 31 Mar 2021 17:35:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C29E161026 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=QfJ/30opA5UH1xjLNve0YBxrlTdK723CqjRVdAvCPPs=; b=bcVEjVuImZM9cDNhOgeyArYRx Hr0RzQWxUkVtUCGAcA07BJy/kM5GN+4/EV/p+yl133lucJzYe3FDuBwzvEAGbQdjbERMCEvKAmuHJ O/ckGgoTLiDGsUnMOCqPZq6yjLgFJ//97v+MUmF4cQwJCMsFskhQZsTIkDlPKB5tTqRLECPaSnS1N E9W8Ok1Sk7piSAU5x2TNvWRUa0usrFPLBrNxeR50j3eipVTfOLqPhulUeHxR2hCnOsyGi9p1uo/Wq LV0H6nQnTfrUr4Lewkb/muQ1JQxxwyCAkygnUFktjj+tsZHhS/AvP6tztX08lfjT9idaP9EPdzxnp WBdzo2M0Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRekt-007CbN-AU; Wed, 31 Mar 2021 17:35:47 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekj-007CXV-8G for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:39 +0000 Received: by mail-wm1-x32a.google.com with SMTP id a132-20020a1c668a0000b029010f141fe7c2so1574201wmc.0 for ; Wed, 31 Mar 2021 10:35:37 -0700 (PDT) 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=mAneJlrkY4/IZLQNpt5ahOvEPFy19jWwGdcAjZr3nhE=; b=YmtZQ+LunBSbH82nppx0e1AHv/erPdAV4rYhHMfTZm5/5CB1E3qrRmqrE980tmzGNR wXzZjOHx2GUc+HKIElUWHVymFNmLAIF6i+kNbkOVhrYDrfmgoOwl8N99OtJg1/Y9Q8pu Tr8+IwMJudTRE3xQE+6S9s+psA2EwSL5m4CKNXrvZde05MYUxqbE7wO3Otlz0aXn43OV 6tmMHep/dQZs8QfM+1Vc7j4vl9uVo4Gio2lCukWS1FcBezTZ5SUm8dqQ5xbdyMOSVWIo 6JtQsaIMJO9CF5yWEaeWuiy92EivH7uyscpg4VxO5AKTPwlURVKbnDJF4XDa9Og89ZJu WSrA== 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=mAneJlrkY4/IZLQNpt5ahOvEPFy19jWwGdcAjZr3nhE=; b=E2uvSMq1jq7JS+V1IPotGH8cinIsPnhgXAx9SGsJY6Fct7BYlZNQfFKjUQFjkLBnHv SH6mikt32DJbZnyfndnoF7EnNAl2g3lLgwuyUM6vJ6UDYS2lSxtp/nhqXQALg2eGifGy GuetMJfbGuRAczau0xzNowEBPF1OyX1RYLLs6xxPQHb4zeg0PbPOML7rTVSQHciBTPsL L05ikACnOpEHHbFo5hj1rtXnnfm1T2U/VfGt3e4XL6dslPTT9wPnryQ7E09f5qFAayJL qG4JOwbnDdPeSn26ZY4iUOxZwGlP2yMIQM/H9QLaEZQb3bG8rN8DahThDseEySCRcLwr jhGw== X-Gm-Message-State: AOAM533xt8psFjhDZYV3aoWXj0D4DKo6kUhFe/x1ph1AXCLhURlZyJdl 9TqzslGGlFB4oq2A0RvWSb0= X-Google-Smtp-Source: ABdhPJzlxACnhIRQ+AXKJJI1GcyjjGziE0R7NWal5rREJt1JXk2twRrZNDdgHHf0WjBbeLi2WZFJSw== X-Received: by 2002:a05:600c:22cd:: with SMTP id 13mr4137385wmg.90.1617212137004; Wed, 31 Mar 2021 10:35:37 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:36 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com, Frank Rowand Subject: [PATCH v3 8/9] media: hantro: add initial SAMA5D4 support Date: Wed, 31 Mar 2021 18:35:19 +0100 Message-Id: <20210331173520.184191-9-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183537_428983_4BB5728F X-CRM114-Status: GOOD ( 20.28 ) 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, supporting the MPEG-2, VP8 and H264 codecs with resolutions up-to 1280x720. Post-processing core is also available on the SoC. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org> Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Signed-off-by: Emil Velikov --- v2 - Split DT and defconfig changes to separate patches (Eze) - s/Atmel/Microchip/ (Nicolas) v3 - Drop the clk/irq names (RobH) --- 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 | 117 ++++++++++++++++++ 5 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 drivers/staging/media/hantro/sama5d4_vdec_hw.c diff --git a/drivers/staging/media/hantro/Kconfig b/drivers/staging/media/hantro/Kconfig index 5b6cf9f62b1a..20b1f6d7b69c 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 Microchip 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 d1294eb9cd07..74a3d9eab454 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 = "microchip,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..d52ac626f98a --- /dev/null +++ b/drivers/staging/media/hantro/sama5d4_vdec_hw.c @@ -0,0 +1,117 @@ +// 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[] = { + { NULL, hantro_g1_irq }, +}; + +static const char * const sama5d4_clk_names[] = { NULL }; + +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), +}; From patchwork Wed Mar 31 17:35: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: 12175843 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,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 2C955C433B4 for ; Wed, 31 Mar 2021 17:35:53 +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 9EFC96100A for ; Wed, 31 Mar 2021 17:35:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EFC96100A 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=ZRA/2byzOE1YEGWKEC6t50PKI9D3g/kFTmf6a9B1cNc=; b=PEBrLbXft+c2c9jG1uTVZnVHm gqdmuRZ+bHOZF09/m3AQra6wgS16dhf17CkNYX/xT+M7FBoWCwiDDJrmh6me0gJSvmxE+Ss9x3n/F Np8/rfyq2c8gBvNYWVqOA8QYs4EGQZ+4tQND8PksLfUBDZW9ZLRsp/E5cAoH1PkF9N+gBm5IY6hmc Av0G9lXJ+npMgsd7COC2Ey2vbx/C+VQFfdVb5SWr3kDP1nMYYr2BsGE/JYpc7hUigS7FJr8U5GnYx 0crBSYbWhzIcTKKzuHGS1HDkyzxoN/5TcwcLytutVFR+A6GG9wDeOcti6MJ0OQppSLogWV0rNQ1fA uLgIgtLFA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lReku-007CcE-NX; Wed, 31 Mar 2021 17:35:48 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRekk-007CXz-7I for linux-rockchip@lists.infradead.org; Wed, 31 Mar 2021 17:35:39 +0000 Received: by mail-wm1-x32a.google.com with SMTP id d191so10539890wmd.2 for ; Wed, 31 Mar 2021 10:35:38 -0700 (PDT) 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=c9dnfwn3uUQXnRGTtGdPI5EXjcVR5rT5ZIvAQLeTWB0=; b=WCzlqR6P/SJcQRG8ZJhW0JgDKZwNXWVNT0P8HMH4MCT5hPUS6PXalp4CoXzfamAgq+ zBQ1utZxjBRsVGd23sJ9ofKZbKQxv1krZ0EHv3gDMkzrsXFSdI2bx7/JT7+YPpajylsS ugbM5qPu7Yzowim/m953+AXX1SK5CKZWA13mPgLMKqcyaat3wHKSNSGVL0cYtX30pNTU sMzFUF2J3LMfVh8kLYG17BQSa8qrryJPyvLpbqmweoAnlaIXcKpFEm4DNCONU4+X/zCT YQ2TE7NNoPS+AbhcKNB1j9HPw/3dLlUy8L6/Le1ESMnNKq+hd5m5c5rNr3gqMKbV3JZD A/PA== 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=c9dnfwn3uUQXnRGTtGdPI5EXjcVR5rT5ZIvAQLeTWB0=; b=PPKZdiJi7lIAhz/DEWuHqKfvC2Ikjj2XOvkjn1AAEtIywmyV2fX46ZkGhkSO/Gzo/l Fh7xGZb8Io03h7kAfANnbsqWbwZdsV5gOW0RC7V2b6mvelJL0LgoIZrjdKpfXsxZkS4k IuqgeXRF6siWwp1ctvrTDJKvYOS6b2dMrHfxdEoQsq/lhKVgUCD2njVOedgaFaXjYfwv yUkOXc3ANPo2ZTJYR0hw+QLyStJSm/9bJI++RIa+Nke+p9x4eLoFZ1d1OMWu4om8cRhN IUOrCPa1zb4A3b06jrOxroVvKyhxdTGcXbgvjvSnXyVAIvOCP/qZCWHYEtzJtMO1x0MO cxpA== X-Gm-Message-State: AOAM532MR+O/p8icaBquKiPf/Ufpxix9G8du+YLEbmbPwaBVcc8ypc8q Hj2rwD1Eu48mzjNpu2sDfp4= X-Google-Smtp-Source: ABdhPJxVIpTnZ6aBrQGee2qYidNtRG733Qb/IoI1wVPHki4azaPWSOVPcGbgOfhdcfiXWhpV4GfaVg== X-Received: by 2002:a1c:1f4c:: with SMTP id f73mr4183679wmf.25.1617212137932; Wed, 31 Mar 2021 10:35:37 -0700 (PDT) Received: from arch-x1c3.. ([2a00:5f00:102:0:6e1d:cfb9:fb12:552d]) by smtp.gmail.com with ESMTPSA id 12sm4714200wmw.43.2021.03.31.10.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 10:35:37 -0700 (PDT) From: Emil Velikov To: kernel@collabora.com, Ezequiel Garcia , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: emil.l.velikov@gmail.com, Frank Rowand Subject: [PATCH v3 9/9] ARM: dts: sama5d4: enable Hantro G1 VDEC Date: Wed, 31 Mar 2021 18:35:20 +0100 Message-Id: <20210331173520.184191-10-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331173520.184191-1-emil.l.velikov@gmail.com> References: <20210331173520.184191-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-20210331_183538_364013_FC2FE3C6 X-CRM114-Status: UNSURE ( 9.01 ) 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 Add the SAMA5D4 VDEC module which comprises Hantro G1 video decoder core. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Acked-by: Nicolas Ferre Signed-off-by: Emil Velikov --- v2 - Split out of larger patch (Eze) - s/Atmel/Microchip/ (Nicolas) - Drop leading 0 in node name/address v3 - Drop the clk/irq names (RobH) --- arch/arm/boot/dts/sama5d4.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index 05c55875835d..e47e1ca63043 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -101,6 +101,13 @@ nfc_sram: sram@100000 { ranges = <0 0x100000 0x2400>; }; + vdec0: vdec@300000 { + compatible = "microchip,sama5d4-vdec"; + reg = <0x00300000 0x100000>; + interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 19>; + }; + usb0: gadget@400000 { compatible = "atmel,sama5d3-udc"; reg = <0x00400000 0x100000