From patchwork Tue Jun 20 00:03:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13285029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E63EEEB64DB for ; Tue, 20 Jun 2023 00:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=x1lNKE2Xj4UdhnGYLdaBkIJSLP1DcsW/wHZqk3oE/2E=; b=fWo3isSRKfUjJE I8AESWGdU35KLiXq+mVZJlg41U6s4RuP65CL9yL9eEpuvQac+UWOak0MedmxWAbIeUhEAT+oxEM3F 7azXnP6bkVb4kaulPjr/ZoTeYaNOMU+PhTNgOwkQAnUaaWm6De4Dt/R+LbF4vNlmC5/hueiNb7NmD XTguoldyjySasf4g92eGxuTicHrB0pomNDsRMAtUB8fsgoxc23n/HQDmo7EcJ3LKLWzJfYQhEOSYz 7BOeqeFT4pkVdVZyYcCm2A28AiRwP8kgopG7O/dqV/ROO1ba3099MrDhj3z3dRJnEK//nf9gJmQ9V 3k3Bj+x/TNM4zX3Z4sEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBOqu-009iWX-0r; Tue, 20 Jun 2023 00:04:08 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBOqr-009iUp-1u; Tue, 20 Jun 2023 00:04:07 +0000 Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id E4FC56605992; Tue, 20 Jun 2023 01:03:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687219439; bh=dRdASRjcg3gh8xdvmAjk5IeDVNUJ5py/Gpoxgpqy9mM=; h=From:To:Cc:Subject:Date:From; b=c2E96qafu1qO5q5VvpdtSbfzvaJQJ/BYXbg1YV3/zV3XEg94ANjku3aPaOBpd1VNu FFyr9eVuYPxoASrBzh3WqKv2UAM6PdEob2sUpK/3SB1U0X3I7HCw54DQj6XY6kL2VV mGVjV4ql2soeAUhDL17nF8CvAWe1LBUiHVWpe1xO/2vhAVddRSiUNx+ufQn2p+A+Zq EzvU0M/VewaI8oUYn0PQv9+1/UygIABJNvE8I45ZtE862nBPhGcvkychinTaIoE1J3 JqEiP1yBVjLxZVHcKSaPyrodhKXabm7jhhE2ugQb/ozFLhtNf9vOAOH7ZEiLfsopJR WiZIlby23js5Q== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Matthias Brugger , Hans Verkuil Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Andrew-CT Chen , Conor Dooley , Krzysztof Kozlowski , Mauro Carvalho Chehab , Rob Herring , Tiffany Lin , Yunfei Dong , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 0/6] Enable decoder for mt8183 Date: Mon, 19 Jun 2023 20:03:33 -0400 Message-ID: <20230620000349.2122191-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230619_170405_776233_A0FC99CB X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series enables the hardware decoder present on mt8183. At first glance, the only missing piece is the devicetree node for it, however, simply adding it as is would cause an address collision between the first register iospace and the clock-controller node, so a rework of the dt-binding and driver, as well as addition of a new syscon phandle property, were needed first. Tested that H264 decoding works with the hardware decoder on mt8183-kukui-jacuzzi-juniper-sku16, giving a fluster score of 98/135 on the JVT-AVC_V1 test suite. And ensured other SoCs (MT8192 and MT8195) still work as usual. Changes in v3: - Switched the handling of the VDEC_HW_ACTIVE bit to use a syscon instead of the 'active' clock Changes in v2: - Merged commit 1 (media: dt-bindings: mediatek,vcodec: Allow single clock for mt8183) into commit 3 (media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183) - Further constrained properties in dt-binding - Added CLK_IGNORE_UNUSED flag to active clock - Reformatted reg-names in DT node NĂ­colas F. R. A. Prado (5): media: dt-bindings: mediatek,vcodec: Allow single clock for mt8183 media: dt-bindings: mediatek,vcodec: Don't require assigned-clocks media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183 media: mediatek: vcodec: Define address for VDEC_HW_ACTIVE media: mediatek: vcodec: Read HW active status from syscon on MT8183 Yunfei Dong (1): arm64: dts: mediatek: mt8183: Add decoder .../media/mediatek,vcodec-decoder.yaml | 69 +++++++++++++++--- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 30 ++++++++ .../mediatek/vcodec/mtk_vcodec_dec_drv.c | 71 ++++++++++++++++--- .../mediatek/vcodec/mtk_vcodec_dec_hw.c | 4 +- .../mediatek/vcodec/mtk_vcodec_dec_hw.h | 3 +- .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 1 + 6 files changed, 153 insertions(+), 25 deletions(-)