From patchwork Thu Apr 1 14:43:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178181 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 0F3F8C433ED for ; Thu, 1 Apr 2021 14:43: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 8C91861360 for ; Thu, 1 Apr 2021 14:43:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C91861360 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=ABc+W6DaGIr0bx0wDXu0dfIY3 fE6yJwkxxmXuM+OXwiiXiR2ycylLZFzOLT1Hdcdmxq5wRyPVXMImEbr1l5eMm/XZjdEloJNPzRp7H wHn/G0BkbK8aagOW4wRfj2OXO3r5TMeXxnu9txZqZqkg/qaauxV9XVIRbTVn4XTULds49mhQbsaMs 8vdddCCIxq2C2bpQjrv/Edrjl5wiBilWqWJkkaKAGyVRSzEAWtgqcq3CS3Qn/A1cVvkV31BWbvVCN vMgUHtTWtN71FYdlahyJYMgkHjajfhrgWLsF5uiyVCRQBK6E1aPC+5u3EAv/sHTJLydvEIekVZfNY xCyEDopjA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY4-009sbL-E2; Thu, 01 Apr 2021 14:43:52 +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 1lRyXy-009sZ9-MZ for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:48 +0000 Received: by mail-ej1-x62d.google.com with SMTP id e14so3233266ejz.11 for ; Thu, 01 Apr 2021 07:43:46 -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=cocP5aFSaDQz8YX9rCZCsYjT4pyAyRqKwmr4Mz497RoajsgGF2xqbQCtJ9O1AY1Gok ztzYsKCqUuhznyQHYNx2Ba6KCc28I3YlyUPf+rRN55qv+nTIwfMsXFpH1R+VsnczpIsn AHdxpAHTqlY7owm9DUO/EWWQc0gyCbJ84Ia71jjxSrFwE+HNkgTzErq5IJPuKGBXzjYT sxrjIr4B9GpD9yQvDcDIqYCd8CPisH9MTH4PUN8ypRhG7B0+q81iEIvldW03OaV/sYVY I+7YmjudeoZ+90m1q30mzvPcIALWSTMjdDS3lm7yhQaGuhM88R53g0IXZGctH+u/a4xD Wt6g== 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=ohTc+seafCFBvuFCgYQyB1o8IaJ1ySK1h5D8yiVOoYqetETvaqdU17WsCfefVrvkOk F5xPimq9PI42MEEK7Bi1aIGOkjSXh//6XJxc9xtrrR1qQyyoRl3Hsz7vEUYivV2aUfx+ slab7jaRMdeAsfCXcEesw9rd+TUzfQbZhGFTVESGtMdbHJomrBMNBebj6ilv+KeOUsdW +bX4HwOzXPU3FUiK77n3ui0HYGgNsoZ2MiLjq2dhZHbq6KSk3i9GGddX9uDmnPCtVw9E 4dUhg4wiz8I867NOyfAX5ZrC6sjRTGQllz5qz92P1Qm3Fy1YC/kmYhkEAJ9lHdRhQ1e8 teEA== X-Gm-Message-State: AOAM5317eW/UiVdj1GDS6hZ+IgVUUUUgJs6h2CWvDlLXa1ofpQZuOTn4 CBHbNYsKBxXLXVWHJL2IF80= X-Google-Smtp-Source: ABdhPJyVac4iu3IdmV+i/AHmGdiPnVtIYRQD5L8PxGyrsvDy5FaLQyPgzgxpLJNCatATCQIbVe94Ww== X-Received: by 2002:a17:907:37a:: with SMTP id rs26mr9422030ejb.336.1617288226183; Thu, 01 Apr 2021 07:43:46 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:45 -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 v4 1/9] media: hantro: use G1_REG_INTERRUPT directly for the mpeg2 Date: Thu, 1 Apr 2021 15:43:28 +0100 Message-Id: <20210401144336.2495479-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154346_848169_74F6B848 X-CRM114-Status: GOOD ( 12.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. 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 Thu Apr 1 14:43:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178183 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 52A8CC433B4 for ; Thu, 1 Apr 2021 14:44:00 +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 E14AE6135C for ; Thu, 1 Apr 2021 14:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E14AE6135C 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=EaRDegyil1EbLLzSj5BKwMmSo lqwr/6nbxJ0mttwtIuaAV6RzRRorjRqMhfIBmob9eRSNM5XWfKj1NRvQD1btEJb3SNjKPcc3sBogZ l/uDvRDnx7VzWF9WQklqFEnMVftgrMJTBk7TDcbFoiOsuCHTY6HycqEtIAHhj1QaoSVF3sMXHtqZt xVD174X6ar994VhRGvqEWrGawXxw/mySeccyavYGQBEzwBfjmZs/Tnvw6HMVcbwgZX4FD0h7AHfgd iVdCOaRcLBFQm80TINTyMJpqzM0BzabLu62vkcN6dBObsIYlTxLFfGDT4mNc2DtleEt5nw0/u1hvO a3r+vZviQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY6-009sc3-5r; Thu, 01 Apr 2021 14:43:54 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRyXz-009sZP-Mk for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:49 +0000 Received: by mail-ed1-x52e.google.com with SMTP id bx7so2222857edb.12 for ; Thu, 01 Apr 2021 07:43:47 -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=PQD/yD5wECUFHyUXqIIV6kgZEBoPNySiNLhipn5PaPgwdwqEZMV/JOvfNwzPouldSH yFOXRCAVF6syQpz1q+7SuyWq0t8aB+S2R6hVI6lPvSgIj0Vz9xLJhX9Np+Hd83JaFL1j sZc/f4pPcW6wIATINRATOVun4cyzKK6gw227gFRHkYanowJ3XWx3XF2pRq3aY/Wb2YkF uioaXeOOD+Ysm2m8u8tOPtHDwRtDggFO/wqsOfH8z4RJmtoBS0x3ClV5D2fZCan3rlYg iBqY65qefYhJQenmjxpCRpXrRRl6rN43jyjECL1ve0Fytry0wgQIkQ5x83nvxDtlSJET yuVw== 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=bx7Nv0M8w12xXCVAuAdMDJCCKKqqX2fhI+5iw+riWg8zpOu668f/W8AQZReCKwyGxP IDRi8EPxUjq1kTR8HuY1SUO/Hi0k2aCseD4RAV3m5oyZFKCQqSwAyt0biMxrQO3tjGlT CTqrW20GKss8a4cNwRMcmLBjEy5FlpOcFDSD+gP3xxhqPae2icEqrVj17e5CsNWq/7K2 NVm+lmRS5bcWBYlu0B2bCzoS0Nr1iPPbBT9/mBL3ie0J/xPcenaFcttbcUxW2MQGfwT8 ipzTzS1OyyvVK+vGYcuuP++LjTPfGrSA7OrM1XA2aUkvWVYyjs3Blp7DflYvbLp3FbH5 RlTw== X-Gm-Message-State: AOAM53099y57tvgP719zP0wf8P5MNkh7fXTZEaUG36ComByv0VOEO6Z5 ncm2FBmZbPvKTjUfoD5VY1Y= X-Google-Smtp-Source: ABdhPJys+1L+GR0Q8RJlO+aVJo1otlu7AICp0FPiPRQPvqFgdpuDu2gCuA6ngwmguDf6yWL4FXMWJg== X-Received: by 2002:a05:6402:3550:: with SMTP id f16mr10175223edd.134.1617288227200; Thu, 01 Apr 2021 07:43:47 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:46 -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 v4 2/9] media: hantro: imx: reuse MB_DIM define Date: Thu, 1 Apr 2021 15:43:29 +0100 Message-Id: <20210401144336.2495479-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154347_798664_BF80DC71 X-CRM114-Status: GOOD ( 11.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 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 Thu Apr 1 14:43:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178185 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 B1393C433ED for ; Thu, 1 Apr 2021 14:43:59 +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 443626135E for ; Thu, 1 Apr 2021 14:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 443626135E 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=S26qyM6xh0bZPhaa6cRfKl6aR mKl+5xn2945UpouSwzTDrV8AruMtkWIAuyxyY7Vs1imr3/r9q1FmV6efpXkFhhjYrrH4pYafoBseu t9MKPrEwqIKwI+oPqDjNeV+Q8rpeLQX/UH4Qb5h5TrBJ6UrOZy+ls+BhVd6CqOCS3AxwgK/N/P6yq 89Oizipl4t//By7N03iW90iNTDQ0+yAebvfAcN91I/ZHtKpY9bXc297rVMI6iNyam/wPArEjpRiar /XbVsk8kBsQb+5GSRa68+sLeV74m5ZmlcFSq2h3k8Op6f9+qc+w6myDgsFA2Wnp6Ws3r8c8G5P7vh uOWwViRKQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY7-009scm-5I; Thu, 01 Apr 2021 14:43:55 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY0-009sZi-MR for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:51 +0000 Received: by mail-ed1-x531.google.com with SMTP id x21so2256512eds.4 for ; Thu, 01 Apr 2021 07:43:48 -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=ppjMXHiKLN4nrgzpuZWnErAVl4VqKZhSm767onbkZd3jCkdF9RFeJcLceb3RjPrQP/ 0cRXkoEpt0a+YJ4pvQELXNYptTgiOZjodVCpqi/hdUOVJ7bly6TetsSrZJp2rG8n10LZ NVipJJUp6zrh944qg6i+6/y3xf+raLRS1kTntUju58niMldgO2LwSze05TjwaWeClZkH TdWXEi5vTK8EZKxw9cnM1rHgp51UMYq44cbMPaqXxKApsbnD47EPbqQXr1TrC4EkHvJ/ g7afBz7qMgp8U2UJt6Pw7wAaSVvBEUrPI+mbS1aZ22kH0Nx9bhrqLk06iZ/qgmmLh/Hh EBdw== 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=RB3ptmPRPFk+IxdLxygIl2dgqN3zMlL8T6VyIJPvKMbXIX/ThqvQMtvjUiWiSCNYjw 2fZ+alveGJXDIz0K+Rt2vvbQRGeFg+sWUrrJEAunFmdVFnVEMTx3AHsLDJS9ByUisamu jSW22+eb8SoSdbPpUdAGawjd3xEwl5RSOaEc6VCZp4yQrrJAzUG2D3PJdXpKLuaEYwP/ xRMD/Kd7qSHTcwBpdBhYwknvRM5PElzCMAfCEowCsdhETLIVtbkFJRv9lPcGJ1b/j6oy +oXlBEaSFokT4PW23xR769Iv2ZOCdgyNLCq5qy+jfHf/iOY3Xj9RgiDgkyTwnwD83NPj ECIg== X-Gm-Message-State: AOAM533xc4L8VIi7dzIbeLDFByBdAxxqbTILV4oarT866CDry8XPwh5X S0D/dEFQv3YL5N643Yjo0okiNEbX3eL9+w== X-Google-Smtp-Source: ABdhPJxDjWYWAJ6CH7cpMYUtIYM3bzWT+WYeumva0k/FHVEhLjz31ru+X9G8m029yNHv5J5ZNSvlWA== X-Received: by 2002:a05:6402:c11:: with SMTP id co17mr10540834edb.246.1617288228170; Thu, 01 Apr 2021 07:43:48 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:47 -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 v4 3/9] media: hantro: imx: remove duplicate dec_base init Date: Thu, 1 Apr 2021 15:43:30 +0100 Message-Id: <20210401144336.2495479-4-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154348_821392_AC9B3C83 X-CRM114-Status: GOOD ( 10.75 ) 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 Thu Apr 1 14:43:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178187 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 399DFC433ED for ; Thu, 1 Apr 2021 14:44:03 +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 BAB4261243 for ; Thu, 1 Apr 2021 14:44:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAB4261243 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=nBXH/uqQ3AssAArVKHY/PIJ/6 y908HzcbIQgMeH7iQH/ZruXphR7BstcP9Zf8ItCKapPTu1iUEf8BPVufS1DI1EtES3Rj+EWh2XNTS 84V8w+BL8M8vm47CCjUZwTZByFn+OTP9+hqo6d2kj/NEX/2P+T6vux4PI7S8Jx5COIkiqmrExATh9 snBglL87MtH4bpkfFogBlXZuWzA1FOHLA3MTiB04TCvHioQzbiiMOQRBXZMVA/B4m36i7NzED1Kui koD3xElV6GD48L9fE5nZvbP/rA0V0iaFdzAmaFuqdBjNXksgapnurvWHHpZwyPtB4jvB1krwWFI2F MyBfmLq6A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY8-009sdk-JA; Thu, 01 Apr 2021 14:43:57 +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 1lRyY1-009sa6-Rj for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:53 +0000 Received: by mail-ej1-x62b.google.com with SMTP id r12so3264894ejr.5 for ; Thu, 01 Apr 2021 07:43:49 -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=Yx8aJJF9roXhjRvDam2PZ/yiaGQfqO6XO6xisEn4pmEJrBCqSuW73+eIrydZ8+7iwJ 0Xt6ZBC77PaQOMtj4201lxCmu4wX/dkuj/RVa1r9XkwWmiRQb6dDdjmKsSQbv+vhRbPx u+dMeYQZJW7ZhTvkhNs+vIBwagNotIf8JBLoxszWk8De+6QZjAP8C6RE4vgaOtm3f7Y7 Ht+vr4bDq4zY16YByGONEw2LshCyJbFte7VvJjH4on84mLfs3NRKmcU6be1j6clerxf2 ReXUEyf+PGGKQ4JcBruu2oQMLxw6Rtm/+5TX4V8pdtTbTApFFhkUb38ZpCbFZPyCNd/k /U3g== 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=LFzUzkOsq+KQTKxxU5M9QRhnrnNWqm8BGwV0bMPyqIIvj7LO1/C3nICFYgWeZ/ilto CEF1FhbsZ3+m4PAl8wSdkGy6nlYe4bszvR11Pxtbh1yekvam40l1FSoqPMUzB0rw9q4d vez6XpijFKKcVw7s/di5MXzdTuSrBfu027CGEtS4L5hWIZsLWE1sBOFXImI4A8VRuaa6 48W1AgFWOISkR7VJWsjzUzcz/G902RLwDnqwUVRWYIhGVy65j1dA3/qtw95ZP9knU2wF hIIknvHPoqtN8oNjelzghRAiyxaLWjJ/LCtdgghFgyd+HtRXet2dAASHqhLUVsrzCcQX MCdg== X-Gm-Message-State: AOAM533B5L4B8ed8ggeKdeYn7i5DM3VNm1/9D6X0HK34NxXLc0ZMaat9 tHRNYhCGZOhRBZa0Sr50r6g= X-Google-Smtp-Source: ABdhPJzZowtT7P8Uk03UXsaDI9qXGEjJgDB6omDUiNF5Lwe4cohmebQyyy0VbSRa7O5DF0gjk8/Vyw== X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr9157045ejc.133.1617288229379; Thu, 01 Apr 2021 07:43:49 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:48 -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 v4 4/9] media: hantro: imx: remove unused include Date: Thu, 1 Apr 2021 15:43:31 +0100 Message-Id: <20210401144336.2495479-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154351_843638_D75B74F5 X-CRM114-Status: GOOD ( 10.43 ) 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 Thu Apr 1 14:43:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178189 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 DAFD5C433B4 for ; Thu, 1 Apr 2021 14:44: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 65D066135E for ; Thu, 1 Apr 2021 14:44:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65D066135E 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=hddG+Ej4Sl+AIV/66i0gJeo6K WoW0rch38Rc8AIacJy9+5M7W+viHPQKnWaD9VM4AlYF+ORTKdxnIzNVhBxxzBn3dWmR9xnW3eRYhB HKFR3GjSlmRSNsAu9Bb5dR6yvweIM1377JpN/hZskmCMxGM+P1cv6QHELytMRwCdSlGgR16rouYL8 cDp6f8sQhtBu2EgeNu5RXWFrwGh2lU2reP8Ci0SK+v7JHq4XiXpV1VZ6nJZablV84gqfPEiE+NMTU QQNmGfPR89wxycGzY2V5Sn9aPSbygG34MYN3/lrtNBQOBsHwWVijZOuvhZWIPrQqc1REAL/KwNTa7 l8Mm4NKDQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyYA-009sfJ-Rz; Thu, 01 Apr 2021 14:43:58 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY3-009sa9-1j for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:53 +0000 Received: by mail-ed1-x52a.google.com with SMTP id h10so2221271edt.13 for ; Thu, 01 Apr 2021 07:43:50 -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=srOwqToty+vlDNm7oWtGDR2rnfrMWI9xJ/AbSrtKPS6ImnqjGhLG4EF5aj0htMsX+m 6ZzqPZuGSwy++hrcbJqmzOiAV6L4AFMvuwQIYYejhQVV6xLcLjQgA1bjYAnO7vVNm7Od 3JcGJJ+rvbkXtDVlK3U2lQ4PRQ+J9jwyIejQqDC4nPseYN92yjwErLnsI6ff9U52E0Ib XlY3RLi30q7jfkGGOnTEOnW9DBltSSL9CWl93FRNAZmiAB2yGzb5vIeLmDwpnUaa8FDS rXJiKcSW4tDPKW4wnWdMZmMy45OLwDf6wc5zxXDN4BE6lauX8r6NG0CRDWuyufmoVO9V W8Gw== 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=VQHZPST71tcng0oh0jjxu/kBxnWWEQqO7Ct/VVdTqmTgcMqGQHX+vDB6RD+dZjvNku PkMzzngxM2eyblZEIozez1tYq2secUTdg/ZGF/FmaPXrrIQ/qRERan4uHJ8iY2GDMLt/ nIV7MgvJyUTIJRAV438CrH8qmZg0bJ+KqPwWwFeJWG8zAhjXoYCKPF2PWnZ3+qXK4LI/ 6ScvwkrCRuYNKJ3SYyWVcY2ntCaA2VtQo5eVMpw3+5zbEO9/YQdrgYCKWY3zy4/6BHwN sHBBF5+uECL+f18dhRQQMpRieHbl8LkzZIKFXBiLZpzH8NCuv3KDnIMy3naxcDWVS6/8 QW/A== X-Gm-Message-State: AOAM530Zw3ghFCgD0IeXuM+B/rHgRotggvyyyuy/LfOW6Ipl7nyholeb IYLgbPOGOBh82TU6Lb5euos= X-Google-Smtp-Source: ABdhPJzRF3IZ7eUDkITHBb5jDzzgzF/Uytq1qkOWxgyKdzjQJXYQ75EK0bm6BTY2xxVf/P8SRYopRQ== X-Received: by 2002:a05:6402:447:: with SMTP id p7mr10216224edw.89.1617288230479; Thu, 01 Apr 2021 07:43:50 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:50 -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 v4 5/9] media: hantro: introduce hantro_g1.c for common API Date: Thu, 1 Apr 2021 15:43:32 +0100 Message-Id: <20210401144336.2495479-6-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154351_731126_1ED76B81 X-CRM114-Status: GOOD ( 19.63 ) 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 Thu Apr 1 14:43:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178191 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 AB23DC433B4 for ; Thu, 1 Apr 2021 14:44: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 3E63361243 for ; Thu, 1 Apr 2021 14:44:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E63361243 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=+rnwskfsXLOV1v3DJhJ0QMpj751n+y7hNGPGJ/GvwEk=; b=gOr5aLU6MNEzS6CgjZ39Qe/+P NnQG0jq30cced/Wtje7vLAeLGJT4bjS6uGvunc99dH1rIzEmXHnewTEHIdZyMGaP5VhApaYK/79Nt z6BtX+koYiMucuBsx/O4Exquu0Sjx5Rym2oMx7c4bL02zWpmCcUUAVHTqZhlWN1UW30fEMf2f6RvP b0BAR3VD3PiyFepJJGc7WjfFuROSoVw67c4WkCYHgBKmHq0uNfEEc+d/tPdIhAP9bKBWg1XbAbFQ6 3WGKb9h/WAaqO3EMzBNGYZKGqKHKyfvRkNo2spAm6Zd+dz9NTei6mdS4VkBEXFICT5ejyyytzWQgv HJMrV1EFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyYD-009sic-El; Thu, 01 Apr 2021 14:44:01 +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 1lRyY4-009sam-7i for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:55 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a7so3277006ejs.3 for ; Thu, 01 Apr 2021 07:43:51 -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=yig8wQrnDjVWOaduCo+gf0ULa0HF9/VzKj4q+s3NOg0=; b=iA+jBF2AtdizxHuy6c1WTy36heCgpdHTHOf9wlsxGeKwSk0QQNSASMsUO7mCWDk787 8JpJFk+POrnc74pOlD/EjNy+B84xWf1phARmPuKUTqd4/nkgM096fBJXPHc+wU4OKmgd 6eOQMdiThCGfRHwcso19u/zOpf/S83/cwVKvly6BldkWSvJqzbpfuPUuW3UAcamoemOP 5TH1Q6BMRcE6Buf2ZPqrqiJLioBl4liOwcSa++y93XJG1it1yKDcYMKK9d4eVHHfRqpw RlZgg74OEdMoFuePFswqUDrdKJPG3chO38RIJPVkBmvNnDbPa0yFyMvGXzurr62fUfx2 p2lA== 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=yig8wQrnDjVWOaduCo+gf0ULa0HF9/VzKj4q+s3NOg0=; b=ARbZkhP8tRC/nHV4c7i5gBB/WCRzgSk3wJBrpj/AfZ2AbaGGnyDYKuCJy0s2s/7AYq 101W5j3xTzc0TMpKgZJzBWlbxPeO8gm5u3uG+fG3m8Ddv+FE+hBP2E10AmDVQ6sa05zZ AOA44/eVHsbhzpRoBWOgHIUCX+CxOk2+rfrTUkwsrmxGJqlpOJP/kb4nWX0K16vJAhlF EmKvyYBxG9/1/MN1Wh5f2w9rm522RNlo21q0Fh+o6kH4HK1fTwi7JSV/ShNQbt5GCICN 5sJTCtc6gHVgOC0QNLWbhR+H556yINY7UcFz2jPEJCkNGXafw7kOWVQgzHBfOKx+Ygyx yg8g== X-Gm-Message-State: AOAM5335GsTq8JrmksJLLfQ9Btd2IqLsc0YHhLlqd7GMDGr5Ry+EmRsj FQ8DgRmZlsw0kUt7C4DFdFE= X-Google-Smtp-Source: ABdhPJzFfoNll0q3Uy/syhJ58IU7DBgEtCbBIxOU1O6lmNSDG0VhWTV+qaqNKijHJgm81V4lUHRLOQ== X-Received: by 2002:a17:906:130c:: with SMTP id w12mr9410734ejb.253.1617288231693; Thu, 01 Apr 2021 07:43:51 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:51 -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 v4 6/9] media: hantro: add fallback handling for single irq/clk Date: Thu, 1 Apr 2021 15:43:33 +0100 Message-Id: <20210401144336.2495479-7-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154352_374780_B6FE0964 X-CRM114-Status: GOOD ( 16.81 ) 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. Keep the names within the drivers themselves, but don't use them when only a single entry exists. Instead use: - num_clk == 1 - devm_clk_get(..., NULL) - num_irq == 1 - platform_get_irq(..., 0) Suggested-by: Ezequiel Garcia Signed-off-by: Emil Velikov --- v3 - New patch v4 - Drop WARN_ON, guard on num_{irq,clk} instead (Eze) - Drop Nicolas ack (Eze) --- drivers/staging/media/hantro/hantro_drv.c | 37 ++++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index e5f200e64993..a51700a9e3b7 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -752,12 +752,23 @@ static int hantro_probe(struct platform_device *pdev) if (!vpu->clocks) return -ENOMEM; - for (i = 0; i < vpu->variant->num_clocks; i++) - vpu->clocks[i].id = vpu->variant->clk_names[i]; - ret = devm_clk_bulk_get(&pdev->dev, vpu->variant->num_clocks, - vpu->clocks); - if (ret) - return ret; + if (vpu->variant->num_clocks > 1) { + for (i = 0; i < vpu->variant->num_clocks; i++) + vpu->clocks[i].id = vpu->variant->clk_names[i]; + + ret = devm_clk_bulk_get(&pdev->dev, vpu->variant->num_clocks, + vpu->clocks); + if (ret) + return ret; + } else { + /* + * If the driver has a single clk, chances are there will be no + * actual name in the DT bindings. + */ + vpu->clocks[0].clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(vpu->clocks)) + return PTR_ERR(vpu->clocks); + } num_bases = vpu->variant->num_regs ?: 1; vpu->reg_bases = devm_kcalloc(&pdev->dev, num_bases, @@ -785,13 +796,23 @@ static int hantro_probe(struct platform_device *pdev) vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); for (i = 0; i < vpu->variant->num_irqs; i++) { - const char *irq_name = vpu->variant->irqs[i].name; + const char *irq_name; int irq; if (!vpu->variant->irqs[i].handler) continue; - irq = platform_get_irq_byname(vpu->pdev, irq_name); + if (vpu->variant->num_clocks > 1) { + irq_name = vpu->variant->irqs[i].name; + irq = platform_get_irq_byname(vpu->pdev, irq_name); + } else { + /* + * If the driver has a single IRQ, chances are there + * will be no actual name in the DT bindings. + */ + irq_name = "default"; + irq = platform_get_irq(vpu->pdev, 0); + } if (irq <= 0) return -ENXIO; From patchwork Thu Apr 1 14:43:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178193 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 AA213C433ED for ; Thu, 1 Apr 2021 14:44: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 3988A6135C for ; Thu, 1 Apr 2021 14:44:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3988A6135C 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=A/oAuTcDEExsZLLwoaPsmatGHcjdasZfGCCoxDEFAUs=; b=ltcpQu5dONWEjrcd+hqjX55Ya gHIUpvWPdP5Y1kqgpTICHwthxDd6kSLVnV/EqC+xe74FvXSGST00SLG6ixx+RmeEuTg8aifhoWaGa cGDO1Ji10ICgIR28klyG8YMX+xlkwaxg5QclLecb6vqeMty/xerrZeH2FQj4Q/cO9oSXqJD1BMSLC XM+kTu7uR8NOlGp/rk/wvSk5mhA0BdF3aeYZF7ZbBpLyoJqIVKtElrqyZUlD8+p8oV5ch9LIT3Duw ta03z9/mhh47+nhuX9Z2uZ7WpWOW788id1mXKIfFnS1v6a0x8/fbBlHYKkLFEth1eQFgpqwty4M0o hbKajA1/A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyYG-009sk2-7C; Thu, 01 Apr 2021 14:44:04 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY5-009sbW-9G for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:55 +0000 Received: by mail-ed1-x529.google.com with SMTP id b16so2246074eds.7 for ; Thu, 01 Apr 2021 07:43:53 -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=zwsGjPkGaotb7ZsEBdVviG/LoubldrQow2Hx2iAHbwE=; b=YK9lS4PpBN7LGEGrmVF8+znEyHLBPKMqx2R/SKS/iwLgZ5fXdYKxWw6+C5sTRtIcDn 3zXqJdCda3Lu9rx5y9nvU9/uV3eNxIayG5kPoh6NnMCf/BR/ayCBbvZ/y3Apm0Mbi+nL cN9/DhcY6TjrCgSutBEjpzMGFYDXOUAdgJOJ2IefDsRlpFFkp4HjIMBljIa5NJ3L+zpY Y342/+xjQ0Rn/LsQqvL5jkEOC4bUGlAZFaDBv5VmUkCEdVfy6OqlfhPnJLVh4//WGfxT NF9WGSLJ+UNUjB1UTx4sCD1AEx6z3SO/Zw7FP6SxcB4iaI6uExqR8Lcb1yFGLjC3v3MU 3iJQ== 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=zwsGjPkGaotb7ZsEBdVviG/LoubldrQow2Hx2iAHbwE=; b=gT7twUm2AYUTlw+NLVxGTOfxbwN5Jbd+RkaR5KjRNjSjWc9oRbL+jM92GjuCEWcjQ9 Rj782sO3k1jjEeLvS8wqJZvLzaoNnSJ8XuGOoJOGtLpKUlVZ1qswg4ulcsD6tuU0gpjD 2fvmBRCZL3rBkfphlEyBpWhZMjWlnA/fPyG0td81QPkroQeNBPPDL2FE0RxAizlsLco/ lkUsayJ4TQkgU+Vfl2jZ5kiZ0w3DLANqxtpreZXwcD0vnizX0L9So9heSeDwB85odlA7 NGkgsaD2rmozG74e8zSn25yTsCYfU0Swa9HjG6f382+3vcIrhds7GJfn1KRcxsOPRoFe O3BA== X-Gm-Message-State: AOAM533q3MaEdBV+EvM5c2pYjOqPMlmcmhNJ7n+9px6ByZEpxxayUIG+ 4BrK6rcm7pY6cykpIxg7ur8= X-Google-Smtp-Source: ABdhPJwBbLjtIbBVsJtEeHpWiTusAcMdb8YSew0NSa1mi5jvshz5skGyCYGE4G/achcpGOpDVB6+HQ== X-Received: by 2002:a05:6402:31e9:: with SMTP id dy9mr10423951edb.186.1617288232742; Thu, 01 Apr 2021 07:43:52 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:52 -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 v4 7/9] media: dt-bindings: Document SAMA5D4 VDEC bindings Date: Thu, 1 Apr 2021 15:43:34 +0100 Message-Id: <20210401144336.2495479-8-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154353_448078_81A4F611 X-CRM114-Status: GOOD ( 12.07 ) 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 Reviewed-by: Rob Herring --- v2 - Newly introduced - s/Atmel/Microchip/ (Nicolas) - Drop leading 0 in node name/address v3.5 - Drop interrupt/clock names (RobH) --- .../media/microchip,sama5d4-vdec.yaml | 47 +++++++++++++++++++ 1 file changed, 47 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..4b77103ca913 --- /dev/null +++ b/Documentation/devicetree/bindings/media/microchip,sama5d4-vdec.yaml @@ -0,0 +1,47 @@ +# 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 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + #include + + vdec0: vdec@300000 { + compatible = "microchip,sama5d4-vdec"; + reg = <0x00300000 0x100000>; + interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 19>; + }; From patchwork Thu Apr 1 14:43:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178197 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 E3D19C43460 for ; Thu, 1 Apr 2021 14:44:12 +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 82EE661243 for ; Thu, 1 Apr 2021 14:44:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82EE661243 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=FnxqTDGMswfYJFyjcCFAm3PUr+RGyHSABxlLx13RVbY=; b=qn+hZiLLqWHhqLGQMhlmqX2Uq ksfYuEM4UmxAX+m8ZxmpU+hv3Mbqg1o9lDTSO9/AlhpsjrFJKGZcGMPzd1TgAHk4Xg8AxMCey0+cF L1i/1TqcTTvaZDfpdT9gUx9dLHNv92Nz0myd6ueBnqVt1nxL7wY7O/gvM8x5bjilJsX3I8tXW/Fn0 UdKL2gCgXdvCbTewD9NT8CvjjWM0zNm46E0VJwl1kzBAtOadHYGHX5kJ/+slw5Gs7NC43txtdyEGO ++nscL7M+wNV7Kc6oZAWzhdfit5Cd7/5kUkATTxZ5SCRm7ogcttsuvRUBgJsbJPL0XhLRBOnSAIPK fe+qa/0sA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyYH-009skc-6h; Thu, 01 Apr 2021 14:44:05 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRyY6-009sc4-HB for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:57 +0000 Received: by mail-ej1-x631.google.com with SMTP id u5so3255252ejn.8 for ; Thu, 01 Apr 2021 07:43:54 -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=SEaAjpZRZU1S/zHuK6dI0CmdeojHND8RGsU2GYWDib8=; b=RgElAeOZYoFDNxKoK3v4YG+1YojY29SrgvOMgwYxRcBMbN4gyI9IzO2U5C+w7hmYEQ rl8Rv3XJ1RqILdh7hVpsSuRjwF9tNKE6rtNE7MdfU8viJpmyO+Ejw7izpXt9uDW/jvlZ eluHwDLxm7gq4G020YsRhBLKqtrJFFYqY62Ko+AJYHPMFVHO7p68GhG7tmGoA9YtT2lu p+4fnDPbzAJmzEw+O+4Ye0pcNpIX8Fx0wbZRQCpjwEBOUP4JeMUngN8JFHcQWyMYc2Mr Osp5hm7biMwmZ28vYCEEL7FrhMiu6SAdOWdHqdyEaE7Y+BAYqj7+M58TRV7QP0dvJoyR /H/Q== 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=SEaAjpZRZU1S/zHuK6dI0CmdeojHND8RGsU2GYWDib8=; b=qxpRNSe0WUIAMrKkRe2IlDahEA6PXzK2YZGXvJZcqUja1pQNP+ja4gv8aqQk0m8z+P M13BEY23hG2wqfB9fAH1Bdvyww/Y1xgnJkcyPeAA/5sFvYeWS/2RvjtNUd3xBLkg6ygo Hi3awIyyj3KYZUosRWyRKoSQogjqLTAq1YBTFiMJWYAPMt2hGclfkx1b4F6E3nJFA1mb xrxiTYDjo3LtOxKobSmhxU3jeTOVUU1u0jxuqXB5SZtWn2vEsPcsx7juR5QQWhPaR1ow e5alasZq/N6dPbz0rESb0j0WQSY1CO2qSAofO/m/CfB91f0fBAdDU8vrX7fV7N5+hLEh z94Q== X-Gm-Message-State: AOAM531c0PK+0AuB+h5u7FBzTsaOmbkwBAEcjVsLsrttAblY+z5Cj7Uk UL2xvsHqQUvp34/DRhoAvr8= X-Google-Smtp-Source: ABdhPJynUALfPH1bII+UDwU2NWuqjTwL8Jxc6lt4YphGSUSngAhil/8XWM4XKx4YrHJpmPNDl2urNg== X-Received: by 2002:a17:906:32da:: with SMTP id k26mr9412132ejk.483.1617288233986; Thu, 01 Apr 2021 07:43:53 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:53 -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 v4 8/9] media: hantro: add initial SAMA5D4 support Date: Thu, 1 Apr 2021 15:43:35 +0100 Message-Id: <20210401144336.2495479-9-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154354_685835_7ECBF2FB X-CRM114-Status: GOOD ( 20.31 ) 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) v4: - Reinstate clk/irq names (Eze) --- 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 a51700a9e3b7..3b39b4377fd5 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..58ae72c2b723 --- /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[] = { + { "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), +}; From patchwork Thu Apr 1 14:43:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 12178195 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=-10.9 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, UNWANTED_LANGUAGE_BODY,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 2A51FC43462 for ; Thu, 1 Apr 2021 14:44:13 +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 C1AAF6135C for ; Thu, 1 Apr 2021 14:44:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1AAF6135C 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=KtLNxYPLeUy7QI/LTtKw6eAnJ Cy+N8GxTX5MlZcyO4WZ3maAarvbYOimp0q/SMAg6mVP2Ozpk2GuWnGwHk3RIAdmfw7lIFc4mRyao4 spXYEnzWpSvVflUvmnQyCz4kh6KuKjCxWBK84ciikhrxjo7hLGlP8WDK1VyRHO1lNbrSTX+c1z8R1 2BnbMVSn2+ZyBwkDB4D422ZLAGzDWqKSNAMUrTu+z8cipYaJBlcyaE4fh8+lqeF6d/Mxf35liPvHp /GAiALyxk63WE0FiNAZ6Up92vFuTVLy48nS706YVBIWnlulFvxZMbRtFMyiEkt2lWEVFmgr5HfPi7 IXfWEYQTg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRyYL-009sm5-1Q; Thu, 01 Apr 2021 14:44:09 +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 1lRyY7-009scl-86 for linux-rockchip@lists.infradead.org; Thu, 01 Apr 2021 14:43:56 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a7so3277281ejs.3 for ; Thu, 01 Apr 2021 07:43:55 -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=GDJXTN0HFj6eVKPH5TMDm6NIGcjzfywnofpIQvY30/bpMclQDTYXhbqaRs7Ct6+xEU arM9lX4UMRhxGi5yCMBxEeObbwH76zyTY+uTeURueKMwawjX7uS1bs+z08TTfo25mqNL u77h961Ii+Mq29Xzlj58mKsWMvLPpOzDc4AZTWVa36AS1/oS+L/vD7nw9mpz990Wh+ga 4a/5Qy5s1uXhMSPvTz08ISCpkiC+8QB7ngcorzxToBFRJ4U2crSuPDDiZMdzSsNn9n1y 8OQRxhEPiiuNFjM9G1vcuE8GMRICguqgOjbsVodi+yCBZHuHWwvNrYJwXkF5dOh8X49M xpqQ== 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=BbasUwD7s+/mT8VcMAoeApeNaR3wDHlkzwMkH2jVA/vcNXd+bnjcZyHSZYbV/bQNKE wxq/1m7kcC6WnhsnD1fAvzP/dFb0TQFchUSf5ISJKBtJlHQQ7b6fxDO8n/HBB+fH8BPC /DXGAT1Ig/IEKHTEVFAP6SsDOIkCUjZNAwMqFOwxVnoBF4JgLVVweMQrh1MKiFehwGuO iEm11avljsJT9JaD9fiAxuoUobL0H+r+2LKLK+yH3v3XxzJIgVc0XsvET653QuGHccCI jZgo2cnURnx8/GDuLeX5XgSxvmg84V6klGZvkgQ38muJYb4mPWY8BKbxykhg1MP1ySj4 OYyw== X-Gm-Message-State: AOAM530eUcNAqtpmr4eAmrN61QMpFV2W0oJI0niqDI4LIXgQ4od1GXd8 11JhSBLtVI1m2imFqeRG0Zc= X-Google-Smtp-Source: ABdhPJwEdgYTRpOzaOCZ20hnOAYuVxYiUwWxcYARQTiQhaUcIT3j3xfkvUdqsKyHyPAV7qD+3Tda3A== X-Received: by 2002:a17:906:aed6:: with SMTP id me22mr9618958ejb.146.1617288234968; Thu, 01 Apr 2021 07:43:54 -0700 (PDT) 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 nd36sm2854950ejc.21.2021.04.01.07.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 07:43:54 -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 v4 9/9] ARM: dts: sama5d4: enable Hantro G1 VDEC Date: Thu, 1 Apr 2021 15:43:36 +0100 Message-Id: <20210401144336.2495479-10-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401144336.2495479-1-emil.l.velikov@gmail.com> References: <20210401144336.2495479-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-20210401_154355_413488_A4773DB4 X-CRM114-Status: UNSURE ( 9.22 ) 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